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,8 @@
|
|
|
1
|
+
// o-media-card: Media card (Figma "Main Cards" > Media card): picture, play button, title bar at the bottom.
|
|
2
|
+
const props = {
|
|
3
|
+
image: { type: String, value: '' },
|
|
4
|
+
title: { type: String, value: '' },
|
|
5
|
+
subtitle: { type: String, value: '' },
|
|
6
|
+
play: { type: Boolean, value: true },
|
|
7
|
+
};
|
|
8
|
+
export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest}from"../common/tslib";import{MessageType}from"./message.interface";import{getInstance}from"../common/utils";const showMessage=function(e,s=MessageType.info){const{context:t,selector:o="#o-message"}=e,n=__rest(e,["context","selector"]),r=getInstance(t,o);if("boolean"!=typeof n.single&&(n.single=!0),r)return r.setMessage(n,s),r;console.error("Composant introuvable : vérifiez selector et context")};export default{info:e=>showMessage(e,MessageType.info),success:e=>showMessage(e,MessageType.success),warning:e=>showMessage(e,MessageType.warning),error:e=>showMessage(e,MessageType.error),hide(e){const{context:s,selector:t="#o-message"}=Object.assign({},e),o=getInstance(s,t);o&&o.hide()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var MessageType;!function(e){e.info="info",e.success="success",e.warning="warning",e.error="error"}(MessageType||(MessageType={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import{MessageType}from"./message.interface";import props from"./props";import{unitConvert}from"../common/utils";const SHOW_DURATION=400,{prefix:prefix}=config,name=`${prefix}-message`;let Message=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties=Object.assign({},props),this.data={prefix:prefix,classPrefix:name,messageList:[]},this.index=0,this.instances=[],this.gap=12,this.observers={visible(s){s?this.setMessage(this.properties,this.properties.theme):this.setData({messageList:[]})}},this.pageLifetimes={show(){this.hideAll()}},this.lifetimes={ready(){this.memoInitialData()}}}memoInitialData(){this.initialData=Object.assign(Object.assign({},this.properties),this.data)}setMessage(s,e=MessageType.info){let t=`${name}_${this.index}`;s.single&&(t=name),this.gap=unitConvert(s.gap||this.gap);const i=Object.assign(Object.assign({},s),{theme:e,id:t,gap:this.gap}),a=this.instances.findIndex(s=>s.id===t);if(a<0)this.addMessage(i);else{const s=this.instances[a],e=this.getOffsetHeight(a);s.resetData(()=>{s.setData(i,s.show.bind(s,e)),s.onHide=()=>{this.close(t)}})}}addMessage(s){const e=[...this.data.messageList,{id:s.id}];this.setData({messageList:e},()=>{const e=this.getOffsetHeight(),t=this.showMessageItem(s,s.id,e);t&&(this.instances.push(t),this.index+=1)})}getOffsetHeight(s=-1){let e=0,t=s;(-1===t||t>this.instances.length)&&(t=this.instances.length);for(let s=0;s<t;s+=1){const t=this.instances[s];e+=t.data.height+t.data.gap}return e}showMessageItem(s,e,t){const i=this.selectComponent(`#${e}`);if(i)return i.onHide=()=>{this.close(e)},i.resetData(()=>{i.setData(s,i.show.bind(i,t))}),i;console.error("Composant introuvable : vérifiez selector et context")}close(s){setTimeout(()=>{this.removeMsg(s)},400),this.removeInstance(s)}hide(s){s||this.hideAll();const e=this.instances.find(e=>e.id===s);e&&e.hide()}hideAll(){[...this.instances].forEach(s=>null==s?void 0:s.hide())}removeInstance(s){const e=this.instances.findIndex(e=>e.id===s);if(e<0)return;const t=this.instances[e].data.height;this.instances.splice(e,1);for(let s=e;s<this.instances.length;s+=1){const e=this.instances[s];e.setData({wrapTop:e.data.wrapTop-t-e.data.gap})}}removeMsg(s){const e=this.data.messageList.findIndex(e=>e.id===s);e>-1&&(this.data.messageList.splice(e,1),this.setData({messageList:this.data.messageList}))}handleClose(){this.triggerEvent("close-btn-click")}handleLinkClick(){this.triggerEvent("link-click")}handleDurationEnd(){this.triggerEvent("duration-end")}};Message=__decorate([wxComponent()],Message);export default Message;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-message-item":"../message-item/message-item"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<block wx:for="{{messageList}}" wx:key="id"><o-message-item id="{{item.id}}" bind:close-btn-click="handleClose" bind:link-click="handleLinkClick" bind:duration-end="handleDurationEnd"><slot name="icon" slot="icon"/><slot name="content" slot="content"/><slot/><slot name="link" slot="link"/><slot name="close-btn" slot="close-btn"/></o-message-item></block>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={placement:{type:String,value:"bottom"},align:{type:String,value:"left"},closeBtn:{type:null,value:!0},content:{type:String},duration:{type:Number,value:3e3},gap:{type:null,value:12},icon:{type:null,value:!0},link:{type:null},marquee:{type:null,value:!1},offset:{type:Array},single:{type:Boolean,value:!0},theme:{type:String,value:"info"},visible:{type:Boolean,value:!1},defaultVisible:{type:Boolean,value:!1},zIndex:{type:Number,value:15e3}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest}from"../common/tslib";import{MessageType}from"../message/message.interface";import{getInstance}from"../common/utils";const showMessage=function(e,s=MessageType.info){const{context:t,selector:o="#o-message"}=e,n=__rest(e,["context","selector"]),a=getInstance(t,o);if(a)return a.resetData(()=>{a.setData(Object.assign({theme:s},n),a.show.bind(a))}),a;console.error("Composant introuvable : vérifiez selector et context")};export default{info:e=>showMessage(e,MessageType.info),success:e=>showMessage(e,MessageType.success),warning:e=>showMessage(e,MessageType.warning),error:e=>showMessage(e,MessageType.error),hide(e){const{context:s,selector:t="#o-message"}=Object.assign({},e),o=getInstance(s,t);o&&o.hide()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"../message/props";import{getRect,unitConvert,calcIcon}from"../common/utils";import{isObject}from"../common/validator";const{prefix:prefix}=config,name=`${prefix}-message`,SHOW_DURATION=500,THEME_ICON={info:"info-circle-filled",success:"check-circle-filled",warning:"error-circle-filled",error:"close-circle-filled"};let Message=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-icon`,`${prefix}-class-link`,`${prefix}-class-close-btn`],this.options={multipleSlots:!0},this.properties=Object.assign({},props),this.data={prefix:prefix,classPrefix:name,loop:-1,animation:[],showAnimation:[],wrapTop:-999,fadeClass:""},this.closeTimeoutContext=0,this.nextAnimationContext=0,this.resetAnimation=wx.createAnimation({duration:0,timingFunction:"linear"}),this.observers={marquee(t){"{}"!==JSON.stringify(t)&&"true"!==JSON.stringify(t)||this.setData({marquee:{speed:50,loop:-1,delay:0}})},"icon, theme"(t,e){this.setData({_icon:calcIcon(t,THEME_ICON[e])})},link(t){const e=isObject(t)?Object.assign({},t):{content:t};this.setData({_link:e})},closeBtn(t){this.setData({_closeBtn:calcIcon(t,"close")})}},this.lifetimes={ready(){this.memoInitialData()},detached(){this.reset()}}}memoInitialData(){this.initialData=Object.assign(Object.assign({},this.properties),this.data)}resetData(t){this.setData(Object.assign({},this.initialData),t)}checkAnimation(){const{marquee:t}=this.properties;if(!t||0===t.loop)return;const e=t.speed;if(this.data.loop>0)this.data.loop-=1;else if(0===this.data.loop)return void this.setData({animation:this.resetAnimation.translateX(0).step().export()});this.nextAnimationContext&&this.clearMessageAnimation();const i=`#${name}__text-wrap`,s=`#${name}__text`;Promise.all([getRect(this,s),getRect(this,i)]).then(([t,i])=>{this.setData({animation:this.resetAnimation.translateX(i.width).step().export()},()=>{const s=(t.width+i.width)/e*1e3,o=wx.createAnimation({duration:s}).translateX(-t.width).step().export();setTimeout(()=>{this.nextAnimationContext=setTimeout(this.checkAnimation.bind(this),s),this.setData({animation:o})},20)})})}clearMessageAnimation(){clearTimeout(this.nextAnimationContext),this.nextAnimationContext=0}show(t=0){const{duration:e,marquee:i,offset:s,id:o}=this.properties;this.setData({visible:!0,loop:i.loop||this.data.loop,fadeClass:`${name}__fade`,wrapTop:unitConvert(s[0])+t}),this.reset(),this.checkAnimation(),e&&e>0&&(this.closeTimeoutContext=setTimeout(()=>{this.hide(),this.triggerEvent("duration-end",{self:this})},e));getRect(this,o?`#${o}`:`#${name}`).then(t=>{this.setData({height:t.height},()=>{this.setData({fadeClass:""})})})}hide(){this.reset(),this.setData({fadeClass:`${name}__fade`}),setTimeout(()=>{this.setData({visible:!1,animation:[]})},500),"function"==typeof this.onHide&&this.onHide()}reset(){this.nextAnimationContext&&this.clearMessageAnimation(),clearTimeout(this.closeTimeoutContext),this.closeTimeoutContext=0}handleClose(){this.hide(),this.triggerEvent("close-btn-click")}handleLinkClick(){this.triggerEvent("link-click")}};Message=__decorate([wxComponent()],Message);export default Message;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon","o-link":"../link/link"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="./message-item.wxs" module="_this"></wxs><wxs src="../common/utils.wxs" module="_"/><import src="../common/template/icon.wxml"/><block wx:if="{{visible}}"><view class="{{classPrefix}} class {{prefix}}-class {{classPrefix}}--{{theme}} {{classPrefix}}--{{placement}} {{fadeClass}}" style="{{_._style([_this.getMessageStyles(zIndex, offset, wrapTop, placement), style, customStyle])}}" animation="{{showAnimation}}" id="{{id || classPrefix}}" aria-role="alert"><view class="{{classPrefix}}__icon--left"><slot name="icon"/><template wx:if="{{_icon}}" is="icon" data="{{oClass: prefix + '-class-icon', ariaHidden: true, ..._icon }}"/></view><view class="{{classPrefix}}__text-wrap {{marquee ? classPrefix + '__text-nowrap' : ''}}" style="text-align: {{align}}" id="{{classPrefix}}__text-wrap"><view class="{{classPrefix}}__text {{prefix}}-class-content" id="{{classPrefix}}__text" animation="{{animation}}"><block wx:if="{{content}}">{{content}}</block><slot name="content"/><slot/></view></view><o-link wx:if="{{_link && _link.content}}" class="{{classPrefix}}__link {{prefix}}-class-link" style="{{_._style([_link.style, _link.customStyle])}}" disabled="{{_link.disabled || false}}" hover="{{_link.hover || true}}" theme="{{_link.theme || 'primary'}}" size="{{_link.size || 'medium'}}" prefixIcon="{{_link.prefixIcon || false}}" suffixIcon="{{_link.suffixIcon || false}}" underline="{{_link.underline || false}}" content="{{_link.content || ''}}" navigatorProps="{{_link.navigatorProps || null}}" bind:complete="handleLinkClick"/><slot name="link"/><view class="{{classPrefix}}__icon--right" bind:tap="handleClose"><slot name="close-btn"/><template wx:if="{{_closeBtn}}" is="icon" data="{{oClass: prefix + '-class-close-btn', ariaRole: 'button', ariaLabel: 'Fermer', ..._closeBtn }}"/></view></view></block>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var isEmptyObj = function (obj) {
|
|
2
|
+
return JSON.stringify(obj) === '{}';
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
var changeNumToStr = function (arr) {
|
|
6
|
+
return arr.map(function (item) {
|
|
7
|
+
return typeof item === 'number' ? item + 'rpx' : item;
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var getMessageStyles = function (zIndex, offset, wrapTop, placement) {
|
|
12
|
+
var arr = changeNumToStr(offset || [0, 0]);
|
|
13
|
+
var left = arr[1] || 0;
|
|
14
|
+
var right = arr[1] || 0;
|
|
15
|
+
|
|
16
|
+
var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
|
|
17
|
+
var styleOffset = '';
|
|
18
|
+
|
|
19
|
+
styleOffset += placement === 'bottom'
|
|
20
|
+
? 'top:auto;bottom:calc(' + wrapTop + 'px + env(safe-area-inset-bottom));'
|
|
21
|
+
: 'top:' + wrapTop + 'px;';
|
|
22
|
+
styleOffset += 'left:' + left + ';';
|
|
23
|
+
styleOffset += 'right:' + right + ';';
|
|
24
|
+
|
|
25
|
+
return zIndexStyle + styleOffset;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
getMessageStyles: getMessageStyles,
|
|
30
|
+
isEmptyObj: isEmptyObj,
|
|
31
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-message {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
transition: opacity .3s,transform .4s,top .4s;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
height: 96rpx;
|
|
12
|
+
align-items: center;
|
|
13
|
+
z-index: 15000;
|
|
14
|
+
padding: 0 var(--o-spacer-2,32rpx);
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
border-radius: var(--o-message-border-radius,var(--o-radius-default,12rpx));
|
|
17
|
+
line-height: 1;
|
|
18
|
+
background-color: var(--o-message-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
19
|
+
box-shadow: var(--o-message-box-shadow,var(--o-shadow-1,0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12)));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.o-message__text {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
color: var(--o-message-content-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
25
|
+
font: var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.o-message__text-wrap {
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
overflow-x: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.o-message__text-nowrap {
|
|
35
|
+
word-break: keep-all;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.o-message--info {
|
|
40
|
+
color: var(--o-message-info-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.o-message--success {
|
|
44
|
+
color: var(--o-message-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.o-message--warning {
|
|
48
|
+
color: var(--o-message-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.o-message--error {
|
|
52
|
+
color: var(--o-message-error-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.o-message__icon--left,
|
|
56
|
+
.o-message__icon--right {
|
|
57
|
+
font-size: 44rpx;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-message__icon--left:not(:empty) {
|
|
61
|
+
margin-right: var(--o-spacer,16rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.o-message__icon--right {
|
|
65
|
+
color: var(--o-message-close-icon-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.o-message__icon--right:not(:empty),
|
|
69
|
+
.o-message__link {
|
|
70
|
+
flex: 0 0 auto;
|
|
71
|
+
margin-left: var(--o-spacer,16rpx);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-message__fade {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transform: translateY(-100%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.o-message {
|
|
80
|
+
height: auto;
|
|
81
|
+
min-height: var(--o-message-min-height,112rpx);
|
|
82
|
+
padding: var(--o-message-padding,24rpx 32rpx);
|
|
83
|
+
border-radius: var(--o-message-border-radius,16rpx);
|
|
84
|
+
line-height: normal;
|
|
85
|
+
box-shadow: var(--o-message-box-shadow,0 4rpx 16rpx rgba(0,0,0,.2));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.o-message--info {
|
|
89
|
+
background-color: var(--o-message-info-bg,#085ebd);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.o-message--success {
|
|
93
|
+
background-color: var(--o-message-success-bg,#028702);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.o-message--warning {
|
|
97
|
+
background-color: var(--o-message-warning-bg,#e37318);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-message--error {
|
|
101
|
+
background-color: var(--o-message-error-bg,#cd3c14);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.o-message .o-message__text {
|
|
105
|
+
color: var(--o-message-content-color,#fff);
|
|
106
|
+
font: var(--o-message-content-font,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.o-message .o-message__icon--left {
|
|
110
|
+
font-size: var(--o-message-icon-size,48rpx);
|
|
111
|
+
color: var(--o-message-icon-color,rgba(255,255,255,.8));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.o-message .o-message__icon--left:not(:empty) {
|
|
115
|
+
margin-right: var(--o-spacer-1,24rpx);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.o-message .o-message__icon--right {
|
|
119
|
+
font-size: var(--o-message-close-size,48rpx);
|
|
120
|
+
color: var(--o-message-close-icon-color,#fff);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.o-message--bottom.o-message__fade {
|
|
124
|
+
transform: translateY(100%);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.o-message--info .o-message__text,
|
|
128
|
+
.o-message--info .o-message__icon--left,
|
|
129
|
+
.o-message--info .o-message__icon--right {
|
|
130
|
+
color: var(--o-message-info-text-color,#fff);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.o-message--warning .o-message__text,
|
|
134
|
+
.o-message--warning .o-message__icon--right {
|
|
135
|
+
color: var(--o-message-warning-text-color,var(--o-static-on-canary,#000));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.o-message--warning .o-message__icon--left {
|
|
139
|
+
color: var(--o-message-warning-icon-color,rgba(0,0,0,.7));
|
|
140
|
+
}
|
|
141
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./navbar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{getRect,systemInfo}from"../common/utils";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-navbar`,SKIP_MENU_RECT_SCENES=[1433,1434,1177,1175],checkSpecialScene=()=>{const{scene:t}=wx.getLaunchOptionsSync();return SKIP_MENU_RECT_SCENES.includes(t)};let Navbar=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-placeholder`,`${prefix}-class-content`,`${prefix}-class-title`,`${prefix}-class-left`,`${prefix}-class-center`,`${prefix}-class-left-icon`,`${prefix}-class-home-icon`,`${prefix}-class-capsule`,`${prefix}-class-nav-btn`],this.timer=null,this.options={multipleSlots:!0},this.properties=props,this.observers={visible(t){const{animation:e}=this.properties,i=`${name}${t?"--visible":"--hide"}`;this.setData({visibleClass:`${i}${e?"-animation":""}`}),this.timer&&clearTimeout(this.timer),e&&(this.timer=setTimeout(()=>{this.setData({visibleClass:i})},300))},"title,titleMaxLength"(){const{title:t}=this.properties,e=this.properties.titleMaxLength||Number.MAX_SAFE_INTEGER;let i=t.slice(0,e);e<t.length&&(i+="..."),this.setData({showTitle:i})}},this.data={prefix:prefix,classPrefix:name,boxStyle:"",showTitle:"",hideLeft:!1,hideCenter:!1,isSpecialScene:!1,_menuRect:null,_leftRect:null,_boxStyle:{}},this.methods={initStyle(){this.getMenuRect();const{_menuRect:t,_leftRect:e}=this.data;if(!t||!e||!systemInfo)return;const i={"--o-navbar-padding-top":`${systemInfo.statusBarHeight}px`,"--o-navbar-right":systemInfo.windowWidth-t.left+"px","--o-navbar-left-max-width":`${t.left}px`,"--o-navbar-capsule-height":`${t.height}px`,"--o-navbar-capsule-width":`${t.width}px`};const h=2*(t.top-systemInfo.statusBarHeight)+t.height;h>=t.height&&(i["--o-navbar-height"]=`${h}px`);this.calcCenterStyle(e,t,i)},calcCenterStyle(t,e,i){const n=Math.max(t.right,systemInfo.windowWidth-e.left),s=Object.assign(Object.assign({},i),{"z-index":this.properties.zIndex,"--o-navbar-center-left":`${n}px`,"--o-navbar-center-width":`${Math.max(e.left-n,0)}px`}),a=Object.entries(s).map(([t,e])=>`${t}: ${e}`).join("; ");this.setData({boxStyle:a,_boxStyle:s})},getLeftRect(){getRect(this,`.${name}__left`).then(t=>{t.right>this.data._leftRect.right&&this.calcCenterStyle(t,this.data._menuRect,this.data._boxStyle)})},getMenuRect(){if(!this.data.isSpecialScene&&wx.getMenuButtonBoundingClientRect){const t=wx.getMenuButtonBoundingClientRect();this.setData({_menuRect:t,_leftRect:{right:systemInfo.windowWidth-t.left}})}},onMenuButtonBoundingClientRectWeightChange(){wx.onMenuButtonBoundingClientRectWeightChange&&(this.onMenuButtonBoundingClientRectWeightChangeCallback=t=>this.queryElements(t),wx.onMenuButtonBoundingClientRectWeightChange(this.onMenuButtonBoundingClientRectWeightChangeCallback))},offMenuButtonBoundingClientRectWeightChange(){this.onMenuButtonBoundingClientRectWeightChangeCallback&&wx.offMenuButtonBoundingClientRectWeightChange(this.onMenuButtonBoundingClientRectWeightChangeCallback)},queryElements(t){Promise.all([getRect(this,`.${this.data.classPrefix}__left`),getRect(this,`.${this.data.classPrefix}__center`)]).then(([e,i])=>{const n=Math.round(e.right),s=Math.round(i.right),a=t.left;this.setData({hideLeft:n>a,hideCenter:n>a||s>a})})},goBack(){const{delta:t}=this.data,e=this;this.triggerEvent("go-back"),t>0&&wx.navigateBack({delta:t,fail(t){e.triggerEvent("fail",t)},complete(t){e.triggerEvent("complete",t)},success(t){e.triggerEvent("success",t)}})}}}attached(){const t=checkSpecialScene();t&&this.setData({isSpecialScene:t}),this.initStyle(),this.getLeftRect(),this.onMenuButtonBoundingClientRectWeightChange()}detached(){this.offMenuButtonBoundingClientRectWeightChange()}};Navbar=__decorate([wxComponent()],Navbar);export default Navbar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view wx:if="{{!(isSpecialScene && isHiddenInSpecialScene)}}" class="{{_.cls(classPrefix, [['fixed', fixed]])}} {{visibleClass}} class {{prefix}}-class" style="{{_._style([boxStyle, style, customStyle])}}"><view wx:if="{{fixed && placeholder}}" class="{{classPrefix}}__placeholder {{prefix}}-class-placeholder"/><view class="{{classPrefix}}__content {{prefix}}-class-content"><view class="{{classPrefix}}__left {{hideLeft ? classPrefix + '__left--hide' : ''}} {{prefix}}-class-left"><view wx:if="{{leftArrow}}" class="{{classPrefix}}__btn" bind:tap="goBack" aria-role="button" aria-label="返回"><o-icon name="chevron-left" class="{{classPrefix}}__left-arrow"/></view><slot name="left"/><view class="{{classPrefix}}__capsule {{prefix}}-class-capsule"><slot name="capsule"/></view></view><view class="{{classPrefix}}__center {{hideCenter ? classPrefix + '__center--hide' : ''}} {{prefix}}-class-center"><slot name="title"/><text wx:if="{{title}}" class="{{classPrefix}}__center-title {{prefix}}-class-title">{{showTitle}}</text></view></view></view>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-navbar {
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.o-navbar--fixed .o-navbar__content {
|
|
8
|
+
position: fixed;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-navbar--visible {
|
|
14
|
+
display: '';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-navbar--visible-animation {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
transition: opacity .3s cubic-bezier(.645,.045,.355,1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.o-navbar--hide-animation {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
transition: opacity .3s cubic-bezier(.645,.045,.355,1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.o-navbar--hide {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.o-navbar__placeholder {
|
|
32
|
+
height: var(--o-navbar-height,48px);
|
|
33
|
+
padding-top: var(--o-navbar-padding-top,20px);
|
|
34
|
+
position: relative;
|
|
35
|
+
visibility: hidden;
|
|
36
|
+
box-sizing: content-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.o-navbar__content {
|
|
40
|
+
position: relative;
|
|
41
|
+
height: var(--o-navbar-height,48px);
|
|
42
|
+
width: calc(100% - var(--o-navbar-right,95px));
|
|
43
|
+
padding-right: var(--o-navbar-right,95px);
|
|
44
|
+
padding-top: var(--o-navbar-padding-top,20px);
|
|
45
|
+
color: var(--o-navbar-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
46
|
+
background: var(--o-navbar-background,var(--o-navbar-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff))));
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
box-sizing: content-box;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-navbar__left {
|
|
53
|
+
position: relative;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
max-width: var(--o-navbar-left-max-width);
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
margin-left: var(--o-spacer-1,24rpx);
|
|
60
|
+
transition: opacity .3s cubic-bezier(.645,.045,.355,1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.o-navbar__left-arrow {
|
|
64
|
+
font-size: var(--o-navbar-left-arrow-size,24px);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.o-navbar__left--hide {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.o-navbar__capsule {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
width: var(--o-navbar-capsule-width,88px);
|
|
74
|
+
height: var(--o-navbar-capsule-height,32px);
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.o-navbar__capsule::before {
|
|
80
|
+
content: '';
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 200%;
|
|
85
|
+
height: 200%;
|
|
86
|
+
transform: scale(.5);
|
|
87
|
+
transform-origin: 0 0;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
border-radius: calc(var(--o-navbar-capsule-border-radius,16px) * 2);
|
|
90
|
+
border: 2rpx solid var(--o-navbar-capsule-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.o-navbar__capsule:empty {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.o-navbar__center {
|
|
98
|
+
text-align: center;
|
|
99
|
+
position: absolute;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
left: var(--o-navbar-center-left,var(--o-navbar-right,95px));
|
|
102
|
+
width: var(--o-navbar-center-width,187px);
|
|
103
|
+
height: var(--o-navbar-height,48px);
|
|
104
|
+
flex: 1;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
transition: opacity .3s cubic-bezier(.645,.045,.355,1);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.o-navbar__center:empty {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.o-navbar__center-title {
|
|
117
|
+
font: var(--o-navbar-title-font,var(--o-font-title-large,600 36rpx / 52rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
118
|
+
text-overflow: ellipsis;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.o-navbar__center--hide {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={animation:{type:Boolean,value:!0},delta:{type:Number,value:1},fixed:{type:Boolean,value:!0},isHiddenInSpecialScene:{type:Boolean,value:!1},leftArrow:{type:Boolean,value:!1},placeholder:{type:Boolean,value:!1},safeAreaInsetTop:{type:Boolean,value:!0},title:{type:String},titleMaxLength:{type:Number},visible:{type:Boolean,value:!0},zIndex:{type:Number,value:1}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./notice-bar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import{getRect,getAnimationFrame,calcIcon}from"../common/utils";import props from"./props";import config from"../common/config";const{prefix:prefix}=config,name=`${prefix}-notice-bar`,THEME_ICON={info:"info-circle-filled",success:"check-circle-filled",warning:"error-circle-filled",error:"error-circle-filled"};let NoticeBar=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-prefix-icon`,`${prefix}-class-operation`,`${prefix}-class-suffix-icon`],this.options={multipleSlots:!0,pureDataPattern:/^__/},this.properties=props,this.data={prefix:prefix,classPrefix:name,loop:-1,__ready:!1},this.observers={marquee(t){"{}"!==JSON.stringify(t)&&"true"!==JSON.stringify(t)||this.setData({marquee:{speed:50,loop:-1,delay:0}})},visible(t){this.data.__ready&&(t?this.show():this.clearNoticeBarAnimation())},prefixIcon(t){this.setPrefixIcon(t)},suffixIcon(t){this.setData({_suffixIcon:calcIcon(t)})},content(){this.data.__ready&&(this.clearNoticeBarAnimation(),this.initAnimation())}},this.lifetimes={created(){this.resetAnimation=wx.createAnimation({duration:0,timingFunction:"linear"})},detached(){this.clearNoticeBarAnimation()},ready(){this.show(),this.setData({__ready:!0})}},this.methods={initAnimation(){const t=`.${name}__content-wrap`,i=`.${name}__content`;getAnimationFrame(this,()=>{Promise.all([getRect(this,i),getRect(this,t)]).then(([t,i])=>{const{marquee:e}=this.properties;if(null!=t&&null!=i&&t.width&&i.width&&!1!==e&&(e||i.width<t.width)){const n=e.speed||50,o=e.delay||0,a=(i.width+t.width)/n*1e3,r=t.width/n*1e3;this.setData({wrapWidth:Number(i.width),nodeWidth:Number(t.width),animationDuration:a,delay:o,loop:e.loop-1,firstAnimationDuration:r}),0!==e.loop&&this.startScrollAnimation(!0)}}).catch(()=>{})})},startScrollAnimation(t=!1){this.clearNoticeBarAnimation();const{wrapWidth:i,nodeWidth:e,firstAnimationDuration:n,animationDuration:o,delay:a}=this.data,r=t?a:0,s=t?n:o;this.setData({animationData:this.resetAnimation.translateX(t?0:i).step().export()}),getAnimationFrame(this,()=>{this.setData({animationData:wx.createAnimation({duration:s,timingFunction:"linear",delay:r}).translateX(-e).step().export()})}),this.nextAnimationContext=setTimeout(()=>{this.data.loop>0?(this.data.loop-=1,this.startScrollAnimation()):0===this.data.loop?this.setData({animationData:this.resetAnimation.translateX(0).step().export()}):this.data.loop<0&&this.startScrollAnimation()},s+r)},show(){this.clearNoticeBarAnimation(),this.setPrefixIcon(this.properties.prefixIcon),this.initAnimation()},clearNoticeBarAnimation(){this.nextAnimationContext&&clearTimeout(this.nextAnimationContext),this.nextAnimationContext=null},setPrefixIcon(t){const{theme:i}=this.properties;this.setData({_prefixIcon:calcIcon(t,THEME_ICON[i])})},onChange(t){const{current:i,source:e}=t.detail;this.triggerEvent("change",{current:i,source:e})},clickPrefixIcon(){this.triggerEvent("click",{trigger:"prefix-icon"})},clickContent(){this.triggerEvent("click",{trigger:"content"})},clickSuffixIcon(){this.triggerEvent("click",{trigger:"suffix-icon"})},clickOperation(){this.triggerEvent("click",{trigger:"operation"})}}}};NoticeBar=__decorate([wxComponent()],NoticeBar);export default NoticeBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><view wx:if="{{visible}}" style="{{_._style([style, customStyle])}}" class="{{classPrefix}} {{classPrefix}}--{{theme}} class {{prefix}}-class"><view class="{{classPrefix}}__prefix-icon" bind:tap="clickPrefixIcon"><slot name="prefix-icon"/><template wx:if="{{_prefixIcon}}" is="icon" data="{{oClass: prefix + '-class-prefix-icon', ..._prefixIcon }}"></template></view><view class="{{classPrefix}}__content-wrap" bind:tap="clickContent"><view wx:if="{{ direction === 'vertical' && _.isArray(content) }}"><swiper autoplay="true" vertical="true" circular="true" interval="{{interval}}" display-multiple-items="1" class="{{classPrefix}}__content {{classPrefix}}__content--vertical" bindchange="onChange"><block wx:for="{{content}}" wx:key="index"><swiper-item><view class="{{classPrefix}}__content--vertical-item">{{item}}</view></swiper-item></block></swiper></view><view wx:else class="{{classPrefix}}__content {{prefix}}-class-content {{ !marquee ? classPrefix + '__content-wrapable' : ''}}" animation="{{ animationData }}"><block wx:if="{{content}}">{{content}}</block><slot name="content"/><view class="{{classPrefix}}__operation {{prefix}}-class-operation" catch:tap="clickOperation"><block wx:if="{{ operation }}">{{operation}}</block><slot name="operation"/></view></view></view><view class="{{classPrefix}}__suffix-icon" bind:tap="clickSuffixIcon"><slot name="suffix-icon"/><template wx:if="{{_suffixIcon}}" is="icon" data="{{oClass: prefix + '-class-suffix-icon', ..._suffixIcon }}"></template></view></view>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-notice-bar {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
padding: 26rpx var(--o-spacer-2,32rpx);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-notice-bar__content-wrap {
|
|
10
|
+
flex: 1;
|
|
11
|
+
overflow-x: hidden;
|
|
12
|
+
font: var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
13
|
+
color: var(--o-notice-bar-font-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.o-notice-bar__content {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-notice-bar__content-wrapable {
|
|
22
|
+
white-space: normal;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.o-notice-bar__content--vertical {
|
|
26
|
+
display: block;
|
|
27
|
+
height: var(--o-line-height-title-small,44rpx);
|
|
28
|
+
line-height: var(--o-line-height-title-small,44rpx);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.o-notice-bar__content--vertical-item {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.o-notice-bar__prefix-icon {
|
|
38
|
+
color: inherit;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.o-notice-bar__prefix-icon:not(:empty) {
|
|
42
|
+
padding-right: var(--o-spacer,16rpx);
|
|
43
|
+
width: 44rpx;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-notice-bar__suffix-icon {
|
|
47
|
+
color: var(--o-notice-bar-suffix-icon-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.o-notice-bar__prefix-icon,
|
|
51
|
+
.o-notice-bar__suffix-icon {
|
|
52
|
+
font-size: 44rpx;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.o-notice-bar__prefix-icon:empty,
|
|
56
|
+
.o-notice-bar__suffix-icon:empty {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-notice-bar__operation {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
vertical-align: top;
|
|
63
|
+
color: var(--o-notice-bar-operation-font-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.o-notice-bar__operation:empty {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.o-notice-bar__suffix-icon:not(:empty) {
|
|
72
|
+
padding-left: var(--o-spacer,16rpx);
|
|
73
|
+
width: 44rpx;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.o-notice-bar--info {
|
|
77
|
+
color: var(--o-notice-bar-info-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
78
|
+
background-color: var(--o-notice-bar-info-bg-color,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.o-notice-bar--success {
|
|
82
|
+
color: var(--o-notice-bar-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
83
|
+
background-color: var(--o-notice-bar-success-bg-color,var(--o-success-color-1,#eaf7ee));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.o-notice-bar--warning {
|
|
87
|
+
color: var(--o-notice-bar-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
88
|
+
background-color: var(--o-notice-bar-warning-bg-color,var(--o-warning-color-1,#fff1e9));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.o-notice-bar--error {
|
|
92
|
+
color: var(--o-notice-bar-error-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
93
|
+
background-color: var(--o-notice-bar-error-bg-color,var(--o-error-color-1,#f9dedc));
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={content:{type:null},direction:{type:String,value:"horizontal"},interval:{type:Number,value:2e3},marquee:{type:null,value:!1},operation:{type:String},prefixIcon:{type:null,value:!0},suffixIcon:{type:null},theme:{type:String,value:"info"},visible:{type:Boolean,value:null},defaultVisible:{type:Boolean,value:!1}};export default props;
|
|
@@ -0,0 +1,35 @@
|
|
|
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}-notification-item`;
|
|
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
|
+
text(value) { this.setData({ _long: (value || '').length > 90 }); },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let NotificationItem = class NotificationItem 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, _expanded: false, _long: false };
|
|
22
|
+
this.observers = observers;
|
|
23
|
+
this.lifetimes = {
|
|
24
|
+
attached() {
|
|
25
|
+
Object.keys(observers).forEach((key) => observers[key].call(this, this.properties[key]));
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
this.methods = {
|
|
29
|
+
onTap() { this.triggerEvent('click'); },
|
|
30
|
+
onMore() { this.setData({ _expanded: !this.data._expanded }); },
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
NotificationItem = __decorate([wxComponent()], NotificationItem);
|
|
35
|
+
export default NotificationItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<view class="o-notification-item {{unread ? 'o-notification-item--unread' : ''}} class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<view class="o-thumb o-notification-item__thumb">
|
|
3
|
+
<image wx:if="{{thumbnail}}" class="o-thumb__image" src="{{thumbnail}}" mode="aspectFill" />
|
|
4
|
+
<o-icon wx:else name="{{icon}}" />
|
|
5
|
+
</view>
|
|
6
|
+
<view class="o-grow">
|
|
7
|
+
<view class="o-row o-row--top">
|
|
8
|
+
<view class="o-grow o-txt-title o-notification-item__title">{{title}}</view>
|
|
9
|
+
<text class="o-txt-small o-notification-item__time">{{time}}</text>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="o-txt-body o-notification-item__text {{_expanded ? 'o-notification-item__text--open' : ''}}">{{text}}</view>
|
|
12
|
+
<view wx:if="{{_long}}" class="o-link o-notification-item__more" catch:tap="onMore">{{_expanded ? 'Réduire' : 'Lire la suite'}}</view>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Notification (Figma "Notifications"): thumbnail, title, time, text with "Lire la suite", unread state. */
|
|
5
|
+
.o-notification-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
padding: 24rpx 32rpx;
|
|
9
|
+
border-bottom: 2rpx solid var(--o-scheme-outline-variant, #ddd);
|
|
10
|
+
background-color: var(--o-scheme-surface, #fff);
|
|
11
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.o-notification-item--unread {
|
|
15
|
+
background-color: var(--o-scheme-surface-variant, #eee);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.o-notification-item__thumb {
|
|
19
|
+
width: 80rpx;
|
|
20
|
+
height: 80rpx;
|
|
21
|
+
margin-right: 24rpx;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.o-notification-item__title {
|
|
25
|
+
font: var(--o-type-title-small, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.o-notification-item__time {
|
|
29
|
+
flex: none;
|
|
30
|
+
margin-left: 16rpx;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.o-notification-item__text {
|
|
34
|
+
margin-top: 8rpx;
|
|
35
|
+
display: -webkit-box;
|
|
36
|
+
-webkit-box-orient: vertical;
|
|
37
|
+
-webkit-line-clamp: 3;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.o-notification-item__text--open {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.o-notification-item__more {
|
|
46
|
+
margin-top: 8rpx;
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// o-notification-item: Notification (Figma "Notifications"): thumbnail, title, time, text with "Lire la suite", unread state.
|
|
2
|
+
const props = {
|
|
3
|
+
thumbnail: { type: String, value: '' },
|
|
4
|
+
icon: { type: String, value: 'notification' },
|
|
5
|
+
title: { type: String, value: '' },
|
|
6
|
+
time: { type: String, value: '' },
|
|
7
|
+
text: { type: String, value: '' },
|
|
8
|
+
unread: { type: Boolean, value: false },
|
|
9
|
+
};
|
|
10
|
+
export default props;
|