@tuya-miniapp/smart-ui 1.3.1-beta-2 → 1.3.1-beta-3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/calendar/calendar.wxml +13 -8
  2. package/dist/calendar/components/header/index.js +6 -2
  3. package/dist/calendar/components/header/index.wxml +1 -1
  4. package/dist/calendar/components/month/index.css +1 -1
  5. package/dist/calendar/components/month/index.wxss +1 -1
  6. package/dist/calendar/components/month-list/index.css +1 -1
  7. package/dist/calendar/components/month-list/index.js +24 -26
  8. package/dist/calendar/components/month-list/index.wxml +13 -9
  9. package/dist/calendar/components/month-list/index.wxss +1 -1
  10. package/dist/calendar/components/year-list/index.css +1 -1
  11. package/dist/calendar/components/year-list/index.js +15 -2
  12. package/dist/calendar/components/year-list/index.wxml +7 -1
  13. package/dist/calendar/components/year-list/index.wxss +1 -1
  14. package/dist/calendar/index.js +25 -27
  15. package/dist/calendar/index.wxs +1 -1
  16. package/dist/calendar/utils.d.ts +4 -0
  17. package/dist/calendar/utils.js +28 -0
  18. package/dist/notice-bar/index.css +1 -1
  19. package/dist/notice-bar/index.wxss +1 -1
  20. package/dist/search/index.css +1 -1
  21. package/dist/search/index.js +1 -5
  22. package/dist/search/index.wxml +1 -1
  23. package/dist/search/index.wxss +1 -1
  24. package/dist/tabs/index.css +1 -1
  25. package/dist/tabs/index.wxss +1 -1
  26. package/dist/toast/toast.js +2 -0
  27. package/dist/wxs/style.wxs +0 -7
  28. package/lib/calendar/calendar.wxml +13 -8
  29. package/lib/calendar/components/header/index.js +6 -2
  30. package/lib/calendar/components/header/index.wxml +1 -1
  31. package/lib/calendar/components/month/index.css +1 -1
  32. package/lib/calendar/components/month/index.wxss +1 -1
  33. package/lib/calendar/components/month-list/index.css +1 -1
  34. package/lib/calendar/components/month-list/index.js +24 -26
  35. package/lib/calendar/components/month-list/index.wxml +13 -9
  36. package/lib/calendar/components/month-list/index.wxss +1 -1
  37. package/lib/calendar/components/year-list/index.css +1 -1
  38. package/lib/calendar/components/year-list/index.js +15 -2
  39. package/lib/calendar/components/year-list/index.wxml +7 -1
  40. package/lib/calendar/components/year-list/index.wxss +1 -1
  41. package/lib/calendar/index.js +24 -26
  42. package/lib/calendar/index.wxs +1 -1
  43. package/lib/calendar/utils.d.ts +4 -0
  44. package/lib/calendar/utils.js +30 -1
  45. package/lib/notice-bar/index.css +1 -1
  46. package/lib/notice-bar/index.wxss +1 -1
  47. package/lib/search/index.css +1 -1
  48. package/lib/search/index.js +1 -5
  49. package/lib/search/index.wxml +1 -1
  50. package/lib/search/index.wxss +1 -1
  51. package/lib/tabs/index.css +1 -1
  52. package/lib/tabs/index.wxss +1 -1
  53. package/lib/toast/toast.js +2 -0
  54. package/lib/wxs/style.wxs +0 -7
  55. package/package.json +15 -3
@@ -1 +1 @@
1
- @import '../common/index.css';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.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{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.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{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,32px);padding:2px}.smart-tabs__nav--card .smart-tab{color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 32px) - 2px)}.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{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:6px;left:0;opacity:0;position:absolute;top:0;z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%}.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--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;padding:0 5px;position:relative;text-align:center}.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}
1
+ @import '../common/index.css';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.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{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.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{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,32px);padding:2px}.smart-tabs__nav--card .smart-tab{color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 32px) - 2px)}.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{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);left:0;opacity:0;position:absolute;top:0;z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%}.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--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;padding:0 5px;position:relative;text-align:center}.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}
@@ -1 +1 @@
1
- @import '../common/index.wxss';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.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{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.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{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,32px);padding:2px}.smart-tabs__nav--card .smart-tab{color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 32px) - 2px)}.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{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:6px;left:0;opacity:0;position:absolute;top:0;z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%}.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--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;padding:0 5px;position:relative;text-align:center}.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}
1
+ @import '../common/index.wxss';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.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{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.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{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,32px);padding:2px}.smart-tabs__nav--card .smart-tab{color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 32px) - 2px)}.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{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);left:0;opacity:0;position:absolute;top:0;z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%}.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--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;padding:0 5px;position:relative;text-align:center}.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}
@@ -26,6 +26,7 @@ var defaultOptions = {
26
26
  width: '100%',
27
27
  };
28
28
  var queue = [];
29
+ // @ts-expect-error
29
30
  var currentOptions = __assign({}, defaultOptions);
30
31
  function parseOptions(message) {
31
32
  return (0, validator_1.isObj)(message) ? message : { message: message };
@@ -80,6 +81,7 @@ Toast.setDefaultOptions = function (options) {
80
81
  Object.assign(currentOptions, options);
81
82
  };
82
83
  Toast.resetDefaultOptions = function () {
84
+ // @ts-expect-error
83
85
  currentOptions = __assign({}, defaultOptions);
84
86
  };
85
87
  exports.default = Toast;
package/lib/wxs/style.wxs CHANGED
@@ -1,10 +1,3 @@
1
- /*
2
- * @Author: mjh
3
- * @Date: 2024-08-02 11:38:15
4
- * @LastEditors: mjh
5
- * @LastEditTime: 2024-10-31 15:52:59
6
- * @Description:
7
- */
8
1
  /* eslint-disable */
9
2
  var object = require('./object.wxs');
10
3
  var array = require('./array.wxs');
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "1.3.1-beta-2",
3
+ "version": "1.3.1-beta-3",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",
7
7
  "description": "轻量、可靠的智能小程序 UI 组件库",
8
8
  "scripts": {
9
9
  "dev": "NODE_OPTIONS=--no-experimental-fetch node build/dev.mjs",
10
- "lint": "eslint ./packages --ext .js,.ts --fix && stylelint \"packages/**/*.less\" --fix",
10
+ "lint": "eslint ./packages --ext .js,.ts --fix",
11
+ "lint:style": "stylelint \"packages/**/*.less\" --fix",
11
12
  "prepare": "husky install",
12
13
  "release": "sh build/release.sh",
13
14
  "build:icon": "yarn && node build/generate-icon/index.js",
@@ -20,6 +21,12 @@
20
21
  "dist",
21
22
  "lib"
22
23
  ],
24
+ "husky": {
25
+ "hooks": {
26
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --config commitlint.config.js",
27
+ "pre-commit": "lint-staged"
28
+ }
29
+ },
23
30
  "lint-staged": {
24
31
  "*.{ts,js}": [
25
32
  "eslint --fix",
@@ -33,10 +40,14 @@
33
40
  "devDependencies": {
34
41
  "@babel/plugin-transform-modules-commonjs": "^7.16.0",
35
42
  "@babel/preset-typescript": "^7.16.0",
43
+ "@commitlint/cli": "19.2.0",
44
+ "@commitlint/config-conventional": "19.1.0",
36
45
  "@types/fs-extra": "^11.0.4",
37
46
  "@types/jest": "^27.0.2",
38
- "@vant/eslint-config": "^4.0.0",
39
47
  "@vant/stylelint-config": "^1.4.2",
48
+ "eslint-config-tuya-panel": "^0.4.2",
49
+ "eslint-plugin-literal-check": "^0.1.2",
50
+ "eslint-plugin-prettier": "^5.2.1",
40
51
  "fs-extra": "^11.2.0",
41
52
  "gulp": "^4.0.2",
42
53
  "gulp-insert": "^0.5.0",
@@ -51,6 +62,7 @@
51
62
  "miniprogram-api-typings": "^3.1.6",
52
63
  "miniprogram-ci": "^1.6.1",
53
64
  "miniprogram-simulate": "^1.4.2",
65
+ "stylelint": "^13.0.0",
54
66
  "svgo": "^3.2.0",
55
67
  "ts-jest": "^27.0.7",
56
68
  "tscpaths": "^0.0.9",