@tuya-miniapp/smart-ui 2.7.1-beta-13 → 2.7.2-beta-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/dist/common/style/clearfix.css +1 -0
- package/dist/common/style/clearfix.wxss +1 -0
- package/dist/common/style/ellipsis.css +1 -0
- package/dist/common/style/ellipsis.wxss +1 -0
- package/dist/common/style/hairline.css +1 -0
- package/dist/common/style/hairline.wxss +1 -0
- package/dist/common/style/mixins/clearfix.css +0 -0
- package/dist/common/style/mixins/clearfix.wxss +0 -0
- package/dist/common/style/mixins/ellipsis.css +0 -0
- package/dist/common/style/mixins/ellipsis.wxss +0 -0
- package/dist/common/style/mixins/hairline.css +1 -0
- package/dist/common/style/mixins/hairline.wxss +1 -0
- package/dist/common/style/var.css +1 -0
- package/dist/common/style/var.wxss +1 -0
- package/dist/toast/index.css +1 -0
- package/dist/toast/index.wxss +1 -0
- package/dist/transition/index.css +1 -0
- package/dist/transition/index.wxss +1 -0
- package/dist/tree-select/index.css +1 -0
- package/dist/tree-select/index.wxss +1 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/index.js +121 -0
- package/lib/action-sheet/index.json +8 -0
- package/lib/action-sheet/index.wxml +87 -0
- package/lib/action-sheet/index.wxss +1 -0
- 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.d.ts +1 -0
- package/lib/battery/index.js +105 -0
- package/lib/battery/index.json +4 -0
- package/lib/battery/index.wxml +1 -0
- package/lib/bottom-sheet/index.css +1 -0
- package/lib/bottom-sheet/index.d.ts +1 -0
- package/lib/bottom-sheet/index.js +82 -0
- package/lib/bottom-sheet/index.json +8 -0
- package/lib/bottom-sheet/index.wxml +43 -0
- package/lib/bottom-sheet/index.wxs +12 -0
- package/lib/bottom-sheet/index.wxss +1 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.js +64 -0
- package/lib/button/index.json +7 -0
- package/lib/button/index.wxml +64 -0
- package/lib/button/index.wxs +39 -0
- package/lib/button/index.wxss +1 -0
- package/lib/calendar/calendar.wxml +84 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +465 -0
- package/lib/calendar/index.json +12 -0
- package/lib/calendar/index.wxml +25 -0
- package/lib/calendar/index.wxs +59 -0
- package/lib/calendar/index.wxss +1 -0
- package/lib/calendar-header/index.css +1 -0
- package/lib/calendar-header/index.d.ts +1 -0
- package/lib/calendar-header/index.js +75 -0
- package/lib/calendar-header/index.json +6 -0
- package/lib/calendar-header/index.wxml +27 -0
- package/lib/calendar-header/index.wxss +1 -0
- package/lib/calendar-month/index.css +1 -0
- package/lib/calendar-month/index.d.ts +1 -0
- package/lib/calendar-month/index.js +179 -0
- package/lib/calendar-month/index.json +3 -0
- package/lib/calendar-month/index.wxml +22 -0
- package/lib/calendar-month/index.wxs +73 -0
- package/lib/calendar-month/index.wxss +1 -0
- package/lib/calendar-month-list/index.css +1 -0
- package/lib/calendar-month-list/index.d.ts +1 -0
- package/lib/calendar-month-list/index.js +105 -0
- package/lib/calendar-month-list/index.json +7 -0
- package/lib/calendar-month-list/index.wxml +15 -0
- package/lib/calendar-month-list/index.wxss +1 -0
- package/lib/calendar-utils/types.d.ts +7 -0
- package/lib/calendar-utils/types.js +2 -0
- package/lib/calendar-utils/utils.d.ts +21 -0
- package/lib/calendar-utils/utils.js +175 -0
- package/lib/calendar-utils/utils.wxs +25 -0
- package/lib/calendar-year-list/index.css +1 -0
- package/lib/calendar-year-list/index.d.ts +1 -0
- package/lib/calendar-year-list/index.js +115 -0
- package/lib/calendar-year-list/index.json +7 -0
- package/lib/calendar-year-list/index.wxml +15 -0
- package/lib/calendar-year-list/index.wxss +1 -0
- package/lib/cascader/index.css +1 -0
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +207 -0
- package/lib/cascader/index.json +8 -0
- package/lib/cascader/index.wxml +56 -0
- package/lib/cascader/index.wxs +21 -0
- package/lib/cascader/index.wxss +1 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.d.ts +1 -0
- package/lib/cell/index.js +48 -0
- package/lib/cell/index.json +6 -0
- package/lib/cell/index.wxml +47 -0
- package/lib/cell/index.wxs +17 -0
- package/lib/cell/index.wxss +1 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.d.ts +1 -0
- package/lib/cell-group/index.js +14 -0
- package/lib/cell-group/index.json +3 -0
- package/lib/cell-group/index.wxml +15 -0
- package/lib/cell-group/index.wxs +14 -0
- package/lib/cell-group/index.wxss +1 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.js +84 -0
- package/lib/checkbox/index.json +6 -0
- package/lib/checkbox/index.wxml +32 -0
- package/lib/checkbox/index.wxs +20 -0
- package/lib/checkbox/index.wxss +1 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.d.ts +1 -0
- package/lib/checkbox-group/index.js +39 -0
- package/lib/checkbox-group/index.json +3 -0
- package/lib/checkbox-group/index.wxml +5 -0
- package/lib/checkbox-group/index.wxss +1 -0
- package/lib/circle/index.css +1 -0
- package/lib/circle/index.d.ts +1 -0
- package/lib/circle/index.js +134 -0
- package/lib/circle/index.json +3 -0
- package/lib/circle/index.rjs +232 -0
- package/lib/circle/index.wxml +8 -0
- package/lib/circle/index.wxss +1 -0
- package/lib/col/index.css +1 -0
- package/lib/col/index.d.ts +1 -0
- package/lib/col/index.js +11 -0
- package/lib/col/index.json +3 -0
- package/lib/col/index.wxml +9 -0
- package/lib/col/index.wxs +18 -0
- package/lib/col/index.wxss +1 -0
- package/lib/collapse/index.css +1 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse/index.js +48 -0
- package/lib/collapse/index.json +3 -0
- package/lib/collapse/index.wxml +3 -0
- package/lib/collapse/index.wxss +1 -0
- package/lib/collapse-item/animate.d.ts +2 -0
- package/lib/collapse-item/animate.js +43 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.d.ts +1 -0
- package/lib/collapse-item/index.js +64 -0
- package/lib/collapse-item/index.json +6 -0
- package/lib/collapse-item/index.wxml +45 -0
- package/lib/collapse-item/index.wxss +1 -0
- package/lib/common/appLog.d.ts +10 -0
- package/lib/common/appLog.js +112 -0
- package/lib/common/color.d.ts +7 -0
- package/lib/common/color.js +10 -0
- package/lib/common/component.d.ts +4 -0
- package/lib/common/component.js +49 -0
- package/lib/common/index.css +1 -0
- package/lib/common/index.wxss +1 -0
- package/lib/common/relation.d.ts +15 -0
- package/lib/common/relation.js +65 -0
- package/lib/common/style/clearfix.css +1 -0
- package/lib/common/style/clearfix.wxss +1 -0
- package/lib/common/style/ellipsis.css +1 -0
- package/lib/common/style/ellipsis.wxss +1 -0
- package/lib/common/style/hairline.css +1 -0
- package/lib/common/style/hairline.wxss +1 -0
- package/lib/common/style/mixins/clearfix.css +0 -0
- package/lib/common/style/mixins/clearfix.wxss +0 -0
- package/lib/common/style/mixins/ellipsis.css +0 -0
- package/lib/common/style/mixins/ellipsis.wxss +0 -0
- package/lib/common/style/mixins/hairline.css +1 -0
- package/lib/common/style/mixins/hairline.wxss +1 -0
- package/lib/common/style/var.css +1 -0
- package/lib/common/style/var.wxss +1 -0
- package/lib/common/ty.d.ts +7 -0
- package/lib/common/ty.js +35 -0
- package/lib/common/utils.d.ts +24 -0
- package/lib/common/utils.js +140 -0
- package/lib/common/validator.d.ts +9 -0
- package/lib/common/validator.js +43 -0
- package/lib/common/version.d.ts +15 -0
- package/lib/common/version.js +70 -0
- package/lib/config-provider/index.d.ts +1 -0
- package/lib/config-provider/index.js +11 -0
- package/lib/config-provider/index.json +3 -0
- package/lib/config-provider/index.wxml +5 -0
- package/lib/config-provider/index.wxs +29 -0
- package/lib/count-down/index.css +1 -0
- package/lib/count-down/index.d.ts +1 -0
- package/lib/count-down/index.js +104 -0
- package/lib/count-down/index.json +3 -0
- package/lib/count-down/index.wxml +4 -0
- package/lib/count-down/index.wxss +1 -0
- package/lib/count-down/utils.d.ts +10 -0
- package/lib/count-down/utils.js +64 -0
- package/lib/custom-keyboard/index.css +1 -0
- package/lib/custom-keyboard/index.d.ts +1 -0
- package/lib/custom-keyboard/index.js +156 -0
- package/lib/custom-keyboard/index.json +9 -0
- package/lib/custom-keyboard/index.wxml +44 -0
- package/lib/custom-keyboard/index.wxss +1 -0
- package/lib/datetime-picker/index.css +1 -0
- package/lib/datetime-picker/index.d.ts +1 -0
- package/lib/datetime-picker/index.js +512 -0
- package/lib/datetime-picker/index.json +6 -0
- package/lib/datetime-picker/index.wxml +22 -0
- package/lib/datetime-picker/index.wxss +1 -0
- package/lib/definitions/index.d.ts +29 -0
- package/lib/definitions/index.js +2 -0
- package/lib/dialog/dialog.d.ts +75 -0
- package/lib/dialog/dialog.js +137 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +223 -0
- package/lib/dialog/index.json +10 -0
- package/lib/dialog/index.wxml +146 -0
- package/lib/dialog/index.wxss +1 -0
- package/lib/divider/index.css +1 -0
- package/lib/divider/index.d.ts +1 -0
- package/lib/divider/index.js +14 -0
- package/lib/divider/index.json +4 -0
- package/lib/divider/index.wxml +9 -0
- package/lib/divider/index.wxs +18 -0
- package/lib/divider/index.wxss +1 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.d.ts +1 -0
- package/lib/dropdown-item/index.js +150 -0
- package/lib/dropdown-item/index.json +8 -0
- package/lib/dropdown-item/index.wxml +52 -0
- package/lib/dropdown-item/index.wxss +1 -0
- package/lib/dropdown-item/shared.d.ts +5 -0
- package/lib/dropdown-item/shared.js +2 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.d.ts +1 -0
- package/lib/dropdown-menu/index.js +137 -0
- package/lib/dropdown-menu/index.json +6 -0
- package/lib/dropdown-menu/index.wxml +24 -0
- package/lib/dropdown-menu/index.wxs +16 -0
- package/lib/dropdown-menu/index.wxss +1 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.d.ts +1 -0
- package/lib/empty/index.js +31 -0
- package/lib/empty/index.json +4 -0
- package/lib/empty/index.wxml +22 -0
- package/lib/empty/index.wxs +13 -0
- package/lib/empty/index.wxss +1 -0
- package/lib/field/cell-input.wxml +59 -0
- package/lib/field/cell-textarea.wxml +28 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +160 -0
- package/lib/field/index.json +7 -0
- package/lib/field/index.wxml +4 -0
- package/lib/field/index.wxs +19 -0
- package/lib/field/index.wxss +1 -0
- package/lib/field/input.wxml +30 -0
- package/lib/field/props.d.ts +4 -0
- package/lib/field/props.js +59 -0
- package/lib/field/textarea.wxml +32 -0
- package/lib/field/types.d.ts +8 -0
- package/lib/field/types.js +2 -0
- package/lib/goods-action/index.css +1 -0
- package/lib/goods-action/index.d.ts +1 -0
- package/lib/goods-action/index.js +17 -0
- package/lib/goods-action/index.json +3 -0
- package/lib/goods-action/index.wxml +5 -0
- package/lib/goods-action/index.wxss +1 -0
- package/lib/goods-action-button/index.css +1 -0
- package/lib/goods-action-button/index.d.ts +1 -0
- package/lib/goods-action-button/index.js +51 -0
- package/lib/goods-action-button/index.json +6 -0
- package/lib/goods-action-button/index.wxml +35 -0
- package/lib/goods-action-button/index.wxss +1 -0
- package/lib/goods-action-icon/index.css +1 -0
- package/lib/goods-action-icon/index.d.ts +1 -0
- package/lib/goods-action-icon/index.js +29 -0
- package/lib/goods-action-icon/index.json +7 -0
- package/lib/goods-action-icon/index.wxml +41 -0
- package/lib/goods-action-icon/index.wxss +1 -0
- package/lib/grid/index.css +1 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +57 -0
- package/lib/grid/index.json +3 -0
- package/lib/grid/index.wxml +8 -0
- package/lib/grid/index.wxs +13 -0
- package/lib/grid/index.wxss +1 -0
- package/lib/grid-item/index.css +1 -0
- package/lib/grid-item/index.d.ts +1 -0
- package/lib/grid-item/index.js +54 -0
- package/lib/grid-item/index.json +6 -0
- package/lib/grid-item/index.wxml +27 -0
- package/lib/grid-item/index.wxs +32 -0
- package/lib/grid-item/index.wxss +1 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +23 -0
- package/lib/icon/index.json +6 -0
- package/lib/icon/index.wxml +30 -0
- package/lib/icon/index.wxs +98 -0
- package/lib/icon/index.wxss +1 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.d.ts +1 -0
- package/lib/image/index.js +75 -0
- package/lib/image/index.json +7 -0
- package/lib/image/index.wxml +40 -0
- package/lib/image/index.wxs +42 -0
- package/lib/image/index.wxss +1 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.d.ts +1 -0
- package/lib/index-anchor/index.js +28 -0
- package/lib/index-anchor/index.json +3 -0
- package/lib/index-anchor/index.wxml +14 -0
- package/lib/index-anchor/index.wxss +1 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.d.ts +1 -0
- package/lib/index-bar/index.js +244 -0
- package/lib/index-bar/index.json +3 -0
- package/lib/index-bar/index.wxml +22 -0
- package/lib/index-bar/index.wxss +1 -0
- package/lib/info/index.css +1 -0
- package/lib/info/index.d.ts +1 -0
- package/lib/info/index.js +10 -0
- package/lib/info/index.json +3 -0
- package/lib/info/index.wxml +7 -0
- package/lib/info/index.wxss +1 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.d.ts +1 -0
- package/lib/loading/index.js +44 -0
- package/lib/loading/index.json +3 -0
- package/lib/loading/index.wxml +17 -0
- package/lib/loading/index.wxs +39 -0
- package/lib/loading/index.wxss +1 -0
- package/lib/mixins/basic.d.ts +1 -0
- package/lib/mixins/basic.js +30 -0
- package/lib/mixins/button.d.ts +1 -0
- package/lib/mixins/button.js +54 -0
- package/lib/mixins/link.d.ts +1 -0
- package/lib/mixins/link.js +26 -0
- package/lib/mixins/page-scroll.d.ts +6 -0
- package/lib/mixins/page-scroll.js +47 -0
- package/lib/mixins/touch.d.ts +1 -0
- package/lib/mixins/touch.js +39 -0
- package/lib/mixins/transition.d.ts +1 -0
- package/lib/mixins/transition.js +235 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.js +116 -0
- package/lib/nav-bar/index.json +6 -0
- package/lib/nav-bar/index.wxml +70 -0
- package/lib/nav-bar/index.wxs +14 -0
- package/lib/nav-bar/index.wxss +1 -0
- package/lib/normal-slider/index.css +1 -0
- package/lib/normal-slider/index.d.ts +1 -0
- package/lib/normal-slider/index.js +160 -0
- package/lib/normal-slider/index.json +6 -0
- package/lib/normal-slider/index.wxml +35 -0
- package/lib/normal-slider/index.wxss +1 -0
- package/lib/notice-bar/index.css +1 -0
- package/lib/notice-bar/index.d.ts +1 -0
- package/lib/notice-bar/index.js +178 -0
- package/lib/notice-bar/index.json +6 -0
- package/lib/notice-bar/index.wxml +52 -0
- package/lib/notice-bar/index.wxs +11 -0
- package/lib/notice-bar/index.wxss +1 -0
- package/lib/notify/index.css +1 -0
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +80 -0
- package/lib/notify/index.json +6 -0
- package/lib/notify/index.wxml +22 -0
- package/lib/notify/index.wxs +22 -0
- package/lib/notify/index.wxss +1 -0
- package/lib/notify/notify.d.ts +29 -0
- package/lib/notify/notify.js +72 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.d.ts +1 -0
- package/lib/overlay/index.js +32 -0
- package/lib/overlay/index.json +6 -0
- package/lib/overlay/index.wxml +7 -0
- package/lib/overlay/index.wxss +1 -0
- package/lib/overlay/overlay.wxml +10 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.d.ts +1 -0
- package/lib/picker/index.js +191 -0
- package/lib/picker/index.json +7 -0
- package/lib/picker/index.wxml +48 -0
- package/lib/picker/index.wxs +44 -0
- package/lib/picker/index.wxss +1 -0
- package/lib/picker/shared.d.ts +44 -0
- package/lib/picker/shared.js +47 -0
- package/lib/picker/toolbar.wxml +23 -0
- package/lib/picker-column/index.css +1 -0
- package/lib/picker-column/index.d.ts +1 -0
- package/lib/picker-column/index.js +339 -0
- package/lib/picker-column/index.json +3 -0
- package/lib/picker-column/index.wxml +60 -0
- package/lib/picker-column/index.wxs +623 -0
- package/lib/picker-column/index.wxss +1 -0
- package/lib/popover/index.css +1 -0
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/index.js +224 -0
- package/lib/popover/index.json +7 -0
- package/lib/popover/index.wxml +31 -0
- package/lib/popover/index.wxss +1 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/index.js +122 -0
- package/lib/popup/index.json +7 -0
- package/lib/popup/index.wxml +21 -0
- package/lib/popup/index.wxs +23 -0
- package/lib/popup/index.wxss +1 -0
- package/lib/popup/popup.wxml +16 -0
- package/lib/progress/index.css +1 -0
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/index.js +52 -0
- package/lib/progress/index.json +3 -0
- package/lib/progress/index.wxml +20 -0
- package/lib/progress/index.wxs +36 -0
- package/lib/progress/index.wxss +1 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +75 -0
- package/lib/radio/index.json +6 -0
- package/lib/radio/index.wxml +32 -0
- package/lib/radio/index.wxs +33 -0
- package/lib/radio/index.wxss +1 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/index.js +29 -0
- package/lib/radio-group/index.json +3 -0
- package/lib/radio-group/index.wxml +5 -0
- package/lib/radio-group/index.wxss +1 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/index.js +107 -0
- package/lib/rate/index.json +6 -0
- package/lib/rate/index.wxml +35 -0
- package/lib/rate/index.wxss +1 -0
- package/lib/row/index.css +1 -0
- package/lib/row/index.d.ts +1 -0
- package/lib/row/index.js +26 -0
- package/lib/row/index.json +3 -0
- package/lib/row/index.wxml +5 -0
- package/lib/row/index.wxs +18 -0
- package/lib/row/index.wxss +1 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.d.ts +1 -0
- package/lib/search/index.js +106 -0
- package/lib/search/index.json +7 -0
- package/lib/search/index.wxml +57 -0
- package/lib/search/index.wxss +1 -0
- package/lib/sidebar/index.css +1 -0
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar/index.js +36 -0
- package/lib/sidebar/index.json +3 -0
- package/lib/sidebar/index.wxml +3 -0
- package/lib/sidebar/index.wxss +1 -0
- package/lib/sidebar-item/index.css +1 -0
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/index.js +32 -0
- package/lib/sidebar-item/index.json +6 -0
- package/lib/sidebar-item/index.wxml +18 -0
- package/lib/sidebar-item/index.wxss +1 -0
- package/lib/skeleton/index.css +1 -0
- package/lib/skeleton/index.d.ts +1 -0
- package/lib/skeleton/index.js +48 -0
- package/lib/skeleton/index.json +4 -0
- package/lib/skeleton/index.wxml +29 -0
- package/lib/skeleton/index.wxss +1 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +208 -0
- package/lib/slider/index.json +3 -0
- package/lib/slider/index.wxml +68 -0
- package/lib/slider/index.wxs +14 -0
- package/lib/slider/index.wxss +1 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/index.js +225 -0
- package/lib/stepper/index.json +6 -0
- package/lib/stepper/index.wxml +45 -0
- package/lib/stepper/index.wxs +32 -0
- package/lib/stepper/index.wxss +1 -0
- 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/sticky/index.css +1 -0
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +128 -0
- package/lib/sticky/index.json +3 -0
- package/lib/sticky/index.wxml +8 -0
- package/lib/sticky/index.wxs +25 -0
- package/lib/sticky/index.wxss +1 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.d.ts +1 -0
- package/lib/swipe-cell/index.js +142 -0
- package/lib/swipe-cell/index.json +3 -0
- package/lib/swipe-cell/index.wxml +21 -0
- package/lib/swipe-cell/index.wxss +1 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/index.js +44 -0
- package/lib/switch/index.json +6 -0
- package/lib/switch/index.wxml +51 -0
- package/lib/switch/index.wxs +26 -0
- package/lib/switch/index.wxss +1 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +66 -0
- package/lib/tab/index.json +3 -0
- package/lib/tab/index.wxml +8 -0
- package/lib/tab/index.wxss +1 -0
- package/lib/tabbar/index.css +1 -0
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/index.js +73 -0
- package/lib/tabbar/index.json +3 -0
- package/lib/tabbar/index.wxml +12 -0
- package/lib/tabbar/index.wxss +1 -0
- package/lib/tabbar-item/index.css +1 -0
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/index.js +79 -0
- package/lib/tabbar-item/index.json +7 -0
- package/lib/tabbar-item/index.wxml +32 -0
- package/lib/tabbar-item/index.wxss +1 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.js +329 -0
- package/lib/tabs/index.json +7 -0
- package/lib/tabs/index.wxml +67 -0
- package/lib/tabs/index.wxs +99 -0
- package/lib/tabs/index.wxss +1 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +34 -0
- package/lib/tag/index.json +6 -0
- package/lib/tag/index.wxml +17 -0
- package/lib/tag/index.wxs +13 -0
- package/lib/tag/index.wxss +1 -0
- package/lib/toast/icons.d.ts +3 -0
- package/lib/toast/icons.js +12 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.d.ts +1 -0
- package/lib/toast/index.js +63 -0
- package/lib/toast/index.json +9 -0
- package/lib/toast/index.wxml +33 -0
- package/lib/toast/index.wxss +1 -0
- package/lib/toast/toast.d.ts +35 -0
- package/lib/toast/toast.js +116 -0
- package/lib/transition/index.css +1 -0
- package/lib/transition/index.d.ts +1 -0
- package/lib/transition/index.js +15 -0
- package/lib/transition/index.json +3 -0
- package/lib/transition/index.wxml +9 -0
- package/lib/transition/index.wxs +17 -0
- package/lib/transition/index.wxss +1 -0
- package/lib/tree-select/index.css +1 -0
- package/lib/tree-select/index.d.ts +1 -0
- package/lib/tree-select/index.js +74 -0
- package/lib/tree-select/index.json +8 -0
- package/lib/tree-select/index.wxml +41 -0
- package/lib/tree-select/index.wxs +12 -0
- package/lib/tree-select/index.wxss +1 -0
- package/lib/wxs/add-unit.wxs +12 -0
- package/lib/wxs/array.wxs +5 -0
- package/lib/wxs/bem.wxs +39 -0
- package/lib/wxs/memoize.wxs +55 -0
- package/lib/wxs/object.wxs +13 -0
- package/lib/wxs/style.wxs +46 -0
- package/lib/wxs/utils.wxs +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<view class="contain">
|
|
2
|
+
<ty-slider
|
|
3
|
+
instanceId="{{instanceId}}"
|
|
4
|
+
className="{{className}}"
|
|
5
|
+
disable="{{disable}}"
|
|
6
|
+
end="{{value}}"
|
|
7
|
+
min="{{min}}"
|
|
8
|
+
max="{{max}}"
|
|
9
|
+
step="{{step}}"
|
|
10
|
+
thumbStyle="{{thumbStyle}}"
|
|
11
|
+
thumbWrapStyle="{{thumbWrapStyle}}"
|
|
12
|
+
enableTouch="{{enableTouch}}"
|
|
13
|
+
trackStyle="{{trackStyle}}"
|
|
14
|
+
barStyle="{{barStyle}}"
|
|
15
|
+
hidden="{{hidden}}"
|
|
16
|
+
parcelMargin="{{parcelMargin}}"
|
|
17
|
+
parcel="{{parcel}}"
|
|
18
|
+
parcelThumbHeight="{{parcelThumbHeight}}"
|
|
19
|
+
parcelThumbWidth="{{parcelThumbWidth}}"
|
|
20
|
+
stepStyle="{{stepStyle}}"
|
|
21
|
+
activeStepStyle="{{activeStepStyle}}"
|
|
22
|
+
showSteps="{{showSteps}}"
|
|
23
|
+
direction="{{direction}}"
|
|
24
|
+
bindmove="bindmove"
|
|
25
|
+
bindend="bindend"
|
|
26
|
+
bindstart="bindstart"
|
|
27
|
+
reverse="{{reverse}}"
|
|
28
|
+
hotAreaStyle="{{hotAreaStyle}}"
|
|
29
|
+
hideThumbButton="{{hideThumbButton}}"
|
|
30
|
+
thumbStyleRenderFormatter="{{thumbStyleRenderFormatter}}"
|
|
31
|
+
thumbStyleRenderValueScale="{{thumbStyleRenderValueScale}}"
|
|
32
|
+
thumbStyleRenderValueStart="{{thumbStyleRenderValueStart}}"
|
|
33
|
+
thumbStyleRenderValueReverse="{{thumbStyleRenderValueReverse}}"
|
|
34
|
+
/>
|
|
35
|
+
</view>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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))}.contain{--thumb-active-color:var(--app-B3,#fff)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-notice-bar{align-items:center;background-color:var(--notice-bar-background-color,#e7f3fe);color:var(--notice-bar-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;font-size:var(--notice-bar-font-size,12px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,14px);padding:var(--notice-bar-padding,0 16px)}.smart-notice-bar--info{--icon-color:var(--notice-bar-info-color,#1989fa)}.smart-notice-bar--warning{--icon-color:var(--notice-bar-warning-color,#ffa000);background-color:var(--notice-bar-background-warning-color,#fff5e5)}.smart-notice-bar--error{--icon-color:var(--notice-bar-error-color,#f04c4c);background-color:var(--notice-bar-background-error-color,#fdeded)}.smart-notice-bar--hover{opacity:.6}.smart-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.smart-notice-bar--wrapable .smart-notice-bar__wrap{height:auto}.smart-notice-bar--wrapable .smart-notice-bar__content{position:relative;white-space:normal}.smart-notice-bar__left-icon{align-items:center;display:flex;font-size:var(--notice-bar-icon-size,16px);margin-right:var(--notice-bar-left-icon-margin-right,8px);vertical-align:middle}.smart-notice-bar__right-icon{--icon-color:var(--notice-bar-right-icon-color,rgba(0,0,0,.2));font-size:var(--notice-bar-icon-size,16px);margin-left:var(--notice-bar-right-icon-margin-left,8px)}.smart-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,14px);overflow:hidden;position:relative}.smart-notice-bar__content{position:absolute;white-space:nowrap}.smart-notice-bar__content.smart-ellipsis{max-width:100%}.smart-notice-bar__content__btn{color:var(--notice-bar-btn-color,var(--app-M4,#1989fa));display:inline-block}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var component_1 = require("../common/component");
|
|
7
|
+
var utils_1 = require("../common/utils");
|
|
8
|
+
var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
|
|
9
|
+
var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
|
10
|
+
(0, component_1.SmartComponent)({
|
|
11
|
+
props: {
|
|
12
|
+
text: {
|
|
13
|
+
type: String,
|
|
14
|
+
value: '',
|
|
15
|
+
observer: 'init',
|
|
16
|
+
},
|
|
17
|
+
btnText: {
|
|
18
|
+
type: String,
|
|
19
|
+
value: '',
|
|
20
|
+
observer: 'init',
|
|
21
|
+
},
|
|
22
|
+
btnTextColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
value: '',
|
|
25
|
+
observer: 'init',
|
|
26
|
+
},
|
|
27
|
+
mode: {
|
|
28
|
+
type: String,
|
|
29
|
+
value: '',
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
value: 'info',
|
|
34
|
+
},
|
|
35
|
+
url: {
|
|
36
|
+
type: String,
|
|
37
|
+
value: '',
|
|
38
|
+
},
|
|
39
|
+
openType: {
|
|
40
|
+
type: String,
|
|
41
|
+
value: 'navigateTo',
|
|
42
|
+
},
|
|
43
|
+
rightIconColor: {
|
|
44
|
+
type: String,
|
|
45
|
+
value: '',
|
|
46
|
+
},
|
|
47
|
+
leftIconColor: {
|
|
48
|
+
type: String,
|
|
49
|
+
value: '',
|
|
50
|
+
},
|
|
51
|
+
delay: {
|
|
52
|
+
type: Number,
|
|
53
|
+
value: 1,
|
|
54
|
+
},
|
|
55
|
+
customStyle: {
|
|
56
|
+
type: String,
|
|
57
|
+
value: '',
|
|
58
|
+
},
|
|
59
|
+
customHoverClass: {
|
|
60
|
+
type: String,
|
|
61
|
+
value: '',
|
|
62
|
+
},
|
|
63
|
+
rightIconStyle: {
|
|
64
|
+
type: String,
|
|
65
|
+
value: '',
|
|
66
|
+
},
|
|
67
|
+
leftIconStyle: {
|
|
68
|
+
type: String,
|
|
69
|
+
value: '',
|
|
70
|
+
},
|
|
71
|
+
speed: {
|
|
72
|
+
type: Number,
|
|
73
|
+
value: 60,
|
|
74
|
+
observer: 'init',
|
|
75
|
+
},
|
|
76
|
+
scrollable: null,
|
|
77
|
+
leftIcon: {
|
|
78
|
+
type: String,
|
|
79
|
+
value: '',
|
|
80
|
+
},
|
|
81
|
+
color: String,
|
|
82
|
+
background: String,
|
|
83
|
+
wrapable: Boolean,
|
|
84
|
+
},
|
|
85
|
+
data: {
|
|
86
|
+
Xmark: Xmark_1.default,
|
|
87
|
+
Right: Right_1.default,
|
|
88
|
+
show: true,
|
|
89
|
+
},
|
|
90
|
+
created: function () {
|
|
91
|
+
this.resetAnimation = wx.createAnimation({
|
|
92
|
+
duration: 0,
|
|
93
|
+
timingFunction: 'linear',
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
destroyed: function () {
|
|
97
|
+
this.timer && clearTimeout(this.timer);
|
|
98
|
+
},
|
|
99
|
+
mounted: function () {
|
|
100
|
+
this.init();
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
init: function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
(0, utils_1.requestAnimationFrame)(function () {
|
|
106
|
+
Promise.all([
|
|
107
|
+
(0, utils_1.getRect)(_this, '.smart-notice-bar__content'),
|
|
108
|
+
(0, utils_1.getRect)(_this, '.smart-notice-bar__wrap'),
|
|
109
|
+
]).then(function (rects) {
|
|
110
|
+
var contentRect = rects[0], wrapRect = rects[1];
|
|
111
|
+
var _a = _this.data, speed = _a.speed, scrollable = _a.scrollable, delay = _a.delay;
|
|
112
|
+
if (contentRect == null ||
|
|
113
|
+
wrapRect == null ||
|
|
114
|
+
!contentRect.width ||
|
|
115
|
+
!wrapRect.width ||
|
|
116
|
+
scrollable === false) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (scrollable || wrapRect.width < contentRect.width) {
|
|
120
|
+
var duration = ((wrapRect.width + contentRect.width) / speed) * 1000;
|
|
121
|
+
_this.wrapWidth = wrapRect.width;
|
|
122
|
+
_this.contentWidth = contentRect.width;
|
|
123
|
+
_this.duration = duration;
|
|
124
|
+
_this.animation = wx.createAnimation({
|
|
125
|
+
duration: duration,
|
|
126
|
+
timingFunction: 'linear',
|
|
127
|
+
delay: delay,
|
|
128
|
+
});
|
|
129
|
+
_this.scroll(true);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
scroll: function (isInit) {
|
|
135
|
+
var _this = this;
|
|
136
|
+
if (isInit === void 0) { isInit = false; }
|
|
137
|
+
this.timer && clearTimeout(this.timer);
|
|
138
|
+
this.timer = null;
|
|
139
|
+
this.setData({
|
|
140
|
+
animationData: this.resetAnimation
|
|
141
|
+
.translateX(isInit ? 0 : this.wrapWidth)
|
|
142
|
+
.step()
|
|
143
|
+
.export(),
|
|
144
|
+
});
|
|
145
|
+
(0, utils_1.requestAnimationFrame)(function () {
|
|
146
|
+
_this.setData({
|
|
147
|
+
animationData: _this.animation.translateX(-_this.contentWidth).step().export(),
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
this.timer = setTimeout(function () {
|
|
151
|
+
_this.scroll();
|
|
152
|
+
}, this.duration + this.data.delay);
|
|
153
|
+
},
|
|
154
|
+
onClickIcon: function (event) {
|
|
155
|
+
if (this.data.mode === 'closeable') {
|
|
156
|
+
this.timer && clearTimeout(this.timer);
|
|
157
|
+
this.timer = null;
|
|
158
|
+
this.setData({ show: false });
|
|
159
|
+
this.$emit('close', event.detail);
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
onClickBtnText: function (event) {
|
|
163
|
+
this.$emit('btn-click', event);
|
|
164
|
+
},
|
|
165
|
+
onClick: function (event) {
|
|
166
|
+
var _a = this.data, url = _a.url, mode = _a.mode, openType = _a.openType;
|
|
167
|
+
if (mode === 'link' && url) {
|
|
168
|
+
if (openType === 'redirectTo') {
|
|
169
|
+
wx.redirectTo({ url: url });
|
|
170
|
+
}
|
|
171
|
+
else if (openType === 'navigateTo') {
|
|
172
|
+
wx.navigateTo({ url: url });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.$emit('click', event);
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<view
|
|
5
|
+
wx:if="{{ show }}"
|
|
6
|
+
class="custom-class {{ utils.bem('notice-bar', { wrapable, warning: type === 'warning', error: type === 'error', info: type === 'info' }) }}"
|
|
7
|
+
hover-class="{{ mode === 'link' ? 'smart-notice-bar--hover' : ''}} {{ customHoverClass }}"
|
|
8
|
+
style="{{ computed.rootStyle([{ color, background }, customStyle]) }}"
|
|
9
|
+
bind:tap="onClick"
|
|
10
|
+
>
|
|
11
|
+
<smart-icon
|
|
12
|
+
wx:if="{{ leftIcon }}"
|
|
13
|
+
name="{{ leftIcon }}"
|
|
14
|
+
class="smart-notice-bar__left-icon"
|
|
15
|
+
style="{{ computed.rootStyle(leftIconStyle) }}"
|
|
16
|
+
color="{{ leftIconColor }}"
|
|
17
|
+
/>
|
|
18
|
+
<slot wx:else name="left-icon" />
|
|
19
|
+
|
|
20
|
+
<view class="smart-notice-bar__wrap">
|
|
21
|
+
<view class="smart-notice-bar__content {{ scrollable === false && !wrapable ? 'smart-ellipsis' : '' }}" animation="{{ animationData }}">
|
|
22
|
+
{{ text }}
|
|
23
|
+
<view
|
|
24
|
+
wx:if="{{ btnText }}"
|
|
25
|
+
class="smart-notice-bar__content__btn"
|
|
26
|
+
hover-class="smart-notice-bar--hover"
|
|
27
|
+
catch:tap="onClickBtnText"
|
|
28
|
+
style="{{ btnTextColor ? 'color: ' + btnTextColor : ''}}"
|
|
29
|
+
>
|
|
30
|
+
{{ btnText }}
|
|
31
|
+
</view>
|
|
32
|
+
<slot wx:if="{{ !text }}"></slot>
|
|
33
|
+
</view>
|
|
34
|
+
</view>
|
|
35
|
+
|
|
36
|
+
<smart-icon
|
|
37
|
+
wx:if="{{ mode === 'closeable' }}"
|
|
38
|
+
class="smart-notice-bar__right-icon"
|
|
39
|
+
name="{{ Xmark }}"
|
|
40
|
+
style="{{ computed.rootStyle(rightIconStyle) }}"
|
|
41
|
+
color=" {{ rightIconColor }} "
|
|
42
|
+
catch:tap="onClickIcon"
|
|
43
|
+
/>
|
|
44
|
+
<smart-icon
|
|
45
|
+
wx:elif="{{ mode === 'link' }}"
|
|
46
|
+
color=" {{ rightIconColor }} "
|
|
47
|
+
class="smart-notice-bar__right-icon"
|
|
48
|
+
name="{{ Right }}"
|
|
49
|
+
style="{{ computed.rootStyle(rightIconStyle) }}"
|
|
50
|
+
/>
|
|
51
|
+
<slot wx:else name="right-icon" />
|
|
52
|
+
</view>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-notice-bar{align-items:center;background-color:var(--notice-bar-background-color,#e7f3fe);color:var(--notice-bar-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;font-size:var(--notice-bar-font-size,12px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,14px);padding:var(--notice-bar-padding,0 16px)}.smart-notice-bar--info{--icon-color:var(--notice-bar-info-color,#1989fa)}.smart-notice-bar--warning{--icon-color:var(--notice-bar-warning-color,#ffa000);background-color:var(--notice-bar-background-warning-color,#fff5e5)}.smart-notice-bar--error{--icon-color:var(--notice-bar-error-color,#f04c4c);background-color:var(--notice-bar-background-error-color,#fdeded)}.smart-notice-bar--hover{opacity:.6}.smart-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.smart-notice-bar--wrapable .smart-notice-bar__wrap{height:auto}.smart-notice-bar--wrapable .smart-notice-bar__content{position:relative;white-space:normal}.smart-notice-bar__left-icon{align-items:center;display:flex;font-size:var(--notice-bar-icon-size,16px);margin-right:var(--notice-bar-left-icon-margin-right,8px);vertical-align:middle}.smart-notice-bar__right-icon{--icon-color:var(--notice-bar-right-icon-color,rgba(0,0,0,.2));font-size:var(--notice-bar-icon-size,16px);margin-left:var(--notice-bar-right-icon-margin-left,8px)}.smart-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,14px);overflow:hidden;position:relative}.smart-notice-bar__content{position:absolute;white-space:nowrap}.smart-notice-bar__content.smart-ellipsis{max-width:100%}.smart-notice-bar__content__btn{color:var(--notice-bar-btn-color,var(--app-M4,#1989fa));display:inline-block}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.smart-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.smart-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.smart-notify--success{background-color:var(--notify-success-background-color,#07c160)}.smart-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.smart-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var component_1 = require("../common/component");
|
|
4
|
+
var color_1 = require("../common/color");
|
|
5
|
+
var utils_1 = require("../common/utils");
|
|
6
|
+
var notify_1 = require("./notify");
|
|
7
|
+
(0, component_1.SmartComponent)({
|
|
8
|
+
props: {
|
|
9
|
+
message: String,
|
|
10
|
+
background: String,
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
value: 'danger',
|
|
14
|
+
},
|
|
15
|
+
color: {
|
|
16
|
+
type: String,
|
|
17
|
+
value: color_1.WHITE,
|
|
18
|
+
},
|
|
19
|
+
duration: {
|
|
20
|
+
type: Number,
|
|
21
|
+
value: 3000,
|
|
22
|
+
},
|
|
23
|
+
zIndex: {
|
|
24
|
+
type: Number,
|
|
25
|
+
value: 110,
|
|
26
|
+
},
|
|
27
|
+
safeAreaInsetTop: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
value: false,
|
|
30
|
+
},
|
|
31
|
+
useSlot: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
value: false,
|
|
34
|
+
},
|
|
35
|
+
transition: {
|
|
36
|
+
type: String,
|
|
37
|
+
value: 'slide-down',
|
|
38
|
+
},
|
|
39
|
+
top: null,
|
|
40
|
+
},
|
|
41
|
+
data: {
|
|
42
|
+
show: false,
|
|
43
|
+
onOpened: null,
|
|
44
|
+
onClose: null,
|
|
45
|
+
onClick: null,
|
|
46
|
+
},
|
|
47
|
+
created: function () {
|
|
48
|
+
var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;
|
|
49
|
+
this.setData({ statusBarHeight: statusBarHeight });
|
|
50
|
+
},
|
|
51
|
+
mounted: function () {
|
|
52
|
+
notify_1.contextRef.value = (0, utils_1.getCurrentPage)();
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
show: function () {
|
|
56
|
+
var _this = this;
|
|
57
|
+
var _a = this.data, duration = _a.duration, onOpened = _a.onOpened;
|
|
58
|
+
clearTimeout(this.timer);
|
|
59
|
+
this.setData({ show: true });
|
|
60
|
+
wx.nextTick(onOpened);
|
|
61
|
+
if (duration > 0 && duration !== Infinity) {
|
|
62
|
+
this.timer = setTimeout(function () {
|
|
63
|
+
_this.hide();
|
|
64
|
+
}, duration);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
hide: function () {
|
|
68
|
+
var onClose = this.data.onClose;
|
|
69
|
+
clearTimeout(this.timer);
|
|
70
|
+
this.setData({ show: false });
|
|
71
|
+
wx.nextTick(onClose);
|
|
72
|
+
},
|
|
73
|
+
onTap: function (event) {
|
|
74
|
+
var onClick = this.data.onClick;
|
|
75
|
+
if (onClick) {
|
|
76
|
+
onClick(event.detail);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<smart-transition
|
|
5
|
+
name="{{ transition }}"
|
|
6
|
+
show="{{ show }}"
|
|
7
|
+
custom-class="smart-notify__container"
|
|
8
|
+
custom-style="{{ computed.rootStyle({ zIndex, top }) }}"
|
|
9
|
+
bind:tap="onTap"
|
|
10
|
+
>
|
|
11
|
+
<view
|
|
12
|
+
class="smart-notify smart-notify--{{ type }}"
|
|
13
|
+
style="{{ computed.notifyStyle({ background, color }) }}"
|
|
14
|
+
>
|
|
15
|
+
<view
|
|
16
|
+
wx:if="{{ safeAreaInsetTop }}"
|
|
17
|
+
style="height: {{ statusBarHeight }}px"
|
|
18
|
+
/>
|
|
19
|
+
<slot wx:if="{{ useSlot }}" />
|
|
20
|
+
<text wx:else>{{ message }}</text>
|
|
21
|
+
</view>
|
|
22
|
+
</smart-transition>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
|
4
|
+
|
|
5
|
+
function rootStyle(data) {
|
|
6
|
+
return style({
|
|
7
|
+
'z-index': data.zIndex,
|
|
8
|
+
top: addUnit(data.top),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function notifyStyle(data) {
|
|
13
|
+
return style({
|
|
14
|
+
background: data.background,
|
|
15
|
+
color: data.color,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
rootStyle: rootStyle,
|
|
21
|
+
notifyStyle: notifyStyle,
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.smart-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.smart-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.smart-notify--success{background-color:var(--notify-success-background-color,#07c160)}.smart-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.smart-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
|
3
|
+
type NotifyContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;
|
|
4
|
+
interface NotifyOptions {
|
|
5
|
+
type?: 'primary' | 'success' | 'danger' | 'warning';
|
|
6
|
+
transition?: 'fade' | 'fade-up' | 'fade-down' | 'fade-left' | 'fade-right' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right';
|
|
7
|
+
color?: string;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
top?: number;
|
|
10
|
+
message: string;
|
|
11
|
+
context?: any;
|
|
12
|
+
duration?: number;
|
|
13
|
+
selector?: string;
|
|
14
|
+
background?: string;
|
|
15
|
+
safeAreaInsetTop?: boolean;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
onOpened?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const contextRef: {
|
|
21
|
+
value: NotifyContext | null;
|
|
22
|
+
};
|
|
23
|
+
declare function Notify(options: NotifyOptions | string): any;
|
|
24
|
+
declare namespace Notify {
|
|
25
|
+
var clear: (options?: NotifyOptions | undefined) => void;
|
|
26
|
+
var setDefaultOptions: (options: NotifyOptions) => void;
|
|
27
|
+
var resetDefaultOptions: () => void;
|
|
28
|
+
}
|
|
29
|
+
export default Notify;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.contextRef = void 0;
|
|
15
|
+
var utils_1 = require("../common/utils");
|
|
16
|
+
var color_1 = require("../common/color");
|
|
17
|
+
var defaultOptions = {
|
|
18
|
+
selector: '#smart-notify',
|
|
19
|
+
type: 'danger',
|
|
20
|
+
message: '',
|
|
21
|
+
background: '',
|
|
22
|
+
duration: 3000,
|
|
23
|
+
zIndex: 110,
|
|
24
|
+
top: 0,
|
|
25
|
+
color: color_1.WHITE,
|
|
26
|
+
safeAreaInsetTop: false,
|
|
27
|
+
onClick: function () { },
|
|
28
|
+
onOpened: function () { },
|
|
29
|
+
onClose: function () { },
|
|
30
|
+
};
|
|
31
|
+
var currentOptions = __assign({}, defaultOptions);
|
|
32
|
+
function parseOptions(message) {
|
|
33
|
+
if (message == null) {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
return typeof message === 'string' ? { message: message } : message;
|
|
37
|
+
}
|
|
38
|
+
exports.contextRef = {
|
|
39
|
+
value: null,
|
|
40
|
+
};
|
|
41
|
+
function Notify(options) {
|
|
42
|
+
options = __assign(__assign({}, currentOptions), parseOptions(options));
|
|
43
|
+
var context = (typeof options.context === 'function' ? options.context() : options.context) ||
|
|
44
|
+
exports.contextRef.value ||
|
|
45
|
+
(0, utils_1.getCurrentPage)();
|
|
46
|
+
var notify = context.selectComponent(options.selector);
|
|
47
|
+
delete options.context;
|
|
48
|
+
delete options.selector;
|
|
49
|
+
if (notify) {
|
|
50
|
+
notify.setData(options);
|
|
51
|
+
notify.show();
|
|
52
|
+
return notify;
|
|
53
|
+
}
|
|
54
|
+
console.warn('未找到 smart-notify 节点,请确认 selector 及 context 是否正确');
|
|
55
|
+
}
|
|
56
|
+
exports.default = Notify;
|
|
57
|
+
Notify.clear = function (options) {
|
|
58
|
+
options = __assign(__assign({}, defaultOptions), parseOptions(options));
|
|
59
|
+
var context = (typeof options.context === 'function' ? options.context() : options.context) ||
|
|
60
|
+
exports.contextRef.value ||
|
|
61
|
+
(0, utils_1.getCurrentPage)();
|
|
62
|
+
var notify = context.selectComponent(options.selector);
|
|
63
|
+
if (notify) {
|
|
64
|
+
notify.hide();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
Notify.setDefaultOptions = function (options) {
|
|
68
|
+
Object.assign(currentOptions, options);
|
|
69
|
+
};
|
|
70
|
+
Notify.resetDefaultOptions = function () {
|
|
71
|
+
currentOptions = __assign({}, defaultOptions);
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-overlay{background-color:var(--overlay-background-color,var(--smart-ui-overlay,rgba(0,0,0,.6)));height:100%;left:0;position:fixed;top:0;width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var component_1 = require("../common/component");
|
|
4
|
+
(0, component_1.SmartComponent)({
|
|
5
|
+
props: {
|
|
6
|
+
show: Boolean,
|
|
7
|
+
customStyle: String,
|
|
8
|
+
duration: {
|
|
9
|
+
type: null,
|
|
10
|
+
value: 300,
|
|
11
|
+
},
|
|
12
|
+
zIndex: {
|
|
13
|
+
type: Number,
|
|
14
|
+
value: 1,
|
|
15
|
+
},
|
|
16
|
+
lockScroll: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
value: true,
|
|
19
|
+
},
|
|
20
|
+
rootPortal: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
value: false,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
onClick: function () {
|
|
27
|
+
this.$emit('click');
|
|
28
|
+
},
|
|
29
|
+
// for prevent touchmove
|
|
30
|
+
noop: function () { },
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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-overlay{background-color:var(--overlay-background-color,var(--smart-ui-overlay,rgba(0,0,0,.6)));height:100%;left:0;position:fixed;top:0;width:100%}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<smart-transition
|
|
2
|
+
show="{{ show }}"
|
|
3
|
+
custom-class="smart-overlay custom-class"
|
|
4
|
+
custom-style="z-index: {{ zIndex }}; {{ customStyle }}"
|
|
5
|
+
duration="{{ duration }}"
|
|
6
|
+
bind:tap="onClick"
|
|
7
|
+
catch:touchmove="{{ lockScroll ? 'noop' : ''}}"
|
|
8
|
+
>
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</smart-transition>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--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-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))}:host{width:100%}.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{align-items:center;display:flex;justify-content:center;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|