@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 @@
|
|
|
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-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center;transition:all .5s}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,329 @@
|
|
|
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
|
+
var component_1 = require("../common/component");
|
|
15
|
+
var touch_1 = require("../mixins/touch");
|
|
16
|
+
var utils_1 = require("../common/utils");
|
|
17
|
+
var validator_1 = require("../common/validator");
|
|
18
|
+
var relation_1 = require("../common/relation");
|
|
19
|
+
(0, component_1.SmartComponent)({
|
|
20
|
+
mixins: [touch_1.touch],
|
|
21
|
+
classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class', 'wrap-class'],
|
|
22
|
+
relation: (0, relation_1.useChildren)('tab', function () {
|
|
23
|
+
this.updateTabs();
|
|
24
|
+
}),
|
|
25
|
+
props: {
|
|
26
|
+
sticky: Boolean,
|
|
27
|
+
border: Boolean,
|
|
28
|
+
swipeable: Boolean,
|
|
29
|
+
titleActiveColor: String,
|
|
30
|
+
titleInactiveColor: String,
|
|
31
|
+
color: String,
|
|
32
|
+
animated: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
observer: function () {
|
|
35
|
+
var _this = this;
|
|
36
|
+
this.children.forEach(function (child, index) {
|
|
37
|
+
return child.updateRender(index === _this.data.currentIndex, _this);
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
lineWidth: {
|
|
42
|
+
type: null,
|
|
43
|
+
value: 16,
|
|
44
|
+
observer: 'resize',
|
|
45
|
+
},
|
|
46
|
+
lineHeight: {
|
|
47
|
+
type: null,
|
|
48
|
+
value: -1,
|
|
49
|
+
},
|
|
50
|
+
active: {
|
|
51
|
+
type: null,
|
|
52
|
+
value: 0,
|
|
53
|
+
observer: function (name) {
|
|
54
|
+
if (name !== this.getCurrentName()) {
|
|
55
|
+
this.setCurrentIndexByName(name);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
type: {
|
|
60
|
+
type: String,
|
|
61
|
+
value: 'line',
|
|
62
|
+
},
|
|
63
|
+
ellipsis: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
value: true,
|
|
66
|
+
},
|
|
67
|
+
duration: {
|
|
68
|
+
type: Number,
|
|
69
|
+
value: 0.3,
|
|
70
|
+
},
|
|
71
|
+
zIndex: {
|
|
72
|
+
type: Number,
|
|
73
|
+
value: 1,
|
|
74
|
+
},
|
|
75
|
+
swipeThreshold: {
|
|
76
|
+
type: Number,
|
|
77
|
+
value: 5,
|
|
78
|
+
observer: function (value) {
|
|
79
|
+
this.setData({
|
|
80
|
+
scrollable: this.children.length > value || !this.data.ellipsis,
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
offsetTop: {
|
|
85
|
+
type: Number,
|
|
86
|
+
value: 0,
|
|
87
|
+
},
|
|
88
|
+
lazyRender: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
value: true,
|
|
91
|
+
},
|
|
92
|
+
useBeforeChange: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
value: false,
|
|
95
|
+
},
|
|
96
|
+
inactiveDestroy: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
value: false,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
data: {
|
|
102
|
+
tabs: [],
|
|
103
|
+
scrollLeft: 0,
|
|
104
|
+
scrollable: false,
|
|
105
|
+
currentIndex: 0,
|
|
106
|
+
container: null,
|
|
107
|
+
skipTransition: true,
|
|
108
|
+
scrollWithAnimation: false,
|
|
109
|
+
lineOffsetLeft: 0,
|
|
110
|
+
inited: false,
|
|
111
|
+
hasSubTitle: false,
|
|
112
|
+
},
|
|
113
|
+
mounted: function () {
|
|
114
|
+
var _this = this;
|
|
115
|
+
(0, utils_1.requestAnimationFrame)(function () {
|
|
116
|
+
_this.swiping = true;
|
|
117
|
+
_this.setData({
|
|
118
|
+
container: function () { return _this.createSelectorQuery().select('.smart-tabs'); },
|
|
119
|
+
});
|
|
120
|
+
_this.resize();
|
|
121
|
+
_this.scrollIntoView();
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
updateTabs: function () {
|
|
126
|
+
var _a = this, _b = _a.children, children = _b === void 0 ? [] : _b, data = _a.data;
|
|
127
|
+
this.setData({
|
|
128
|
+
tabs: children.map(function (child) { return child.data; }),
|
|
129
|
+
scrollable: this.children.length > data.swipeThreshold || !data.ellipsis,
|
|
130
|
+
});
|
|
131
|
+
this.setCurrentIndexByName(data.active || this.getCurrentName());
|
|
132
|
+
},
|
|
133
|
+
trigger: function (eventName, child) {
|
|
134
|
+
var currentIndex = this.data.currentIndex;
|
|
135
|
+
var data = this.getChildData(currentIndex, child);
|
|
136
|
+
if (!(0, validator_1.isDef)(data)) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.$emit(eventName, data);
|
|
140
|
+
},
|
|
141
|
+
onTap: function (event) {
|
|
142
|
+
var _this = this;
|
|
143
|
+
var index = event.currentTarget.dataset.index;
|
|
144
|
+
var child = this.children[index];
|
|
145
|
+
if (child.data.disabled) {
|
|
146
|
+
this.trigger('disabled', child);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.onBeforeChange(index)
|
|
150
|
+
.then(function () {
|
|
151
|
+
_this.setCurrentIndex(index);
|
|
152
|
+
(0, utils_1.nextTick)(function () {
|
|
153
|
+
_this.trigger('click');
|
|
154
|
+
});
|
|
155
|
+
})
|
|
156
|
+
.catch(function (err) { });
|
|
157
|
+
},
|
|
158
|
+
// correct the index of active tab
|
|
159
|
+
setCurrentIndexByName: function (name) {
|
|
160
|
+
var _a = this.children, children = _a === void 0 ? [] : _a;
|
|
161
|
+
var matched = children.filter(function (child) { return child.getComputedName() === name; });
|
|
162
|
+
if (matched.length) {
|
|
163
|
+
this.setCurrentIndex(matched[0].index);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
setCurrentIndex: function (currentIndex) {
|
|
167
|
+
var _this = this;
|
|
168
|
+
var _a = this, data = _a.data, _b = _a.children, children = _b === void 0 ? [] : _b;
|
|
169
|
+
if (!(0, validator_1.isDef)(currentIndex) || currentIndex >= children.length || currentIndex < 0) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
var hasSubTitle = false;
|
|
173
|
+
(0, utils_1.groupSetData)(this, function () {
|
|
174
|
+
var task = [];
|
|
175
|
+
children.forEach(function (item, index) {
|
|
176
|
+
var active = index === currentIndex;
|
|
177
|
+
if (active !== item.data.active || !item.inited) {
|
|
178
|
+
active
|
|
179
|
+
? task.push(function () { return item.updateRender(active, _this); })
|
|
180
|
+
: task.unshift(function () { return item.updateRender(active, _this); });
|
|
181
|
+
}
|
|
182
|
+
if (item.data.subtitle) {
|
|
183
|
+
hasSubTitle = true;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
task.forEach(function (fun) { return fun(); });
|
|
187
|
+
});
|
|
188
|
+
if (currentIndex === data.currentIndex) {
|
|
189
|
+
if (!data.inited) {
|
|
190
|
+
this.resize();
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
var shouldEmitChange = data.currentIndex !== null;
|
|
195
|
+
this.setData({ currentIndex: currentIndex, hasSubTitle: hasSubTitle });
|
|
196
|
+
(0, utils_1.requestAnimationFrame)(function () {
|
|
197
|
+
_this.resize();
|
|
198
|
+
_this.scrollIntoView();
|
|
199
|
+
});
|
|
200
|
+
(0, utils_1.nextTick)(function () {
|
|
201
|
+
_this.trigger('input');
|
|
202
|
+
if (shouldEmitChange) {
|
|
203
|
+
_this.trigger('change');
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
getCurrentName: function () {
|
|
208
|
+
var activeTab = this.children[this.data.currentIndex];
|
|
209
|
+
if (activeTab) {
|
|
210
|
+
return activeTab.getComputedName();
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
resize: function () {
|
|
214
|
+
var _this = this;
|
|
215
|
+
var _a = this.data, currentIndex = _a.currentIndex, ellipsis = _a.ellipsis, skipTransition = _a.skipTransition, type = _a.type;
|
|
216
|
+
Promise.all([
|
|
217
|
+
(0, utils_1.getAllRect)(this, '.smart-tab'),
|
|
218
|
+
type === 'line' ? (0, utils_1.getRect)(this, '.smart-tabs__line') : Promise.resolve({ width: 0 }),
|
|
219
|
+
]).then(function (_a) {
|
|
220
|
+
var _b = _a[0], rects = _b === void 0 ? [] : _b, lineRect = _a[1];
|
|
221
|
+
var rect = rects === null || rects === void 0 ? void 0 : rects[currentIndex];
|
|
222
|
+
if (rect == null || rect === undefined) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
var _c = rects[currentIndex], cardWidth = _c.width, cardHeight = _c.height;
|
|
226
|
+
var lineOffsetLeft = rects
|
|
227
|
+
.slice(0, currentIndex)
|
|
228
|
+
.reduce(function (prev, curr) { return prev + curr.width; }, 0);
|
|
229
|
+
if (type === 'line') {
|
|
230
|
+
lineOffsetLeft += (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
|
|
231
|
+
}
|
|
232
|
+
_this.setData({ lineOffsetLeft: lineOffsetLeft, inited: true, cardWidth: cardWidth, cardHeight: cardHeight });
|
|
233
|
+
_this.swiping = true;
|
|
234
|
+
if (skipTransition) {
|
|
235
|
+
// waiting transition end
|
|
236
|
+
setTimeout(function () {
|
|
237
|
+
_this.setData({ skipTransition: false });
|
|
238
|
+
}, _this.data.duration);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
// scroll active tab into view
|
|
243
|
+
scrollIntoView: function () {
|
|
244
|
+
var _this = this;
|
|
245
|
+
var _a = this.data, currentIndex = _a.currentIndex, scrollable = _a.scrollable, scrollWithAnimation = _a.scrollWithAnimation;
|
|
246
|
+
if (!scrollable) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
Promise.all([(0, utils_1.getAllRect)(this, '.smart-tab'), (0, utils_1.getRect)(this, '.smart-tabs__nav')]).then(function (_a) {
|
|
250
|
+
var tabRects = _a[0], navRect = _a[1];
|
|
251
|
+
var tabRect = tabRects[currentIndex];
|
|
252
|
+
var offsetLeft = tabRects
|
|
253
|
+
.slice(0, currentIndex)
|
|
254
|
+
.reduce(function (prev, curr) { return prev + curr.width; }, 0);
|
|
255
|
+
_this.setData({
|
|
256
|
+
scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,
|
|
257
|
+
});
|
|
258
|
+
if (!scrollWithAnimation) {
|
|
259
|
+
(0, utils_1.nextTick)(function () {
|
|
260
|
+
_this.setData({ scrollWithAnimation: true });
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
onTouchScroll: function (event) {
|
|
266
|
+
this.$emit('scroll', event.detail);
|
|
267
|
+
},
|
|
268
|
+
onTouchStart: function (event) {
|
|
269
|
+
if (!this.data.swipeable)
|
|
270
|
+
return;
|
|
271
|
+
this.swiping = true;
|
|
272
|
+
this.touchStart(event);
|
|
273
|
+
},
|
|
274
|
+
onTouchMove: function (event) {
|
|
275
|
+
if (!this.data.swipeable || !this.swiping)
|
|
276
|
+
return;
|
|
277
|
+
this.touchMove(event);
|
|
278
|
+
},
|
|
279
|
+
// watch swipe touch end
|
|
280
|
+
onTouchEnd: function () {
|
|
281
|
+
var _this = this;
|
|
282
|
+
if (!this.data.swipeable || !this.swiping)
|
|
283
|
+
return;
|
|
284
|
+
var _a = this, direction = _a.direction, deltaX = _a.deltaX, offsetX = _a.offsetX;
|
|
285
|
+
var minSwipeDistance = 50;
|
|
286
|
+
if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
|
|
287
|
+
var index_1 = this.getAvaiableTab(deltaX);
|
|
288
|
+
if (index_1 !== -1) {
|
|
289
|
+
this.onBeforeChange(index_1)
|
|
290
|
+
.then(function () { return _this.setCurrentIndex(index_1); })
|
|
291
|
+
.catch(function (err) { });
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
this.swiping = false;
|
|
295
|
+
},
|
|
296
|
+
getAvaiableTab: function (direction) {
|
|
297
|
+
var _a = this.data, tabs = _a.tabs, currentIndex = _a.currentIndex;
|
|
298
|
+
var step = direction > 0 ? -1 : 1;
|
|
299
|
+
for (var i = step; currentIndex + i < tabs.length && currentIndex + i >= 0; i += step) {
|
|
300
|
+
var index = currentIndex + i;
|
|
301
|
+
if (index >= 0 && index < tabs.length && tabs[index] && !tabs[index].disabled) {
|
|
302
|
+
return index;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return -1;
|
|
306
|
+
},
|
|
307
|
+
onBeforeChange: function (index) {
|
|
308
|
+
var _this = this;
|
|
309
|
+
var useBeforeChange = this.data.useBeforeChange;
|
|
310
|
+
if (!useBeforeChange) {
|
|
311
|
+
return Promise.resolve();
|
|
312
|
+
}
|
|
313
|
+
return new Promise(function (resolve, reject) {
|
|
314
|
+
_this.$emit('before-change', __assign(__assign({}, _this.getChildData(index)), { callback: function (status) { return (status ? resolve() : reject()); } }));
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
getChildData: function (index, child) {
|
|
318
|
+
var currentChild = child || this.children[index];
|
|
319
|
+
if (!(0, validator_1.isDef)(currentChild)) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
return {
|
|
323
|
+
index: currentChild.index,
|
|
324
|
+
name: currentChild.getComputedName(),
|
|
325
|
+
title: currentChild.data.title,
|
|
326
|
+
};
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<view class="custom-class {{ utils.bem('tabs') }}">
|
|
5
|
+
<smart-sticky
|
|
6
|
+
disabled="{{ !sticky }}"
|
|
7
|
+
z-index="{{ zIndex }}"
|
|
8
|
+
offset-top="{{ offsetTop }}"
|
|
9
|
+
container="{{ container }}"
|
|
10
|
+
bind:scroll="onTouchScroll"
|
|
11
|
+
>
|
|
12
|
+
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} {{ hasSubTitle ? 'smart-tabs--line_subtitle' : '' }} wrap-class">
|
|
13
|
+
<slot name="nav-left" />
|
|
14
|
+
|
|
15
|
+
<scroll-view
|
|
16
|
+
scroll-x="{{ scrollable }}"
|
|
17
|
+
scroll-with-animation="{{ scrollWithAnimation }}"
|
|
18
|
+
scroll-left="{{ scrollLeft }}"
|
|
19
|
+
class="{{ utils.bem('tabs__scroll', [type]) }}"
|
|
20
|
+
style="{{ color ? 'border-color: ' + color : '' }}"
|
|
21
|
+
>
|
|
22
|
+
<view class="{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class" style="{{ computed.navStyle(color, type) }}">
|
|
23
|
+
<view wx:if="{{ type === 'line' }}" class="smart-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}" />
|
|
24
|
+
<view wx:if="{{ type === 'card' }}" class="smart-tabs__card" style="{{ computed.cardStyle({ color, lineOffsetLeft, cardHeight, skipTransition, duration, cardWidth, inited }) }}" />
|
|
25
|
+
<view
|
|
26
|
+
wx:for="{{ tabs }}"
|
|
27
|
+
wx:key="index"
|
|
28
|
+
data-index="{{ index }}"
|
|
29
|
+
class="{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}"
|
|
30
|
+
style="{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}"
|
|
31
|
+
bind:tap="onTap"
|
|
32
|
+
>
|
|
33
|
+
<view class="{{ ellipsis ? 'smart-ellipsis' : '' }}" style="{{ item.titleStyle }}">
|
|
34
|
+
{{ item.title }}
|
|
35
|
+
<smart-info
|
|
36
|
+
wx:if="{{ item.info !== null || item.dot }}"
|
|
37
|
+
info="{{ item.info }}"
|
|
38
|
+
dot="{{ item.dot }}"
|
|
39
|
+
custom-class="smart-tab__title__info"
|
|
40
|
+
/>
|
|
41
|
+
</view>
|
|
42
|
+
<view wx:if="{{!!item.subtitle}}" class="{{ ellipsis ? 'smart-ellipsis' : '' }}" style="{{ item.subtitleStyle }}">
|
|
43
|
+
{{ item.subtitle }}
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
46
|
+
</view>
|
|
47
|
+
</scroll-view>
|
|
48
|
+
|
|
49
|
+
<slot name="nav-right" />
|
|
50
|
+
</view>
|
|
51
|
+
</smart-sticky>
|
|
52
|
+
|
|
53
|
+
<view
|
|
54
|
+
class="smart-tabs__content"
|
|
55
|
+
bind:touchstart="onTouchStart"
|
|
56
|
+
bind:touchmove="onTouchMove"
|
|
57
|
+
bind:touchend="onTouchEnd"
|
|
58
|
+
bind:touchcancel="onTouchEnd"
|
|
59
|
+
>
|
|
60
|
+
<view
|
|
61
|
+
class="{{ utils.bem('tabs__track', [{ animated }]) }} smart-tabs__track"
|
|
62
|
+
style="{{ computed.trackStyle({ duration, currentIndex, animated }) }}"
|
|
63
|
+
>
|
|
64
|
+
<slot />
|
|
65
|
+
</view>
|
|
66
|
+
</view>
|
|
67
|
+
</view>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var utils = require('../wxs/utils.wxs');
|
|
3
|
+
var style = require('../wxs/style.wxs');
|
|
4
|
+
|
|
5
|
+
function tabClass(active, ellipsis) {
|
|
6
|
+
var classes = ['tab-class'];
|
|
7
|
+
|
|
8
|
+
if (active) {
|
|
9
|
+
classes.push('tab-active-class');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (ellipsis) {
|
|
13
|
+
classes.push('smart-ellipsis');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return classes.join(' ');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function tabStyle(data) {
|
|
20
|
+
var titleColor = data.active
|
|
21
|
+
? data.titleActiveColor
|
|
22
|
+
: data.titleInactiveColor;
|
|
23
|
+
|
|
24
|
+
var ellipsis = data.scrollable && data.ellipsis;
|
|
25
|
+
|
|
26
|
+
// card theme color
|
|
27
|
+
if (data.type === 'card') {
|
|
28
|
+
return style({
|
|
29
|
+
'border-color': data.color,
|
|
30
|
+
'background-color': !data.disabled && data.active && data.type !== 'card' ? data.color : null,
|
|
31
|
+
color: titleColor || (!data.disabled && !data.active && data.type !== 'card' ? data.color : null),
|
|
32
|
+
'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return style({
|
|
37
|
+
color: titleColor,
|
|
38
|
+
'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function navStyle(color, type) {
|
|
43
|
+
return style({
|
|
44
|
+
'border-color': type === 'card' && color ? color : null,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function trackStyle(data) {
|
|
49
|
+
if (!data.animated) {
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return style({
|
|
54
|
+
left: -100 * data.currentIndex + '%',
|
|
55
|
+
'transition-duration': data.duration + 's',
|
|
56
|
+
'-webkit-transition-duration': data.duration + 's',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function lineStyle(data) {
|
|
61
|
+
return style({
|
|
62
|
+
width: utils.addUnit(data.lineWidth),
|
|
63
|
+
opacity: data.inited ? 1 : 0,
|
|
64
|
+
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
|
|
65
|
+
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
|
|
66
|
+
'background-color': data.color,
|
|
67
|
+
height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
|
|
68
|
+
'border-radius':
|
|
69
|
+
data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
|
|
70
|
+
'transition-duration': !data.skipTransition ? data.duration + 's' : null,
|
|
71
|
+
'-webkit-transition-duration': !data.skipTransition
|
|
72
|
+
? data.duration + 's'
|
|
73
|
+
: null,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function cardStyle(data) {
|
|
78
|
+
return style({
|
|
79
|
+
width: utils.addUnit(data.cardWidth),
|
|
80
|
+
opacity: data.inited ? 1 : 0,
|
|
81
|
+
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
|
|
82
|
+
'-webkit-transform': 'translate(' + data.lineOffsetLeft + 'px, 0px)',
|
|
83
|
+
'background-color': data.color,
|
|
84
|
+
'transition-duration': !data.skipTransition ? data.duration + 's' : null,
|
|
85
|
+
'-webkit-transition-duration': !data.skipTransition
|
|
86
|
+
? data.duration + 's'
|
|
87
|
+
: null,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
module.exports = {
|
|
93
|
+
tabClass: tabClass,
|
|
94
|
+
tabStyle: tabStyle,
|
|
95
|
+
trackStyle: trackStyle,
|
|
96
|
+
lineStyle: lineStyle,
|
|
97
|
+
navStyle: navStyle,
|
|
98
|
+
cardStyle: cardStyle,
|
|
99
|
+
};
|
|
@@ -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-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center;transition:all .5s}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
|
@@ -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-tag{align-items:center;border-radius:var(--tag-border-radius,4px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,17px);padding:var(--tag-padding,2px 8px);position:relative}.smart-tag--default{background-color:var(--tag-default-color,#969799)}.smart-tag--default.smart-tag--plain{color:var(--tag-default-color,#969799)}.smart-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.smart-tag--danger.smart-tag--plain{color:var(--tag-danger-color,#ee0a24)}.smart-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.smart-tag--primary.smart-tag--plain{color:var(--tag-primary-color,#1989fa)}.smart-tag--success{background-color:var(--tag-success-color,#07c160)}.smart-tag--success.smart-tag--plain{color:var(--tag-success-color,#07c160)}.smart-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.smart-tag--warning.smart-tag--plain{color:var(--tag-warning-color,#ff976a)}.smart-tag--plain{background-color:var(--tag-plain-background-color,transparent)}.smart-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-tag--medium{font-size:var(--tag-medium-font-size,14px);line-height:var(--tag-medium-line-height,20px)}.smart-tag--large{font-size:var(--tag-large-font-size,16px);line-height:var(--tag-large-line-height,22px)}.smart-tag--mark{border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.smart-tag--mark:after{content:"";display:block;width:2px}.smart-tag--round{border-radius:var(--tag-round-border-radius,999px)}.smart-tag__close{margin-left:2px;min-width:1em}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/tag/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
|
|
7
|
+
var component_1 = require("../common/component");
|
|
8
|
+
(0, component_1.SmartComponent)({
|
|
9
|
+
props: {
|
|
10
|
+
size: String,
|
|
11
|
+
mark: Boolean,
|
|
12
|
+
color: String,
|
|
13
|
+
plain: Boolean,
|
|
14
|
+
round: Boolean,
|
|
15
|
+
textColor: {
|
|
16
|
+
type: String,
|
|
17
|
+
// value:'#fff'
|
|
18
|
+
},
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
value: 'default',
|
|
22
|
+
},
|
|
23
|
+
closeable: Boolean,
|
|
24
|
+
},
|
|
25
|
+
data: {
|
|
26
|
+
crossIcon: Xmark_1.default,
|
|
27
|
+
closeColor: '#fff',
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
onClose: function () {
|
|
31
|
+
this.$emit('close');
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<view
|
|
5
|
+
class="custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}"
|
|
6
|
+
style="{{ computed.rootStyle({ plain, color, textColor }) }}"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
<smart-icon
|
|
10
|
+
wx:if="{{ closeable }}"
|
|
11
|
+
name="{{crossIcon}}"
|
|
12
|
+
custom-class="smart-tag__close"
|
|
13
|
+
bind:click="onClose"
|
|
14
|
+
color="{{textColor || closeColor}}"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
</view>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
|
|
4
|
+
function rootStyle(data) {
|
|
5
|
+
return style({
|
|
6
|
+
'background-color': data.plain ? '' : data.color,
|
|
7
|
+
color: data.textColor || data.plain ? data.textColor || data.color : '',
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
rootStyle: rootStyle,
|
|
13
|
+
};
|
|
@@ -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-tag{align-items:center;border-radius:var(--tag-border-radius,4px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,17px);padding:var(--tag-padding,2px 8px);position:relative}.smart-tag--default{background-color:var(--tag-default-color,#969799)}.smart-tag--default.smart-tag--plain{color:var(--tag-default-color,#969799)}.smart-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.smart-tag--danger.smart-tag--plain{color:var(--tag-danger-color,#ee0a24)}.smart-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.smart-tag--primary.smart-tag--plain{color:var(--tag-primary-color,#1989fa)}.smart-tag--success{background-color:var(--tag-success-color,#07c160)}.smart-tag--success.smart-tag--plain{color:var(--tag-success-color,#07c160)}.smart-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.smart-tag--warning.smart-tag--plain{color:var(--tag-warning-color,#ff976a)}.smart-tag--plain{background-color:var(--tag-plain-background-color,transparent)}.smart-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-tag--medium{font-size:var(--tag-medium-font-size,14px);line-height:var(--tag-medium-line-height,20px)}.smart-tag--large{font-size:var(--tag-large-font-size,16px);line-height:var(--tag-large-line-height,22px)}.smart-tag--mark{border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.smart-tag--mark:after{content:"";display:block;width:2px}.smart-tag--round{border-radius:var(--tag-round-border-radius,999px)}.smart-tag__close{margin-left:2px;min-width:1em}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const Success: "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20class%3D%22icon%22%20width%3D%22200px%22%20height%3D%22200.00px%22%20viewBox%3D%220%200%201024%201024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M639.232%20815.232a315.306667%20315.306667%200%200%201-127.061333%2025.898667%20314.922667%20314.922667%200%200%201-127.232-25.898667%20337.92%20337.92%200%200%201-104.832-71.338667%20337.834667%20337.834667%200%200%201-71.338667-104.832%20314.88%20314.88%200%200%201-25.898667-127.232%20317.013333%20317.013333%200%200%201%2025.728-127.061333%20335.445333%20335.445333%200%200%201%2071.338667-105.173333%20333.653333%20333.653333%200%200%201%20105.002667-71.168c39.68-17.066667%2081.92-25.6%20126.890666-25.6%2044.928%200%2087.296%208.533333%20127.061334%2025.6%2039.722667%2017.066667%2074.752%2040.789333%20105.002666%2071.168a339.2%20339.2%200%200%201%2071.338667%20105.173333c17.28%2039.765333%2025.898667%2082.133333%2025.898667%20127.061333a316.714667%20316.714667%200%200%201-25.728%20127.232%20337.322667%20337.322667%200%200%201-176.213334%20176.213334z%20m-178.901333-149.930667a32.128%2032.128%200%200%200%2016.256%204.053334c11.733333%200%2021.12-5.546667%2028.16-16.597334l150.058666-235.434666c2.261333-3.413333%204.266667-6.954667%205.930667-10.666667a26.453333%2026.453333%200%200%200%202.56-11.050667%2023.466667%2023.466667%200%200%200-8.96-19.114666%2031.146667%2031.146667%200%200%200-20.181333-7.296c-9.728%200-17.877333%205.290667-24.405334%2015.914666l-134.485333%20215.808-63.701333-81.28a35.413333%2035.413333%200%200%200-11.690667-10.88%2028.16%2028.16%200%200%200-13.056-3.029333%2026.325333%2026.325333%200%200%200-19.84%208.32%2028.032%2028.032%200%200%200-7.936%2020.138667c0%207.466667%202.816%2014.677333%208.448%2021.674666l79.274667%2097.28c4.309333%205.376%208.832%209.472%2013.568%2012.16z%22%2F%3E%3C%2Fsvg%3E";
|
|
2
|
+
export declare const Alarm: "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20class%3D%22icon%22%20width%3D%22200px%22%20height%3D%22200.00px%22%20viewBox%3D%220%200%201024%201024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M512%2053.248c129.707%203.413%20237.739%2048.299%20324.096%20134.656S967.339%20382.293%20970.752%20512c-3.413%20129.707-48.299%20237.739-134.656%20324.096S641.707%20967.339%20512%20970.752c-129.707-3.413-237.739-48.299-324.096-134.656S56.661%20641.707%2053.248%20512c3.413-129.707%2048.299-237.739%20134.656-324.096S382.293%2056.661%20512%2053.248z%20m0%20196.608c-17.749%200-32.427%206.485-44.032%2019.456-11.605%2012.971-16.725%2028.331-15.36%2046.08l23.552%20262.144c1.365%209.557%205.291%2017.237%2011.776%2023.04%206.485%205.803%2014.507%208.704%2024.064%208.704s17.579-2.901%2024.064-8.704c6.485-5.803%2010.411-13.483%2011.776-23.04l23.552-262.144c1.365-17.749-3.755-33.109-15.36-46.08-11.605-12.971-26.283-19.456-44.032-19.456z%20m0%20524.288c15.019-0.683%2027.477-5.803%2037.376-15.36%209.899-9.557%2014.848-21.845%2014.848-36.864%200-15.019-4.949-27.477-14.848-37.376-9.899-9.899-22.357-14.848-37.376-14.848-15.019%200-27.477%204.949-37.376%2014.848-9.899%209.899-14.848%2022.357-14.848%2037.376%200%2015.019%204.949%2027.307%2014.848%2036.864%209.899%209.557%2022.357%2014.677%2037.376%2015.36z%22%2F%3E%3C%2Fsvg%3E";
|
|
3
|
+
export declare const Error: "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20t%3D%221730686926977%22%20class%3D%22icon%22%20viewBox%3D%220%200%201024%201024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20p-id%3D%225067%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22200%22%20height%3D%22200%22%3E%3Cpath%20d%3D%22M512%20102.4a409.6%20409.6%200%201%201%200%20819.2%20409.6%20409.6%200%200%201%200-819.2z%20m159.2832%20250.3168a40.96%2040.96%200%200%200-54.0672-3.4304l-3.84%203.4304L512%20454.0416l-101.376-101.376-3.584-3.1232a40.96%2040.96%200%200%200-57.7536%2057.2416l3.4304%203.84L454.0416%20512l-101.376%20101.376-3.1232%203.584a40.96%2040.96%200%200%200%2057.2416%2057.7536l3.84-3.4304L512%20569.9584l101.376%20101.376%203.584%203.1232a40.96%2040.96%200%200%200%2057.7536-57.2416l-3.4304-3.84L569.9584%20512l101.376-101.376%203.1232-3.584a40.96%2040.96%200%200%200-3.1744-54.3232z%22%20p-id%3D%225068%22%2F%3E%3C%2Fsvg%3E";
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
exports.Error = exports.Alarm = exports.Success = void 0;
|
|
7
|
+
var Warning_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Warning"));
|
|
8
|
+
var CheckmarkCircle_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/CheckmarkCircle"));
|
|
9
|
+
var Close_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Close"));
|
|
10
|
+
exports.Success = CheckmarkCircle_1.default;
|
|
11
|
+
exports.Alarm = Warning_1.default;
|
|
12
|
+
exports.Error = Close_1.default;
|
|
@@ -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-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,12px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,calc(100vw - 48px));min-width:var(--toast-min-width,56px);position:fixed;right:-1000px;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{padding:var(--toast-text-padding,14px 16px)}.smart-toast--icon{min-height:var(--toast-default-min-height,56px);padding:var(--toast-default-padding,22px 14px 14px);width:var(--toast-default-width,56px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{font-size:var(--toast-font-size,14px);padding-top:8px;text-align:center}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|