@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,75 @@
|
|
|
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 Check_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Check"));
|
|
7
|
+
var version_1 = require("../common/version");
|
|
8
|
+
var component_1 = require("../common/component");
|
|
9
|
+
var relation_1 = require("../common/relation");
|
|
10
|
+
(0, component_1.SmartComponent)({
|
|
11
|
+
field: true,
|
|
12
|
+
relation: (0, relation_1.useParent)('radio-group', function () {
|
|
13
|
+
this.updateFromParent();
|
|
14
|
+
}),
|
|
15
|
+
classes: ['icon-class', 'label-class'],
|
|
16
|
+
props: {
|
|
17
|
+
name: null,
|
|
18
|
+
value: null,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
useIconSlot: Boolean,
|
|
21
|
+
checkedColor: String,
|
|
22
|
+
labelPosition: {
|
|
23
|
+
type: String,
|
|
24
|
+
value: 'right',
|
|
25
|
+
},
|
|
26
|
+
labelDisabled: Boolean,
|
|
27
|
+
shape: {
|
|
28
|
+
type: String,
|
|
29
|
+
value: 'round',
|
|
30
|
+
},
|
|
31
|
+
iconSize: {
|
|
32
|
+
type: null,
|
|
33
|
+
value: 24,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
data: {
|
|
37
|
+
direction: '',
|
|
38
|
+
parentDisabled: false,
|
|
39
|
+
icon: Check_1.default,
|
|
40
|
+
preventDefault: false,
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
updateFromParent: function () {
|
|
44
|
+
if (!this.parent) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
var _a = this.parent.data, value = _a.value, parentDisabled = _a.disabled, direction = _a.direction, preventDefault = _a.preventDefault;
|
|
48
|
+
this.setData({
|
|
49
|
+
value: value,
|
|
50
|
+
direction: direction,
|
|
51
|
+
parentDisabled: parentDisabled,
|
|
52
|
+
preventDefault: preventDefault,
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
emitChange: function (value) {
|
|
56
|
+
var instance = this.parent || this;
|
|
57
|
+
instance.$emit('input', value);
|
|
58
|
+
instance.$emit('change', value);
|
|
59
|
+
if ((0, version_1.canIUseModel)() && !this.properties.preventDefault) {
|
|
60
|
+
instance.setData({ value: value });
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
onChange: function () {
|
|
64
|
+
if (!this.data.disabled && !this.data.parentDisabled) {
|
|
65
|
+
this.emitChange(this.data.name);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
onClickLabel: function () {
|
|
69
|
+
var _a = this.data, disabled = _a.disabled, parentDisabled = _a.parentDisabled, labelDisabled = _a.labelDisabled, name = _a.name;
|
|
70
|
+
if (!(disabled || parentDisabled) && !labelDisabled) {
|
|
71
|
+
this.emitChange(name);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<view class="{{ utils.bem('radio', [direction]) }} custom-class">
|
|
5
|
+
<view
|
|
6
|
+
wx:if="{{ labelPosition === 'left' }}"
|
|
7
|
+
class="{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class"
|
|
8
|
+
bindtap="onClickLabel"
|
|
9
|
+
>
|
|
10
|
+
<slot />
|
|
11
|
+
</view>
|
|
12
|
+
<view class="smart-radio__icon-wrap" style="font-size: {{ utils.addUnit(iconSize) }}" bindtap="onChange">
|
|
13
|
+
<slot wx:if="{{ useIconSlot }}" name="icon" />
|
|
14
|
+
<smart-icon
|
|
15
|
+
wx:else
|
|
16
|
+
name="{{ icon }}"
|
|
17
|
+
size="1em"
|
|
18
|
+
color="{{ value === name ? '#fff' : 'none'}}"
|
|
19
|
+
class="{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}"
|
|
20
|
+
style="{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}"
|
|
21
|
+
custom-class="icon-class"
|
|
22
|
+
custom-style="{{ computed.iconCustomStyle({ iconSize }) }}"
|
|
23
|
+
/>
|
|
24
|
+
</view>
|
|
25
|
+
<view
|
|
26
|
+
wx:if="{{ labelPosition === 'right' }}"
|
|
27
|
+
class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}"
|
|
28
|
+
bindtap="onClickLabel"
|
|
29
|
+
>
|
|
30
|
+
<slot />
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
|
4
|
+
|
|
5
|
+
function iconStyle(data) {
|
|
6
|
+
var styles = {
|
|
7
|
+
'font-size': addUnit(data.iconSize),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
if (
|
|
11
|
+
data.checkedColor &&
|
|
12
|
+
!(data.disabled || data.parentDisabled) &&
|
|
13
|
+
data.value === data.name
|
|
14
|
+
) {
|
|
15
|
+
styles['border-color'] = data.checkedColor;
|
|
16
|
+
styles['background-color'] = data.checkedColor;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return style(styles);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function iconCustomStyle(data) {
|
|
23
|
+
return style({
|
|
24
|
+
'line-height': addUnit(data.iconSize),
|
|
25
|
+
'font-size': '.8em',
|
|
26
|
+
display: 'block',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = {
|
|
31
|
+
iconStyle: iconStyle,
|
|
32
|
+
iconCustomStyle: iconCustomStyle,
|
|
33
|
+
};
|
|
@@ -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-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.smart-radio__icon-wrap{display:flex;flex:none}.smart-radio--horizontal{margin-right:var(--padding-sm,12px)}.smart-radio__icon{align-items:center;border:2px solid var(--radio-border-color,var(--app-B6-N6,rgba(0,0,0,.2)));border-radius:var(--radio-border-radius,4px);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,24px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border,background-color;width:1em}.smart-radio__icon--round{border-radius:100%}.smart-radio__icon--checked{background-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));border-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));color:#fff}.smart-radio__icon--disabled{opacity:.3}.smart-radio__label{word-wrap:break-word;color:var(--radio-label-color,var(--app-B6-N1,#000));font-size:var(--radio-label-size,12px);padding-left:var(--radio-label-margin,10px)}.smart-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.smart-radio__label--disabled{color:var(--radio-disabled-label-color,var(--app-B6-N5,rgba(0,0,0,.3)))}.smart-radio__label:empty{margin:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';.smart-radio-group--horizontal{display:flex;flex-wrap:wrap}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var component_1 = require("../common/component");
|
|
4
|
+
var relation_1 = require("../common/relation");
|
|
5
|
+
(0, component_1.SmartComponent)({
|
|
6
|
+
field: true,
|
|
7
|
+
relation: (0, relation_1.useChildren)('radio'),
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: null,
|
|
11
|
+
observer: 'updateChildren',
|
|
12
|
+
},
|
|
13
|
+
preventDefault: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
value: false,
|
|
16
|
+
observer: 'updateChildren',
|
|
17
|
+
},
|
|
18
|
+
direction: String,
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
observer: 'updateChildren',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
updateChildren: function () {
|
|
26
|
+
this.children.forEach(function (child) { return child.updateFromParent(); });
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.smart-radio-group--horizontal{display:flex;flex-wrap:wrap}
|
|
@@ -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-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.smart-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.smart-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.smart-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.smart-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.smart-rate__icon--full,.smart-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.smart-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var CheckmarkCircle_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/CheckmarkCircle"));
|
|
18
|
+
var CheckmarkCircleVoid_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/CheckmarkCircleVoid"));
|
|
19
|
+
var utils_1 = require("../common/utils");
|
|
20
|
+
var component_1 = require("../common/component");
|
|
21
|
+
var version_1 = require("../common/version");
|
|
22
|
+
(0, component_1.SmartComponent)({
|
|
23
|
+
field: true,
|
|
24
|
+
classes: ['icon-class'],
|
|
25
|
+
props: {
|
|
26
|
+
value: {
|
|
27
|
+
type: Number,
|
|
28
|
+
observer: function (value) {
|
|
29
|
+
if (value !== this.data.innerValue) {
|
|
30
|
+
this.setData({ innerValue: value });
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
readonly: Boolean,
|
|
35
|
+
disabled: Boolean,
|
|
36
|
+
allowHalf: Boolean,
|
|
37
|
+
size: null,
|
|
38
|
+
icon: {
|
|
39
|
+
type: String,
|
|
40
|
+
value: CheckmarkCircle_1.default,
|
|
41
|
+
},
|
|
42
|
+
voidIcon: {
|
|
43
|
+
type: String,
|
|
44
|
+
value: CheckmarkCircleVoid_1.default,
|
|
45
|
+
},
|
|
46
|
+
color: {
|
|
47
|
+
type: String,
|
|
48
|
+
value: 'var(--app-M4)',
|
|
49
|
+
},
|
|
50
|
+
voidColor: {
|
|
51
|
+
type: String,
|
|
52
|
+
value: 'var(--app-B3-N7)',
|
|
53
|
+
},
|
|
54
|
+
disabledColor: {
|
|
55
|
+
type: String,
|
|
56
|
+
value: 'var(--app-B3-N7)',
|
|
57
|
+
},
|
|
58
|
+
count: {
|
|
59
|
+
type: Number,
|
|
60
|
+
value: 5,
|
|
61
|
+
observer: function (value) {
|
|
62
|
+
this.setData({ innerCountArray: Array.from({ length: value }) });
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
gutter: null,
|
|
66
|
+
touchable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
value: true,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
data: {
|
|
72
|
+
innerValue: 0,
|
|
73
|
+
innerCountArray: Array.from({ length: 5 }),
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
onSelect: function (event) {
|
|
77
|
+
var _this = this;
|
|
78
|
+
var data = this.data;
|
|
79
|
+
var score = event.currentTarget.dataset.score;
|
|
80
|
+
if (!data.disabled && !data.readonly) {
|
|
81
|
+
this.setData({ innerValue: score + 1 });
|
|
82
|
+
if ((0, version_1.canIUseModel)()) {
|
|
83
|
+
this.setData({ value: score + 1 });
|
|
84
|
+
}
|
|
85
|
+
wx.nextTick(function () {
|
|
86
|
+
_this.$emit('input', score + 1);
|
|
87
|
+
_this.$emit('change', score + 1);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
onTouchMove: function (event) {
|
|
92
|
+
var _this = this;
|
|
93
|
+
var touchable = this.data.touchable;
|
|
94
|
+
if (!touchable)
|
|
95
|
+
return;
|
|
96
|
+
var clientX = event.touches[0].clientX;
|
|
97
|
+
(0, utils_1.getAllRect)(this, '.smart-rate__icon').then(function (list) {
|
|
98
|
+
var target = list
|
|
99
|
+
.sort(function (cur, next) { return cur.dataset.score - next.dataset.score; })
|
|
100
|
+
.find(function (item) { return clientX >= item.left && clientX <= item.right; });
|
|
101
|
+
if (target != null) {
|
|
102
|
+
_this.onSelect(__assign(__assign({}, event), { currentTarget: target }));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="../wxs/style.wxs" module="style" />
|
|
3
|
+
|
|
4
|
+
<view
|
|
5
|
+
class="{{ utils.bem('rate') }} custom-class"
|
|
6
|
+
bind:touchmove="onTouchMove"
|
|
7
|
+
>
|
|
8
|
+
<view
|
|
9
|
+
class="{{ utils.bem('rate__item') }}"
|
|
10
|
+
wx:for="{{ innerCountArray }}"
|
|
11
|
+
wx:key="index"
|
|
12
|
+
style="{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}"
|
|
13
|
+
>
|
|
14
|
+
<smart-icon
|
|
15
|
+
name="{{ index + 1 <= innerValue ? icon : voidIcon }}"
|
|
16
|
+
class="{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}"
|
|
17
|
+
style="{{ style({ fontSize: utils.addUnit(size) }) }}"
|
|
18
|
+
custom-class="icon-class"
|
|
19
|
+
data-score="{{ index }}"
|
|
20
|
+
color="{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}"
|
|
21
|
+
bind:click="onSelect"
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<smart-icon
|
|
25
|
+
wx:if="{{ allowHalf }}"
|
|
26
|
+
name="{{ index + 0.5 <= innerValue ? icon : voidIcon }}"
|
|
27
|
+
class="{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}"
|
|
28
|
+
style="{{ style({ fontSize: utils.addUnit(size) }) }}"
|
|
29
|
+
custom-class="icon-class"
|
|
30
|
+
data-score="{{ index - 0.5 }}"
|
|
31
|
+
color="{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}"
|
|
32
|
+
bind:click="onSelect"
|
|
33
|
+
/>
|
|
34
|
+
</view>
|
|
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))}.smart-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.smart-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.smart-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.smart-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.smart-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.smart-rate__icon--full,.smart-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.smart-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.css';.smart-row:after{clear:both;content:"";display:table}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/row/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var component_1 = require("../common/component");
|
|
4
|
+
var relation_1 = require("../common/relation");
|
|
5
|
+
(0, component_1.SmartComponent)({
|
|
6
|
+
relation: (0, relation_1.useChildren)('col', function (target) {
|
|
7
|
+
var gutter = this.data.gutter;
|
|
8
|
+
if (gutter) {
|
|
9
|
+
target.setData({ gutter: gutter });
|
|
10
|
+
}
|
|
11
|
+
}),
|
|
12
|
+
props: {
|
|
13
|
+
gutter: {
|
|
14
|
+
type: Number,
|
|
15
|
+
observer: 'setGutter',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
setGutter: function () {
|
|
20
|
+
var _this = this;
|
|
21
|
+
this.children.forEach(function (col) {
|
|
22
|
+
col.setData(_this.data);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
|
4
|
+
|
|
5
|
+
function rootStyle(data) {
|
|
6
|
+
if (!data.gutter) {
|
|
7
|
+
return '';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return style({
|
|
11
|
+
'margin-right': addUnit(-data.gutter / 2),
|
|
12
|
+
'margin-left': addUnit(-data.gutter / 2),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
rootStyle: rootStyle,
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.smart-row:after{clear:both;content:"";display:table}
|
|
@@ -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-search{--field-left-icon-margin-right:4px;--field-left-body-padding-right:0;align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));color:var(--search-label-color,var(--app-B4-N1,#000));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
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 version_1 = require("../common/version");
|
|
8
|
+
var Search_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Search"));
|
|
9
|
+
var Close_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Close"));
|
|
10
|
+
(0, component_1.SmartComponent)({
|
|
11
|
+
field: true,
|
|
12
|
+
classes: ['field-class', 'input-class', 'cancel-class'],
|
|
13
|
+
props: {
|
|
14
|
+
value: {
|
|
15
|
+
type: String,
|
|
16
|
+
value: '',
|
|
17
|
+
},
|
|
18
|
+
label: String,
|
|
19
|
+
focus: Boolean,
|
|
20
|
+
error: Boolean,
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
readonly: Boolean,
|
|
23
|
+
inputAlign: {
|
|
24
|
+
type: String,
|
|
25
|
+
value: 'left',
|
|
26
|
+
},
|
|
27
|
+
showAction: Boolean,
|
|
28
|
+
useActionSlot: Boolean,
|
|
29
|
+
useLeftIconSlot: Boolean,
|
|
30
|
+
useRightIconSlot: Boolean,
|
|
31
|
+
leftIcon: {
|
|
32
|
+
type: String,
|
|
33
|
+
value: Search_1.default,
|
|
34
|
+
},
|
|
35
|
+
rightIcon: String,
|
|
36
|
+
placeholder: String,
|
|
37
|
+
placeholderStyle: String,
|
|
38
|
+
searchText: String,
|
|
39
|
+
background: String,
|
|
40
|
+
actionText: {
|
|
41
|
+
type: String,
|
|
42
|
+
value: 'Cancel',
|
|
43
|
+
},
|
|
44
|
+
maxlength: {
|
|
45
|
+
type: Number,
|
|
46
|
+
value: -1,
|
|
47
|
+
},
|
|
48
|
+
shape: {
|
|
49
|
+
type: String,
|
|
50
|
+
value: 'square',
|
|
51
|
+
},
|
|
52
|
+
clearable: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
value: true,
|
|
55
|
+
},
|
|
56
|
+
clearTrigger: {
|
|
57
|
+
type: String,
|
|
58
|
+
value: 'focus',
|
|
59
|
+
},
|
|
60
|
+
clearIcon: {
|
|
61
|
+
type: String,
|
|
62
|
+
value: Close_1.default,
|
|
63
|
+
},
|
|
64
|
+
cursorSpacing: {
|
|
65
|
+
type: Number,
|
|
66
|
+
value: 0,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
onChange: function (event) {
|
|
71
|
+
this.setData({ value: event.detail });
|
|
72
|
+
this.$emit('change', event.detail);
|
|
73
|
+
},
|
|
74
|
+
onCancel: function () {
|
|
75
|
+
var _this = this;
|
|
76
|
+
/**
|
|
77
|
+
* 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
|
|
78
|
+
*/
|
|
79
|
+
setTimeout(function () {
|
|
80
|
+
if ((0, version_1.canIUseModel)()) {
|
|
81
|
+
_this.setData({ value: '' });
|
|
82
|
+
}
|
|
83
|
+
_this.$emit('cancel');
|
|
84
|
+
_this.$emit('change', '');
|
|
85
|
+
}, 200);
|
|
86
|
+
},
|
|
87
|
+
onSearch: function (event) {
|
|
88
|
+
this.$emit('search', event.detail);
|
|
89
|
+
},
|
|
90
|
+
goSearch: function () {
|
|
91
|
+
this.$emit('search', this.data.value);
|
|
92
|
+
},
|
|
93
|
+
onFocus: function (event) {
|
|
94
|
+
this.$emit('focus', event.detail);
|
|
95
|
+
},
|
|
96
|
+
onBlur: function (event) {
|
|
97
|
+
this.$emit('blur', event.detail);
|
|
98
|
+
},
|
|
99
|
+
onClear: function (event) {
|
|
100
|
+
this.$emit('clear', event.detail);
|
|
101
|
+
},
|
|
102
|
+
onClickInput: function (event) {
|
|
103
|
+
this.$emit('click-input', event.detail);
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
|
|
3
|
+
<view
|
|
4
|
+
class="{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class"
|
|
5
|
+
style="background: {{ background }}"
|
|
6
|
+
>
|
|
7
|
+
|
|
8
|
+
<view class="{{ utils.bem('search__content', [shape]) }}">
|
|
9
|
+
<view class="smart-search__label" wx:if="{{ label }}">{{ label }}</view>
|
|
10
|
+
<slot wx:else name="label" />
|
|
11
|
+
|
|
12
|
+
<smart-field
|
|
13
|
+
type="search"
|
|
14
|
+
right-icon="{{ !useRightIconSlot ? rightIcon : '' }}"
|
|
15
|
+
focus="{{ focus }}"
|
|
16
|
+
error="{{ error }}"
|
|
17
|
+
border="{{ false }}"
|
|
18
|
+
confirm-type="search"
|
|
19
|
+
class="smart-search__field field-class"
|
|
20
|
+
value="{{ value }}"
|
|
21
|
+
disabled="{{ disabled }}"
|
|
22
|
+
readonly="{{ readonly }}"
|
|
23
|
+
clearable="{{ clearable }}"
|
|
24
|
+
clear-trigger="{{ clearTrigger }}"
|
|
25
|
+
clear-icon="{{ clearIcon }}"
|
|
26
|
+
maxlength="{{ maxlength }}"
|
|
27
|
+
input-align="{{ inputAlign }}"
|
|
28
|
+
input-class="smart-search__input input-class"
|
|
29
|
+
placeholder="{{ placeholder }}"
|
|
30
|
+
placeholder-style="{{ placeholderStyle }}"
|
|
31
|
+
cursor-spacing="{{ cursorSpacing }}"
|
|
32
|
+
custom-style="padding: 0; background-color: transparent;"
|
|
33
|
+
bind:blur="onBlur"
|
|
34
|
+
bind:focus="onFocus"
|
|
35
|
+
bind:change="onChange"
|
|
36
|
+
bind:confirm="onSearch"
|
|
37
|
+
bind:clear="onClear"
|
|
38
|
+
bind:click-input="onClickInput"
|
|
39
|
+
>
|
|
40
|
+
<smart-icon wx:if="{{ !useLeftIconSlot && leftIcon }}" size="18" name="{{ leftIcon }}" custom-class="smart-search__field__left-icon" slot="left-icon" />
|
|
41
|
+
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
|
|
42
|
+
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
|
|
43
|
+
<view wx:if="{{ searchText }}" hover-class="smart-search__hover" bind:tap="goSearch" class="smart-search__submit" slot="button" >{{ searchText }}</view>
|
|
44
|
+
<slot name="search-button" slot="button" />
|
|
45
|
+
</smart-field>
|
|
46
|
+
</view>
|
|
47
|
+
|
|
48
|
+
<view
|
|
49
|
+
wx:if="{{ showAction || useActionSlot }}"
|
|
50
|
+
class="smart-search__action"
|
|
51
|
+
hover-class="smart-search__action--hover"
|
|
52
|
+
hover-stay-time="70"
|
|
53
|
+
>
|
|
54
|
+
<slot wx:if="{{ useActionSlot }}" name="action" />
|
|
55
|
+
<view wx:else bind:tap="onCancel" class="smart-search__action-button cancel-class">{{ actionText }}</view>
|
|
56
|
+
</view>
|
|
57
|
+
</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-search{--field-left-icon-margin-right:4px;--field-left-body-padding-right:0;align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));color:var(--search-label-color,var(--app-B4-N1,#000));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
|
|
@@ -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-sidebar{width:var(--sidebar-width,80px)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|