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,186 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-collapse-panel {
|
|
4
|
+
background-color: var(--o-collapse-panel-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.o-collapse-panel--disabled {
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.o-collapse-panel--disabled .o-collapse-panel__content,
|
|
12
|
+
.o-collapse-panel--disabled .o-collapse-panel__header {
|
|
13
|
+
opacity: .3;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.o-collapse-panel--top {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column-reverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-collapse-panel__header {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding-left: var(--o-collapse-horizontal-padding,var(--o-spacer-2,32rpx));
|
|
27
|
+
height: var(--o-collapse-header-height,auto);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.o-collapse-panel__header--top {
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.o-collapse-panel__header--top::after {
|
|
35
|
+
content: '';
|
|
36
|
+
display: block;
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: unset;
|
|
40
|
+
left: unset;
|
|
41
|
+
right: unset;
|
|
42
|
+
background-color: var(--o-collapse-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.o-collapse-panel__header--top::after {
|
|
46
|
+
height: 1px;
|
|
47
|
+
left: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
transform: scaleY(.5);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-collapse-panel__header--bottom {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.o-collapse-panel__header--bottom::after {
|
|
57
|
+
content: '';
|
|
58
|
+
display: block;
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: unset;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
left: unset;
|
|
63
|
+
right: unset;
|
|
64
|
+
background-color: var(--o-collapse-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.o-collapse-panel__header--bottom::after {
|
|
68
|
+
height: 1px;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
transform: scaleY(.5);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-collapse-panel__header::after {
|
|
75
|
+
left: var(--o-spacer-2,32rpx);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-collapse-panel__extra {
|
|
79
|
+
font: var(--o-collapse-extra-font,var(--o-font-body-large,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.o-collapse-panel__body {
|
|
83
|
+
position: relative;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.o-collapse-panel__body::after {
|
|
87
|
+
content: '';
|
|
88
|
+
display: block;
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: unset;
|
|
91
|
+
bottom: 0;
|
|
92
|
+
left: unset;
|
|
93
|
+
right: unset;
|
|
94
|
+
background-color: var(--o-collapse-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.o-collapse-panel__body::after {
|
|
98
|
+
height: 1px;
|
|
99
|
+
left: 0;
|
|
100
|
+
right: 0;
|
|
101
|
+
transform: scaleY(.5);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.o-collapse-panel__wrapper {
|
|
105
|
+
height: 0;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.o-collapse-panel__content {
|
|
110
|
+
color: var(--o-collapse-content-text-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
111
|
+
font: var(--o-collapse-content-font,var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
112
|
+
padding: var(--o-collapse-content-padding,var(--o-spacer-2,32rpx));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.o-collapse-panel__content--disabled {
|
|
116
|
+
color: var(--o-collapse-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--bottom {
|
|
120
|
+
position: relative;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--bottom::after {
|
|
124
|
+
content: '';
|
|
125
|
+
display: block;
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: unset;
|
|
128
|
+
bottom: 0;
|
|
129
|
+
left: unset;
|
|
130
|
+
right: unset;
|
|
131
|
+
background-color: var(--o-collapse-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--bottom::after {
|
|
135
|
+
height: 1px;
|
|
136
|
+
left: 0;
|
|
137
|
+
right: 0;
|
|
138
|
+
transform: scaleY(.5);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--top {
|
|
142
|
+
position: relative;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--top::after {
|
|
146
|
+
content: '';
|
|
147
|
+
display: block;
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0;
|
|
150
|
+
bottom: unset;
|
|
151
|
+
left: unset;
|
|
152
|
+
right: unset;
|
|
153
|
+
background-color: var(--o-collapse-border-color,var(--o-border-level-1-color,var(--o-gray-color-3,#dddddd)));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.o-collapse-panel__content--expanded.o-collapse-panel__content--top::after {
|
|
157
|
+
height: 1px;
|
|
158
|
+
left: 0;
|
|
159
|
+
right: 0;
|
|
160
|
+
transform: scaleY(.5);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.o-collapse-panel__arrow--top {
|
|
164
|
+
transform: rotate(180deg);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.class-title {
|
|
168
|
+
font: var(--o-collapse-title-font,var(--o-font-body-large,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
169
|
+
color: var(--o-collapse-header-text-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.class-left-icon {
|
|
173
|
+
color: var(--o-collapse-left-icon-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.class-right-icon {
|
|
177
|
+
color: var(--o-collapse-icon-color,var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d)));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.class-left-icon--disabled,
|
|
181
|
+
.class-note--disabled,
|
|
182
|
+
.class-right-icon--disabled,
|
|
183
|
+
.class-title--disabled {
|
|
184
|
+
color: var(--o-collapse-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
185
|
+
}
|
|
186
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./collapse-panel";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={content:{type:String},disabled:{type:null,value:void 0},expandIcon:{type:null,value:void 0},header:{type:String},headerLeftIcon:{type:String},headerRightContent:{type:String},placement:{type:String,value:"bottom"},value:{type:null}};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{SATURATION_PANEL_DEFAULT_HEIGHT,SATURATION_PANEL_DEFAULT_WIDTH,SLIDER_DEFAULT_WIDTH,DEFAULT_COLOR,ALPHA_MAX,HUE_MAX,DEFAULT_SYSTEM_SWATCH_COLORS}from"./constants";import{getRect,debounce}from"../common/utils";import{Color,getColorObject}from"./utils";const{prefix:prefix}=config,name=`${prefix}-color-picker`,getCoordinate=(t,e,a)=>{var o;const{pageX:i,pageY:r,clientY:l}=t.changedTouches[0]||{},s=a?e.top:null===(o=t.currentTarget)||void 0===o?void 0:o.offsetTop;return{x:Math.min(Math.max(0,i-e.left),e.width),y:Math.min(Math.max(0,(a?l:r)-s),e.height)}},getFormatList=(t,e)=>{const a={HSV:Object.values(e.getHsva()),HSVA:Object.values(e.getHsva()),HSL:Object.values(e.getHsla()),HSLA:Object.values(e.getHsla()),HSB:Object.values(e.getHsla()),RGB:Object.values(e.getRgba()),RGBA:Object.values(e.getRgba()),CMYK:[...Object.values(e.getCmyk()),0],CSS:[e.css,0],HEX:[e.hex,0]},o=a[t];return o?[...o.slice(0,o.length-1),`${Math.round(100*e.alpha)}%`]:a.RGB},genSwatchList=t=>void 0===t?DEFAULT_SYSTEM_SWATCH_COLORS:t&&t.length?t:[];let ColorPicker=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties=props,this.observers={format(){this.setCoreStyle()},swatchColors(t){this.setData({innerSwatchList:genSwatchList(t)})},type(t){this.setData({isMultiple:"multiple"===t})},"usePopup, visible"(t,e){this.timer&&clearTimeout(this.timer),t&&e&&(this.timer=setTimeout(()=>{this.getEleReact()},350))},value(t){t&&this.init()}},this.color=new Color(props.defaultValue.value||props.value.value||DEFAULT_COLOR),this.data={prefix:prefix,classPrefix:name,panelRect:{width:SATURATION_PANEL_DEFAULT_WIDTH,height:SATURATION_PANEL_DEFAULT_HEIGHT},sliderRect:{width:SLIDER_DEFAULT_WIDTH,left:0},saturationInfo:{saturation:0,value:0},saturationThumbStyle:{left:0,top:0},sliderInfo:{value:0},hueSliderStyle:{left:0},alphaSliderStyle:{left:0},innerValue:props.defaultValue.value||props.value.value,showPrimaryColorPreview:!1,previewColor:props.defaultValue.value||props.value.value,formatList:getFormatList(props.format.value,this.color),innerSwatchList:genSwatchList(props.swatchColors.value),isMultiple:"multiple"===props.type.value,defaultOverlayProps:{}},this.lifetimes={ready(){this.init()},attached(){this.debouncedUpdateEleRect=debounce(t=>this.updateEleRect(t),150)},detached(){clearTimeout(this.timer)}},this.methods={init(){const{value:t,defaultValue:e}=this.properties,a=t||e;a&&this.setData({innerValue:a}),this.color=new Color(a||DEFAULT_COLOR),this.updateColor(),this.getEleReact()},updateEleRect(t){if(!t)return;const{scrollTop:e}=t.detail,{width:a,height:o,left:i,initTop:r}=this.data.panelRect;this.setData({panelRect:{width:a,height:o,left:i,top:r-e,initTop:r}})},getEleReact(){Promise.all([getRect(this,`.${name}__saturation`),getRect(this,`.${name}__slider`)]).then(([t,e])=>{this.setData({panelRect:{width:t.width||SATURATION_PANEL_DEFAULT_WIDTH,height:t.height||SATURATION_PANEL_DEFAULT_HEIGHT,left:t.left||0,top:t.top||0,initTop:t.top||0},sliderRect:{left:e.left||0,width:e.width||SLIDER_DEFAULT_WIDTH}},()=>{this.setCoreStyle()})})},clickSwatch(t){const e=t.currentTarget.dataset.value;this.color.update(e),this.emitColorChange("preset"),this.setCoreStyle()},setCoreStyle(){this.setData({sliderInfo:{value:this.color.hue},hueSliderStyle:this.getSliderThumbStyle({value:this.color.hue,maxValue:HUE_MAX}),alphaSliderStyle:this.getSliderThumbStyle({value:100*this.color.alpha,maxValue:ALPHA_MAX}),saturationInfo:{saturation:this.color.saturation,value:this.color.value},saturationThumbStyle:this.getSaturationThumbStyle({saturation:this.color.saturation,value:this.color.value}),previewColor:this.color.rgba,formatList:getFormatList(this.properties.format,this.color)})},emitColorChange(t){this.setData({innerValue:this.formatValue()}),this.triggerEvent("change",{value:this.formatValue(),context:{trigger:t,color:getColorObject(this.color)}})},defaultEmptyColor:()=>DEFAULT_COLOR,updateColor(){const t=this.data.innerValue||this.defaultEmptyColor();this.color.update(t)},getSaturationAndValueByCoordinate(t){const{width:e,height:a}=this.data.panelRect,{x:o,y:i}=t;let r=o/e,l=1-i/a;return r=Math.min(1,Math.max(0,r)),l=Math.min(1,Math.max(0,l)),{saturation:r,value:l}},getSaturationThumbStyle({saturation:t,value:e}){const{width:a,height:o}=this.data.panelRect,i=Math.round((1-e)*o),r=Math.round(t*a);return{color:this.color.rgb,left:`${r}px`,top:`${i}px`}},getSliderThumbStyle({value:t,maxValue:e}){const{width:a}=this.data.sliderRect;if(!a)return;return{left:`${Math.round(t/e*100)}%`,color:this.color.rgb}},onChangeSaturation({saturation:t,value:e}){const{saturation:a,value:o}=this.color;let i="palette-saturation-brightness";if(e!==o&&t!==a)this.color.saturation=t,this.color.value=e,i="palette-saturation-brightness";else if(t!==a)this.color.saturation=t,i="palette-saturation";else{if(e===o)return;this.color.value=e,i="palette-brightness"}this.triggerEvent("palette-bar-change",{color:getColorObject(this.color)}),this.emitColorChange(i),this.setCoreStyle()},formatValue(){return this.color.getFormatsColorMap()[this.properties.format]||this.color.css},onChangeSlider({value:t,isAlpha:e}){e?this.color.alpha=t/100:this.color.hue=t,this.emitColorChange(e?"palette-alpha-bar":"palette-hue-bar"),this.setCoreStyle()},handleSaturationDrag(t){const{usePopup:e,fixed:a}=this.properties,o=getCoordinate(t,this.data.panelRect,e||a),{saturation:i,value:r}=this.getSaturationAndValueByCoordinate(o);this.onChangeSaturation({saturation:i,value:r})},handleSliderDrag(t,e=!1){const{width:a}=this.data.sliderRect,o=getCoordinate(t,this.data.sliderRect),{x:i}=o,r=e?ALPHA_MAX:HUE_MAX;let l=Math.round(i/a*r*100)/100;l<0&&(l=0),l>r&&(l=r),this.onChangeSlider({value:l,isAlpha:e})},handleDiffDrag(t){switch(t.target.dataset.type||t.currentTarget.dataset.type){case"saturation":this.handleSaturationDrag(t);break;case"hue-slider":this.handleSliderDrag(t);break;case"alpha-slider":this.handleSliderDrag(t,!0)}},onTouchStart(t){this.handleDiffDrag(t)},onTouchMove(t){this.handleDiffDrag(t)},onTouchEnd(t){wx.nextTick(()=>{this.handleDiffDrag(t)})},close(t){this.properties.autoClose&&this.setData({visible:!1}),this.triggerEvent("close",{trigger:t})},onVisibleChange(){this.close("overlay")}}}};ColorPicker=__decorate([wxComponent()],ColorPicker);export default ColorPicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-popup":"../popup/popup"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><o-popup wx:if="{{usePopup}}" class="class" visible="{{visible}}" using-custom-navbar="{{popupProps.usingCustomNavbar || false}}" show-overlay="{{popupProps.showOverlay || true}}" z-index="{{ popupProps.zIndex || 11500 }}" overlay-props="{{ popupProps.overlayProps || defaultOverlayProps }}" placement="bottom" bind:visible-change="onVisibleChange"><slot name="header"/><include src="./template.wxml"/><slot name="footer"/></o-popup><block wx:else><include src="./template.wxml"/></block>
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-color-picker__panel {
|
|
4
|
+
padding: 0;
|
|
5
|
+
width: var(--o-color-picker-panel-width,750rpx);
|
|
6
|
+
background: var(--o-color-picker-panel-background,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
7
|
+
border-top-left-radius: var(--o-color-picker-panel-radius,var(--o-radius-extraLarge,24rpx));
|
|
8
|
+
border-top-right-radius: var(--o-color-picker-panel-radius,var(--o-radius-extraLarge,24rpx));
|
|
9
|
+
user-select: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.o-color-picker__body {
|
|
13
|
+
padding: var(--o-color-picker-panel-padding,var(--o-spacer-2,32rpx));
|
|
14
|
+
padding-bottom: 56rpx;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-color-picker__thumb {
|
|
18
|
+
position: absolute;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
outline: 0;
|
|
21
|
+
width: var(--o-color-picker-slider-thumb-size,48rpx);
|
|
22
|
+
height: var(--o-color-picker-slider-thumb-size,48rpx);
|
|
23
|
+
border-radius: var(--o-radius-circle,50%);
|
|
24
|
+
box-shadow: var(--o-shadow-1,0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12));
|
|
25
|
+
color: var(--o-text-color-brand,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.o-color-picker__thumb::after,
|
|
30
|
+
.o-color-picker__thumb::before {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
border-radius: var(--o-radius-circle,50%);
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: block;
|
|
36
|
+
border: 1px solid var(--o-component-border,var(--o-gray-color-4,#dddddd));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.o-color-picker__thumb::before {
|
|
40
|
+
left: 0;
|
|
41
|
+
top: 0;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
background-color: #fff;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.o-color-picker__thumb::after {
|
|
48
|
+
left: 3px;
|
|
49
|
+
top: 3px;
|
|
50
|
+
width: calc(100% - 6px);
|
|
51
|
+
height: calc(100% - 6px);
|
|
52
|
+
padding: var(--o-color-picker-slider-thumb-padding,6rpx);
|
|
53
|
+
background: currentcolor;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.o-color-picker__saturation {
|
|
57
|
+
height: var(--o-color-picker-saturation-height,288rpx);
|
|
58
|
+
border-radius: var(--o-color-picker-saturation-radius,var(--o-radius-default,12rpx));
|
|
59
|
+
position: relative;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
background: 0 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.o-color-picker__saturation::after,
|
|
65
|
+
.o-color-picker__saturation::before {
|
|
66
|
+
content: '';
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-color-picker__saturation::before {
|
|
75
|
+
background: linear-gradient(90deg,#fff,transparent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-color-picker__saturation::after {
|
|
79
|
+
background: linear-gradient(0deg,#000,transparent);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.o-color-picker__saturation .o-color-picker__thumb {
|
|
83
|
+
width: var(--o-color-picker-saturation-thumb-size,48rpx);
|
|
84
|
+
height: var(--o-color-picker-saturation-thumb-size,48rpx);
|
|
85
|
+
border-radius: var(--o-radius-circle,50%);
|
|
86
|
+
transform: translate(-50%,-50%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.o-color-picker__slider-wrapper {
|
|
90
|
+
border-radius: calc(var(--o-color-picker-slider-height,16rpx)/ 2);
|
|
91
|
+
padding: var(--o-color-picker-slider-wrapper-padding,0 18rpx);
|
|
92
|
+
position: relative;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.o-color-picker__slider-wrapper--hue-type {
|
|
96
|
+
background: linear-gradient(90deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);
|
|
97
|
+
margin: var(--o-spacer,16rpx) 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-color-picker__slider-wrapper--alpha-type {
|
|
101
|
+
background: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
102
|
+
margin: 40rpx 0 var(--o-spacer,16rpx) 0;
|
|
103
|
+
background-image: linear-gradient(45deg,#c5c5c5 25%,transparent 0,transparent 75%,#c5c5c5 0,#c5c5c5),linear-gradient(45deg,#c5c5c5 25%,transparent 0,transparent 75%,#c5c5c5 0,#c5c5c5);
|
|
104
|
+
background-size: 6px 6px;
|
|
105
|
+
background-position: 0 0,3px 3px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.o-color-picker__slider-wrapper--alpha-type .o-color-picker__rail {
|
|
109
|
+
background: linear-gradient(to right,transparent,currentcolor);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.o-color-picker__slider-padding {
|
|
113
|
+
position: absolute;
|
|
114
|
+
left: 0;
|
|
115
|
+
top: 0;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: var(--o-color-picker-slider-height,16rpx);
|
|
118
|
+
border-radius: calc(var(--o-color-picker-slider-height,16rpx)/ 2);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.o-color-picker__slider {
|
|
122
|
+
height: var(--o-color-picker-slider-height,16rpx);
|
|
123
|
+
position: relative;
|
|
124
|
+
border-radius: calc(var(--o-color-picker-slider-height,16rpx)/ 2);
|
|
125
|
+
color: transparent;
|
|
126
|
+
outline: 0;
|
|
127
|
+
z-index: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.o-color-picker__slider .o-color-picker__thumb {
|
|
131
|
+
transform: translate(var(--o-color-picker-slider-thumb-transform-x,-18rpx),-50%);
|
|
132
|
+
top: 50%;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.o-color-picker__slider .o-color-picker__rail {
|
|
136
|
+
position: absolute;
|
|
137
|
+
top: 0;
|
|
138
|
+
left: 0;
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 100%;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
border-radius: inherit;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.o-color-picker__sliders-wrapper {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
margin: var(--o-spacer-2,32rpx) 0 40rpx;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.o-color-picker__sliders {
|
|
152
|
+
width: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.o-color-picker__sliders-preview {
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
margin-left: var(--o-spacer-1,24rpx);
|
|
158
|
+
width: var(--o-color-picker-gradient-preview-width,56rpx);
|
|
159
|
+
height: var(--o-color-picker-gradient-preview-height,56rpx);
|
|
160
|
+
border-radius: var(--o-color-picker-gradient-preview-radius,var(--o-radius-small,6rpx));
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
background: var(--o-text-color-anti,var(--o-font-white-1,#fff));
|
|
163
|
+
background-image: linear-gradient(45deg,#c5c5c5 25%,transparent 0,transparent 75%,#c5c5c5 0,#c5c5c5),linear-gradient(45deg,#c5c5c5 25%,transparent 0,transparent 75%,#c5c5c5 0,#c5c5c5);
|
|
164
|
+
background-size: 6px 6px;
|
|
165
|
+
background-position: 0 0,3px 3px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.o-color-picker__sliders-preview-inner {
|
|
169
|
+
display: block;
|
|
170
|
+
width: 100%;
|
|
171
|
+
height: 100%;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.o-color-picker__format {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: space-between;
|
|
178
|
+
color: var(--o-text-color-placeholder,var(--o-font-gray-3,#8d8d8d));
|
|
179
|
+
text-align: center;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.o-color-picker__format:not(:empty)+.o-color-picker__swatches-wrap:not(:empty) {
|
|
183
|
+
margin-top: 56rpx;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.o-color-picker__format-item {
|
|
187
|
+
font: var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.o-color-picker__format-item--first {
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
width: 136rpx;
|
|
193
|
+
border: 2rpx solid var(--o-component-border,var(--o-gray-color-4,#dddddd));
|
|
194
|
+
border-radius: var(--o-radius-default,12rpx);
|
|
195
|
+
padding: 6rpx 0;
|
|
196
|
+
margin-right: var(--o-spacer-1,24rpx);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.o-color-picker__format-item--second {
|
|
200
|
+
flex: 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.o-color-picker__format-inputs {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: space-around;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.o-color-picker__format-input {
|
|
210
|
+
flex: 1;
|
|
211
|
+
width: 0;
|
|
212
|
+
margin-left: calc(-1 * var(--o-spacer,16rpx)/ 8);
|
|
213
|
+
padding: 6rpx 0;
|
|
214
|
+
border: 1px solid var(--o-component-border,var(--o-gray-color-4,#dddddd));
|
|
215
|
+
border-radius: var(--o-radius-default,12rpx);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.o-color-picker__format-input:not(:first-child):not(:last-child) {
|
|
219
|
+
border-radius: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.o-color-picker__format-input:first-child:not(:last-child) {
|
|
223
|
+
border-top-right-radius: 0;
|
|
224
|
+
border-bottom-right-radius: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.o-color-picker__format-input:last-child:not(:first-child) {
|
|
228
|
+
border-top-left-radius: 0;
|
|
229
|
+
border-bottom-left-radius: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.o-color-picker__format-input--fixed {
|
|
233
|
+
flex-shrink: 0;
|
|
234
|
+
flex-grow: 0;
|
|
235
|
+
flex-basis: 133rpx;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.o-color-picker__swatches-wrap {
|
|
239
|
+
position: relative;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.o-color-picker__swatches+.o-color-picker__swatches {
|
|
243
|
+
margin-top: var(--o-spacer-1,24rpx);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.o-color-picker__swatches-title {
|
|
247
|
+
font: var(--o-color-picker-swatches-title-font,var(--o-font-title-medium,600 32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
248
|
+
padding: 0;
|
|
249
|
+
color: var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f));
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
justify-content: space-between;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.o-color-picker__swatches-items {
|
|
256
|
+
margin-top: var(--o-spacer-1,24rpx);
|
|
257
|
+
width: 100%;
|
|
258
|
+
height: 48rpx;
|
|
259
|
+
display: flex;
|
|
260
|
+
flex-direction: row;
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.o-color-picker__swatches-items::-webkit-scrollbar {
|
|
265
|
+
display: none;
|
|
266
|
+
width: 0;
|
|
267
|
+
height: 0;
|
|
268
|
+
color: transparent;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.o-color-picker__swatches-item {
|
|
272
|
+
width: var(--o-color-picker-swatch-width,48rpx);
|
|
273
|
+
height: var(--o-color-picker-swatch-height,48rpx);
|
|
274
|
+
border-radius: var(--o-radius-small,6rpx);
|
|
275
|
+
padding: var(--o-color-picker-swatch-padding,0);
|
|
276
|
+
overflow: hidden;
|
|
277
|
+
display: inline-flex;
|
|
278
|
+
vertical-align: top;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
position: relative;
|
|
282
|
+
transform-origin: center;
|
|
283
|
+
transition: all var(--o-anim-duration-base,.2s) var(--o-anim-time-fn-easing,cubic-bezier(.38,0,.24,1));
|
|
284
|
+
box-sizing: border-box;
|
|
285
|
+
flex-shrink: 0;
|
|
286
|
+
margin-right: var(--o-spacer-1,24rpx);
|
|
287
|
+
border-radius: var(--o-color-picker-swatch-border-radius,var(--o-radius-small,6rpx));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.o-color-picker__swatches-item::after {
|
|
291
|
+
content: '';
|
|
292
|
+
width: 100%;
|
|
293
|
+
height: 100%;
|
|
294
|
+
position: absolute;
|
|
295
|
+
left: 0;
|
|
296
|
+
top: 0;
|
|
297
|
+
opacity: 0;
|
|
298
|
+
background: rgba(0,0,0,.2);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.o-color-picker__swatches-item:active::after {
|
|
302
|
+
opacity: 1;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.o-color-picker__swatches-inner {
|
|
306
|
+
width: 100%;
|
|
307
|
+
height: 100%;
|
|
308
|
+
display: block;
|
|
309
|
+
border-radius: var(--o-color-picker-swatch-border-radius,var(--o-radius-small,6rpx));
|
|
310
|
+
position: relative;
|
|
311
|
+
}
|
|
312
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEFAULT_COLOR="#001F97";export const DEFAULT_SYSTEM_SWATCH_COLORS=["#fef3eb","#fce2cc","#f9c599","#f7a866","#f48b33","#f27d1a","#f16e00","#cd5e00","#a94d00","#853d00"];export const SATURATION_PANEL_DEFAULT_WIDTH=343;export const SATURATION_PANEL_DEFAULT_HEIGHT=144;export const SLIDER_DEFAULT_WIDTH=303;export const HUE_MAX=360;export const ALPHA_MAX=100;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./color-picker";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={autoClose:{type:Boolean,value:!0},colorModes:{type:null,value:"monochrome"},enableAlpha:{type:Boolean,value:!1},enableMultipleGradient:{type:Boolean,value:!0},fixed:{type:Boolean,value:!1},format:{type:String,value:"RGB"},popupProps:{type:Object,value:{}},swatchColors:{type:Array,value:void 0},type:{type:String,value:"base"},usePopup:{type:Boolean,value:!1},value:{type:String,value:null},defaultValue:{type:String,value:""},visible:{type:Boolean,value:!1}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view class="{{classPrefix}}__panel" style="{{_._style([style, customStyle])}}"><view class="{{classPrefix}}__body {{classPrefix}}__body--{{type}}"><view class="{{classPrefix}}__saturation" wx:if="{{isMultiple}}" catchtouchstart="onTouchStart" catchtouchmove="onTouchMove" catchtouchend="onTouchEnd" data-type="saturation" style="background: hsl({{sliderInfo.value}}, 100%, 50%)"><view class="{{classPrefix}}__thumb" tabIndex="{{0}}" style="{{_._style(saturationThumbStyle)}}"></view></view><view class="{{classPrefix}}__sliders-wrapper" wx:if="{{isMultiple}}"><view class="{{classPrefix}}__sliders"><view class="{{classPrefix}}__slider-wrapper {{classPrefix}}__slider-wrapper--hue-type"><view class="{{classPrefix}}__slider" catchtouchstart="onTouchStart" catchtouchmove="onTouchMove" catchtouchend="onTouchEnd" data-type="hue-slider"><view class="{{classPrefix}}__rail"></view><view class="{{classPrefix}}__thumb" style="{{_._style(hueSliderStyle)}}"></view></view></view><view wx:if="{{enableAlpha}}" class="{{classPrefix}}__slider-wrapper {{classPrefix}}__slider-wrapper--alpha-type"><view class="{{classPrefix}}__slider-padding" style="background: linear-gradient(90deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.0) 93%, {{alphaSliderStyle.color}} 93%, {{alphaSliderStyle.color}} 100%)"></view><view class="{{classPrefix}}__slider" catchtouchstart="onTouchStart" catchtouchmove="onTouchMove" catchtouchend="onTouchEnd" data-type="alpha-slider"><view class="{{classPrefix}}__rail" style="background: linear-gradient(to right, rgba(0, 0, 0, 0), {{alphaSliderStyle.color}})"></view><view class="{{classPrefix}}__thumb" style="{{_._style(alphaSliderStyle)}}"></view></view></view></view><view wx:if="{{showPrimaryColorPreview}}" class="{{classPrefix}}__sliders-preview {{classPrefix}}--bg-alpha"><view class="{{classPrefix}}__sliders-preview-inner" style="background: {{previewColor}}"/></view></view><view class="{{classPrefix}}__format" wx:if="{{isMultiple}}"><view class="{{classPrefix}}__format-item {{classPrefix}}__format-item--first">{{format}}</view><view class="{{classPrefix}}__format-item {{classPrefix}}__format-item--second"><view class="{{classPrefix}}__format-inputs"><view wx:for="{{formatList}}" wx:key="index" class="{{classPrefix}}__format-input {{classPrefix}}__format-input--{{ index === formatList.length - 1 && formatList.length === 2 ? 'fixed' : 'base' }}">{{item}}</view></view></view></view><view class="{{classPrefix}}__swatches-wrap" wx:if="{{innerSwatchList.length}}"><view class="{{classPrefix}}__swatches"><view class="{{classPrefix}}__swatches-title" wx:if="{{isMultiple}}">Couleurs prédéfinies</view><scroll-view class="{{classPrefix}}__swatches-items" scroll-x enable-flex scroll-anchoring type="list"><view wx:for="{{innerSwatchList}}" wx:for-item="swatch" wx:key="swatch" class="{{classPrefix}}__swatches-item" data-value="{{swatch}}" catch:tap="clickSwatch"><view class="{{classPrefix}}__swatches-inner" style="background-color: {{swatch}};"></view></view></scroll-view></view></view></view></view>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"../common/shared/color-picker/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default class Bus{constructor(){this.listeners=new Map,this.emitted=new Set}on(t,e){if(this.emitted.has(t))return void e();const s=this.listeners.get(t)||[];s.push(e),this.listeners.set(t,s)}emit(t){const e=this.listeners.get(t);e&&e.forEach(t=>t()),this.emitted.add(t)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default{prefix:"o"};export const prefix="o";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var trimLeft=/^\s+/,trimRight=/\s+$/;function tinycolor(t,r){if(r=r||{},(t=t||"")instanceof tinycolor)return t;if(!(this instanceof tinycolor))return new tinycolor(t,r);var e=inputToRGB(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=e.ok}function inputToRGB(t){var r={r:0,g:0,b:0},e=1,n=null,a=null,o=null,i=!1,s=!1;return"string"==typeof t&&(t=stringInputToObject(t)),"object"==_typeof(t)&&(isValidCSSUnit(t.r)&&isValidCSSUnit(t.g)&&isValidCSSUnit(t.b)?(r=rgbToRgb(t.r,t.g,t.b),i=!0,s="%"===String(t.r).substr(-1)?"prgb":"rgb"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.v)?(n=convertToPercentage(t.s),a=convertToPercentage(t.v),r=hsvToRgb(t.h,n,a),i=!0,s="hsv"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.l)&&(n=convertToPercentage(t.s),o=convertToPercentage(t.l),r=hslToRgb(t.h,n,o),i=!0,s="hsl"),t.hasOwnProperty("a")&&(e=t.a)),e=boundAlpha(e),{ok:i,format:t.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:e}}function rgbToRgb(t,r,e){return{r:255*bound01(t,255),g:255*bound01(r,255),b:255*bound01(e,255)}}function rgbToHsl(t,r,e){t=bound01(t,255),r=bound01(r,255),e=bound01(e,255);var n,a,o=Math.max(t,r,e),i=Math.min(t,r,e),s=(o+i)/2;if(o==i)n=a=0;else{var h=o-i;switch(a=s>.5?h/(2-o-i):h/(o+i),o){case t:n=(r-e)/h+(r<e?6:0);break;case r:n=(e-t)/h+2;break;case e:n=(t-r)/h+4}n/=6}return{h:n,s:a,l:s}}function hslToRgb(t,r,e){var n,a,o;function i(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=bound01(t,360),r=bound01(r,100),e=bound01(e,100),0===r)n=a=o=e;else{var s=e<.5?e*(1+r):e+r-e*r,h=2*e-s;n=i(h,s,t+1/3),a=i(h,s,t),o=i(h,s,t-1/3)}return{r:255*n,g:255*a,b:255*o}}function rgbToHsv(t,r,e){t=bound01(t,255),r=bound01(r,255),e=bound01(e,255);var n,a,o=Math.max(t,r,e),i=Math.min(t,r,e),s=o,h=o-i;if(a=0===o?0:h/o,o==i)n=0;else{switch(o){case t:n=(r-e)/h+(r<e?6:0);break;case r:n=(e-t)/h+2;break;case e:n=(t-r)/h+4}n/=6}return{h:n,s:a,v:s}}function hsvToRgb(t,r,e){t=6*bound01(t,360),r=bound01(r,100),e=bound01(e,100);var n=Math.floor(t),a=t-n,o=e*(1-r),i=e*(1-a*r),s=e*(1-(1-a)*r),h=n%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h]}}function rgbToHex(t,r,e,n){var a=[pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(Math.round(e).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function rgbaToHex(t,r,e,n,a){var o=[pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(Math.round(e).toString(16)),pad2(convertDecimalToHex(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function rgbaToArgbHex(t,r,e,n){return[pad2(convertDecimalToHex(n)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(Math.round(e).toString(16))].join("")}function _desaturate(t,r){r=0===r?0:r||10;var e=tinycolor(t).toHsl();return e.s-=r/100,e.s=clamp01(e.s),tinycolor(e)}function _saturate(t,r){r=0===r?0:r||10;var e=tinycolor(t).toHsl();return e.s+=r/100,e.s=clamp01(e.s),tinycolor(e)}function _greyscale(t){return tinycolor(t).desaturate(100)}function _lighten(t,r){r=0===r?0:r||10;var e=tinycolor(t).toHsl();return e.l+=r/100,e.l=clamp01(e.l),tinycolor(e)}function _brighten(t,r){r=0===r?0:r||10;var e=tinycolor(t).toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(-r/100*255))),e.g=Math.max(0,Math.min(255,e.g-Math.round(-r/100*255))),e.b=Math.max(0,Math.min(255,e.b-Math.round(-r/100*255))),tinycolor(e)}function _darken(t,r){r=0===r?0:r||10;var e=tinycolor(t).toHsl();return e.l-=r/100,e.l=clamp01(e.l),tinycolor(e)}function _spin(t,r){var e=tinycolor(t).toHsl(),n=(e.h+r)%360;return e.h=n<0?360+n:n,tinycolor(e)}function _complement(t){var r=tinycolor(t).toHsl();return r.h=(r.h+180)%360,tinycolor(r)}function polyad(t,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var e=tinycolor(t).toHsl(),n=[tinycolor(t)],a=360/r,o=1;o<r;o++)n.push(tinycolor({h:(e.h+o*a)%360,s:e.s,l:e.l}));return n}function _splitcomplement(t){var r=tinycolor(t).toHsl(),e=r.h;return[tinycolor(t),tinycolor({h:(e+72)%360,s:r.s,l:r.l}),tinycolor({h:(e+216)%360,s:r.s,l:r.l})]}function _analogous(t,r,e){r=r||6,e=e||30;var n=tinycolor(t).toHsl(),a=360/e,o=[tinycolor(t)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,o.push(tinycolor(n));return o}function _monochromatic(t,r){r=r||6;for(var e=tinycolor(t).toHsv(),n=e.h,a=e.s,o=e.v,i=[],s=1/r;r--;)i.push(tinycolor({h:n,s:a,v:o})),o=(o+s)%1;return i}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=boundAlpha(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=rgbToHsv(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=rgbToHsv(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=rgbToHsl(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=rgbToHsl(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return rgbToHex(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return rgbaToHex(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),e=r,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=tinycolor(t);e="#"+rgbaToArgbHex(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return tinycolor(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(t,r){if("object"==_typeof(t)){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]="a"===n?t[n]:convertToPercentage(t[n]));t=e}return tinycolor(t,r)},tinycolor.equals=function(t,r){return!(!t||!r)&&tinycolor(t).toRgbString()==tinycolor(r).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(t,r,e){e=0===e?0:e||50;var n=tinycolor(t).toRgb(),a=tinycolor(r).toRgb(),o=e/100;return tinycolor({r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a})},tinycolor.readability=function(t,r){var e=tinycolor(t),n=tinycolor(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)},tinycolor.isReadable=function(t,r,e){var n,a,o=tinycolor.readability(t,r);switch(a=!1,(n=validateWCAG2Parms(e)).level+n.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},tinycolor.mostReadable=function(t,r,e){var n,a,o,i,s=null,h=0;a=(e=e||{}).includeFallbackColors,o=e.level,i=e.size;for(var l=0;l<r.length;l++)(n=tinycolor.readability(t,r[l]))>h&&(h=n,s=tinycolor(r[l]));return tinycolor.isReadable(t,s,{level:o,size:i})||!a?s:(e.includeFallbackColors=!1,tinycolor.mostReadable(t,["#fff","#000"],e))};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names);function flip(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}function boundAlpha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function bound01(t,r){isOnePointZero(t)&&(t="100%");var e=isPercentage(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function clamp01(t){return Math.min(1,Math.max(0,t))}function parseIntFromHex(t){return parseInt(t,16)}function isOnePointZero(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function isPercentage(t){return"string"==typeof t&&-1!=t.indexOf("%")}function pad2(t){return 1==t.length?"0"+t:""+t}function convertToPercentage(t){return t<=1&&(t=100*t+"%"),t}function convertDecimalToHex(t){return Math.round(255*parseFloat(t)).toString(16)}function convertHexToDecimal(t){return parseIntFromHex(t)/255}var matchers=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+e),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function isValidCSSUnit(t){return!!matchers.CSS_UNIT.exec(t)}function stringInputToObject(t){t=t.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var r,e=!1;if(names[t])t=names[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(r=matchers.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=matchers.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=matchers.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=matchers.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=matchers.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=matchers.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=matchers.hex8.exec(t))?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),a:convertHexToDecimal(r[4]),format:e?"name":"hex8"}:(r=matchers.hex6.exec(t))?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),format:e?"name":"hex"}:(r=matchers.hex4.exec(t))?{r:parseIntFromHex(r[1]+""+r[1]),g:parseIntFromHex(r[2]+""+r[2]),b:parseIntFromHex(r[3]+""+r[3]),a:convertHexToDecimal(r[4]+""+r[4]),format:e?"name":"hex8"}:!!(r=matchers.hex3.exec(t))&&{r:parseIntFromHex(r[1]+""+r[1]),g:parseIntFromHex(r[2]+""+r[2]),b:parseIntFromHex(r[3]+""+r[3]),format:e?"name":"hex"}}function validateWCAG2Parms(t){var r,e;return"AA"!==(r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==r&&(r="AA"),"small"!==(e=(t.size||"small").toLowerCase())&&"large"!==e&&(e="small"),{level:r,size:e}}export{tinycolor as default};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Textes par défaut des composants, indexés par nom de composant en camelCase.
|
|
2
|
+
export default {
|
|
3
|
+
typography: { expandText: 'Voir plus', collapseText: 'Réduire', copiedText: 'Copié' },
|
|
4
|
+
calendar: {
|
|
5
|
+
title: 'Sélectionner une date',
|
|
6
|
+
confirm: 'Confirmer',
|
|
7
|
+
weekdays: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
|
|
8
|
+
monthTitle: '{month} {year}',
|
|
9
|
+
months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
|
|
10
|
+
},
|
|
11
|
+
cascader: { title: 'Sélectionner', placeholder: 'Sélectionner une option', filterPlaceholder: 'Rechercher', empty: 'Aucun résultat' },
|
|
12
|
+
picker: { cancel: 'Annuler', confirm: 'Confirmer' },
|
|
13
|
+
rate: { texts: ['Très mauvais', 'Décevant', 'Moyen', 'Satisfaisant', 'Excellent'], valueText: '{value} étoile(s)', noValueText: 'Pas de note' },
|
|
14
|
+
upload: { progress: { uploadingText: 'Envoi...', waitingText: 'En attente', failText: 'Échec de l\'envoi', successText: 'Envoyé', reloadText: 'Réessayer' } },
|
|
15
|
+
qrcode: { expiredText: 'QR code expiré', refreshText: 'Actualiser', scannedText: 'Scanné' },
|
|
16
|
+
result: { default: 'Information', success: 'Succès', warning: 'Attention', error: 'Erreur' },
|
|
17
|
+
actionSheet: { cancel: 'Annuler' },
|
|
18
|
+
dropdownMenu: { reset: 'Réinitialiser', confirm: 'Confirmer' },
|
|
19
|
+
guide: { next: 'Suivant', skip: 'Passer', finish: 'Terminer', back: 'Retour' },
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getCurrentPage}from"../utils";const onPageScroll=function(r){const e=getCurrentPage();if(!e)return;const{pageScroller:o}=e;null==o||o.forEach(e=>{"function"==typeof e&&e(r)})};export default(r="onScroll")=>Behavior({attached(){var e;const o=getCurrentPage();if(!o)return;const l=null===(e=this[r])||void 0===e?void 0:e.bind(this);l&&(this._pageScroller=l),Array.isArray(o.pageScroller)?o.pageScroller.push(l):o.pageScroller="function"==typeof o.onPageScroll?[o.onPageScroll.bind(o),l]:[l],o.onPageScroll=onPageScroll},detached(){var r;const e=getCurrentPage();e&&(e.pageScroller=(null===(r=e.pageScroller)||void 0===r?void 0:r.filter(r=>r!==this._pageScroller))||[])}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const MinDistance=10,getDirection=(t,s)=>t>s&&t>10?"horizontal":s>t&&s>10?"vertical":"";export default Behavior({methods:{resetTouchStatus(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},touchStart(t){this.resetTouchStatus();const[s]=t.touches;this.startX=s.clientX,this.startY=s.clientY},touchMove(t){const[s]=t.touches;this.deltaX=s.clientX-this.startX,this.deltaY=s.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=getDirection(this.offsetX,this.offsetY)}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import config from"../config";const{prefix:prefix}=config;export default function transition(){return Behavior({properties:{visible:{type:Boolean,value:null,observer:"watchVisible"},appear:Boolean,name:{type:String,value:"fade"},durations:{type:Number,optionalTypes:[Array]}},data:{transitionClass:"",transitionDurations:300,className:"",realVisible:!1},created(){this.status="",this.transitionT=0},attached(){this.durations=this.getDurations(),this.data.visible&&this.enter(),this.inited=!0},detached(){clearTimeout(this.transitionT)},methods:{watchVisible(t,i){this.inited&&t!==i&&(t?this.enter():this.leave())},getDurations(){const{durations:t}=this.data;return Array.isArray(t)?t.map(t=>Number(t)):[Number(t),Number(t)]},enter(){const{name:t,transitionDurations:i}=this.data,[e]=this.durations;this.status="entering",this.setData({realVisible:!0,transitionClass:`${prefix}-${t}-enter ${prefix}-${t}-enter-active`}),clearTimeout(this.transitionT),setTimeout(()=>{this.setData({transitionClass:`${prefix}-${t}-enter-active ${prefix}-${t}-enter-to`})},30),this.transitionT="number"==typeof e&&e>0?setTimeout(this.entered.bind(this),e+30):setTimeout("entering"===this.status?this.entered.bind(this):null,i+30)},entered(){this.customDuration=!1,clearTimeout(this.transitionT),this.status="entered",this.setData({transitionClass:""})},leave(){const{name:t,transitionDurations:i}=this.data,[,e]=this.durations;this.status="leaving",this.setData({transitionClass:`${prefix}-${t}-leave ${prefix}-${t}-leave-active`}),clearTimeout(this.transitionT),setTimeout(()=>{this.setData({transitionClass:`${prefix}-${t}-leave-active ${prefix}-${t}-leave-to`})},30),"number"==typeof e&&e>0?(this.customDuration=!0,this.transitionT=setTimeout(this.leaved.bind(this),e+30)):this.transitionT=setTimeout("leaving"===this.status?this.leaved.bind(this):null,i+30)},leaved(){this.customDuration=!1,this.triggerEvent("leaved"),clearTimeout(this.transitionT),this.status="leaved",this.setData({transitionClass:"",realVisible:!1})},onTransitionEnd(){this.customDuration||(clearTimeout(this.transitionT),"entering"===this.status&&this.data.visible?this.entered():"leaving"!==this.status||this.data.visible||this.leaved())}}})}
|