@tuya-miniapp/smart-ui 2.5.1-beta-1 → 2.5.1-beta-2

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.
Files changed (113) hide show
  1. package/dist/action-sheet/index.js +1 -3
  2. package/dist/action-sheet/index.wxml +1 -1
  3. package/dist/bottom-sheet/index.css +1 -1
  4. package/dist/bottom-sheet/index.js +4 -4
  5. package/dist/bottom-sheet/index.wxml +1 -7
  6. package/dist/bottom-sheet/index.wxss +1 -1
  7. package/dist/button/index.js +7 -2
  8. package/dist/calendar/calendar.wxml +1 -1
  9. package/dist/calendar/index.wxs +3 -3
  10. package/dist/calendar-header/index.js +2 -2
  11. package/dist/calendar-month/index.wxs +2 -2
  12. package/dist/cascader/index.js +1 -1
  13. package/dist/cell/index.js +4 -4
  14. package/dist/checkbox/index.js +1 -1
  15. package/dist/circle/index.rjs +1 -2
  16. package/dist/common/appLog.js +1 -1
  17. package/dist/custom-keyboard/index.wxml +7 -3
  18. package/dist/dialog/index.css +1 -1
  19. package/dist/dialog/index.js +1 -1
  20. package/dist/dialog/index.wxss +1 -1
  21. package/dist/dropdown-item/index.js +3 -3
  22. package/dist/dropdown-menu/index.js +4 -4
  23. package/dist/field/index.js +1 -1
  24. package/dist/image/index.js +2 -2
  25. package/dist/image/index.wxs +1 -1
  26. package/dist/loading/index.wxs +2 -2
  27. package/dist/mixins/transition.js +6 -4
  28. package/dist/nav-bar/index.js +1 -1
  29. package/dist/notice-bar/index.js +2 -2
  30. package/dist/picker-column/index.js +1 -1
  31. package/dist/picker-column/index.wxs +4 -4
  32. package/dist/popover/index.js +0 -5
  33. package/dist/popover/index.wxml +2 -10
  34. package/dist/popup/index.css +1 -1
  35. package/dist/popup/index.js +1 -1
  36. package/dist/popup/index.wxs +1 -1
  37. package/dist/popup/index.wxss +1 -1
  38. package/dist/radio/index.js +2 -2
  39. package/dist/rate/index.js +2 -2
  40. package/dist/search/index.js +2 -2
  41. package/dist/skeleton/index.css +1 -1
  42. package/dist/skeleton/index.wxss +1 -1
  43. package/dist/stepper/index.js +3 -3
  44. package/dist/steps/index.js +1 -1
  45. package/dist/switch/index.css +1 -1
  46. package/dist/switch/index.wxss +1 -1
  47. package/dist/tag/index.js +1 -1
  48. package/dist/toast/icons.js +3 -3
  49. package/dist/toast/index.css +1 -1
  50. package/dist/toast/index.wxml +1 -1
  51. package/dist/toast/index.wxss +1 -1
  52. package/dist/toast/toast.js +8 -4
  53. package/dist/tree-select/index.js +2 -2
  54. package/lib/action-sheet/index.js +2 -4
  55. package/lib/action-sheet/index.wxml +1 -1
  56. package/lib/bottom-sheet/index.css +1 -1
  57. package/lib/bottom-sheet/index.js +5 -5
  58. package/lib/bottom-sheet/index.wxml +1 -7
  59. package/lib/bottom-sheet/index.wxss +1 -1
  60. package/lib/button/index.js +7 -2
  61. package/lib/calendar/calendar.wxml +1 -1
  62. package/lib/calendar/index.wxs +3 -3
  63. package/lib/calendar-header/index.js +7 -4
  64. package/lib/calendar-month/index.wxs +2 -2
  65. package/lib/cascader/index.js +5 -2
  66. package/lib/cell/index.js +12 -9
  67. package/lib/checkbox/index.js +5 -2
  68. package/lib/circle/index.rjs +1 -2
  69. package/lib/common/appLog.js +1 -1
  70. package/lib/custom-keyboard/index.wxml +7 -3
  71. package/lib/dialog/index.css +1 -1
  72. package/lib/dialog/index.js +2 -2
  73. package/lib/dialog/index.wxss +1 -1
  74. package/lib/dropdown-item/index.js +4 -4
  75. package/lib/dropdown-menu/index.js +4 -4
  76. package/lib/field/index.js +5 -2
  77. package/lib/image/index.js +5 -2
  78. package/lib/image/index.wxs +1 -1
  79. package/lib/loading/index.wxs +2 -2
  80. package/lib/mixins/transition.js +10 -11
  81. package/lib/nav-bar/index.js +5 -2
  82. package/lib/notice-bar/index.js +7 -4
  83. package/lib/picker-column/index.js +2 -5
  84. package/lib/picker-column/index.wxs +4 -4
  85. package/lib/popover/index.js +0 -5
  86. package/lib/popover/index.wxml +2 -10
  87. package/lib/popup/index.css +1 -1
  88. package/lib/popup/index.js +6 -3
  89. package/lib/popup/index.wxs +1 -1
  90. package/lib/popup/index.wxss +1 -1
  91. package/lib/radio/index.js +5 -2
  92. package/lib/rate/index.js +7 -4
  93. package/lib/search/index.js +7 -4
  94. package/lib/skeleton/index.css +1 -1
  95. package/lib/skeleton/index.wxss +1 -1
  96. package/lib/stepper/index.js +6 -6
  97. package/lib/steps/index.js +5 -2
  98. package/lib/switch/index.css +1 -1
  99. package/lib/switch/index.wxss +1 -1
  100. package/lib/tag/index.js +5 -2
  101. package/lib/toast/icons.js +9 -6
  102. package/lib/toast/index.css +1 -1
  103. package/lib/toast/index.wxml +1 -1
  104. package/lib/toast/index.wxss +1 -1
  105. package/lib/toast/toast.js +8 -4
  106. package/lib/tree-select/index.js +5 -2
  107. package/package.json +1 -1
  108. package/dist/bottom-sheet/index.wxs +0 -12
  109. package/dist/common/ty.d.ts +0 -7
  110. package/dist/common/ty.js +0 -33
  111. package/lib/bottom-sheet/index.wxs +0 -12
  112. package/lib/common/ty.d.ts +0 -7
  113. package/lib/common/ty.js +0 -35
@@ -18,7 +18,6 @@ exports.contextRef = void 0;
18
18
  var appLog_1 = __importDefault(require("../common/appLog"));
19
19
  var utils_1 = require("../common/utils");
20
20
  var validator_1 = require("../common/validator");
21
- var ty_1 = __importDefault(require("../common/ty"));
22
21
  var defaultOptions = {
23
22
  type: 'text',
24
23
  mask: false,
@@ -49,6 +48,7 @@ exports.contextRef = {
49
48
  value: {},
50
49
  };
51
50
  function Toast(toastOptions) {
51
+ var _a, _b;
52
52
  var options = __assign(__assign({}, currentOptions), parseOptions(toastOptions));
53
53
  appLog_1.default.info('start open Toast');
54
54
  var context = (typeof options.context === 'function' ? options.context() : options.context) ||
@@ -65,9 +65,11 @@ function Toast(toastOptions) {
65
65
  delete options.context;
66
66
  delete options.selector;
67
67
  toast.clear = function () {
68
+ var _a;
68
69
  toast.setData({ show: false });
69
70
  if (options.nativeDisabled) {
70
- ty_1.default.nativeDisabled(false);
71
+ // @ts-ignore
72
+ (_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, false);
71
73
  }
72
74
  preDisRef.value[options.selector] = false;
73
75
  if (options.onClose) {
@@ -77,10 +79,12 @@ function Toast(toastOptions) {
77
79
  queueRef.value.push(toast);
78
80
  toast.setData(options);
79
81
  if (options.nativeDisabled) {
80
- ty_1.default.nativeDisabled(true);
82
+ // @ts-ignore
83
+ (_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, true);
81
84
  }
82
85
  if (preDisRef.value[options.selector] && !options.nativeDisabled) {
83
- ty_1.default.nativeDisabled(false);
86
+ // @ts-ignore
87
+ (_b = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _b === void 0 ? void 0 : _b.call(ty, false);
84
88
  }
85
89
  preDisRef.value[options.selector] = options.nativeDisabled || false;
86
90
  clearTimeout(toast.timer);
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var icons_1 = require("@tuya-miniapp/icons");
6
+ var Check_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Check"));
4
7
  var component_1 = require("../common/component");
5
8
  (0, component_1.SmartComponent)({
6
9
  classes: [
@@ -32,7 +35,7 @@ var component_1 = require("../common/component");
32
35
  },
33
36
  selectedIcon: {
34
37
  type: String,
35
- value: icons_1.Check,
38
+ value: Check_1.default,
36
39
  },
37
40
  },
38
41
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.5.1-beta-1",
3
+ "version": "2.5.1-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",
@@ -1,12 +0,0 @@
1
- function getHeight(contentHeight) {
2
- var height = contentHeight
3
- ? typeof contentHeight === 'number'
4
- ? contentHeight + 'rpx'
5
- : contentHeight
6
- : 'undefined';
7
- return 'height: ' + height + ';';
8
- }
9
-
10
- module.exports = {
11
- getHeight: getHeight,
12
- };
@@ -1,7 +0,0 @@
1
- declare const tyApi: {
2
- vibrateShort: (v: any) => void;
3
- nativeDisabled: (v: boolean) => void;
4
- getThemeInfo: () => any;
5
- isWX: () => boolean;
6
- };
7
- export default tyApi;
package/dist/common/ty.js DELETED
@@ -1,33 +0,0 @@
1
- const tyApi = {
2
- vibrateShort: (v) => {
3
- // @ts-ignore
4
- if (typeof ty !== 'undefined') {
5
- // @ts-ignore
6
- ty.vibrateShort(v);
7
- }
8
- else if (typeof wx !== 'undefined') {
9
- wx.vibrateShort(v);
10
- }
11
- },
12
- nativeDisabled: (v) => {
13
- var _a;
14
- // @ts-ignore
15
- if (typeof ty !== 'undefined') {
16
- // @ts-ignore
17
- (_a = ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, v);
18
- }
19
- },
20
- getThemeInfo: () => {
21
- var _a;
22
- // @ts-ignore
23
- if (typeof ty !== 'undefined') {
24
- // @ts-ignore
25
- return (_a = ty.getThemeInfo) === null || _a === void 0 ? void 0 : _a.call(ty);
26
- }
27
- },
28
- isWX: () => {
29
- // @ts-ignore
30
- return typeof ty === 'undefined' && !!wx;
31
- },
32
- };
33
- export default tyApi;
@@ -1,12 +0,0 @@
1
- function getHeight(contentHeight) {
2
- var height = contentHeight
3
- ? typeof contentHeight === 'number'
4
- ? contentHeight + 'rpx'
5
- : contentHeight
6
- : 'undefined';
7
- return 'height: ' + height + ';';
8
- }
9
-
10
- module.exports = {
11
- getHeight: getHeight,
12
- };
@@ -1,7 +0,0 @@
1
- declare const tyApi: {
2
- vibrateShort: (v: any) => void;
3
- nativeDisabled: (v: boolean) => void;
4
- getThemeInfo: () => any;
5
- isWX: () => boolean;
6
- };
7
- export default tyApi;
package/lib/common/ty.js DELETED
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tyApi = {
4
- vibrateShort: function (v) {
5
- // @ts-ignore
6
- if (typeof ty !== 'undefined') {
7
- // @ts-ignore
8
- ty.vibrateShort(v);
9
- }
10
- else if (typeof wx !== 'undefined') {
11
- wx.vibrateShort(v);
12
- }
13
- },
14
- nativeDisabled: function (v) {
15
- var _a;
16
- // @ts-ignore
17
- if (typeof ty !== 'undefined') {
18
- // @ts-ignore
19
- (_a = ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, v);
20
- }
21
- },
22
- getThemeInfo: function () {
23
- var _a;
24
- // @ts-ignore
25
- if (typeof ty !== 'undefined') {
26
- // @ts-ignore
27
- return (_a = ty.getThemeInfo) === null || _a === void 0 ? void 0 : _a.call(ty);
28
- }
29
- },
30
- isWX: function () {
31
- // @ts-ignore
32
- return typeof ty === 'undefined' && !!wx;
33
- },
34
- };
35
- exports.default = tyApi;