@tuya-miniapp/smart-ui 2.9.1-beta-1 → 2.9.1-beta-3
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/dist/action-sheet/index.css +1 -1
- package/dist/action-sheet/index.wxss +1 -1
- package/dist/area/index.css +1 -0
- package/dist/area/index.d.ts +1 -0
- package/dist/area/index.js +219 -0
- package/dist/area/index.json +6 -0
- package/dist/area/index.wxml +20 -0
- package/dist/area/index.wxs +8 -0
- package/dist/area/index.wxss +1 -0
- package/dist/battery/index.js +45 -100
- package/dist/battery/index.wxml +1 -21
- package/dist/bottom-sheet/index.css +1 -1
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/button/index.css +1 -1
- package/dist/button/index.wxss +1 -1
- package/dist/calendar/index.css +1 -1
- package/dist/calendar/index.js +5 -1
- package/dist/calendar/index.wxss +1 -1
- package/dist/calendar-header/index.css +1 -1
- package/dist/calendar-header/index.wxss +1 -1
- package/dist/calendar-month/index.css +1 -1
- package/dist/calendar-month/index.wxss +1 -1
- package/dist/calendar-month-list/index.css +1 -1
- package/dist/calendar-month-list/index.wxss +1 -1
- package/dist/calendar-utils/utils.d.ts +1 -1
- package/dist/calendar-utils/utils.js +7 -3
- package/dist/calendar-year-list/index.css +1 -1
- package/dist/calendar-year-list/index.wxss +1 -1
- package/dist/cascader/index.css +1 -1
- package/dist/cascader/index.wxss +1 -1
- package/dist/cell/index.css +1 -1
- package/dist/cell/index.wxss +1 -1
- package/dist/cell-group/index.css +1 -1
- package/dist/cell-group/index.wxss +1 -1
- package/dist/checkbox/index.css +1 -1
- package/dist/checkbox/index.wxss +1 -1
- package/dist/circle/index.css +1 -1
- package/dist/circle/index.wxss +1 -1
- package/dist/collapse/index.css +1 -1
- package/dist/collapse/index.wxss +1 -1
- package/dist/collapse-item/index.css +1 -1
- package/dist/collapse-item/index.wxss +1 -1
- package/dist/common/index.css +1 -1
- package/dist/common/index.wxss +1 -1
- package/dist/common/style/hairline.css +1 -1
- package/dist/common/style/hairline.wxss +1 -1
- package/dist/common/style/mixins/hairline.css +1 -1
- package/dist/common/style/mixins/hairline.wxss +1 -1
- package/dist/common/style/var.css +1 -1
- package/dist/common/style/var.wxss +1 -1
- package/dist/config-provider/dark.wxs +1 -4
- package/dist/config-provider/light.wxs +1 -4
- package/dist/count-down/index.css +1 -1
- package/dist/count-down/index.wxss +1 -1
- package/dist/custom-keyboard/index.css +1 -1
- package/dist/custom-keyboard/index.wxss +1 -1
- package/dist/datetime-picker/index.css +1 -1
- package/dist/datetime-picker/index.wxss +1 -1
- package/dist/dialog/index.css +1 -1
- package/dist/dialog/index.wxss +1 -1
- package/dist/divider/index.css +1 -1
- package/dist/divider/index.wxss +1 -1
- package/dist/dropdown-item/index.css +1 -1
- package/dist/dropdown-item/index.wxss +1 -1
- package/dist/dropdown-menu/index.css +1 -1
- package/dist/dropdown-menu/index.wxss +1 -1
- package/dist/empty/index.css +1 -1
- package/dist/empty/index.wxss +1 -1
- package/dist/field/index.css +1 -1
- package/dist/field/index.wxss +1 -1
- package/dist/goods-action/index.css +1 -1
- package/dist/goods-action/index.wxss +1 -1
- package/dist/goods-action-button/index.css +1 -1
- package/dist/goods-action-button/index.wxss +1 -1
- package/dist/goods-action-icon/index.css +1 -1
- package/dist/goods-action-icon/index.wxss +1 -1
- package/dist/grid-item/index.css +1 -1
- package/dist/grid-item/index.wxss +1 -1
- package/dist/icon/index.css +1 -1
- package/dist/icon/index.wxss +1 -1
- package/dist/image/index.css +1 -1
- package/dist/image/index.wxss +1 -1
- package/dist/index-anchor/index.css +1 -1
- package/dist/index-anchor/index.wxss +1 -1
- package/dist/index-bar/index.css +1 -1
- package/dist/index-bar/index.wxss +1 -1
- package/dist/info/index.css +1 -1
- package/dist/info/index.wxss +1 -1
- package/dist/loading/index.css +1 -1
- package/dist/loading/index.wxss +1 -1
- package/dist/nav-bar/index.css +1 -1
- package/dist/nav-bar/index.wxss +1 -1
- package/dist/normal-slider/index.css +1 -1
- package/dist/normal-slider/index.wxss +1 -1
- package/dist/notice-bar/index.css +1 -1
- package/dist/notice-bar/index.wxss +1 -1
- package/dist/notify/index.css +1 -1
- package/dist/notify/index.wxss +1 -1
- package/dist/overlay/index.css +1 -1
- package/dist/overlay/index.wxss +1 -1
- package/dist/picker/index.css +1 -1
- package/dist/picker/index.wxss +1 -1
- package/dist/picker-column/index.css +1 -1
- package/dist/picker-column/index.wxss +1 -1
- package/dist/popover/index.css +1 -1
- package/dist/popover/index.wxss +1 -1
- package/dist/popup/index.css +1 -1
- package/dist/popup/index.wxss +1 -1
- package/dist/progress/index.css +1 -1
- package/dist/progress/index.wxss +1 -1
- package/dist/radio/index.css +1 -1
- package/dist/radio/index.wxss +1 -1
- package/dist/rate/index.css +1 -1
- package/dist/rate/index.wxss +1 -1
- package/dist/search/index.css +1 -1
- package/dist/search/index.wxss +1 -1
- package/dist/sidebar/index.css +1 -1
- package/dist/sidebar/index.wxss +1 -1
- package/dist/sidebar-item/index.css +1 -1
- package/dist/sidebar-item/index.wxss +1 -1
- package/dist/skeleton/index.css +1 -1
- package/dist/skeleton/index.wxss +1 -1
- package/dist/slider/index.css +1 -1
- package/dist/slider/index.wxss +1 -1
- package/dist/stepper/index.css +1 -1
- package/dist/stepper/index.wxss +1 -1
- package/dist/steps/index.css +1 -0
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/index.js +34 -0
- package/dist/steps/index.json +6 -0
- package/dist/steps/index.wxml +54 -0
- package/dist/steps/index.wxss +1 -0
- package/dist/swipe-cell/index.css +1 -1
- package/dist/swipe-cell/index.wxss +1 -1
- package/dist/switch/index.css +1 -1
- package/dist/switch/index.wxss +1 -1
- package/dist/tab/index.css +1 -1
- package/dist/tab/index.wxss +1 -1
- package/dist/tabbar/index.css +1 -1
- package/dist/tabbar/index.wxss +1 -1
- package/dist/tabbar-item/index.css +1 -1
- package/dist/tabbar-item/index.wxss +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.wxss +1 -1
- package/dist/tag/index.css +1 -1
- package/dist/tag/index.wxss +1 -1
- package/dist/toast/index.css +1 -1
- package/dist/toast/index.wxss +1 -1
- package/dist/tree-select/index.css +1 -1
- package/dist/tree-select/index.wxss +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.wxss +1 -1
- package/lib/area/index.css +1 -0
- package/lib/area/index.d.ts +1 -0
- package/lib/area/index.js +234 -0
- package/lib/area/index.json +6 -0
- package/lib/area/index.wxml +20 -0
- package/lib/area/index.wxs +8 -0
- package/lib/area/index.wxss +1 -0
- package/lib/battery/index.js +38 -100
- package/lib/battery/index.wxml +1 -21
- package/lib/bottom-sheet/index.css +1 -1
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.wxss +1 -1
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +5 -1
- package/lib/calendar/index.wxss +1 -1
- package/lib/calendar-header/index.css +1 -1
- package/lib/calendar-header/index.wxss +1 -1
- package/lib/calendar-month/index.css +1 -1
- package/lib/calendar-month/index.wxss +1 -1
- package/lib/calendar-month-list/index.css +1 -1
- package/lib/calendar-month-list/index.wxss +1 -1
- package/lib/calendar-utils/utils.d.ts +1 -1
- package/lib/calendar-utils/utils.js +8 -3
- package/lib/calendar-year-list/index.css +1 -1
- package/lib/calendar-year-list/index.wxss +1 -1
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.wxss +1 -1
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.wxss +1 -1
- package/lib/cell-group/index.css +1 -1
- package/lib/cell-group/index.wxss +1 -1
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.wxss +1 -1
- package/lib/circle/index.css +1 -1
- package/lib/circle/index.wxss +1 -1
- package/lib/collapse/index.css +1 -1
- package/lib/collapse/index.wxss +1 -1
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.wxss +1 -1
- package/lib/common/index.css +1 -1
- package/lib/common/index.wxss +1 -1
- package/lib/common/style/hairline.css +1 -1
- package/lib/common/style/hairline.wxss +1 -1
- package/lib/common/style/mixins/hairline.css +1 -1
- package/lib/common/style/mixins/hairline.wxss +1 -1
- package/lib/common/style/var.css +1 -1
- package/lib/common/style/var.wxss +1 -1
- package/lib/config-provider/dark.wxs +1 -4
- package/lib/config-provider/light.wxs +1 -4
- package/lib/count-down/index.css +1 -1
- package/lib/count-down/index.wxss +1 -1
- package/lib/custom-keyboard/index.css +1 -1
- package/lib/custom-keyboard/index.wxss +1 -1
- package/lib/datetime-picker/index.css +1 -1
- package/lib/datetime-picker/index.wxss +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.wxss +1 -1
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.wxss +1 -1
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.wxss +1 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.wxss +1 -1
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.wxss +1 -1
- package/lib/field/index.css +1 -1
- package/lib/field/index.wxss +1 -1
- package/lib/goods-action/index.css +1 -1
- package/lib/goods-action/index.wxss +1 -1
- package/lib/goods-action-button/index.css +1 -1
- package/lib/goods-action-button/index.wxss +1 -1
- package/lib/goods-action-icon/index.css +1 -1
- package/lib/goods-action-icon/index.wxss +1 -1
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.wxss +1 -1
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.wxss +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image/index.wxss +1 -1
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/index.wxss +1 -1
- package/lib/index-bar/index.css +1 -1
- package/lib/index-bar/index.wxss +1 -1
- package/lib/info/index.css +1 -1
- package/lib/info/index.wxss +1 -1
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.wxss +1 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.wxss +1 -1
- package/lib/normal-slider/index.css +1 -1
- package/lib/normal-slider/index.wxss +1 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.wxss +1 -1
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.wxss +1 -1
- package/lib/overlay/index.css +1 -1
- package/lib/overlay/index.wxss +1 -1
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.wxss +1 -1
- package/lib/picker-column/index.css +1 -1
- package/lib/picker-column/index.wxss +1 -1
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.wxss +1 -1
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.wxss +1 -1
- package/lib/progress/index.css +1 -1
- package/lib/progress/index.wxss +1 -1
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.wxss +1 -1
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.wxss +1 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.wxss +1 -1
- package/lib/sidebar/index.css +1 -1
- package/lib/sidebar/index.wxss +1 -1
- package/lib/sidebar-item/index.css +1 -1
- package/lib/sidebar-item/index.wxss +1 -1
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.wxss +1 -1
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.wxss +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.wxss +1 -1
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/index.js +39 -0
- package/lib/steps/index.json +6 -0
- package/lib/steps/index.wxml +54 -0
- package/lib/steps/index.wxss +1 -0
- package/lib/swipe-cell/index.css +1 -1
- package/lib/swipe-cell/index.wxss +1 -1
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.wxss +1 -1
- package/lib/tab/index.css +1 -1
- package/lib/tab/index.wxss +1 -1
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.wxss +1 -1
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.wxss +1 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.wxss +1 -1
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.wxss +1 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.wxss +1 -1
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.wxss +1 -1
- package/package.json +2 -2
- package/dist/battery/index.css +0 -1
- package/dist/battery/index.wxss +0 -1
- package/lib/battery/index.css +0 -1
- package/lib/battery/index.wxss +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:336px;overflow-y:scroll}.smart-action-sheet__icon{--icon-color:var(--action-sheet-active-icon-color,var(--app-M1,#3678e3));font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,0 16px 0 0);position:absolute;right:0;top:0;transform:translateY(50%)}.smart-action-sheet__item{border-radius:var(--action-sheet-item-border-radius,0);color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));min-height:56px}.smart-action-sheet__item:not(:last-child){border-bottom:.5px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.08)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:.5px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.08)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:336px;overflow-y:scroll}.smart-action-sheet__icon{--icon-color:var(--action-sheet-active-icon-color,var(--app-M1,#3678e3));font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,0 16px 0 0);position:absolute;right:0;top:0;transform:translateY(50%)}.smart-action-sheet__item{border-radius:var(--action-sheet-item-border-radius,0);color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));min-height:56px}.smart-action-sheet__item:not(:last-child){border-bottom:.5px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.08)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:.5px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.08)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { SmartComponent } from '../common/component';
|
|
2
|
+
import { pickerProps } from '../picker/shared';
|
|
3
|
+
import { requestAnimationFrame } from '../common/utils';
|
|
4
|
+
const EMPTY_CODE = '000000';
|
|
5
|
+
SmartComponent({
|
|
6
|
+
classes: ['active-class', 'toolbar-class', 'column-class'],
|
|
7
|
+
props: Object.assign(Object.assign({}, pickerProps), { showToolbar: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
value: true,
|
|
10
|
+
}, value: {
|
|
11
|
+
type: String,
|
|
12
|
+
observer(value) {
|
|
13
|
+
this.code = value;
|
|
14
|
+
this.setValues();
|
|
15
|
+
},
|
|
16
|
+
}, areaList: {
|
|
17
|
+
type: Object,
|
|
18
|
+
value: {},
|
|
19
|
+
observer: 'setValues',
|
|
20
|
+
}, columnsNum: {
|
|
21
|
+
type: null,
|
|
22
|
+
value: 3,
|
|
23
|
+
}, columnsPlaceholder: {
|
|
24
|
+
type: Array,
|
|
25
|
+
observer(val) {
|
|
26
|
+
this.setData({
|
|
27
|
+
typeToColumnsPlaceholder: {
|
|
28
|
+
province: val[0] || '',
|
|
29
|
+
city: val[1] || '',
|
|
30
|
+
county: val[2] || '',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
} }),
|
|
35
|
+
data: {
|
|
36
|
+
columns: [{ values: [] }, { values: [] }, { values: [] }],
|
|
37
|
+
typeToColumnsPlaceholder: {},
|
|
38
|
+
},
|
|
39
|
+
mounted() {
|
|
40
|
+
requestAnimationFrame(() => {
|
|
41
|
+
this.setValues();
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
getPicker() {
|
|
46
|
+
if (this.picker == null) {
|
|
47
|
+
this.picker = this.selectComponent('.smart-area__picker');
|
|
48
|
+
}
|
|
49
|
+
return this.picker;
|
|
50
|
+
},
|
|
51
|
+
onCancel(event) {
|
|
52
|
+
this.emit('cancel', event.detail);
|
|
53
|
+
},
|
|
54
|
+
onConfirm(event) {
|
|
55
|
+
const { index } = event.detail;
|
|
56
|
+
let { value } = event.detail;
|
|
57
|
+
value = this.parseValues(value);
|
|
58
|
+
this.emit('confirm', { value, index });
|
|
59
|
+
},
|
|
60
|
+
emit(type, detail) {
|
|
61
|
+
detail.values = detail.value;
|
|
62
|
+
delete detail.value;
|
|
63
|
+
this.$emit(type, detail);
|
|
64
|
+
},
|
|
65
|
+
parseValues(values) {
|
|
66
|
+
const { columnsPlaceholder } = this.data;
|
|
67
|
+
return values.map((value, index) => {
|
|
68
|
+
if (value && (!value.code || value.name === columnsPlaceholder[index])) {
|
|
69
|
+
return Object.assign(Object.assign({}, value), { code: '', name: '' });
|
|
70
|
+
}
|
|
71
|
+
return value;
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
onChange(event) {
|
|
75
|
+
var _a;
|
|
76
|
+
const { index, picker, value } = event.detail;
|
|
77
|
+
this.code = value[index].code;
|
|
78
|
+
(_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(() => {
|
|
79
|
+
this.$emit('change', {
|
|
80
|
+
picker,
|
|
81
|
+
values: this.parseValues(picker.getValues()),
|
|
82
|
+
index,
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
getConfig(type) {
|
|
87
|
+
const { areaList } = this.data;
|
|
88
|
+
return (areaList && areaList[`${type}_list`]) || {};
|
|
89
|
+
},
|
|
90
|
+
getList(type, code) {
|
|
91
|
+
if (type !== 'province' && !code) {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
const { typeToColumnsPlaceholder } = this.data;
|
|
95
|
+
const list = this.getConfig(type);
|
|
96
|
+
let result = Object.keys(list).map(code => ({
|
|
97
|
+
code,
|
|
98
|
+
name: list[code],
|
|
99
|
+
}));
|
|
100
|
+
if (code != null) {
|
|
101
|
+
// oversea code
|
|
102
|
+
if (code[0] === '9' && type === 'city') {
|
|
103
|
+
code = '9';
|
|
104
|
+
}
|
|
105
|
+
result = result.filter(item => item.code.indexOf(code) === 0);
|
|
106
|
+
}
|
|
107
|
+
if (typeToColumnsPlaceholder[type] && result.length) {
|
|
108
|
+
// set columns placeholder
|
|
109
|
+
const codeFill = type === 'province'
|
|
110
|
+
? ''
|
|
111
|
+
: type === 'city'
|
|
112
|
+
? EMPTY_CODE.slice(2, 4)
|
|
113
|
+
: EMPTY_CODE.slice(4, 6);
|
|
114
|
+
result.unshift({
|
|
115
|
+
code: `${code}${codeFill}`,
|
|
116
|
+
name: typeToColumnsPlaceholder[type],
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
},
|
|
121
|
+
getIndex(type, code) {
|
|
122
|
+
let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
|
|
123
|
+
const list = this.getList(type, code.slice(0, compareNum - 2));
|
|
124
|
+
// oversea code
|
|
125
|
+
if (code[0] === '9' && type === 'province') {
|
|
126
|
+
compareNum = 1;
|
|
127
|
+
}
|
|
128
|
+
code = code.slice(0, compareNum);
|
|
129
|
+
for (let i = 0; i < list.length; i++) {
|
|
130
|
+
if (list[i].code.slice(0, compareNum) === code) {
|
|
131
|
+
return i;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return 0;
|
|
135
|
+
},
|
|
136
|
+
setValues() {
|
|
137
|
+
const picker = this.getPicker();
|
|
138
|
+
if (!picker) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
let code = this.code || this.getDefaultCode();
|
|
142
|
+
const provinceList = this.getList('province');
|
|
143
|
+
const cityList = this.getList('city', code.slice(0, 2));
|
|
144
|
+
const stack = [];
|
|
145
|
+
const indexes = [];
|
|
146
|
+
const { columnsNum } = this.data;
|
|
147
|
+
if (columnsNum >= 1) {
|
|
148
|
+
stack.push(picker.setColumnValues(0, provinceList, false));
|
|
149
|
+
indexes.push(this.getIndex('province', code));
|
|
150
|
+
}
|
|
151
|
+
if (columnsNum >= 2) {
|
|
152
|
+
stack.push(picker.setColumnValues(1, cityList, false));
|
|
153
|
+
indexes.push(this.getIndex('city', code));
|
|
154
|
+
if (cityList.length && code.slice(2, 4) === '00') {
|
|
155
|
+
[{ code }] = cityList;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (columnsNum === 3) {
|
|
159
|
+
stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));
|
|
160
|
+
indexes.push(this.getIndex('county', code));
|
|
161
|
+
}
|
|
162
|
+
return Promise.all(stack)
|
|
163
|
+
.catch(() => { })
|
|
164
|
+
.then(() => picker.setIndexes(indexes))
|
|
165
|
+
.catch(() => { });
|
|
166
|
+
},
|
|
167
|
+
getDefaultCode() {
|
|
168
|
+
const { columnsPlaceholder } = this.data;
|
|
169
|
+
if (columnsPlaceholder.length) {
|
|
170
|
+
return EMPTY_CODE;
|
|
171
|
+
}
|
|
172
|
+
const countyCodes = Object.keys(this.getConfig('county'));
|
|
173
|
+
if (countyCodes[0]) {
|
|
174
|
+
return countyCodes[0];
|
|
175
|
+
}
|
|
176
|
+
const cityCodes = Object.keys(this.getConfig('city'));
|
|
177
|
+
if (cityCodes[0]) {
|
|
178
|
+
return cityCodes[0];
|
|
179
|
+
}
|
|
180
|
+
return '';
|
|
181
|
+
},
|
|
182
|
+
getValues() {
|
|
183
|
+
const picker = this.getPicker();
|
|
184
|
+
if (!picker) {
|
|
185
|
+
return [];
|
|
186
|
+
}
|
|
187
|
+
return this.parseValues(picker.getValues().filter(value => !!value));
|
|
188
|
+
},
|
|
189
|
+
getDetail() {
|
|
190
|
+
const values = this.getValues();
|
|
191
|
+
const area = {
|
|
192
|
+
code: '',
|
|
193
|
+
country: '',
|
|
194
|
+
province: '',
|
|
195
|
+
city: '',
|
|
196
|
+
county: '',
|
|
197
|
+
};
|
|
198
|
+
if (!values.length) {
|
|
199
|
+
return area;
|
|
200
|
+
}
|
|
201
|
+
const names = values.map((item) => item.name);
|
|
202
|
+
area.code = values[values.length - 1].code;
|
|
203
|
+
if (area.code[0] === '9') {
|
|
204
|
+
area.country = names[1] || '';
|
|
205
|
+
area.province = names[2] || '';
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
area.province = names[0] || '';
|
|
209
|
+
area.city = names[1] || '';
|
|
210
|
+
area.county = names[2] || '';
|
|
211
|
+
}
|
|
212
|
+
return area;
|
|
213
|
+
},
|
|
214
|
+
reset(code) {
|
|
215
|
+
this.code = code || '';
|
|
216
|
+
return this.setValues();
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<wxs src="./index.wxs" module="computed" />
|
|
2
|
+
|
|
3
|
+
<smart-picker
|
|
4
|
+
class="smart-area__picker"
|
|
5
|
+
active-class="active-class"
|
|
6
|
+
toolbar-class="toolbar-class"
|
|
7
|
+
column-class="column-class"
|
|
8
|
+
show-toolbar="{{ showToolbar }}"
|
|
9
|
+
value-key="name"
|
|
10
|
+
title="{{ title }}"
|
|
11
|
+
loading="{{ loading }}"
|
|
12
|
+
columns="{{ computed.displayColumns(columns, columnsNum) }}"
|
|
13
|
+
item-height="{{ itemHeight }}"
|
|
14
|
+
visible-item-count="{{ visibleItemCount }}"
|
|
15
|
+
cancel-button-text="{{ cancelButtonText }}"
|
|
16
|
+
confirm-button-text="{{ confirmButtonText }}"
|
|
17
|
+
bind:change="onChange"
|
|
18
|
+
bind:confirm="onConfirm"
|
|
19
|
+
bind:cancel="onCancel"
|
|
20
|
+
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';
|
package/dist/battery/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SmartComponent } from '../common/component';
|
|
2
|
-
const
|
|
2
|
+
const wrapBatteryD = 'M6.5,0 C6.77614237,-5.07265313e-17 7,0.223857625 7,0.5 L7,1 L9.5,1 C10.3284271,1 11,1.67157288 11,2.5 L11,17.5 C11,18.3284271 10.3284271,19 9.5,19 L1.5,19 C0.671572875,19 0,18.3284271 0,17.5 L0,2.5 C0,1.67157288 0.671572875,1 1.5,1 L4,1 L4,0.5 C4,0.223857625 4.22385763,5.07265313e-17 4.5,0 L6.5,0 Z M9.5,2 L1.5,2 C1.22385763,2 1,2.22385763 1,2.5 L1,17.5 C1,17.7761424 1.22385763,18 1.5,18 L9.5,18 C9.77614237,18 10,17.7761424 10,17.5 L10,2.5 C10,2.22385763 9.77614237,2 9.5,2 Z';
|
|
3
3
|
SmartComponent({
|
|
4
4
|
props: {
|
|
5
5
|
type: {
|
|
@@ -9,7 +9,6 @@ SmartComponent({
|
|
|
9
9
|
size: {
|
|
10
10
|
type: Number,
|
|
11
11
|
value: 10,
|
|
12
|
-
observer: 'init',
|
|
13
12
|
},
|
|
14
13
|
value: {
|
|
15
14
|
type: Number,
|
|
@@ -18,134 +17,80 @@ SmartComponent({
|
|
|
18
17
|
},
|
|
19
18
|
highColor: {
|
|
20
19
|
type: String,
|
|
21
|
-
value: '
|
|
20
|
+
value: '#70CF98',
|
|
22
21
|
},
|
|
23
22
|
middleColor: {
|
|
24
23
|
type: String,
|
|
25
|
-
value: '
|
|
24
|
+
value: '#F5A623',
|
|
26
25
|
},
|
|
27
26
|
lowColor: {
|
|
28
27
|
type: String,
|
|
29
|
-
value: '
|
|
30
|
-
},
|
|
31
|
-
chargingColor: {
|
|
32
|
-
type: String,
|
|
33
|
-
value: 'var(--battery-body-charging-background, #2fc755)',
|
|
34
|
-
},
|
|
35
|
-
inCharging: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
value: false,
|
|
28
|
+
value: '#FF4444',
|
|
38
29
|
},
|
|
39
30
|
backgroundColor: String,
|
|
40
|
-
color: String,
|
|
41
|
-
showText: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
value: false,
|
|
44
|
-
},
|
|
45
31
|
onCalcColor: null,
|
|
32
|
+
color: String,
|
|
46
33
|
},
|
|
47
34
|
data: {
|
|
48
|
-
|
|
49
|
-
chargingSvg: '',
|
|
50
|
-
insidePercent: 0,
|
|
51
|
-
bodyStyle: '',
|
|
52
|
-
dotStyle: '',
|
|
53
|
-
zeroStyle: '',
|
|
54
|
-
zeroInnerStyle: '',
|
|
35
|
+
svgUrl: '',
|
|
55
36
|
},
|
|
56
37
|
created() {
|
|
57
38
|
this.init();
|
|
58
39
|
},
|
|
59
40
|
methods: {
|
|
60
41
|
init() {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (sizeData) {
|
|
69
|
-
const { width, height, dotWidth, dotHeight, dotPadding, zeroWidth, zeroHeight, zeroInnerWidth, zeroInnerHeight, borderRadius, dotBorderRadius, zeroBorderRadius, } = sizeData;
|
|
70
|
-
const backgroundColorStyle = this.data.backgroundColor
|
|
71
|
-
? `background-color: ${this.data.backgroundColor};`
|
|
72
|
-
: '';
|
|
73
|
-
const isFull = String(insidePercent) === '100';
|
|
74
|
-
if (this.data.type === 'horizontal') {
|
|
75
|
-
bodyStyle = `width: ${height}px; height: ${width}px; border-radius: ${borderRadius}px; ${backgroundColorStyle}`;
|
|
76
|
-
dotStyle = `width: ${dotHeight}px; height: ${dotWidth}px; margin-left: ${dotPadding}px; border-radius: ${dotBorderRadius}px; ${isFull ? '' : backgroundColorStyle}`;
|
|
77
|
-
zeroStyle = `width: ${zeroHeight}px; height: ${zeroWidth}px; border-radius: ${zeroBorderRadius}px;`;
|
|
78
|
-
zeroInnerStyle = `width: ${zeroInnerHeight}px; height: ${zeroInnerWidth}px;`;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
bodyStyle = `width: ${width}px; height: ${height}px; border-radius: ${borderRadius}px; ${backgroundColorStyle}`;
|
|
82
|
-
dotStyle = `width: ${dotWidth}px; height: ${dotHeight}px; margin-bottom: ${dotPadding}px; border-radius: ${dotBorderRadius}px; ${isFull ? '' : backgroundColorStyle}`;
|
|
83
|
-
zeroStyle = `width: ${zeroWidth}px; height: ${zeroHeight}px; border-radius: ${zeroBorderRadius}px;`;
|
|
84
|
-
zeroInnerStyle = `width: ${zeroInnerWidth}px; height: ${zeroInnerHeight}px;`;
|
|
85
|
-
}
|
|
42
|
+
const bgColor = this.getBgColor();
|
|
43
|
+
let IValue = this.data.value;
|
|
44
|
+
if (IValue > 100) {
|
|
45
|
+
IValue = 100;
|
|
46
|
+
}
|
|
47
|
+
else if (IValue < 0) {
|
|
48
|
+
IValue = 0;
|
|
86
49
|
}
|
|
50
|
+
const top = 17 - ((17 - 3) * IValue) / 100;
|
|
51
|
+
// 左上、右上、右下、左下
|
|
52
|
+
const points = `2 ${top} 9 ${top} 9 17 2 17`;
|
|
53
|
+
const insideColor = this.calcColor(top);
|
|
54
|
+
const svgNode = `<svg
|
|
55
|
+
width="${1.1 * this.data.size}px"
|
|
56
|
+
height="${1.9 * this.data.size}px"
|
|
57
|
+
viewBox="0 0 11 19"
|
|
58
|
+
>
|
|
59
|
+
<path d='${wrapBatteryD}' fill='${this.data.backgroundColor || bgColor}' />
|
|
60
|
+
<polygon points='${points}' fill='${insideColor}' />
|
|
61
|
+
</svg>`;
|
|
87
62
|
this.setData({
|
|
88
|
-
|
|
89
|
-
insidePercentStr: this.data.type === 'vertical' ? `height: ${insidePercent}%` : `width: ${insidePercent}%`,
|
|
90
|
-
insideBotBgClass: String(insidePercent) === '100' ? 'high-bg' : 'base-bg',
|
|
91
|
-
chargingSvg: this.toSvgCssBackground(chargingSvg),
|
|
92
|
-
bodyStyle,
|
|
93
|
-
dotStyle,
|
|
94
|
-
zeroStyle,
|
|
95
|
-
zeroInnerStyle,
|
|
63
|
+
svgUrl: this.toSvgCssBackground(svgNode),
|
|
96
64
|
});
|
|
97
65
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
66
|
+
getBgColor() {
|
|
67
|
+
const WX = wx;
|
|
68
|
+
const bgColor = WX.getThemeInfo();
|
|
69
|
+
if (bgColor && bgColor['--app-B1-N3']) {
|
|
70
|
+
return bgColor['--app-B1-N3'];
|
|
102
71
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const dotWidth = this.data.size * 0.4; // 4 !
|
|
107
|
-
const dotHeight = this.data.size * 0.15; // 1.5 !
|
|
108
|
-
const dotBorderRadius = this.data.size * 0.05; // 0.5
|
|
109
|
-
const dotPadding = this.data.size * 0.05; // 0.5
|
|
110
|
-
const zeroWidth = this.data.size * 0.4; // 4 !
|
|
111
|
-
const zeroHeight = this.data.size * 1.6; // 16
|
|
112
|
-
const zeroInnerWidth = this.data.size * 0.15; // 1.5 !
|
|
113
|
-
const zeroInnerHeight = this.data.size * 1.6; // 16
|
|
114
|
-
const zeroBorderRadius = this.data.size * 0.2; // 2
|
|
115
|
-
return {
|
|
116
|
-
width,
|
|
117
|
-
height,
|
|
118
|
-
dotWidth,
|
|
119
|
-
dotHeight,
|
|
120
|
-
dotPadding,
|
|
121
|
-
zeroWidth,
|
|
122
|
-
zeroHeight,
|
|
123
|
-
zeroInnerWidth,
|
|
124
|
-
zeroInnerHeight,
|
|
125
|
-
borderRadius,
|
|
126
|
-
dotBorderRadius,
|
|
127
|
-
zeroBorderRadius,
|
|
128
|
-
};
|
|
129
|
-
},
|
|
130
|
-
calcColor(value) {
|
|
131
|
-
if (typeof this.data.onCalcColor === 'function') {
|
|
132
|
-
return this.data.onCalcColor();
|
|
72
|
+
const d = wx.getSystemInfoSync();
|
|
73
|
+
if (d && d.theme === 'light') {
|
|
74
|
+
return '#fff';
|
|
133
75
|
}
|
|
76
|
+
return 'rgba(0, 0, 0, 0.5)';
|
|
77
|
+
},
|
|
78
|
+
calcColor(top) {
|
|
134
79
|
if (this.data.color) {
|
|
135
80
|
return this.data.color;
|
|
136
81
|
}
|
|
137
|
-
|
|
138
|
-
|
|
82
|
+
// 自定义电量的颜色分配规则
|
|
83
|
+
const color = typeof this.data.onCalcColor === 'function' && this.data.onCalcColor();
|
|
84
|
+
if (color) {
|
|
85
|
+
return color;
|
|
139
86
|
}
|
|
140
|
-
if (
|
|
87
|
+
if (top <= 14.2 && top >= 3) {
|
|
141
88
|
return this.data.highColor;
|
|
142
89
|
}
|
|
143
|
-
if (
|
|
90
|
+
if (top <= 15.6 && top > 14.2) {
|
|
144
91
|
return this.data.middleColor;
|
|
145
92
|
}
|
|
146
|
-
|
|
147
|
-
return this.data.lowColor;
|
|
148
|
-
}
|
|
93
|
+
return this.data.lowColor;
|
|
149
94
|
},
|
|
150
95
|
toSvgCssBackground(svgString) {
|
|
151
96
|
let res = svgString;
|
|
@@ -159,7 +104,7 @@ SmartComponent({
|
|
|
159
104
|
.replace(/</g, '%3C')
|
|
160
105
|
.replace(/>/g, '%3E')
|
|
161
106
|
.replace(/\s+/g, ' ');
|
|
162
|
-
return `background-image: url("data:image/svg+xml,${res}"); width:
|
|
107
|
+
return `background-image: url("data:image/svg+xml,${res}"); width: ${1.1 * this.data.size}px; height: ${1.9 * this.data.size}px; background-repeat: no-repeat; transform: ${this.data.type === 'horizontal' ? 'rotate(90deg)' : '0'}`;
|
|
163
108
|
},
|
|
164
109
|
},
|
|
165
110
|
});
|
package/dist/battery/index.wxml
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
<view
|
|
2
|
-
<view class="contain {{ type === 'vertical' ? 'contain-vertical' : 'contain-horizontal' }}">
|
|
3
|
-
<view
|
|
4
|
-
class="body {{ value === 0 ? '' : 'overflow-hidden' }} {{ type === 'vertical' ? 'body-vertical' : 'body-horizontal' }}"
|
|
5
|
-
style="{{ bodyStyle }}">
|
|
6
|
-
<view class="bar {{ type === 'vertical' ? 'bar-vertical' : 'bar-horizontal' }}"
|
|
7
|
-
style="background-color: {{ insideColor }}; {{insidePercentStr}}">
|
|
8
|
-
</view>
|
|
9
|
-
<view class="icon" wx:if="{{ inCharging }}" style="{{chargingSvg}}"></view>
|
|
10
|
-
<view wx:if="{{ value === 0 && !inCharging }}"
|
|
11
|
-
class="zero {{ type === 'vertical' ? 'zero-vertical' : 'zero-horizontal' }}" style="{{ zeroStyle }}">
|
|
12
|
-
<view class="zero zero-inner {{ type === 'vertical' ? 'zero-inner-vertical' : 'zero-inner-horizontal' }}"
|
|
13
|
-
style="{{ zeroInnerStyle }}">
|
|
14
|
-
</view>
|
|
15
|
-
</view>
|
|
16
|
-
</view>
|
|
17
|
-
<view class="dot {{ type === 'vertical' ? 'dot-vertical' : 'dot-horizontal' }} {{ insideBotBgClass }}"
|
|
18
|
-
style="{{ dotStyle }}"></view>
|
|
19
|
-
</view>
|
|
20
|
-
<view class="text" wx:if="{{ showText }}">{{ value }}%</view>
|
|
21
|
-
</view>
|
|
1
|
+
<view style="{{svgUrl}}"></view>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__dragger{align-items:center;display:flex;justify-content:center;padding:var(--bottom-sheet-dragger-padding,8px 0)}.smart-bottom-sheet__dragger_node{background:var(--bottom-sheet-dragger-node-background,var(--smart-ui-bottom-sheet-dragger-node-background,rgba(0,0,0,.3)));border-radius:var(--bottom-sheet-dragger-node-border-radius,2px);height:var(--bottom-sheet-dragger-node-height,4px);width:var(--bottom-sheet-dragger-node-width,30px)}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__dragger{align-items:center;display:flex;justify-content:center;padding:var(--bottom-sheet-dragger-padding,8px 0)}.smart-bottom-sheet__dragger_node{background:var(--bottom-sheet-dragger-node-background,var(--smart-ui-bottom-sheet-dragger-node-background,rgba(0,0,0,.3)));border-radius:var(--bottom-sheet-dragger-node-border-radius,2px);height:var(--bottom-sheet-dragger-node-height,4px);width:var(--bottom-sheet-dragger-node-width,30px)}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
package/dist/button/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,10px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);font-weight:400;height:var(--button-default-height,48px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.smart-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.smart-button:after{border-width:0}.smart-button--active:before{opacity:.15}.smart-button--unclickable:after{display:none}.smart-button--default{background:var(--button-default-background-color,var(--app-B3,#fff));border:var(--button-border-width,1px) solid var(--button-default-border-color,var(--app-B6-N7,rgba(0,0,0,.1)));color:var(--button-default-color,var(--app-B1-N1,#000))}.smart-button--default .smart-button__icon>view>view,.smart-button--default .smart-button__right-icon>view>view{background:var(--button-default-color,var(--app-B1-N1,#000))}.smart-button--primary{background:var(--button-primary-background-color,var(--app-M3,#2dda86));border:var(--button-border-width,1px) solid var(--button-primary-border-color,var(--app-M3,#2dda86));color:var(--button-primary-color,#fff);font-weight:600}.smart-button--primary .smart-button__icon>view>view,.smart-button--primary .smart-button__right-icon>view>view{background:var(--button-primary-color,#fff)}.smart-button--info{background:var(--button-info-background-color,var(--app-M4,#1989fa));border:var(--button-border-width,1px) solid var(--button-info-border-color,var(--app-M4,#1989fa));color:var(--button-info-color,#fff)}.smart-button--info .smart-button__icon>view>view,.smart-button--info .smart-button__right-icon>view>view{background:var(--button-info-color,#fff)}.smart-button--danger{background:var(--button-danger-background-color,var(--app-M2,#f04c4c));border:var(--button-border-width,1px) solid var(--button-danger-border-color,var(--app-M2,#f04c4c));color:var(--button-danger-color,#fff)}.smart-button--danger .smart-button__icon>view>view,.smart-button--danger .smart-button__right-icon>view>view{background:var(--button-danger-color,#fff)}.smart-button--warning{background:var(--button-warning-background-color,var(--app-M5,#ffa000));border:var(--button-border-width,1px) solid var(--button-warning-border-color,var(--app-M5,#ffa000));color:var(--button-warning-color,#fff)}.smart-button--warning .smart-button__icon>view>view,.smart-button--warning .smart-button__right-icon>view>view{background:var(--button-warning-color,#fff)}.smart-button--plain{background:var(--button-plain-background-color,#fff)}.smart-button--plain.smart-button--primary{color:var(--button-primary-background-color,var(--app-M3,#2dda86))}.smart-button--plain.smart-button--primary .smart-button__icon>view>view,.smart-button--plain.smart-button--primary .smart-button__right-icon>view>view{background:var(--button-primary-background-color,var(--app-M3,#2dda86))}.smart-button--plain.smart-button--info{color:var(--button-info-background-color,var(--app-M4,#1989fa))}.smart-button--plain.smart-button--info .smart-button__icon>view>view,.smart-button--plain.smart-button--info .smart-button__right-icon>view>view{background:var(--button-info-background-color,var(--app-M4,#1989fa))}.smart-button--plain.smart-button--danger{color:var(--button-danger-background-color,var(--app-M2,#f04c4c))}.smart-button--plain.smart-button--danger .smart-button__icon>view>view,.smart-button--plain.smart-button--danger .smart-button__right-icon>view>view{background:var(--button-danger-background-color,var(--app-M2,#f04c4c))}.smart-button--plain.smart-button--warning{color:var(--button-warning-background-color,var(--app-M5,#ffa000))}.smart-button--plain.smart-button--warning .smart-button__icon>view>view,.smart-button--plain.smart-button--warning .smart-button__right-icon>view>view{background:var(--button-warning-background-color,var(--app-M5,#ffa000))}.smart-button--large{height:var(--button-large-height,48px);width:100%}.smart-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.smart-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.smart-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.smart-button--mini+.smart-button--mini{margin-left:5px}.smart-button--block{display:flex;width:100%}.smart-button--round{border-radius:var(--button-round-border-radius,999px)}.smart-button--square{border-radius:0}.smart-button--disabled{opacity:var(--button-disabled-opacity,.3)}.smart-button__text{display:inline}.smart-button__icon+.smart-button__text:not(:empty),.smart-button__loading-text,.smart-button__text:not(:empty)+.smart-button__right-icon{margin-left:4px}.smart-button__icon,.smart-button__right-icon{line-height:inherit!important;min-width:1em;vertical-align:top}.smart-button--hairline{border-width:0;padding-top:1px}.smart-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 10px)*2);border-width:1px}.smart-button--hairline.smart-button--round:after{border-radius:var(--button-round-border-radius,999px)}.smart-button--hairline.smart-button--square:after{border-radius:0}
|
package/dist/button/index.wxss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,10px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);font-weight:400;height:var(--button-default-height,48px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.smart-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.smart-button:after{border-width:0}.smart-button--active:before{opacity:.15}.smart-button--unclickable:after{display:none}.smart-button--default{background:var(--button-default-background-color,var(--app-B3,#fff));border:var(--button-border-width,1px) solid var(--button-default-border-color,var(--app-B6-N7,rgba(0,0,0,.1)));color:var(--button-default-color,var(--app-B1-N1,#000))}.smart-button--default .smart-button__icon>view>view,.smart-button--default .smart-button__right-icon>view>view{background:var(--button-default-color,var(--app-B1-N1,#000))}.smart-button--primary{background:var(--button-primary-background-color,var(--app-M3,#2dda86));border:var(--button-border-width,1px) solid var(--button-primary-border-color,var(--app-M3,#2dda86));color:var(--button-primary-color,#fff);font-weight:600}.smart-button--primary .smart-button__icon>view>view,.smart-button--primary .smart-button__right-icon>view>view{background:var(--button-primary-color,#fff)}.smart-button--info{background:var(--button-info-background-color,var(--app-M4,#1989fa));border:var(--button-border-width,1px) solid var(--button-info-border-color,var(--app-M4,#1989fa));color:var(--button-info-color,#fff)}.smart-button--info .smart-button__icon>view>view,.smart-button--info .smart-button__right-icon>view>view{background:var(--button-info-color,#fff)}.smart-button--danger{background:var(--button-danger-background-color,var(--app-M2,#f04c4c));border:var(--button-border-width,1px) solid var(--button-danger-border-color,var(--app-M2,#f04c4c));color:var(--button-danger-color,#fff)}.smart-button--danger .smart-button__icon>view>view,.smart-button--danger .smart-button__right-icon>view>view{background:var(--button-danger-color,#fff)}.smart-button--warning{background:var(--button-warning-background-color,var(--app-M5,#ffa000));border:var(--button-border-width,1px) solid var(--button-warning-border-color,var(--app-M5,#ffa000));color:var(--button-warning-color,#fff)}.smart-button--warning .smart-button__icon>view>view,.smart-button--warning .smart-button__right-icon>view>view{background:var(--button-warning-color,#fff)}.smart-button--plain{background:var(--button-plain-background-color,#fff)}.smart-button--plain.smart-button--primary{color:var(--button-primary-background-color,var(--app-M3,#2dda86))}.smart-button--plain.smart-button--primary .smart-button__icon>view>view,.smart-button--plain.smart-button--primary .smart-button__right-icon>view>view{background:var(--button-primary-background-color,var(--app-M3,#2dda86))}.smart-button--plain.smart-button--info{color:var(--button-info-background-color,var(--app-M4,#1989fa))}.smart-button--plain.smart-button--info .smart-button__icon>view>view,.smart-button--plain.smart-button--info .smart-button__right-icon>view>view{background:var(--button-info-background-color,var(--app-M4,#1989fa))}.smart-button--plain.smart-button--danger{color:var(--button-danger-background-color,var(--app-M2,#f04c4c))}.smart-button--plain.smart-button--danger .smart-button__icon>view>view,.smart-button--plain.smart-button--danger .smart-button__right-icon>view>view{background:var(--button-danger-background-color,var(--app-M2,#f04c4c))}.smart-button--plain.smart-button--warning{color:var(--button-warning-background-color,var(--app-M5,#ffa000))}.smart-button--plain.smart-button--warning .smart-button__icon>view>view,.smart-button--plain.smart-button--warning .smart-button__right-icon>view>view{background:var(--button-warning-background-color,var(--app-M5,#ffa000))}.smart-button--large{height:var(--button-large-height,48px);width:100%}.smart-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.smart-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.smart-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.smart-button--mini+.smart-button--mini{margin-left:5px}.smart-button--block{display:flex;width:100%}.smart-button--round{border-radius:var(--button-round-border-radius,999px)}.smart-button--square{border-radius:0}.smart-button--disabled{opacity:var(--button-disabled-opacity,.3)}.smart-button__text{display:inline}.smart-button__icon+.smart-button__text:not(:empty),.smart-button__loading-text,.smart-button__text:not(:empty)+.smart-button__right-icon{margin-left:4px}.smart-button__icon,.smart-button__right-icon{line-height:inherit!important;min-width:1em;vertical-align:top}.smart-button--hairline{border-width:0;padding-top:1px}.smart-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 10px)*2);border-width:1px}.smart-button--hairline.smart-button--round:after{border-radius:var(--button-round-border-radius,999px)}.smart-button--hairline.smart-button--square:after{border-radius:0}
|
package/dist/calendar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}.smart-calendar{--calendar-header-icon_color:var(--calendar-header-icon-color,var(--app-B1-N2,rgba(0,0,0,.7)));background-color:var(--calendar-background-color,var(--app-B6,#fff));color:var(--calendar-text-color,#000);display:flex;flex-direction:column;height:auto}.smart-calendar__close-icon{top:11px}.smart-calendar__popup--bottom,.smart-calendar__popup--top{height:var(--calendar-popup-height,848rpx)}.smart-calendar__popup--left,.smart-calendar__popup--right{height:100%}.smart-calendar-month{margin-top:0rpx}.smart-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.smart-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.smart-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.smart-calendar__footer+.smart-calendar__footer,.smart-calendar__footer:empty{display:none}.smart-calendar__footer:empty+.smart-calendar__footer{display:block!important}
|