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,37 @@
|
|
|
1
|
+
<view class="o-details-card o-details-card--{{size}} class {{prefix}}-class" style="{{style}} {{customStyle}}">
|
|
2
|
+
<view class="o-details-card__media" bind:tap="onTap">
|
|
3
|
+
<image wx:if="{{image}}" class="o-details-card__image" src="{{image}}" mode="aspectFill" />
|
|
4
|
+
<o-icon wx:else name="image" o-class="o-details-card__placeholder" />
|
|
5
|
+
<view wx:if="{{mediaTitle || tag}}" class="o-details-card__header">
|
|
6
|
+
<view class="o-grow">
|
|
7
|
+
<view class="o-details-card__media-title">{{mediaTitle}}</view>
|
|
8
|
+
<view wx:if="{{mediaSubtitle}}" class="o-details-card__media-subtitle">{{mediaSubtitle}}</view>
|
|
9
|
+
</view>
|
|
10
|
+
<view wx:if="{{tag}}" class="o-pill o-pill--black">{{tag}}</view>
|
|
11
|
+
</view>
|
|
12
|
+
<view wx:if="{{play}}" class="o-details-card__play" catch:tap="onPlay"><o-icon name="play" /></view>
|
|
13
|
+
<view wx:if="{{_dots.length}}" class="o-details-card__dots">
|
|
14
|
+
<view wx:for="{{_dots}}" wx:key="*this" class="o-details-card__dot {{item === current ? 'o-details-card__dot--active' : ''}}" />
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<view class="o-row o-row--top o-details-card__content">
|
|
18
|
+
<view class="o-thumb o-details-card__thumb">
|
|
19
|
+
<image wx:if="{{thumbnail}}" class="o-thumb__image" src="{{thumbnail}}" mode="aspectFill" />
|
|
20
|
+
</view>
|
|
21
|
+
<view class="o-grow">
|
|
22
|
+
<view class="o-txt-title o-details-card__title">{{title}}</view>
|
|
23
|
+
<view wx:if="{{subtitle}}" class="o-txt-small">{{subtitle}}</view>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
<view wx:if="{{buttonText}}" class="o-details-card__action">
|
|
27
|
+
<o-button theme="primary" block bind:tap="onButton">{{buttonText}}</o-button>
|
|
28
|
+
</view>
|
|
29
|
+
<view wx:if="{{secondaryButtonText}}" class="o-details-card__action">
|
|
30
|
+
<o-button variant="outline" block bind:tap="onSecondary">{{secondaryButtonText}}</o-button>
|
|
31
|
+
</view>
|
|
32
|
+
<view wx:if="{{priceFrom || link}}" class="o-details-card__price">
|
|
33
|
+
<view wx:if="{{priceFrom}}" class="o-txt-small">{{priceFrom}}</view>
|
|
34
|
+
<view wx:if="{{link}}" class="o-link" bind:tap="onLink">{{link}}</view>
|
|
35
|
+
</view>
|
|
36
|
+
<view wx:if="{{info}}" class="o-details-card__info"><o-icon name="info-circle-filled" /><text>{{info}}</text></view>
|
|
37
|
+
</view>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Card details (Figma "Card details" and "Card details_large"): big media, thumbnail, title, actions. */
|
|
5
|
+
.o-details-card {
|
|
6
|
+
display: block;
|
|
7
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.o-details-card__media {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
height: 336rpx;
|
|
16
|
+
border-radius: 24rpx;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
background-color: var(--o-scheme-surface-variant, #eee);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-details-card__image {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.o-details-card__placeholder {
|
|
27
|
+
font-size: 160rpx;
|
|
28
|
+
color: var(--o-scheme-surface, #fff);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.o-details-card--large .o-details-card__media {
|
|
32
|
+
background: linear-gradient(180deg, #3e3e3e 0%, #eee 70%);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.o-details-card__header {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: flex-start;
|
|
42
|
+
padding: 24rpx;
|
|
43
|
+
color: #fff;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-details-card__media-title {
|
|
47
|
+
font: var(--o-type-title-small, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.o-details-card__media-subtitle {
|
|
51
|
+
font: var(--o-type-body-small, 400 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.o-details-card__play {
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
width: 96rpx;
|
|
60
|
+
height: 96rpx;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
color: #000;
|
|
64
|
+
font-size: 56rpx;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.o-details-card__dots {
|
|
68
|
+
position: absolute;
|
|
69
|
+
bottom: 16rpx;
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 8rpx;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-details-card__dot {
|
|
75
|
+
width: 12rpx;
|
|
76
|
+
height: 12rpx;
|
|
77
|
+
border-radius: 6rpx;
|
|
78
|
+
background-color: rgba(255, 255, 255, .8);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.o-details-card__dot--active {
|
|
82
|
+
width: 32rpx;
|
|
83
|
+
background-color: var(--o-scheme-primary, #f16e00);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.o-details-card__content {
|
|
87
|
+
margin-top: 24rpx;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.o-details-card__thumb {
|
|
91
|
+
width: 64rpx;
|
|
92
|
+
height: 64rpx;
|
|
93
|
+
margin-right: 24rpx;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.o-details-card__title {
|
|
97
|
+
font: var(--o-type-title-small, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-details-card__action {
|
|
101
|
+
margin-top: 24rpx;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.o-details-card__price {
|
|
105
|
+
margin-top: 16rpx;
|
|
106
|
+
text-align: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.o-details-card__info {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 16rpx;
|
|
113
|
+
margin-top: 24rpx;
|
|
114
|
+
padding: 24rpx;
|
|
115
|
+
border-radius: 8rpx;
|
|
116
|
+
background-color: var(--o-scheme-tertiary-container, #e7efff);
|
|
117
|
+
color: var(--o-scheme-tertiary, #085ebd);
|
|
118
|
+
font: var(--o-type-body-small, 400 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
119
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// o-details-card: Card details (Figma "Card details" and "Card details_large"): big media, thumbnail, title, actions.
|
|
2
|
+
const props = {
|
|
3
|
+
// small: picture + title, large: media with header / play / dots, button and price line
|
|
4
|
+
size: { type: String, value: 'small' },
|
|
5
|
+
image: { type: String, value: '' },
|
|
6
|
+
mediaTitle: { type: String, value: '' },
|
|
7
|
+
mediaSubtitle: { type: String, value: '' },
|
|
8
|
+
tag: { type: String, value: '' },
|
|
9
|
+
play: { type: Boolean, value: false },
|
|
10
|
+
// Number of carousel dots (0: none) and active one
|
|
11
|
+
dots: { type: Number, value: 0 },
|
|
12
|
+
current: { type: Number, value: 0 },
|
|
13
|
+
thumbnail: { type: String, value: '' },
|
|
14
|
+
title: { type: String, value: '' },
|
|
15
|
+
subtitle: { type: String, value: '' },
|
|
16
|
+
buttonText: { type: String, value: '' },
|
|
17
|
+
secondaryButtonText: { type: String, value: '' },
|
|
18
|
+
priceFrom: { type: String, value: '' },
|
|
19
|
+
link: { type: String, value: '' },
|
|
20
|
+
info: { type: String, value: '' },
|
|
21
|
+
};
|
|
22
|
+
export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{toCamel}from"../common/utils";import{isObject}from"../common/validator";import useCustomNavbar from"../common/mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-dialog`;let Dialog=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.options={multipleSlots:!0},this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-confirm`,`${prefix}-class-cancel`,`${prefix}-class-action`],this.properties=props,this.data={prefix:prefix,classPrefix:name,buttonVariant:"text"},this.observers={"confirmBtn, cancelBtn"(t,e){const{prefix:o,classPrefix:i,buttonLayout:n}=this.data,s={buttonVariant:"text"},r=[t,e].some(t=>isObject(t)&&t.variant&&"text"!==t.variant),a={confirm:t,cancel:e},c=[`${i}__button`],l=[];r?(s.buttonVariant="base",c.push(`${i}__button--${n}`)):(c.push(`${i}__button--text`),l.push(`${i}-button`)),Object.keys(a).forEach(t=>{const e=a[t],n={block:!0,rootClass:[...c,`${i}__button--${t}`],oClass:[...l,`${o}-class-${t}`],variant:s.buttonVariant,openType:""};"cancel"===t&&"base"===s.buttonVariant&&(n.theme="light"),s[`_${t}`]="string"==typeof e?Object.assign(Object.assign({},n),{content:e}):e&&"object"==typeof e?Object.assign(Object.assign({},n),e):null}),this.setData(Object.assign({},s))}},this.methods={onTplButtonTap(t){var e,o,i;const n=t.type,{type:s,extra:r}=t.target.dataset,a=this.data[`_${s}`],c=`bind${n}`;if("action"===s)return void this.onActionTap(r);if("function"==typeof a[c]){a[c](t)&&this.close()}if(!!!a.openType&&["confirm","cancel"].includes(s)&&(null===(e=this[toCamel(`on-${s}`)])||void 0===e||e.call(this,s)),"tap"!==n){const e=(null===(i=null===(o=t.detail)||void 0===o?void 0:o.errMsg)||void 0===i?void 0:i.indexOf("ok"))>-1;this.triggerEvent(e?"open-type-event":"open-type-error-event",t.detail)}},onConfirm(){this.triggerEvent("confirm"),this._onConfirm&&(this._onConfirm({trigger:"confirm"}),this.close())},onCancel(){const t={trigger:"cancel"};this.triggerEvent("cancel"),this.triggerEvent("close",t),this._onCancel&&(this._onCancel(t),this.close())},onClose(){var t;const e={trigger:"close-btn"};this.triggerEvent("close",e),null===(t=this._onCancel)||void 0===t||t.call(this,e),this.close()},close(){this.setData({visible:!1})},overlayClick(){var t;if(this.triggerEvent("overlay-click"),this.properties.closeOnOverlayClick){const e={trigger:"overlay"};this.triggerEvent("close",e),null===(t=this._onCancel)||void 0===t||t.call(this,e),this.close()}},onActionTap(t){this.triggerEvent("action",{index:t}),this._onAction&&(this._onAction({index:t}),this.close())},openValueCBHandle(t){this.triggerEvent("open-type-event",t.detail)},openValueErrCBHandle(t){this.triggerEvent("open-type-error-event",t.detail)}}}};Dialog=__decorate([wxComponent()],Dialog);export default Dialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-popup":"../popup/popup","o-icon":"../icon/icon","o-button":"../button/button"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<import src="../common/template/button.wxml"/><import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><wxs src="./dialog.wxs" module="_this"/><o-popup name="dialog" style="{{_._style([style, customStyle])}}" class="class" o-class="{{classPrefix}}__wrapper" visible="{{visible}}" showOverlay="{{showOverlay}}" closeOnOverlayClick="{{closeOnOverlayClick}}" preventScrollThrough="{{preventScrollThrough}}" overlayProps="{{overlayProps}}" zIndex="{{zIndex}}" placement="center" usingCustomNavbar="{{usingCustomNavbar}}" bind:visible-change="overlayClick"><view slot="content" class="{{classPrefix}} {{prefix}}-class"><slot name="top"/><view wx:if="{{closeBtn}}" class="{{classPrefix}}__close-btn" bind:tap="onClose"><template wx:if="{{_.isObject(closeBtn)}}" is="icon" data="{{ name: 'close', size: 22, ...closeBtn }}"/><o-icon wx:else name="close" size="44rpx"/></view><view class="{{classPrefix}}__content {{prefix}}-class-content"><view wx:if="{{title}}" class="{{classPrefix}}__header">{{title}}</view><slot name="title"/><view wx:if="{{content}}" class="{{classPrefix}}__body"><text class="{{classPrefix}}__body-text">{{content}}</text></view><slot name="content"/></view><slot name="middle"/><view class="{{_.cls(classPrefix + '__footer', [['column', buttonLayout === 'vertical'], ['full', buttonVariant == 'text' && actions.length == 0]])}}"><block wx:if="{{actions}}"><block wx:for="{{actions}}" wx:key="index"><template is="button" data="{{block: true, type: 'action', extra: index, oClass: prefix + '-class-action', rootClass: _this.getActionClass(classPrefix, buttonLayout), ...item }}"/></block></block><slot name="actions"/><block wx:if="{{_cancel}}"><template is="button" data="{{type: 'cancel', ..._cancel }}"/></block><slot name="cancel-btn"/><block wx:if="{{_confirm}}"><template is="button" data="{{type: 'confirm', theme: 'primary', ..._confirm}}"/></block><slot name="confirm-btn"/></view></view></o-popup>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports.getTypeof = function (obj) {
|
|
2
|
+
return typeof obj;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
module.exports.getActionClass = function (prefix, buttonLayout) {
|
|
6
|
+
var cls = [prefix + '__button', prefix + '__button--action'];
|
|
7
|
+
|
|
8
|
+
if (buttonLayout) {
|
|
9
|
+
cls.push(prefix + '__button--' + buttonLayout);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return cls.join(' ');
|
|
13
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-dialog {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
width: var(--o-dialog-width,622rpx);
|
|
6
|
+
border-radius: var(--o-dialog-border-radius,var(--o-radius-extraLarge,24rpx));
|
|
7
|
+
background-color: var(--o-bg-color-container,var(--o-font-white-1,#fff));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.o-dialog__wrapper {
|
|
11
|
+
--o-popup-border-radius: var(--o-dialog-border-radius, var(--o-radius-extraLarge, 24rpx));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.o-dialog__close-btn {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: var(--o-spacer,16rpx);
|
|
17
|
+
right: var(--o-spacer,16rpx);
|
|
18
|
+
color: var(--o-dialog-close-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.o-dialog__content {
|
|
23
|
+
padding-top: var(--o-spacer-3,48rpx);
|
|
24
|
+
padding-right: var(--o-spacer-3,48rpx);
|
|
25
|
+
padding-bottom: 0;
|
|
26
|
+
padding-left: var(--o-spacer-3,48rpx);
|
|
27
|
+
max-height: var(--o-dialog-body-max-height,912rpx);
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
font-size: var(--o-font-size-m,32rpx);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.o-dialog__content:empty {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.o-dialog__header {
|
|
40
|
+
text-align: center;
|
|
41
|
+
font: var(--o-dialog-title-font,var(--o-font-title-large,600 36rpx / 52rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
42
|
+
color: var(--o-dialog-title-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.o-dialog__header+.o-dialog__body {
|
|
46
|
+
margin-top: var(--o-spacer,16rpx);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.o-dialog__body {
|
|
50
|
+
overflow-y: scroll;
|
|
51
|
+
text-align: center;
|
|
52
|
+
-webkit-overflow-scrolling: touch;
|
|
53
|
+
font: var(--o-dialog-content-font,var(--o-font-body-large,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
54
|
+
color: var(--o-dialog-content-color,var(--o-text-color-secondary,var(--o-font-gray-2,#444748)));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.o-dialog__body-text {
|
|
58
|
+
word-wrap: break-word;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.o-dialog__body--left {
|
|
62
|
+
text-align: left;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.o-dialog__body--right {
|
|
66
|
+
text-align: right;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.o-dialog__footer {
|
|
70
|
+
display: flex;
|
|
71
|
+
padding: var(--o-spacer-3,48rpx);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-dialog__footer--column {
|
|
75
|
+
flex-flow: column-reverse;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-dialog__footer--column .o-dialog__button {
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.o-dialog__footer--full {
|
|
83
|
+
padding: var(--o-spacer-4,64rpx) 0 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.o-dialog__button {
|
|
87
|
+
position: relative;
|
|
88
|
+
flex: 1;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.o-dialog__button--horizontal+.o-dialog__button--horizontal {
|
|
95
|
+
margin-left: var(--o-spacer-1,24rpx);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.o-dialog__button--vertical+.o-dialog__button--vertical {
|
|
99
|
+
margin-bottom: var(--o-spacer-1,24rpx);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.o-dialog__button--text {
|
|
103
|
+
flex: 1;
|
|
104
|
+
--o-button-border-radius: 0;
|
|
105
|
+
--o-button-medium-height: 112rpx;
|
|
106
|
+
border-radius: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.o-dialog__button--text:before {
|
|
110
|
+
content: ' ';
|
|
111
|
+
position: absolute;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
top: 0;
|
|
114
|
+
left: 0;
|
|
115
|
+
border-top: 1px solid var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd));
|
|
116
|
+
border-left: 1px solid var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd));
|
|
117
|
+
transform: scale(.5);
|
|
118
|
+
transform-origin: 0 0;
|
|
119
|
+
width: 200%;
|
|
120
|
+
height: 200%;
|
|
121
|
+
border-radius: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest}from"../common/tslib";import props from"./props";import{getInstance}from"../common/utils";const defaultOptions={actions:[],buttonLayout:props.buttonLayout.value,cancelBtn:props.cancelBtn.value,closeOnOverlayClick:props.closeOnOverlayClick.value,confirmBtn:props.confirmBtn.value,content:"",preventScrollThrough:props.preventScrollThrough.value,showOverlay:props.showOverlay.value,title:"",visible:props.visible.value};export default{alert(t){const e=Object.assign({},t),{context:s,selector:o="#o-dialog"}=e,n=__rest(e,["context","selector"]),c=getInstance(s,o);return c?new Promise(t=>{const e=Object.assign(Object.assign(Object.assign({},defaultOptions),c.properties),n);c.setData(Object.assign(Object.assign({cancelBtn:""},e),{visible:!0})),c._onConfirm=t}):Promise.reject()},confirm(t){const e=Object.assign({},t),{context:s,selector:o="#o-dialog"}=e,n=__rest(e,["context","selector"]),c=getInstance(s,o);return c?new Promise((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},defaultOptions),c.properties),n);c.setData(Object.assign(Object.assign({},s),{visible:!0})),c._onConfirm=t,c._onCancel=e}):Promise.reject()},close(t){const{context:e,selector:s="#o-dialog"}=Object.assign({},t),o=getInstance(e,s);return o?(o.close(),Promise.resolve()):Promise.reject()},action(t){const e=Object.assign({},t),{context:s,selector:o="#o-dialog"}=e,n=__rest(e,["context","selector"]),c=getInstance(s,o);if(!c)return Promise.reject();const{buttonLayout:r="vertical",actions:i=c.properties.actions}=t,a="vertical"===r?7:3;return(!i||"object"==typeof i&&(0===i.length||i.length>a))&&console.warn(`Nombre d'actions conseillé : de 1 à ${a}`),new Promise(t=>{const e=Object.assign(Object.assign(Object.assign({},defaultOptions),c.properties),n);c.setData(Object.assign(Object.assign({},e),{buttonLayout:r,visible:!0})),c._onAction=t})}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={actions:{type:Array},buttonLayout:{type:String,value:"horizontal"},cancelBtn:{type:null},closeBtn:{type:null,value:!1},closeOnOverlayClick:{type:Boolean,value:!1},confirmBtn:{type:null},content:{type:String},overlayProps:{type:Object,value:{}},preventScrollThrough:{type:Boolean,value:!0},showOverlay:{type:Boolean,value:!0},title:{type:String},usingCustomNavbar:{type:Boolean,value:!1},visible:{type:Boolean},zIndex:{type:Number,value:11500}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-divider`;let Divider=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`],this.options={multipleSlots:!0},this.properties=props,this.data={prefix:prefix,classPrefix:name},this.observers={lineColor(){this.setStyle()}},this.methods={setStyle(){const{lineColor:e}=this.properties,o=""+(e?`border-color: ${e};`:"");this.setData({dividerStyle:o})}}}};Divider=__decorate([wxComponent()],Divider);export default Divider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view class="{{layout==='vertical'? classPrefix + '--vertical-center' : ''}}"><view class="{{classPrefix}} class {{prefix}}-class {{classPrefix}}--{{layout}} {{classPrefix}}--{{align}} {{dashed? classPrefix + '--dashed' : ''}}" style="{{_._style([dividerStyle, style, customStyle])}}"><view class="{{prefix}}-class-content {{classPrefix}}__content"><view wx:if="{{content}}">{{content}}</view><slot wx:else name="content"/></view></view></view>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-divider {
|
|
4
|
+
display: flex;
|
|
5
|
+
color: var(--o-divider-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
6
|
+
border-color: var(--o-divider-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
7
|
+
border-style: var(--o-divider-content-line-style,solid);
|
|
8
|
+
border-width: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.o-divider::after,
|
|
12
|
+
.o-divider::before {
|
|
13
|
+
content: '';
|
|
14
|
+
display: block;
|
|
15
|
+
flex: 1;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
border: inherit;
|
|
18
|
+
border-color: inherit;
|
|
19
|
+
border-style: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.o-divider--horizontal {
|
|
23
|
+
align-items: center;
|
|
24
|
+
margin: var(--o-divider-horizontal-margin,20rpx) 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.o-divider--horizontal::after,
|
|
28
|
+
.o-divider--horizontal::before {
|
|
29
|
+
border-top-width: var(--o-divider-border-width,2rpx);
|
|
30
|
+
transform: scaleY(.5);
|
|
31
|
+
transform-origin: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.o-divider--horizontal .o-divider__content:not(:empty) {
|
|
35
|
+
margin: 0 var(--o-divider-content-margin,var(--o-spacer-1,24rpx));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.o-divider--vertical {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
height: 28rpx;
|
|
41
|
+
margin: 0 var(--o-divider-vertical-margin,var(--o-spacer,16rpx));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.o-divider--vertical::after,
|
|
45
|
+
.o-divider--vertical::before {
|
|
46
|
+
border-left-width: var(--o-divider-border-width,2rpx);
|
|
47
|
+
transform: scaleX(.5);
|
|
48
|
+
transform-origin: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.o-divider--vertical-center {
|
|
52
|
+
align-items: center;
|
|
53
|
+
height: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.o-divider--dashed {
|
|
57
|
+
border-style: dashed;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-divider__content {
|
|
61
|
+
font: var(--o-divider-content-font,var(--o-font-body-small,24rpx / 40rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
62
|
+
color: var(--o-divider-content-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.o-divider--left::before,
|
|
66
|
+
.o-divider--right::after {
|
|
67
|
+
max-width: 60rpx;
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./divider";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={align:{type:String,value:"center"},content:{type:String},dashed:{type:Boolean,value:!1},layout:{type:String,value:"horizontal"}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import useCustomNavbar from"../common/mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-drawer`;let Drawer=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.externalClasses=[],this.options={multipleSlots:!0},this.properties=props,this.data={classPrefix:name},this.methods={onVisibleChange({detail:e}){const{visible:t}=e,{showOverlay:r}=this.data;this.setData({visible:t}),t||this.triggerEvent("close",{trigger:"overlay"}),r&&this.triggerEvent("overlay-click",{visible:t})},onItemClick(e){const{index:t,item:r}=e.currentTarget.dataset;this.triggerEvent("item-click",{index:t,item:r})}}}};Drawer=__decorate([wxComponent()],Drawer);export default Drawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-popup":"../popup/popup","o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><o-popup wx:if="{{!destroyOnClose || visible}}" style="{{_._style([style, customStyle])}}" class="class" visible="{{visible}}" z-index="{{zIndex}}" using-custom-navbar="{{usingCustomNavbar}}" placement="{{placement == 'right' ? 'right' : 'left'}}" show-overlay="{{showOverlay}}" overlay-props="{{overlayProps}}" close-on-click-overlay="{{closeOnOverlayClick}}" bind:visible-change="onVisibleChange"><view class="{{classPrefix}}"><slot name="title"/><view wx:if="{{title}}" class="{{classPrefix}}__title">{{title}}</view><scroll-view class="{{classPrefix}}__sidebar" scroll-y type="list"><view class="{{classPrefix}}__sidebar-item" hover-class="{{classPrefix}}--hover" hover-start-time="{{0}}" hover-stay-time="{{100}}" wx:for="{{items}}" wx:item="item" wx:key="index" data-item="{{item}}" data-index="{{index}}" aria-role="{{ ariaRole || 'button' }}" aria-label="{{item.title}}" bindtap="onItemClick"><view aria-hidden="{{true}}" wx:if="{{item.icon}}" class="{{classPrefix}}__sidebar-item-icon"><o-icon name="{{item.icon}}"/></view><view class="{{classPrefix}}__sidebar-item-title">{{item.title}}</view></view></scroll-view><view class="{{classPrefix}}__footer"><slot/><slot name="footer"/></view></view></o-popup>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-drawer {
|
|
4
|
+
background: var(--o-drawer-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
5
|
+
width: var(--o-drawer-width,560rpx);
|
|
6
|
+
height: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.o-drawer--hover {
|
|
12
|
+
background-color: var(--o-drawer-hover-color,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-drawer__title {
|
|
16
|
+
font: var(--o-drawer-title-font,var(--o-font-title-large,600 36rpx / 52rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
17
|
+
padding: var(--o-spacer-3,48rpx) var(--o-spacer-2,32rpx) var(--o-spacer,16rpx);
|
|
18
|
+
color: var(--o-drawer-title-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-drawer__sidebar {
|
|
22
|
+
height: var(--o-drawer-sidebar-height,70vh);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.o-drawer__sidebar-item {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
position: relative;
|
|
29
|
+
padding-top: var(--o-drawer-item-padding,var(--o-spacer-2,32rpx));
|
|
30
|
+
padding-right: 0;
|
|
31
|
+
padding-bottom: var(--o-drawer-item-padding,var(--o-spacer-2,32rpx));
|
|
32
|
+
padding-left: var(--o-drawer-item-padding,var(--o-spacer-2,32rpx));
|
|
33
|
+
font: var(--o-font-body-large,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.o-drawer__sidebar-item::after {
|
|
37
|
+
content: '';
|
|
38
|
+
display: block;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: unset;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
left: unset;
|
|
43
|
+
right: unset;
|
|
44
|
+
background-color: var(--o-drawer-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.o-drawer__sidebar-item::after {
|
|
48
|
+
height: 1px;
|
|
49
|
+
left: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
transform: scaleY(.5);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.o-drawer__sidebar-item::after {
|
|
55
|
+
left: var(--o-drawer-item-padding,var(--o-spacer-2,32rpx));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.o-drawer__sidebar-item-title {
|
|
59
|
+
flex: 1;
|
|
60
|
+
color: var(--o-drawer-title-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.o-drawer__sidebar-item-icon {
|
|
64
|
+
padding-right: var(--o-spacer,16rpx);
|
|
65
|
+
color: var(--o-drawer-item-icon-color,var(--o-drawer-title-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f))));
|
|
66
|
+
font-size: var(--o-drawer-item-icon-size,48rpx);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.o-drawer__footer {
|
|
70
|
+
flex: 1;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
padding-bottom: var(--o-drawer-footer-padding-bottom,40rpx);
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./drawer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={closeOnOverlayClick:{type:Boolean,value:!0},destroyOnClose:{type:Boolean,value:!1},items:{type:Array},overlayProps:{type:Object,value:{}},placement:{type:String,value:"right"},showOverlay:{type:Boolean,value:!0},title:{type:String},usingCustomNavbar:{type:Boolean,value:!1},visible:{type:Boolean,value:!1},zIndex:{type:Number,value:11500}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import menuProps from"../dropdown-menu/props";import{getRect}from"../common/utils";import usingConfig from"../common/mixins/using-config";const{prefix:prefix}=config,parentComponentName="dropdown-menu",componentName="dropdown-item";let DropdownMenuItem=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[usingConfig({componentName:"dropdown-menu"})],this.options={multipleSlots:!0},this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-column`,`${prefix}-class-column-item`,`${prefix}-class-column-item-label`,`${prefix}-class-footer`],this.properties=props,this.data={prefix:prefix,classPrefix:`${prefix}-${componentName}`,show:!1,top:0,maskHeight:0,initValue:null,hasChanged:!1,duration:menuProps.duration.value,zIndex:menuProps.zIndex.value,overlay:menuProps.showOverlay.value,labelAlias:"label",valueAlias:"value",computedLabel:"",firstCheckedValue:""},this.relations={"../dropdown-menu/dropdown-menu":{type:"ancestor",linked(e){const{zIndex:t,duration:o,showOverlay:a}=e.properties;this.setData({zIndex:t,duration:o,showOverlay:a})}}},this.controlledProps=[{key:"value",event:"change"}],this.observers={keys(e){this.setData({labelAlias:e.label||"label",valueAlias:e.value||"value"})},value(e){const{options:t,labelAlias:o,valueAlias:a}=this.data;if(this.data.multiple&&!Array.isArray(e))throw TypeError("value doit être un tableau (mode multiple)");const s=t.find(t=>t[a]===e);s?this.setData({computedLabel:s[o]}):this.setData({computedLabel:""})},"label, computedLabel, disabled"(){var e;null===(e=this.$parent)||void 0===e||e.getAllItems()},show(e){e&&this.getParentBottom(()=>{this.setData({wrapperVisible:!0})})}},this.methods={closeDropdown(){var e;null===(e=this.$parent)||void 0===e||e.setData({activeIdx:-1}),this.setData({show:!1}),this.triggerEvent("close")},getParentBottom(e){getRect(this.$parent,`#${prefix}-bar`).then(t=>{this.setData({top:t.bottom,maskHeight:t.top},e)})},handleTreeClick(e){const{level:t,value:o}=e.currentTarget.dataset,{value:a}=this.data;a[t]=o,this._trigger("change",{value:a})},handleRadioChange(e){const{value:t}=e.detail;if(this._trigger("change",{value:t}),this.data.multiple){const e=this.data.options.find(e=>t.includes(e.value));e&&(this.data.firstCheckedValue=e.value)}else this.closeDropdown()},handleMaskClick(){var e;(null===(e=this.$parent)||void 0===e?void 0:e.properties.closeOnClickOverlay)&&this.closeDropdown()},handleReset(){this._trigger("change",{value:[]}),this._trigger("reset")},handleConfirm(){this._trigger("confirm",{value:this.data.value}),this.closeDropdown(),this.setData({firstCheckedValue:this.data.firstCheckedValue})},onLeaved(){this.setData({wrapperVisible:!1})}}}};DropdownMenuItem=__decorate([wxComponent()],DropdownMenuItem);export default DropdownMenuItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-button":"../button/button","o-radio":"../radio/radio","o-radio-group":"../radio-group/radio-group","o-checkbox":"../checkbox/checkbox","o-checkbox-group":"../checkbox-group/checkbox-group","o-popup":"../popup/popup"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs module="_this" src="./index.wxs"/><wxs module="_" src="../common/utils.wxs"/><view wx:if="{{wrapperVisible}}" class="{{classPrefix}} class {{prefix}}-class" style="{{_._style([_this.getStyles(top, zIndex), style, customStyle])}}"><view class="{{ classPrefix }}__mask" hidden="{{!show}}" style="{{_._style(['height:' + maskHeight + 'px', style, customStyle])}}" bind:tap="handleMaskClick" catchtouchmove="closeDropdown"></view><o-popup visible="{{show}}" z-index="{{zIndex + 1}}" duration="{{duration}}" show-overlay="{{showOverlay}}" custom-style="position: absolute" overlay-props="{{ { style: 'position: absolute' } }}" bind:leaved="onLeaved" bind:visible-change="handleMaskClick" o-class="{{classPrefix}}__popup-host" o-class-content="{{classPrefix}}__content {{prefix}}-class-content"><view class="{{classPrefix}}__body"><scroll-view wx:if="{{!multiple && options && options.length > 0}}" class="{{classPrefix}}__scroll" scroll-y scroll-into-view="id_{{value}}"><o-radio-group class="{{classPrefix}}__radio {{prefix}}-class-column" o-class="{{classPrefix}}__radio-group" style="grid-template-columns: repeat({{optionsColumns}}, 1fr)" value="{{value}}" bind:change="handleRadioChange"><view wx:for="{{options}}" wx:key="index" id="id_{{item[valueAlias]}}"><o-radio placement="{{placement}}" tabindex="0" icon="line" class="{{classPrefix}}__radio-item {{prefix}}-class-column-item" o-class="radio" o-class-label="{{prefix}}-class-column-item-label" value="{{item[valueAlias]}}" label="{{item[labelAlias]}}" disabled="{{item.disabled}}"/></view></o-radio-group></scroll-view><scroll-view wx:if="{{multiple && options && options.length > 0}}" class="{{classPrefix}}__scroll" scroll-y scroll-into-view="id_{{firstCheckedValue}}"><o-checkbox-group class="{{classPrefix}}__checkbox {{prefix}}-class-column" o-class="{{classPrefix}}__checkbox-group" style="grid-template-columns: repeat({{optionsColumns}}, 1fr)" value="{{value ? value : []}}" bind:change="handleRadioChange"><view wx:for="{{options}}" wx:key="index" id="id_{{item[valueAlias]}}"><o-checkbox tabindex="0" class="{{classPrefix}}__checkbox-item {{prefix}}-class-column-item" theme="tag" value="{{item[valueAlias]}}" label="{{item[labelAlias]}}" disabled="{{item.disabled}}"></o-checkbox></view></o-checkbox-group></scroll-view><slot/></view><view class="{{classPrefix}}__footer {{prefix}}-class-footer"><slot name="footer"/><block wx:if="{{multiple}}"><o-button block class="{{classPrefix}}__footer-btn {{classPrefix}}__reset-btn" theme="light" content="{{globalConfig.reset}}" disabled="{{value.length == 0}}" bindtap="handleReset"/><o-button block class="{{classPrefix}}__footer-btn {{classPrefix}}__confirm-btn" theme="primary" content="{{globalConfig.confirm}}" disabled="{{value.length == 0}}" bindtap="handleConfirm"/></block></view></o-popup></view>
|