@ray-js/smart-ui 2.1.5 → 2.1.6-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.
@@ -5,7 +5,7 @@ export interface SmartCircleProps {
5
5
  *
6
6
  * @default 0
7
7
  */
8
- value?: number;
8
+ percent?: number;
9
9
  /**
10
10
  * 指定`canvas`类型
11
11
  */
@@ -1,6 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- (props: import("@ray-js/components-ty-progress-circle/lib/props").IProps): JSX.Element;
4
- defaultProps: import("@ray-js/components-ty-progress-circle/lib/props").IProps;
5
- };
1
+ declare const _default: (props: import("../progress").SmartCircle) => import("react/jsx-runtime").JSX.Element;
6
2
  export default _default;
@@ -1,7 +1,3 @@
1
- /// <reference types="react" />
2
- declare const Circle: {
3
- (props: import("@ray-js/components-ty-progress-circle/lib/props").IProps): JSX.Element;
4
- defaultProps: import("@ray-js/components-ty-progress-circle/lib/props").IProps;
5
- };
1
+ declare const Circle: (props: import("./PropTypes").SmartCircle) => import("react/jsx-runtime").JSX.Element;
6
2
  export { Circle };
7
3
  export * from './PropTypes';
@@ -0,0 +1,2 @@
1
+ declare const _default: (props: Record<string, any>) => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ // @ts-ignore
7
+ var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/lib/circle/index"));
8
+ var withReactProps_1 = require("../common/withReactProps");
9
+ exports["default"] = (0, withReactProps_1.withReactProps)(index_1["default"]);
@@ -0,0 +1,2 @@
1
+ declare const _default: (props: Record<string, any>) => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ // @ts-ignore
7
+ var index_1 = __importDefault(require("@tuya-miniapp/smart-ui/lib/progress/index"));
8
+ var withReactProps_1 = require("../common/withReactProps");
9
+ exports["default"] = (0, withReactProps_1.withReactProps)(index_1["default"]);
@@ -0,0 +1,2 @@
1
+ import { SmartProgressProps, SmartCircle } from '../@types';
2
+ export { SmartProgressProps, SmartCircle };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -1,13 +1,6 @@
1
- /// <reference types="react" />
2
- import { IProps } from '@ray-js/components-ty-progress-bar/lib/props';
3
- import { IProps as IProgressCircleProps } from '@ray-js/components-ty-progress-circle/lib/props';
4
- declare function Progress(props: IProps): import("react/jsx-runtime").JSX.Element;
1
+ import { SmartCircle, SmartProgressProps } from './PropTypes';
2
+ declare function Progress(props: SmartProgressProps): import("react/jsx-runtime").JSX.Element;
5
3
  declare namespace Progress {
6
- var Circle: {
7
- (props: IProgressCircleProps): JSX.Element;
8
- defaultProps: IProgressCircleProps;
9
- };
4
+ var Circle: (props: SmartCircle) => import("react/jsx-runtime").JSX.Element;
10
5
  }
11
- export type ProgressProps = IProps;
12
- export type ProgressCircleProps = IProgressCircleProps;
13
- export { Progress };
6
+ export { Progress, SmartProgressProps, SmartCircle };
@@ -16,10 +16,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  exports.__esModule = true;
17
17
  exports.Progress = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
- var components_ty_progress_bar_1 = __importDefault(require("@ray-js/components-ty-progress-bar"));
20
- var components_ty_progress_circle_1 = __importDefault(require("@ray-js/components-ty-progress-circle"));
19
+ var Circle_1 = __importDefault(require("./Circle"));
20
+ var Progress_1 = __importDefault(require("./Progress"));
21
21
  function Progress(props) {
22
- return (0, jsx_runtime_1.jsx)(components_ty_progress_bar_1["default"], __assign({}, props));
22
+ return ((0, jsx_runtime_1.jsx)(Progress_1["default"]
23
+ // @ts-ignore 属性修改,breaking change 向下兼容
24
+ , __assign({
25
+ // @ts-ignore 属性修改,breaking change 向下兼容
26
+ color: props.fillColor,
27
+ // @ts-ignore 属性修改,breaking change 向下兼容
28
+ percentage: props.percent, "stroke-width": props.height,
29
+ // @ts-ignore 属性修改,breaking change 向下兼容
30
+ trackColor: props.trackColor, "show-pivot": false }, props)));
23
31
  }
24
32
  exports.Progress = Progress;
25
- Progress.Circle = components_ty_progress_circle_1["default"];
33
+ function Circle(props) {
34
+ return ((0, jsx_runtime_1.jsx)(Circle_1["default"]
35
+ // @ts-ignore 属性修改,breaking change 向下兼容
36
+ , __assign({
37
+ // @ts-ignore 属性修改,breaking change 向下兼容
38
+ size: props.size,
39
+ // @ts-ignore 属性修改,breaking change 向下兼容
40
+ trackWidth: props['stroke-width'],
41
+ // @ts-ignore 属性修改,breaking change 向下兼容
42
+ trackColor: props['layer-color'],
43
+ // @ts-ignore 属性修改,breaking change 向下兼容
44
+ fillColor: props.color,
45
+ // @ts-ignore 属性修改,breaking change 向下兼容
46
+ percent: props.value }, props)));
47
+ }
48
+ Progress.Circle = Circle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.1.5",
3
+ "version": "2.1.6-beta-2",
4
4
  "author": "睦海(李利民)",
5
5
  "description": "轻量、可靠的智能小程序 UI 组件库",
6
6
  "scripts": {
@@ -34,10 +34,8 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@ray-js/components-ty-progress-bar": "^0.1.1",
38
- "@ray-js/components-ty-progress-circle": "^0.1.6",
39
- "@ray-js/components-ty-slider": "^0.2.48",
40
- "@tuya-miniapp/smart-ui": "^2.1.5",
37
+ "@ray-js/components-ty-slider": "^0.2.52",
38
+ "@tuya-miniapp/smart-ui": "^2.1.6",
41
39
  "lodash-es": "^4.17.21"
42
40
  },
43
41
  "devDependencies": {