maxit-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +49 -0
- package/README.md +56 -0
- package/bin/maxit.js +75 -0
- package/lib/commands.js +142 -0
- package/lib/project.js +58 -0
- package/lib/registry.js +50 -0
- package/package.json +30 -0
- package/registry/components/action-sheet/action-sheet.js +1 -0
- package/registry/components/action-sheet/action-sheet.json +1 -0
- package/registry/components/action-sheet/action-sheet.wxml +1 -0
- package/registry/components/action-sheet/action-sheet.wxs +34 -0
- package/registry/components/action-sheet/action-sheet.wxss +197 -0
- package/registry/components/action-sheet/index.js +1 -0
- package/registry/components/action-sheet/props.js +1 -0
- package/registry/components/action-sheet/show.js +1 -0
- package/registry/components/action-sheet/template/grid.wxml +1 -0
- package/registry/components/avatar/avatar.js +1 -0
- package/registry/components/avatar/avatar.json +1 -0
- package/registry/components/avatar/avatar.wxml +1 -0
- package/registry/components/avatar/avatar.wxs +30 -0
- package/registry/components/avatar/avatar.wxss +105 -0
- package/registry/components/avatar/index.js +1 -0
- package/registry/components/avatar/props.js +1 -0
- package/registry/components/avatar-group/avatar-group.js +1 -0
- package/registry/components/avatar-group/avatar-group.json +1 -0
- package/registry/components/avatar-group/avatar-group.wxml +1 -0
- package/registry/components/avatar-group/avatar-group.wxss +248 -0
- package/registry/components/avatar-group/index.js +1 -0
- package/registry/components/avatar-group/props.js +1 -0
- package/registry/components/back-top/back-top.js +1 -0
- package/registry/components/back-top/back-top.json +1 -0
- package/registry/components/back-top/back-top.wxml +1 -0
- package/registry/components/back-top/back-top.wxss +77 -0
- package/registry/components/back-top/index.js +1 -0
- package/registry/components/back-top/props.js +1 -0
- package/registry/components/badge/badge.js +1 -0
- package/registry/components/badge/badge.json +1 -0
- package/registry/components/badge/badge.wxml +1 -0
- package/registry/components/badge/badge.wxs +64 -0
- package/registry/components/badge/badge.wxss +168 -0
- package/registry/components/badge/index.js +1 -0
- package/registry/components/badge/props.js +1 -0
- package/registry/components/balance-card/balance-card.js +34 -0
- package/registry/components/balance-card/balance-card.json +1 -0
- package/registry/components/balance-card/balance-card.wxml +33 -0
- package/registry/components/balance-card/balance-card.wxss +111 -0
- package/registry/components/balance-card/index.js +2 -0
- package/registry/components/balance-card/props.js +14 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.js +39 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.json +1 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.wxml +26 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.wxss +31 -0
- package/registry/components/balance-thumb-card/index.js +2 -0
- package/registry/components/balance-thumb-card/props.js +17 -0
- package/registry/components/bill-card/bill-card.js +23 -0
- package/registry/components/bill-card/bill-card.json +1 -0
- package/registry/components/bill-card/bill-card.wxml +30 -0
- package/registry/components/bill-card/bill-card.wxss +33 -0
- package/registry/components/bill-card/index.js +2 -0
- package/registry/components/bill-card/props.js +18 -0
- package/registry/components/button/button.js +1 -0
- package/registry/components/button/button.json +1 -0
- package/registry/components/button/button.wxml +1 -0
- package/registry/components/button/button.wxss +775 -0
- package/registry/components/button/index.js +1 -0
- package/registry/components/button/props.js +1 -0
- package/registry/components/calendar/calendar-header.wxml +1 -0
- package/registry/components/calendar/calendar.js +1 -0
- package/registry/components/calendar/calendar.json +1 -0
- package/registry/components/calendar/calendar.wxml +1 -0
- package/registry/components/calendar/calendar.wxs +44 -0
- package/registry/components/calendar/calendar.wxss +246 -0
- package/registry/components/calendar/index.js +1 -0
- package/registry/components/calendar/props.js +1 -0
- package/registry/components/calendar/template.wxml +1 -0
- package/registry/components/calendar/utils.js +1 -0
- package/registry/components/card/card.js +24 -0
- package/registry/components/card/card.json +1 -0
- package/registry/components/card/card.wxml +23 -0
- package/registry/components/card/card.wxss +103 -0
- package/registry/components/card/index.js +2 -0
- package/registry/components/card/props.js +16 -0
- package/registry/components/card-list/card-list.js +22 -0
- package/registry/components/card-list/card-list.json +1 -0
- package/registry/components/card-list/card-list.wxml +7 -0
- package/registry/components/card-list/card-list.wxss +30 -0
- package/registry/components/card-list/index.js +2 -0
- package/registry/components/card-list/props.js +16 -0
- package/registry/components/cascader/cascader.js +1 -0
- package/registry/components/cascader/cascader.json +1 -0
- package/registry/components/cascader/cascader.wxml +1 -0
- package/registry/components/cascader/cascader.wxss +178 -0
- package/registry/components/cascader/index.js +1 -0
- package/registry/components/cascader/props.js +1 -0
- package/registry/components/category-filter/category-filter.js +50 -0
- package/registry/components/category-filter/category-filter.json +1 -0
- package/registry/components/category-filter/category-filter.wxml +16 -0
- package/registry/components/category-filter/category-filter.wxss +47 -0
- package/registry/components/category-filter/index.js +2 -0
- package/registry/components/category-filter/props.js +10 -0
- package/registry/components/cell/cell.js +1 -0
- package/registry/components/cell/cell.json +1 -0
- package/registry/components/cell/cell.wxml +1 -0
- package/registry/components/cell/cell.wxss +136 -0
- package/registry/components/cell/index.js +1 -0
- package/registry/components/cell/props.js +1 -0
- package/registry/components/check-tag/check-tag.js +1 -0
- package/registry/components/check-tag/check-tag.json +1 -0
- package/registry/components/check-tag/check-tag.wxml +1 -0
- package/registry/components/check-tag/check-tag.wxss +275 -0
- package/registry/components/check-tag/index.js +1 -0
- package/registry/components/check-tag/props.js +1 -0
- package/registry/components/checkbox/checkbox.js +1 -0
- package/registry/components/checkbox/checkbox.json +1 -0
- package/registry/components/checkbox/checkbox.wxml +1 -0
- package/registry/components/checkbox/checkbox.wxss +230 -0
- package/registry/components/checkbox/index.js +1 -0
- package/registry/components/checkbox/props.js +1 -0
- package/registry/components/checkbox-group/checkbox-group.js +1 -0
- package/registry/components/checkbox-group/checkbox-group.json +1 -0
- package/registry/components/checkbox-group/checkbox-group.wxml +1 -0
- package/registry/components/checkbox-group/checkbox-group.wxss +7 -0
- package/registry/components/checkbox-group/index.js +1 -0
- package/registry/components/checkbox-group/props.js +1 -0
- package/registry/components/collapse/collapse.js +1 -0
- package/registry/components/collapse/collapse.json +1 -0
- package/registry/components/collapse/collapse.wxml +1 -0
- package/registry/components/collapse/collapse.wxss +8 -0
- package/registry/components/collapse/index.js +1 -0
- package/registry/components/collapse/props.js +1 -0
- package/registry/components/collapse-panel/collapse-panel.js +1 -0
- package/registry/components/collapse-panel/collapse-panel.json +1 -0
- package/registry/components/collapse-panel/collapse-panel.wxml +1 -0
- package/registry/components/collapse-panel/collapse-panel.wxss +186 -0
- package/registry/components/collapse-panel/index.js +1 -0
- package/registry/components/collapse-panel/props.js +1 -0
- package/registry/components/color-picker/color-picker.js +1 -0
- package/registry/components/color-picker/color-picker.json +1 -0
- package/registry/components/color-picker/color-picker.wxml +1 -0
- package/registry/components/color-picker/color-picker.wxss +312 -0
- package/registry/components/color-picker/constants.js +1 -0
- package/registry/components/color-picker/index.js +1 -0
- package/registry/components/color-picker/interfaces.js +1 -0
- package/registry/components/color-picker/props.js +1 -0
- package/registry/components/color-picker/template.wxml +1 -0
- package/registry/components/color-picker/utils.js +1 -0
- package/registry/components/common/bus.js +1 -0
- package/registry/components/common/config.js +1 -0
- package/registry/components/common/libs/tinycolor.js +1 -0
- package/registry/components/common/locale.js +20 -0
- package/registry/components/common/mixins/page-scroll.js +1 -0
- package/registry/components/common/mixins/touch.js +1 -0
- package/registry/components/common/mixins/transition.js +1 -0
- package/registry/components/common/mixins/using-config.js +24 -0
- package/registry/components/common/mixins/using-custom-navbar.js +1 -0
- package/registry/components/common/shared/calendar/index.js +1 -0
- package/registry/components/common/shared/color-picker/cmyk.js +1 -0
- package/registry/components/common/shared/color-picker/color.js +1 -0
- package/registry/components/common/shared/color-picker/gradient.js +1 -0
- package/registry/components/common/shared/color-picker/index.js +1 -0
- package/registry/components/common/shared/date.js +1 -0
- package/registry/components/common/shared/qrcode/qrcodegen.js +1 -0
- package/registry/components/common/shared/qrcode/utils.js +1 -0
- package/registry/components/common/src/control.js +1 -0
- package/registry/components/common/src/flatTool.js +1 -0
- package/registry/components/common/src/index.js +1 -0
- package/registry/components/common/src/instantiationDecorator.js +1 -0
- package/registry/components/common/src/superComponent.js +1 -0
- package/registry/components/common/style/card.wxss +245 -0
- package/registry/components/common/style/index.wxss +3 -0
- package/registry/components/common/style/tokens.wxss +233 -0
- package/registry/components/common/template/badge.wxml +1 -0
- package/registry/components/common/template/button.wxml +1 -0
- package/registry/components/common/template/icon.wxml +1 -0
- package/registry/components/common/template/image.wxml +1 -0
- package/registry/components/common/tslib.js +2 -0
- package/registry/components/common/typography/ellipsis.wxml +1 -0
- package/registry/components/common/typography/typography.wxs +49 -0
- package/registry/components/common/utils.js +1 -0
- package/registry/components/common/utils.wxs +149 -0
- package/registry/components/common/validator.js +1 -0
- package/registry/components/common/wechat.js +1 -0
- package/registry/components/consumption-card/consumption-card.js +23 -0
- package/registry/components/consumption-card/consumption-card.json +1 -0
- package/registry/components/consumption-card/consumption-card.wxml +16 -0
- package/registry/components/consumption-card/consumption-card.wxss +36 -0
- package/registry/components/consumption-card/index.js +2 -0
- package/registry/components/consumption-card/props.js +14 -0
- package/registry/components/contact-list/contact-list.js +60 -0
- package/registry/components/contact-list/contact-list.json +1 -0
- package/registry/components/contact-list/contact-list.wxml +24 -0
- package/registry/components/contact-list/contact-list.wxss +73 -0
- package/registry/components/contact-list/index.js +2 -0
- package/registry/components/contact-list/props.js +13 -0
- package/registry/components/description-tile/description-tile.js +22 -0
- package/registry/components/description-tile/description-tile.json +1 -0
- package/registry/components/description-tile/description-tile.wxml +11 -0
- package/registry/components/description-tile/description-tile.wxss +21 -0
- package/registry/components/description-tile/index.js +2 -0
- package/registry/components/description-tile/props.js +10 -0
- package/registry/components/details-card/details-card.js +38 -0
- package/registry/components/details-card/details-card.json +1 -0
- package/registry/components/details-card/details-card.wxml +37 -0
- package/registry/components/details-card/details-card.wxss +119 -0
- package/registry/components/details-card/index.js +2 -0
- package/registry/components/details-card/props.js +22 -0
- package/registry/components/dialog/dialog.js +1 -0
- package/registry/components/dialog/dialog.json +1 -0
- package/registry/components/dialog/dialog.wxml +1 -0
- package/registry/components/dialog/dialog.wxs +13 -0
- package/registry/components/dialog/dialog.wxss +123 -0
- package/registry/components/dialog/index.js +1 -0
- package/registry/components/dialog/props.js +1 -0
- package/registry/components/divider/divider.js +1 -0
- package/registry/components/divider/divider.json +1 -0
- package/registry/components/divider/divider.wxml +1 -0
- package/registry/components/divider/divider.wxss +69 -0
- package/registry/components/divider/index.js +1 -0
- package/registry/components/divider/props.js +1 -0
- package/registry/components/drawer/drawer.js +1 -0
- package/registry/components/drawer/drawer.json +1 -0
- package/registry/components/drawer/drawer.wxml +1 -0
- package/registry/components/drawer/drawer.wxss +75 -0
- package/registry/components/drawer/index.js +1 -0
- package/registry/components/drawer/props.js +1 -0
- package/registry/components/dropdown-item/dropdown-item.js +1 -0
- package/registry/components/dropdown-item/dropdown-item.json +1 -0
- package/registry/components/dropdown-item/dropdown-item.wxml +1 -0
- package/registry/components/dropdown-item/dropdown-item.wxss +116 -0
- package/registry/components/dropdown-item/index.js +1 -0
- package/registry/components/dropdown-item/index.wxs +9 -0
- package/registry/components/dropdown-item/props.js +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.js +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.json +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.wxml +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.wxss +72 -0
- package/registry/components/dropdown-menu/index.js +1 -0
- package/registry/components/dropdown-menu/props.js +1 -0
- package/registry/components/empty/empty.js +1 -0
- package/registry/components/empty/empty.json +1 -0
- package/registry/components/empty/empty.wxml +1 -0
- package/registry/components/empty/empty.wxss +28 -0
- package/registry/components/empty/index.js +1 -0
- package/registry/components/empty/props.js +1 -0
- package/registry/components/entry-card/entry-card.js +23 -0
- package/registry/components/entry-card/entry-card.json +1 -0
- package/registry/components/entry-card/entry-card.wxml +14 -0
- package/registry/components/entry-card/entry-card.wxss +30 -0
- package/registry/components/entry-card/index.js +2 -0
- package/registry/components/entry-card/props.js +11 -0
- package/registry/components/file-drop/file-drop.js +23 -0
- package/registry/components/file-drop/file-drop.json +1 -0
- package/registry/components/file-drop/file-drop.wxml +13 -0
- package/registry/components/file-drop/file-drop.wxss +35 -0
- package/registry/components/file-drop/index.js +2 -0
- package/registry/components/file-drop/props.js +9 -0
- package/registry/components/grid/grid.js +1 -0
- package/registry/components/grid/grid.json +1 -0
- package/registry/components/grid/grid.wxml +1 -0
- package/registry/components/grid/grid.wxss +18 -0
- package/registry/components/grid/index.js +1 -0
- package/registry/components/grid/props.js +1 -0
- package/registry/components/grid-item/grid-item.js +1 -0
- package/registry/components/grid-item/grid-item.json +1 -0
- package/registry/components/grid-item/grid-item.wxml +1 -0
- package/registry/components/grid-item/grid-item.wxss +130 -0
- package/registry/components/grid-item/index.js +1 -0
- package/registry/components/grid-item/props.js +1 -0
- package/registry/components/guide/content.wxml +1 -0
- package/registry/components/guide/guide.js +1 -0
- package/registry/components/guide/guide.json +1 -0
- package/registry/components/guide/guide.wxml +1 -0
- package/registry/components/guide/guide.wxss +79 -0
- package/registry/components/guide/index.js +1 -0
- package/registry/components/guide/props.js +1 -0
- package/registry/components/icon/icon.js +1 -0
- package/registry/components/icon/icon.json +1 -0
- package/registry/components/icon/icon.wxml +1 -0
- package/registry/components/icon/icon.wxss +2361 -0
- package/registry/components/icon/index.js +1 -0
- package/registry/components/icon/props.js +1 -0
- package/registry/components/image/image.js +1 -0
- package/registry/components/image/image.json +1 -0
- package/registry/components/image/image.wxml +1 -0
- package/registry/components/image/image.wxss +55 -0
- package/registry/components/image/index.js +1 -0
- package/registry/components/image/props.js +1 -0
- package/registry/components/image-viewer/image-viewer.js +1 -0
- package/registry/components/image-viewer/image-viewer.json +1 -0
- package/registry/components/image-viewer/image-viewer.wxml +1 -0
- package/registry/components/image-viewer/image-viewer.wxs +7 -0
- package/registry/components/image-viewer/image-viewer.wxss +90 -0
- package/registry/components/image-viewer/index.js +1 -0
- package/registry/components/image-viewer/props.js +1 -0
- package/registry/components/info-card/index.js +2 -0
- package/registry/components/info-card/info-card.js +22 -0
- package/registry/components/info-card/info-card.json +1 -0
- package/registry/components/info-card/info-card.wxml +14 -0
- package/registry/components/info-card/info-card.wxss +56 -0
- package/registry/components/info-card/props.js +11 -0
- package/registry/components/input/index.js +1 -0
- package/registry/components/input/input.js +1 -0
- package/registry/components/input/input.json +1 -0
- package/registry/components/input/input.wxml +1 -0
- package/registry/components/input/input.wxs +16 -0
- package/registry/components/input/input.wxss +313 -0
- package/registry/components/input/props.js +1 -0
- package/registry/components/insight-card/index.js +2 -0
- package/registry/components/insight-card/insight-card.js +19 -0
- package/registry/components/insight-card/insight-card.json +1 -0
- package/registry/components/insight-card/insight-card.wxml +17 -0
- package/registry/components/insight-card/insight-card.wxss +35 -0
- package/registry/components/insight-card/props.js +12 -0
- package/registry/components/link/index.js +1 -0
- package/registry/components/link/link.js +1 -0
- package/registry/components/link/link.json +1 -0
- package/registry/components/link/link.wxml +1 -0
- package/registry/components/link/link.wxss +155 -0
- package/registry/components/link/props.js +1 -0
- package/registry/components/list-item/index.js +2 -0
- package/registry/components/list-item/list-item.js +39 -0
- package/registry/components/list-item/list-item.json +1 -0
- package/registry/components/list-item/list-item.wxml +22 -0
- package/registry/components/list-item/list-item.wxss +110 -0
- package/registry/components/list-item/props.js +22 -0
- package/registry/components/loading/index.js +1 -0
- package/registry/components/loading/loading.js +1 -0
- package/registry/components/loading/loading.json +1 -0
- package/registry/components/loading/loading.wxml +1 -0
- package/registry/components/loading/loading.wxss +281 -0
- package/registry/components/loading/props.js +1 -0
- package/registry/components/main-card/index.js +2 -0
- package/registry/components/main-card/main-card.js +23 -0
- package/registry/components/main-card/main-card.json +1 -0
- package/registry/components/main-card/main-card.wxml +37 -0
- package/registry/components/main-card/main-card.wxss +63 -0
- package/registry/components/main-card/props.js +24 -0
- package/registry/components/media-card/index.js +2 -0
- package/registry/components/media-card/media-card.js +23 -0
- package/registry/components/media-card/media-card.json +1 -0
- package/registry/components/media-card/media-card.wxml +11 -0
- package/registry/components/media-card/media-card.wxss +51 -0
- package/registry/components/media-card/props.js +8 -0
- package/registry/components/message/index.js +1 -0
- package/registry/components/message/message.interface.js +1 -0
- package/registry/components/message/message.js +1 -0
- package/registry/components/message/message.json +1 -0
- package/registry/components/message/message.wxml +1 -0
- package/registry/components/message/message.wxss +2 -0
- package/registry/components/message/props.js +1 -0
- package/registry/components/message-item/index.js +1 -0
- package/registry/components/message-item/message-item.js +1 -0
- package/registry/components/message-item/message-item.json +1 -0
- package/registry/components/message-item/message-item.wxml +1 -0
- package/registry/components/message-item/message-item.wxs +31 -0
- package/registry/components/message-item/message-item.wxss +141 -0
- package/registry/components/navbar/index.js +1 -0
- package/registry/components/navbar/navbar.js +1 -0
- package/registry/components/navbar/navbar.json +1 -0
- package/registry/components/navbar/navbar.wxml +1 -0
- package/registry/components/navbar/navbar.wxss +126 -0
- package/registry/components/navbar/props.js +1 -0
- package/registry/components/notice-bar/index.js +1 -0
- package/registry/components/notice-bar/notice-bar.js +1 -0
- package/registry/components/notice-bar/notice-bar.json +1 -0
- package/registry/components/notice-bar/notice-bar.wxml +1 -0
- package/registry/components/notice-bar/notice-bar.wxss +95 -0
- package/registry/components/notice-bar/props.js +1 -0
- package/registry/components/notification-item/index.js +2 -0
- package/registry/components/notification-item/notification-item.js +35 -0
- package/registry/components/notification-item/notification-item.json +1 -0
- package/registry/components/notification-item/notification-item.wxml +14 -0
- package/registry/components/notification-item/notification-item.wxss +47 -0
- package/registry/components/notification-item/props.js +10 -0
- package/registry/components/offer-card/index.js +2 -0
- package/registry/components/offer-card/offer-card.js +22 -0
- package/registry/components/offer-card/offer-card.json +1 -0
- package/registry/components/offer-card/offer-card.wxml +33 -0
- package/registry/components/offer-card/offer-card.wxss +37 -0
- package/registry/components/offer-card/props.js +21 -0
- package/registry/components/om-card/index.js +2 -0
- package/registry/components/om-card/om-card.js +40 -0
- package/registry/components/om-card/om-card.json +1 -0
- package/registry/components/om-card/om-card.wxml +35 -0
- package/registry/components/om-card/om-card.wxss +90 -0
- package/registry/components/om-card/props.js +14 -0
- package/registry/components/overlay/index.js +1 -0
- package/registry/components/overlay/overlay.js +1 -0
- package/registry/components/overlay/overlay.json +1 -0
- package/registry/components/overlay/overlay.wxml +1 -0
- package/registry/components/overlay/overlay.wxss +22 -0
- package/registry/components/overlay/props.js +1 -0
- package/registry/components/paragraph/index.js +1 -0
- package/registry/components/paragraph/paragraph.js +1 -0
- package/registry/components/paragraph/paragraph.json +1 -0
- package/registry/components/paragraph/paragraph.wxml +1 -0
- package/registry/components/paragraph/paragraph.wxss +151 -0
- package/registry/components/paragraph/props.js +1 -0
- package/registry/components/picker/index.js +1 -0
- package/registry/components/picker/picker.js +1 -0
- package/registry/components/picker/picker.json +1 -0
- package/registry/components/picker/picker.wxml +1 -0
- package/registry/components/picker/picker.wxs +9 -0
- package/registry/components/picker/picker.wxss +84 -0
- package/registry/components/picker/props.js +1 -0
- package/registry/components/picker/template.wxml +1 -0
- package/registry/components/picker-item/index.js +1 -0
- package/registry/components/picker-item/picker-item.js +1 -0
- package/registry/components/picker-item/picker-item.json +1 -0
- package/registry/components/picker-item/picker-item.wxml +1 -0
- package/registry/components/picker-item/picker-item.wxss +41 -0
- package/registry/components/picker-item/props.js +1 -0
- package/registry/components/popover/index.js +1 -0
- package/registry/components/popover/popover.js +1 -0
- package/registry/components/popover/popover.json +1 -0
- package/registry/components/popover/popover.wxml +1 -0
- package/registry/components/popover/popover.wxss +336 -0
- package/registry/components/popover/props.js +1 -0
- package/registry/components/popup/index.js +1 -0
- package/registry/components/popup/popup.js +1 -0
- package/registry/components/popup/popup.json +1 -0
- package/registry/components/popup/popup.wxml +1 -0
- package/registry/components/popup/popup.wxs +21 -0
- package/registry/components/popup/popup.wxss +96 -0
- package/registry/components/popup/props.js +1 -0
- package/registry/components/post-item/index.js +2 -0
- package/registry/components/post-item/post-item.js +22 -0
- package/registry/components/post-item/post-item.json +1 -0
- package/registry/components/post-item/post-item.wxml +5 -0
- package/registry/components/post-item/post-item.wxss +37 -0
- package/registry/components/post-item/props.js +7 -0
- package/registry/components/progress/index.js +1 -0
- package/registry/components/progress/progress.js +1 -0
- package/registry/components/progress/progress.json +1 -0
- package/registry/components/progress/progress.wxml +1 -0
- package/registry/components/progress/progress.wxs +80 -0
- package/registry/components/progress/progress.wxss +161 -0
- package/registry/components/progress/props.js +1 -0
- package/registry/components/progress/utils.js +1 -0
- package/registry/components/purchase-card/index.js +2 -0
- package/registry/components/purchase-card/props.js +13 -0
- package/registry/components/purchase-card/purchase-card.js +40 -0
- package/registry/components/purchase-card/purchase-card.json +1 -0
- package/registry/components/purchase-card/purchase-card.wxml +22 -0
- package/registry/components/purchase-card/purchase-card.wxss +19 -0
- package/registry/components/qrcode/components/qrcode-canvas/props.js +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.js +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.json +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxml +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxss +10 -0
- package/registry/components/qrcode/components/qrcode-status/props.js +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.js +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.json +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxml +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxss +32 -0
- package/registry/components/qrcode/hooks/useQRCode.js +1 -0
- package/registry/components/qrcode/index.js +1 -0
- package/registry/components/qrcode/props.js +1 -0
- package/registry/components/qrcode/qrcode.js +1 -0
- package/registry/components/qrcode/qrcode.json +1 -0
- package/registry/components/qrcode/qrcode.wxml +1 -0
- package/registry/components/qrcode/qrcode.wxss +36 -0
- package/registry/components/quick-action/index.js +2 -0
- package/registry/components/quick-action/props.js +10 -0
- package/registry/components/quick-action/quick-action.js +22 -0
- package/registry/components/quick-action/quick-action.json +1 -0
- package/registry/components/quick-action/quick-action.wxml +15 -0
- package/registry/components/quick-action/quick-action.wxss +80 -0
- package/registry/components/radio/index.js +1 -0
- package/registry/components/radio/props.js +1 -0
- package/registry/components/radio/radio.js +1 -0
- package/registry/components/radio/radio.json +1 -0
- package/registry/components/radio/radio.wxml +1 -0
- package/registry/components/radio/radio.wxss +219 -0
- package/registry/components/radio-group/index.js +1 -0
- package/registry/components/radio-group/props.js +1 -0
- package/registry/components/radio-group/radio-group.js +1 -0
- package/registry/components/radio-group/radio-group.json +1 -0
- package/registry/components/radio-group/radio-group.wxml +1 -0
- package/registry/components/radio-group/radio-group.wxss +7 -0
- package/registry/components/rate/index.js +1 -0
- package/registry/components/rate/props.js +1 -0
- package/registry/components/rate/rate.js +1 -0
- package/registry/components/rate/rate.json +1 -0
- package/registry/components/rate/rate.wxml +1 -0
- package/registry/components/rate/rate.wxs +65 -0
- package/registry/components/rate/rate.wxss +99 -0
- package/registry/components/rating-card/index.js +2 -0
- package/registry/components/rating-card/props.js +12 -0
- package/registry/components/rating-card/rating-card.js +42 -0
- package/registry/components/rating-card/rating-card.json +1 -0
- package/registry/components/rating-card/rating-card.wxml +24 -0
- package/registry/components/rating-card/rating-card.wxss +49 -0
- package/registry/components/recap-card/index.js +2 -0
- package/registry/components/recap-card/props.js +21 -0
- package/registry/components/recap-card/recap-card.js +38 -0
- package/registry/components/recap-card/recap-card.json +1 -0
- package/registry/components/recap-card/recap-card.wxml +43 -0
- package/registry/components/recap-card/recap-card.wxss +60 -0
- package/registry/components/result/illustrations.js +2 -0
- package/registry/components/result/index.js +1 -0
- package/registry/components/result/props.js +1 -0
- package/registry/components/result/result.js +1 -0
- package/registry/components/result/result.json +1 -0
- package/registry/components/result/result.wxml +1 -0
- package/registry/components/result/result.wxss +97 -0
- package/registry/components/review-item/index.js +2 -0
- package/registry/components/review-item/props.js +13 -0
- package/registry/components/review-item/review-item.js +38 -0
- package/registry/components/review-item/review-item.json +1 -0
- package/registry/components/review-item/review-item.wxml +19 -0
- package/registry/components/review-item/review-item.wxss +65 -0
- package/registry/components/search/index.js +1 -0
- package/registry/components/search/props.js +1 -0
- package/registry/components/search/search.js +1 -0
- package/registry/components/search/search.json +1 -0
- package/registry/components/search/search.wxml +1 -0
- package/registry/components/search/search.wxs +6 -0
- package/registry/components/search/search.wxss +100 -0
- package/registry/components/section-title/index.js +2 -0
- package/registry/components/section-title/props.js +6 -0
- package/registry/components/section-title/section-title.js +22 -0
- package/registry/components/section-title/section-title.json +1 -0
- package/registry/components/section-title/section-title.wxml +6 -0
- package/registry/components/section-title/section-title.wxss +19 -0
- package/registry/components/segmented/index.js +1 -0
- package/registry/components/segmented/props.js +1 -0
- package/registry/components/segmented/segmented.js +1 -0
- package/registry/components/segmented/segmented.json +1 -0
- package/registry/components/segmented/segmented.wxml +1 -0
- package/registry/components/segmented/segmented.wxss +113 -0
- package/registry/components/selection-card/index.js +2 -0
- package/registry/components/selection-card/props.js +11 -0
- package/registry/components/selection-card/selection-card.js +25 -0
- package/registry/components/selection-card/selection-card.json +1 -0
- package/registry/components/selection-card/selection-card.wxml +7 -0
- package/registry/components/selection-card/selection-card.wxss +27 -0
- package/registry/components/shortcut-chip/index.js +2 -0
- package/registry/components/shortcut-chip/props.js +7 -0
- package/registry/components/shortcut-chip/shortcut-chip.js +24 -0
- package/registry/components/shortcut-chip/shortcut-chip.json +1 -0
- package/registry/components/shortcut-chip/shortcut-chip.wxml +4 -0
- package/registry/components/shortcut-chip/shortcut-chip.wxss +29 -0
- package/registry/components/skeleton/index.js +1 -0
- package/registry/components/skeleton/props.js +1 -0
- package/registry/components/skeleton/skeleton.js +1 -0
- package/registry/components/skeleton/skeleton.json +1 -0
- package/registry/components/skeleton/skeleton.wxml +1 -0
- package/registry/components/skeleton/skeleton.wxss +92 -0
- package/registry/components/slider/index.js +1 -0
- package/registry/components/slider/props.js +1 -0
- package/registry/components/slider/slider.js +1 -0
- package/registry/components/slider/slider.json +1 -0
- package/registry/components/slider/slider.wxml +1 -0
- package/registry/components/slider/slider.wxs +10 -0
- package/registry/components/slider/slider.wxss +287 -0
- package/registry/components/slider/tool.js +1 -0
- package/registry/components/step-item/index.js +1 -0
- package/registry/components/step-item/props.js +1 -0
- package/registry/components/step-item/step-item.js +1 -0
- package/registry/components/step-item/step-item.json +1 -0
- package/registry/components/step-item/step-item.wxml +1 -0
- package/registry/components/step-item/step-item.wxs +7 -0
- package/registry/components/step-item/step-item.wxss +226 -0
- package/registry/components/stepper/index.js +1 -0
- package/registry/components/stepper/props.js +1 -0
- package/registry/components/stepper/stepper.js +1 -0
- package/registry/components/stepper/stepper.json +1 -0
- package/registry/components/stepper/stepper.wxml +1 -0
- package/registry/components/stepper/stepper.wxss +130 -0
- package/registry/components/steps/index.js +1 -0
- package/registry/components/steps/props.js +1 -0
- package/registry/components/steps/steps.js +1 -0
- package/registry/components/steps/steps.json +1 -0
- package/registry/components/steps/steps.wxml +1 -0
- package/registry/components/steps/steps.wxss +27 -0
- package/registry/components/sticky/index.js +1 -0
- package/registry/components/sticky/props.js +1 -0
- package/registry/components/sticky/sticky.js +1 -0
- package/registry/components/sticky/sticky.json +1 -0
- package/registry/components/sticky/sticky.wxml +1 -0
- package/registry/components/sticky/sticky.wxss +6 -0
- package/registry/components/story-item/index.js +2 -0
- package/registry/components/story-item/props.js +8 -0
- package/registry/components/story-item/story-item.js +22 -0
- package/registry/components/story-item/story-item.json +1 -0
- package/registry/components/story-item/story-item.wxml +9 -0
- package/registry/components/story-item/story-item.wxss +43 -0
- package/registry/components/swipe-cell/index.js +1 -0
- package/registry/components/swipe-cell/props.js +1 -0
- package/registry/components/swipe-cell/swipe-cell.js +1 -0
- package/registry/components/swipe-cell/swipe-cell.json +1 -0
- package/registry/components/swipe-cell/swipe-cell.wxml +1 -0
- package/registry/components/swipe-cell/swipe-cell.wxs +185 -0
- package/registry/components/swipe-cell/swipe-cell.wxss +40 -0
- package/registry/components/swiper/index.js +1 -0
- package/registry/components/swiper/index.wxs +25 -0
- package/registry/components/swiper/props.js +1 -0
- package/registry/components/swiper/swiper.js +1 -0
- package/registry/components/swiper/swiper.json +1 -0
- package/registry/components/swiper/swiper.wxml +1 -0
- package/registry/components/swiper/swiper.wxss +28 -0
- package/registry/components/swiper-nav/index.js +1 -0
- package/registry/components/swiper-nav/props.js +1 -0
- package/registry/components/swiper-nav/swiper-nav.js +1 -0
- package/registry/components/swiper-nav/swiper-nav.json +1 -0
- package/registry/components/swiper-nav/swiper-nav.wxml +1 -0
- package/registry/components/swiper-nav/swiper-nav.wxss +155 -0
- package/registry/components/switch/index.js +1 -0
- package/registry/components/switch/props.js +1 -0
- package/registry/components/switch/switch.js +1 -0
- package/registry/components/switch/switch.json +1 -0
- package/registry/components/switch/switch.wxml +1 -0
- package/registry/components/switch/switch.wxss +169 -0
- package/registry/components/tab-bar/index.js +1 -0
- package/registry/components/tab-bar/props.js +1 -0
- package/registry/components/tab-bar/tab-bar.js +1 -0
- package/registry/components/tab-bar/tab-bar.json +1 -0
- package/registry/components/tab-bar/tab-bar.wxml +1 -0
- package/registry/components/tab-bar/tab-bar.wxss +50 -0
- package/registry/components/tab-bar-item/index.js +1 -0
- package/registry/components/tab-bar-item/props.js +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.js +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.json +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.wxml +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.wxss +177 -0
- package/registry/components/tab-panel/index.js +1 -0
- package/registry/components/tab-panel/props.js +1 -0
- package/registry/components/tab-panel/tab-panel.js +1 -0
- package/registry/components/tab-panel/tab-panel.json +1 -0
- package/registry/components/tab-panel/tab-panel.wxml +1 -0
- package/registry/components/tab-panel/tab-panel.wxss +20 -0
- package/registry/components/tabs/index.js +1 -0
- package/registry/components/tabs/props.js +1 -0
- package/registry/components/tabs/tabs.js +1 -0
- package/registry/components/tabs/tabs.json +1 -0
- package/registry/components/tabs/tabs.wxml +1 -0
- package/registry/components/tabs/tabs.wxs +30 -0
- package/registry/components/tabs/tabs.wxss +233 -0
- package/registry/components/tag/index.js +1 -0
- package/registry/components/tag/props.js +1 -0
- package/registry/components/tag/tag.js +1 -0
- package/registry/components/tag/tag.json +1 -0
- package/registry/components/tag/tag.wxml +1 -0
- package/registry/components/tag/tag.wxss +268 -0
- package/registry/components/text/index.js +1 -0
- package/registry/components/text/props.js +1 -0
- package/registry/components/text/text.js +1 -0
- package/registry/components/text/text.json +1 -0
- package/registry/components/text/text.wxml +1 -0
- package/registry/components/text/text.wxss +151 -0
- package/registry/components/textarea/index.js +1 -0
- package/registry/components/textarea/props.js +1 -0
- package/registry/components/textarea/textarea.js +1 -0
- package/registry/components/textarea/textarea.json +1 -0
- package/registry/components/textarea/textarea.wxml +1 -0
- package/registry/components/textarea/textarea.wxs +15 -0
- package/registry/components/textarea/textarea.wxss +151 -0
- package/registry/components/ticket/index.js +2 -0
- package/registry/components/ticket/props.js +19 -0
- package/registry/components/ticket/ticket.js +19 -0
- package/registry/components/ticket/ticket.json +1 -0
- package/registry/components/ticket/ticket.wxml +31 -0
- package/registry/components/ticket/ticket.wxss +57 -0
- package/registry/components/title/index.js +1 -0
- package/registry/components/title/props.js +1 -0
- package/registry/components/title/title.js +1 -0
- package/registry/components/title/title.json +1 -0
- package/registry/components/title/title.wxml +1 -0
- package/registry/components/title/title.wxss +151 -0
- package/registry/components/toast/index.js +1 -0
- package/registry/components/toast/props.js +1 -0
- package/registry/components/toast/toast.js +1 -0
- package/registry/components/toast/toast.json +1 -0
- package/registry/components/toast/toast.wxml +1 -0
- package/registry/components/toast/toast.wxss +87 -0
- package/registry/components/toggle-card/index.js +2 -0
- package/registry/components/toggle-card/props.js +7 -0
- package/registry/components/toggle-card/toggle-card.js +37 -0
- package/registry/components/toggle-card/toggle-card.json +1 -0
- package/registry/components/toggle-card/toggle-card.wxml +12 -0
- package/registry/components/toggle-card/toggle-card.wxss +11 -0
- package/registry/components/top-item/index.js +2 -0
- package/registry/components/top-item/props.js +10 -0
- package/registry/components/top-item/top-item.js +22 -0
- package/registry/components/top-item/top-item.json +1 -0
- package/registry/components/top-item/top-item.wxml +8 -0
- package/registry/components/top-item/top-item.wxss +37 -0
- package/registry/components/transaction-card/index.js +2 -0
- package/registry/components/transaction-card/props.js +25 -0
- package/registry/components/transaction-card/transaction-card.js +43 -0
- package/registry/components/transaction-card/transaction-card.json +1 -0
- package/registry/components/transaction-card/transaction-card.wxml +44 -0
- package/registry/components/transaction-card/transaction-card.wxss +45 -0
- package/registry/components/transfer-item/index.js +2 -0
- package/registry/components/transfer-item/props.js +18 -0
- package/registry/components/transfer-item/transfer-item.js +40 -0
- package/registry/components/transfer-item/transfer-item.json +1 -0
- package/registry/components/transfer-item/transfer-item.wxml +34 -0
- package/registry/components/transfer-item/transfer-item.wxss +66 -0
- package/registry/components/upload/drag.wxs +242 -0
- package/registry/components/upload/index.js +1 -0
- package/registry/components/upload/props.js +1 -0
- package/registry/components/upload/upload.js +1 -0
- package/registry/components/upload/upload.json +1 -0
- package/registry/components/upload/upload.wxml +1 -0
- package/registry/components/upload/upload.wxs +129 -0
- package/registry/components/upload/upload.wxss +354 -0
- package/registry/components/wheel-select/index.js +2 -0
- package/registry/components/wheel-select/props.js +8 -0
- package/registry/components/wheel-select/wheel-select.js +38 -0
- package/registry/components/wheel-select/wheel-select.json +1 -0
- package/registry/components/wheel-select/wheel-select.wxml +9 -0
- package/registry/components/wheel-select/wheel-select.wxss +22 -0
- package/registry/registry.json +1033 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter,__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import props from"./props";import config from"../common/config";import touch from"../common/mixins/touch";import{getRect,uniqueFactory}from"../common/utils";import{getObserver}from"../common/wechat";const{prefix:prefix}=config,name=`${prefix}-tabs`,getUniqueID=uniqueFactory("tabs");let Tabs=class extends SuperComponent{constructor(){super(...arguments),this.options={pureDataPattern:/^currentLabels$/},this.behaviors=[touch],this.externalClasses=[`${prefix}-class`,`${prefix}-class-item`,`${prefix}-class-active`,`${prefix}-class-track`,`${prefix}-class-content`],this.relations={"../tab-panel/tab-panel":{type:"descendant",linked(t){this.children.push(t),this.initChildId(),t.index=this.children.length-1,this.updateTabs()},unlinked(t){this.children=this.children.filter(e=>e.index!==t.index),this.updateTabs(()=>this.setTrack()),this.initChildId()}}},this.properties=props,this.controlledProps=[{key:"value",event:"change"}],this.observers={value(t){t!==this.getCurrentName()&&this.setCurrentIndexByName(t)}},this.data={prefix:prefix,classPrefix:name,tabs:[],currentLabels:[],currentIndex:-1,trackOption:{lineWidth:0,distance:0,isInit:!0},offset:0,scrollLeft:0,tabID:"",placement:"top"},this.lifetimes={created(){this.children=this.children||[]},attached(){wx.nextTick(()=>{this.setTrack()}),getRect(this,`.${name}`).then(t=>{this.containerWidth=t.width}),this.setData({tabID:getUniqueID()})}},this.methods={onScroll(t){const{scrollLeft:e}=t.detail;this.setData({scrollLeft:e})},updateTabs(t){const{children:e}=this,i=e.map(t=>t.data);i.forEach(t=>{"string"==typeof t.icon&&(t.icon={name:t.icon})}),this.setData({tabs:i},t),this.setCurrentIndexByName(this.properties.value)},setCurrentIndexByName(t){const{children:e}=this,i=e.findIndex(e=>e.getComputedName()===`${t}`);i>-1&&this.setCurrentIndex(i)},setCurrentIndex(t){if(t<=-1||t>=this.children.length)return;const e=[];this.children.forEach((i,s)=>{const r=t===s;r===i.data.active&&i.initialized||i.render(r,this),this.data.animation&&s<=t&&!i.data.hasActivated&&i.setData({hasActivated:!0}),e.push(i.data.label)});const{currentIndex:i,currentLabels:s}=this.data;i===t&&s.join("")===e.join("")||this.setData({currentIndex:t,currentLabels:e},()=>{this.setTrack()})},getCurrentName(){if(this.children){const t=this.children[this.data.currentIndex];if(t)return t.getComputedName()}},calcScrollOffset:(t,e,i,s)=>s+e-.5*t+i/2,getTabHeight(){return getRect(this,`.${name}`)},getTrackSize(){const{bottomLineMode:t}=this.properties,e={fixed:`.${prefix}-tabs__track`,auto:`.${prefix}-tabs__item--active .${prefix}-tabs__item-inner`,full:`.${prefix}-tabs__item--active`};return new Promise((i,s)=>{this.trackWidth?i(this.trackWidth):getRect(this,e[t]||e.fixed).then(t=>{t&&i(t.width)}).catch(s)})},setTrack(){return __awaiter(this,void 0,void 0,function*(){const{children:t}=this;if(!t)return;const{currentIndex:e}=this.data;if(!(e<=-1))try{const t=yield getRect(this,`.${prefix}-tabs__item`,!0),i=t[e];if(!i)return;let s=0,r=0,a=0;if(t.forEach(t=>{s<e&&(r+=t.width,s+=1),a+=t.width}),this.containerWidth){const t=this.calcScrollOffset(this.containerWidth,i.left,i.width,this.data.scrollLeft),e=a-this.containerWidth;this.setData({offset:Math.min(Math.max(t,0),e)})}else this._hasObserved||(this._hasObserved=!0,getObserver(this,`.${name}`).then(()=>this.setTrack()));const n=yield this.getTrackSize();"line"===this.data.theme&&(r+=(i.width-n)/2);const h=void 0===this.previousIndex;(h||this.previousIndex!==e)&&(this.previousIndex=e,this.setData({trackOption:{lineWidth:n,distance:r,isInit:h}}))}catch(t){this.triggerEvent("error",t)}})},onTabTap(t){const{index:e}=t.currentTarget.dataset;this.changeIndex(e)},onTouchStart(t){this.properties.swipeable&&this.touchStart(t)},onTouchMove(t){this.properties.swipeable&&this.touchMove(t)},onTouchEnd(){if(!this.properties.swipeable)return;const{direction:t,deltaX:e,offsetX:i}=this;if("horizontal"===t&&i>=50){const t=this.getAvailableTabIndex(e);-1!==t&&this.changeIndex(t)}},onTouchScroll(t){this._trigger("scroll",t.detail)},changeIndex(t){const e=this.data.tabs[t],{value:i,label:s}=e;(null==e?void 0:e.disabled)||t===this.data.currentIndex||this._trigger("change",{value:i,label:s}),this._trigger("click",{value:i,label:s})},getAvailableTabIndex(t){const e=t>0?-1:1,{currentIndex:i,tabs:s}=this.data,r=s.length;for(let t=e;i+e>=0&&i+e<r;t+=e){const e=i+t;if(!(e>=0&&e<r&&s[e]))return i;if(!s[e].disabled)return e}return-1}}}initChildId(){this.children.forEach((t,e)=>{t.setId(`${this.data.tabID}_panel_${e}`)})}};Tabs=__decorate([wxComponent()],Tabs);export default Tabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-sticky":"../sticky/sticky","o-badge":"../badge/badge","o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<import src="../common/template/badge.wxml"/><import src="../common/template/icon.wxml"/><wxs src="./tabs.wxs" module="_tabs"/><wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix, [placement])}} class {{prefix}}-class"><o-sticky o-class="{{_.cls(classPrefix + '__sticky', [placement])}}" disabled="{{ !sticky }}" z-index="{{ stickyProps.zIndex || '1' }}" offset-top="{{ stickyProps.offsetTop || 0 }}" container="{{ stickyProps.container }}" bind:scroll="onTouchScroll"><view class="{{_.cls(classPrefix + '__wrapper', [theme])}}"><scroll-view class="{{_.cls(classPrefix + '__scroll', [placement, ['split', split]])}}" enhanced enable-flex scroll-left="{{offset}}" scroll-x="{{true}}" scroll-anchoring scroll-with-animation enable-passive show-scrollbar="{{false}}" type="list" bind:scroll="onScroll"><view class="{{_.cls(classPrefix + '__nav', [placement, ['evenly', spaceEvenly]])}}" aria-role="tablist"><view wx:for="{{tabs}}" wx:key="index" data-index="{{index}}" class="{{_.cls(classPrefix + '__item', [theme, ['evenly', spaceEvenly], placement, ['disabled', item.disabled], ['active', currentIndex === index]])}} {{currentIndex === index ? prefix + '-class-active' : ''}} {{prefix}}-class-item" bind:tap="onTabTap" aria-role="tab" aria-controls="{{tabID + '_panel_' + index}}" aria-selected="{{currentIndex === index}}" aria-disabled="{{item.disabled}}" aria-label="{{ ariaLabel || (item.badgeProps.dot || item.badgeProps.count ? item.label + _.getBadgeAriaLabel({ ...item.badgeProps }) : '') }}"><view class="{{_.cls(classPrefix + '__item-inner', [theme, ['active', currentIndex === index]])}}" aria-hidden="{{ item.badgeProps.dot || item.badgeProps.count }}"><template wx:if="{{item.icon}}" is="icon" data="{{ oClass: classPrefix + '__icon', ...item.icon }}"/><block wx:if="{{item.badgeProps}}"><template is="badge" data="{{ ...item.badgeProps, content: item.label, oClass: _.cls(classPrefix + '__badge', [ ['disabled', item.disabled], ['active', currentIndex === index]])}}"/></block><block wx:else>{{item.label}}</block></view><view wx:if="{{theme == 'card' && currentIndex - 1 == index}}" class="{{classPrefix}}__item-prefix"/><view wx:if="{{theme == 'card' && currentIndex + 1 == index}}" class="{{classPrefix}}__item-suffix"/></view><view wx:if="{{theme == 'line' && showBottomLine}}" class="{{_.cls(classPrefix + '__track', [placement])}} {{prefix}}-class-track" style="{{_tabs.trackStyle(trackOption)}}"/></view></scroll-view></view></o-sticky><slot name="middle"/><view class="{{_.cls(classPrefix + '__content', [['animated', animation]])}}" bind:touchstart="onTouchStart" bind:touchmove="onTouchMove" bind:touchend="onTouchEnd" bind:touchcancel="onTouchEnd"><view class="{{classPrefix}}__content-inner {{prefix}}-class-content" style="{{ _tabs.animate({duration: animation.duration, currentIndex:currentIndex}) }}"><slot/></view></view></view>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var utils = require('../common/utils.wxs');
|
|
2
|
+
|
|
3
|
+
function animate(options) {
|
|
4
|
+
if (options.duration) {
|
|
5
|
+
return utils._style({
|
|
6
|
+
'transition-duration': options.duration + 's',
|
|
7
|
+
transform: 'translate3d( ' + -100 * options.currentIndex + '%,0, 0)',
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function trackStyle(options) {
|
|
14
|
+
if (options.distance || options.lineWidth) {
|
|
15
|
+
return utils._style({
|
|
16
|
+
'-webkit-transform': 'translateX(' + options.distance + 'px)',
|
|
17
|
+
transform: 'translateX(' + options.distance + 'px)',
|
|
18
|
+
'transition-duration': options.isInit ? '0' : '0.3s',
|
|
19
|
+
width: options.lineWidth + 'px',
|
|
20
|
+
opacity: 1,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
animate: animate,
|
|
29
|
+
trackStyle: trackStyle,
|
|
30
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-tabs {
|
|
4
|
+
position: relative;
|
|
5
|
+
font: var(--o-tab-font,var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
6
|
+
background: var(--o-tab-nav-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.o-tabs__wrapper {
|
|
11
|
+
display: flex;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
background: var(--o-tab-nav-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.o-tabs__wrapper--card {
|
|
17
|
+
background: var(--o-tab-item-tag-bg,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
18
|
+
--o-tab-border-color: transparent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-tabs__item {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex: none;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
color: var(--o-tab-item-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
29
|
+
padding: 0 var(--o-spacer-2,32rpx);
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
height: var(--o-tab-item-height,96rpx);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.o-tabs__item--active {
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
color: var(--o-tab-item-active-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.o-tabs__item--disabled {
|
|
42
|
+
color: var(--o-tab-item-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.o-tabs__item--evenly {
|
|
46
|
+
flex: 1 0 auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.o-tabs__item-inner {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.o-tabs__item-inner--tag {
|
|
56
|
+
width: 100%;
|
|
57
|
+
text-align: center;
|
|
58
|
+
padding: 0 var(--o-spacer-2,32rpx);
|
|
59
|
+
line-height: var(--o-tab-item-tag-height,64rpx);
|
|
60
|
+
border-radius: calc(var(--o-tab-item-tag-height,64rpx)/ 2);
|
|
61
|
+
background-color: var(--o-tab-item-tag-bg,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.o-tabs__item-inner--active.o-tabs__item-inner--tag {
|
|
65
|
+
background-color: var(--o-tab-item-tag-active-bg,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.o-tabs__item--tag:not(.o-tabs__item--evenly) {
|
|
69
|
+
padding: 0 calc(var(--o-spacer,16rpx)/ 2);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.o-tabs__item--tag:not(.o-tabs__item--evenly):first-child {
|
|
73
|
+
margin-left: var(--o-spacer,16rpx);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.o-tabs__item--tag:not(.o-tabs__item--evenly):last-child {
|
|
77
|
+
padding-right: var(--o-spacer-1,24rpx);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.o-tabs__item--tag {
|
|
81
|
+
padding: 0 var(--o-spacer,16rpx);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.o-tabs__item--card.o-tabs__item--active {
|
|
85
|
+
background-color: var(--o-tab-nav-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
86
|
+
border-radius: var(--o-radius-large,18rpx) var(--o-radius-large,18rpx) 0 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.o-tabs__item--card.o-tabs__item--active:first-child {
|
|
90
|
+
border-top-left-radius: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.o-tabs__item--card.o-tabs__item--active:last-child {
|
|
94
|
+
border-top-right-radius: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.o-tabs__item--card.o-tabs__item--pre {
|
|
98
|
+
border-bottom-right-radius: var(--o-radius-large,18rpx);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.o-tabs__item-prefix,
|
|
102
|
+
.o-tabs__item-suffix {
|
|
103
|
+
position: absolute;
|
|
104
|
+
bottom: 0;
|
|
105
|
+
width: 18rpx;
|
|
106
|
+
height: 18rpx;
|
|
107
|
+
background-color: var(--o-tab-nav-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.o-tabs__item-prefix::after,
|
|
111
|
+
.o-tabs__item-suffix::after {
|
|
112
|
+
content: '';
|
|
113
|
+
display: block;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
background-color: var(--o-tab-item-tag-bg,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.o-tabs__item-prefix {
|
|
120
|
+
right: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.o-tabs__item-prefix::after {
|
|
124
|
+
border-bottom-right-radius: var(--o-radius-large,18rpx);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.o-tabs__item-suffix {
|
|
128
|
+
left: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.o-tabs__item-suffix::after {
|
|
132
|
+
border-bottom-left-radius: var(--o-radius-large,18rpx);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.o-tabs__badge {
|
|
136
|
+
--o-badge-content-text-font: var(--o-tab-font, var(--o-font-body-medium, 28rpx / 44rpx var(--o-font-family, Roboto, PingFang SC, Microsoft YaHei, Arial)));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.o-tabs__badge--active {
|
|
140
|
+
--o-badge-content-text-font: var(--o-font-mark-medium, 600 28rpx / 44rpx var(--o-font-family, Roboto, PingFang SC, Microsoft YaHei, Arial));
|
|
141
|
+
--o-badge-content-text-color: var(--o-tab-item-active-color, var(--o-brand-color, var(--o-primary-color-7, #f16e00)));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.o-tabs__badge--disabled {
|
|
145
|
+
--o-badge-content-text-color: var(--o-tab-item-disabled-color, var(--o-text-color-disabled, var(--o-font-gray-4, rgba(0, 0, 0, 0.26))));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.o-tabs__icon {
|
|
149
|
+
font-size: var(--o-tab-icon-size,36rpx);
|
|
150
|
+
margin-right: calc(var(--o-spacer,16rpx)/ 4);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.o-tabs__content {
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.o-tabs__nav {
|
|
158
|
+
position: relative;
|
|
159
|
+
user-select: none;
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-wrap: nowrap;
|
|
162
|
+
align-items: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.o-tabs__nav.o-tabs__nav--evenly {
|
|
166
|
+
width: 100%;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.o-tabs__track {
|
|
170
|
+
position: absolute;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
z-index: 1;
|
|
173
|
+
opacity: 0;
|
|
174
|
+
background-color: var(--o-tab-track-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
175
|
+
left: 0;
|
|
176
|
+
bottom: 1rpx;
|
|
177
|
+
width: var(--o-tab-track-width,32rpx);
|
|
178
|
+
height: var(--o-tab-track-thickness,6rpx);
|
|
179
|
+
border-radius: var(--o-tab-track-radius,8rpx);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.o-tabs__scroll {
|
|
183
|
+
position: relative;
|
|
184
|
+
height: var(--o-tab-item-height,96rpx);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.o-tabs__scroll--split {
|
|
188
|
+
position: relative;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.o-tabs__scroll--split::after {
|
|
192
|
+
content: '';
|
|
193
|
+
display: block;
|
|
194
|
+
position: absolute;
|
|
195
|
+
top: unset;
|
|
196
|
+
bottom: 0;
|
|
197
|
+
left: unset;
|
|
198
|
+
right: unset;
|
|
199
|
+
background-color: var(--o-tab-border-color,var(--o-component-stroke,var(--o-gray-color-3,#dddddd)));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.o-tabs__scroll--split::after {
|
|
203
|
+
height: 1px;
|
|
204
|
+
left: 0;
|
|
205
|
+
right: 0;
|
|
206
|
+
transform: scaleY(.5);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.o-tabs__scroll::-webkit-scrollbar {
|
|
210
|
+
display: none;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.o-tabs__content {
|
|
214
|
+
width: 100%;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.o-tabs__content-inner {
|
|
218
|
+
display: block;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.o-tabs__content--animated .o-tabs__content-inner {
|
|
222
|
+
position: relative;
|
|
223
|
+
width: 100%;
|
|
224
|
+
height: 100%;
|
|
225
|
+
display: flex;
|
|
226
|
+
will-change: left;
|
|
227
|
+
transition-property: transform;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.o-tabs__item--active {
|
|
231
|
+
font-weight: var(--o-tab-item-active-weight,500);
|
|
232
|
+
}
|
|
233
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./tag";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={closable:{type:null,value:!1},disabled:{type:Boolean,value:!1},icon:{type:null},maxWidth:{type:null},shape:{type:String,value:"square"},size:{type:String,value:"medium"},theme:{type:String,value:"default"},variant:{type:String,value:"dark"}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{wxComponent,SuperComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{classNames,calcIcon}from"../common/utils";import{isNumeric}from"../common/validator";const{prefix:prefix}=config,name=`${prefix}-tag`;let Tag=class extends SuperComponent{constructor(){super(...arguments),this.data={prefix:prefix,classPrefix:name,className:"",tagStyle:""},this.properties=props,this.externalClasses=[`${prefix}-class`],this.options={multipleSlots:!0},this.lifetimes={attached(){this.setClass(),this.setTagStyle()}},this.observers={"size, shape, theme, variant, closable, disabled"(){this.setClass()},maxWidth(){this.setTagStyle()},icon(s){this.setData({_icon:calcIcon(s)})},closable(s){this.setData({_closable:calcIcon(s,"close")})}},this.methods={setClass(){const{prefix:s,classPrefix:t}=this.data,{size:e,shape:a,theme:i,variant:o,closable:l,disabled:r}=this.properties,c=classNames([t,`${t}--${i||"default"}`,`${t}--${o}`,l?`${t}--closable ${s}-is-closable`:"",r?`${t}--disabled ${s}-is-disabled`:"",`${t}--${e}`,`${t}--${a}`]);this.setData({className:c})},setTagStyle(){const{maxWidth:s}=this.properties;if(!s)return"";const t=isNumeric(s)?`${s}px`:s;this.setData({tagStyle:`max-width:${t};`})},handleClick(s){this.data.disabled||this.triggerEvent("click",s)},handleClose(s){this.data.disabled||this.triggerEvent("close",s)}}}};Tag=__decorate([wxComponent()],Tag);export default Tag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":".././icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><import src="../common/template/icon.wxml"/><view class="{{className}} class {{prefix}}-class" style="{{_._style([tagStyle, style, customStyle])}}" bind:tap="handleClick"><view aria-hidden="{{true}}" class="{{classPrefix}}__icon"><template wx:if="{{_icon}}" is="icon" data="{{ oClass: prefix + '-icon', ..._icon }}"/><slot name="icon"/></view><view class="{{classPrefix}}__text"><slot/></view><o-icon wx:if="{{_closable}}" class="{{classPrefix}}__icon-close {{prefix}}-icon" prefix="{{_closable.prefix || ''}}" name="{{_closable.name || ''}}" size="{{_closable.size || ''}}" color="{{_closable.color || ''}}" aria-role="button" aria-label="Fermer" catch:tap="handleClose"/><slot wx:else name="closable"/></view>
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-tag {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
border: 2rpx solid transparent;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
border-radius: var(--o-tag-square-border-radius,8rpx);
|
|
9
|
+
user-select: none;
|
|
10
|
+
vertical-align: middle;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-tag__text {
|
|
14
|
+
word-wrap: normal;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.o-tag__icon,
|
|
21
|
+
.o-tag__icon-close {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.o-tag__icon-close {
|
|
27
|
+
color: var(--o-tag-close-icon-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.o-tag__icon:not(:empty)+.o-tag__text:not(:empty),
|
|
31
|
+
.o-tag__text:not(:empty)+.o-tag__icon-close:not(:empty) {
|
|
32
|
+
margin-left: calc(var(--o-spacer,16rpx)/ 2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.o-tag.o-tag--small {
|
|
36
|
+
padding: var(--o-tag-small-padding,2rpx 10rpx);
|
|
37
|
+
font: var(--o-tag-small-font,var(--o-font-body-extraSmall,20rpx / 32rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.o-tag.o-tag--small .o-icon,
|
|
41
|
+
.o-tag.o-tag--small .o-icon-close {
|
|
42
|
+
font-size: var(--o-tag-small-icon-size,24rpx);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.o-tag.o-tag--small .o-tag__icon:not(:empty)+.o-tag__text:not(:empty),
|
|
46
|
+
.o-tag.o-tag--small .o-tag__text:not(:empty)+.o-tag__icon-close:not(:empty) {
|
|
47
|
+
margin-left: calc(var(--o-spacer,16rpx)/ 4);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.o-tag.o-tag--medium {
|
|
51
|
+
padding: var(--o-tag-medium-padding,2rpx 14rpx);
|
|
52
|
+
font: var(--o-tag-medium-font,var(--o-font-body-small,24rpx / 40rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.o-tag.o-tag--medium .o-icon,
|
|
56
|
+
.o-tag.o-tag--medium .o-icon-close {
|
|
57
|
+
font-size: var(--o-tag-medium-icon-size,28rpx);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-tag.o-tag--large {
|
|
61
|
+
padding: var(--o-tag-large-padding,calc(var(--o-spacer,16rpx)/ 4) 14rpx);
|
|
62
|
+
font: var(--o-tag-large-font,var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.o-tag.o-tag--large .o-icon,
|
|
66
|
+
.o-tag.o-tag--large .o-icon-close {
|
|
67
|
+
font-size: var(--o-tag-large-icon-size,32rpx);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.o-tag.o-tag--extra-large {
|
|
71
|
+
padding: var(--o-tag-extra-large-padding,var(--o-spacer,16rpx) 30rpx);
|
|
72
|
+
font: var(--o-tag-extra-large-font,var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.o-tag.o-tag--extra-large .o-icon,
|
|
76
|
+
.o-tag.o-tag--extra-large .o-icon-close {
|
|
77
|
+
font-size: var(--o-tag-extra-large-icon-size,32rpx);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.o-tag.o-tag--square {
|
|
81
|
+
border-radius: var(--o-tag-square-border-radius,8rpx);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.o-tag.o-tag--round {
|
|
85
|
+
border-radius: var(--o-tag-round-border-radius,var(--o-radius-round,999px));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.o-tag.o-tag--mark {
|
|
89
|
+
border-radius: 0;
|
|
90
|
+
border-top-right-radius: var(--o-tag-mark-border-radius,var(--o-tag-round-border-radius,var(--o-radius-round,999px)));
|
|
91
|
+
border-bottom-right-radius: var(--o-tag-mark-border-radius,var(--o-tag-round-border-radius,var(--o-radius-round,999px)));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.o-tag--dark.o-tag--default {
|
|
95
|
+
color: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
96
|
+
border-color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
97
|
+
background-color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-tag--dark.o-tag--primary {
|
|
101
|
+
color: var(--o-tag-primary-text-color,#000);
|
|
102
|
+
border-color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
103
|
+
background-color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.o-tag--dark.o-tag--success {
|
|
107
|
+
color: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
108
|
+
border-color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
109
|
+
background-color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.o-tag--dark.o-tag--warning {
|
|
113
|
+
color: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
114
|
+
border-color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
115
|
+
background-color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.o-tag--dark.o-tag--danger {
|
|
119
|
+
color: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
120
|
+
border-color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
121
|
+
background-color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.o-tag--dark.o-tag--default {
|
|
125
|
+
color: var(--o-tag-default-font-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.o-tag--outline.o-tag--default {
|
|
129
|
+
color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
130
|
+
border-color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
131
|
+
background-color: var(--o-tag-default-light-color,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.o-tag--outline.o-tag--primary {
|
|
135
|
+
color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
136
|
+
border-color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
137
|
+
background-color: var(--o-tag-primary-light-color,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.o-tag--outline.o-tag--success {
|
|
141
|
+
color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
142
|
+
border-color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
143
|
+
background-color: var(--o-tag-success-light-color,var(--o-success-color-1,#eaf7ee));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.o-tag--outline.o-tag--warning {
|
|
147
|
+
color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
148
|
+
border-color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
149
|
+
background-color: var(--o-tag-warning-light-color,var(--o-warning-color-1,#fff1e9));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.o-tag--outline.o-tag--danger {
|
|
153
|
+
color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
154
|
+
border-color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
155
|
+
background-color: var(--o-tag-danger-light-color,var(--o-error-color-1,#f9dedc));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.o-tag--outline.o-tag--default {
|
|
159
|
+
color: var(--o-tag-default-font-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.o-tag--outline.o-tag--default {
|
|
163
|
+
background-color: var(--o-tag-outline-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.o-tag--outline.o-tag--primary {
|
|
167
|
+
background-color: var(--o-tag-outline-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.o-tag--outline.o-tag--success {
|
|
171
|
+
background-color: var(--o-tag-outline-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.o-tag--outline.o-tag--warning {
|
|
175
|
+
background-color: var(--o-tag-outline-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.o-tag--outline.o-tag--danger {
|
|
179
|
+
background-color: var(--o-tag-outline-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.o-tag--light.o-tag--default {
|
|
183
|
+
color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
184
|
+
border-color: var(--o-tag-default-light-color,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
185
|
+
background-color: var(--o-tag-default-light-color,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.o-tag--light.o-tag--primary {
|
|
189
|
+
color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
190
|
+
border-color: var(--o-tag-primary-light-color,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
191
|
+
background-color: var(--o-tag-primary-light-color,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.o-tag--light.o-tag--success {
|
|
195
|
+
color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
196
|
+
border-color: var(--o-tag-success-light-color,var(--o-success-color-1,#eaf7ee));
|
|
197
|
+
background-color: var(--o-tag-success-light-color,var(--o-success-color-1,#eaf7ee));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.o-tag--light.o-tag--warning {
|
|
201
|
+
color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
202
|
+
border-color: var(--o-tag-warning-light-color,var(--o-warning-color-1,#fff1e9));
|
|
203
|
+
background-color: var(--o-tag-warning-light-color,var(--o-warning-color-1,#fff1e9));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.o-tag--light.o-tag--danger {
|
|
207
|
+
color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
208
|
+
border-color: var(--o-tag-danger-light-color,var(--o-error-color-1,#f9dedc));
|
|
209
|
+
background-color: var(--o-tag-danger-light-color,var(--o-error-color-1,#f9dedc));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.o-tag--light.o-tag--default {
|
|
213
|
+
color: var(--o-tag-default-font-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.o-tag--light-outline.o-tag--default {
|
|
217
|
+
color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
218
|
+
border-color: var(--o-tag-default-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
219
|
+
background-color: var(--o-tag-default-light-color,var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee)));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.o-tag--light-outline.o-tag--primary {
|
|
223
|
+
color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
224
|
+
border-color: var(--o-tag-primary-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
225
|
+
background-color: var(--o-tag-primary-light-color,var(--o-brand-color-light,var(--o-primary-color-1,#fef3eb)));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.o-tag--light-outline.o-tag--success {
|
|
229
|
+
color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
230
|
+
border-color: var(--o-tag-success-color,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
231
|
+
background-color: var(--o-tag-success-light-color,var(--o-success-color-1,#eaf7ee));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.o-tag--light-outline.o-tag--warning {
|
|
235
|
+
color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
236
|
+
border-color: var(--o-tag-warning-color,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
237
|
+
background-color: var(--o-tag-warning-light-color,var(--o-warning-color-1,#fff1e9));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.o-tag--light-outline.o-tag--danger {
|
|
241
|
+
color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
242
|
+
border-color: var(--o-tag-danger-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
243
|
+
background-color: var(--o-tag-danger-light-color,var(--o-error-color-1,#f9dedc));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.o-tag--light-outline.o-tag--default {
|
|
247
|
+
color: var(--o-tag-default-font-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
248
|
+
border-color: var(--o-component-border,var(--o-gray-color-4,#dddddd));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.o-tag.o-tag--closable.o-tag--disabled {
|
|
252
|
+
cursor: not-allowed;
|
|
253
|
+
color: var(--o-tag-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
254
|
+
background-color: var(--o-tag-disabled-background-color,var(--o-bg-color-component-disabled,var(--o-gray-color-2,#eee)));
|
|
255
|
+
border-color: var(--o-tag-disabled-border-color,var(--o-component-border,var(--o-gray-color-4,#dddddd)));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.o-tag--dark.o-tag--default {
|
|
259
|
+
color: var(--o-tag-default-fill-text-color,#1c1b1f);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.o-tag--dark.o-tag--warning,
|
|
263
|
+
.o-tag--outline.o-tag--warning,
|
|
264
|
+
.o-tag--light.o-tag--warning,
|
|
265
|
+
.o-tag--light-outline.o-tag--warning {
|
|
266
|
+
color: var(--o-tag-warning-text-color,var(--o-static-on-canary,#000));
|
|
267
|
+
}
|
|
268
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./text";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={code:{type:Boolean,value:!1},content:{type:String},copyable:{type:null,value:!1},delete:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},ellipsis:{type:null,value:!1},italic:{type:Boolean,value:!1},keyboard:{type:Boolean,value:!1},mark:{type:null,value:!1},strong:{type:Boolean,value:!1},theme:{type:String},underline:{type:Boolean,value:!1}};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 usingConfig from"../common/mixins/using-config";const{prefix:prefix}=config,componentName="typography";let Text=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[usingConfig({componentName:"typography"})],this.externalClasses=[`${prefix}-class`,`${prefix}-class-copy`],this.options={multipleSlots:!0},this.properties=props,this.data={prefix:prefix,classPrefix:`${prefix}-typography`,className:"",_delete:!1,isExpanded:!1,isCopied:!1},this.lifetimes={attached(){this.updateClass()}},this.observers={"theme, disabled"(){this.updateClass()},delete(e){this.setData({_delete:e})}},this.methods={updateClass(){const{classPrefix:e}=this.data,{theme:t,disabled:s}=this.properties,i=[e];s?i.push(`${e}--disabled`):t&&["primary","secondary","success","warning","error"].includes(t)&&i.push(`${e}--${t}`),this.setData({className:i.join(" ")})},onExpand(){this.setData({isExpanded:!0});const{ellipsis:e}=this.properties;"object"==typeof e&&this.triggerEvent("expand",{expanded:!0})},onCollapse(){this.setData({isExpanded:!1});const{ellipsis:e}=this.properties;"object"==typeof e&&this.triggerEvent("expand",{expanded:!1})},onCopy(){if(this.data.isCopied)return;const{copyable:e,content:t}=this.properties;let s=t||"";"object"==typeof e&&null!==e&&e.text&&(s=e.text),wx.setClipboardData({data:s,success:()=>{this.setData({isCopied:!0}),this.triggerEvent("copy",{text:s}),setTimeout(()=>{this.setData({isCopied:!1})},1500)}})}}}};Text=__decorate([wxComponent()],Text);export default Text;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><wxs src="../common/typography/typography.wxs" module="_this"/><import src="../common/typography/ellipsis.wxml"/><view class="{{className}} {{prefix}}-class {{_this.wrapperClass(classPrefix, ellipsis)}}" style="{{ellipsis ? '' : 'display:inline;'}}{{_._style([style, customStyle])}}{{ellipsis ? '' : _this.markStyle(mark)}}"><view wx:if="{{ellipsis}}" class="{{classPrefix}}__ellipsis-content {{_this.decorClass(classPrefix, strong, underline, _delete, code, mark, keyboard, italic)}}" style="{{_this.ellipsisStyle(ellipsis, isExpanded)}}{{_this.markStyle(mark)}}"><text wx:if="{{content}}">{{content}}</text><slot wx:else/></view><block wx:else><view class="{{_this.decorClass(classPrefix, strong, underline, _delete, code, mark, keyboard, italic)}}" style="display: inline"><text wx:if="{{content}}">{{content}}</text><slot wx:else/></view></block><template is="ellipsis-toggle" data="{{ellipsis, isExpanded, classPrefix, globalConfig, extraStyle: copyable ? 'margin-right:16rpx;' : ''}}"/><view wx:if="{{copyable}}" class="{{classPrefix}}__copy {{prefix}}-class-copy" bind:tap="onCopy"><block wx:if="{{isCopied}}"><o-icon name="check"/></block><block wx:elif="{{copyable.suffix}}"><slot name="suffix"/></block><block wx:else><o-icon name="file-copy"/></block></view></view>
|