@ray-js/smart-ui 2.0.1-beta-11 → 2.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # 更新日志
2
+
3
+ `2024-05-20`
4
+
5
+ **Features**
6
+
7
+ - `1.0.0-beta.0` 版本发布,基于 `vant-weapp@1.11.5` & `vant-weapp-typings@v1.31.0` 实现。
8
+
@@ -0,0 +1,56 @@
1
+ [English](./README.md) | 简体中文
2
+
3
+ # @ray-js/smart-ui
4
+
5
+ ## 介绍
6
+
7
+ `@ray-js/smart-ui` 是一个基于 `Ray` 框架和 `@tuya-miniapp/smart-ui` 的 React 组件库,旨在提供符合智能小程序移动端设计规范的轻量、可靠的 UI 组件。通过结合 `Ray` 的规范适配中间层和内置的完善 TS 类型,我们提供了一整套适用于智能小程序的 React 组件,让开发者能够快速构建符合设计规范的移动端应用。
8
+
9
+ ## 预览
10
+
11
+ 扫描下方智能小程序二维码,体验组件库示例。
12
+
13
+ <img src="https://images.tuyacn.com/content-platform/hestia/1716260412b7f2ae02271.png" width="200" height="200">
14
+
15
+ ## 使用之前
16
+
17
+ 使用 Smart UI 前,请确保你已经学习过智能小程序官方的 [Ray 开发概述](https://developer.tuya.com/cn/miniapp/develop/ray/guide/overview) 和 [Ray 组件介绍](https://developer.tuya.com/cn/miniapp/develop/ray/framework/component)。
18
+
19
+ ## 安装
20
+
21
+ ```bash
22
+ # 通过 yarn 安装(推荐)
23
+ yarn add @ray-js/smart-ui
24
+
25
+ # 通过 npm 安装
26
+ npm i @ray-js/smart-ui
27
+ ```
28
+
29
+ ## 使用组件
30
+
31
+ 以按钮组件为例
32
+
33
+ ```jsx
34
+ import { Button } from '@ray-js/smart-ui';
35
+
36
+ export default function Demo() {
37
+ return <Button type="info">信息按钮</Button>;
38
+ }
39
+ ```
40
+
41
+ ## 在开发者工具中预览
42
+
43
+ ```bash
44
+ # 安装项目依赖
45
+ $ yarn
46
+ ```
47
+
48
+ 打开 [Tuya MiniApp Tools](https://developer.tuya.com/cn/miniapp/devtools/tools),把 `example` 目录添加进去就可以预览示例了。
49
+
50
+ ## 基础库版本
51
+
52
+ @ray-js/smart-ui 从智能小程序基础库 `2.19.0` 版本 `@ray-js/ray@^1.5.1` 及 IDE `0.6.5` 开始提供稳定的支持。
53
+
54
+ ## 开源协议
55
+
56
+ 本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
@@ -241,6 +241,10 @@ export interface SmartCalendarProps extends SmartCalendarRangeProps, SmartCalend
241
241
  * @default false
242
242
  */
243
243
  readonly?: boolean;
244
+ /**
245
+ * 支持单元格自定义 class
246
+ */
247
+ dayClassMap?: Record<string, string>;
244
248
  }
245
249
  export interface SmartCalendarEvents {
246
250
  /**
@@ -248,24 +248,24 @@ export interface SmartFieldProps {
248
248
  alwaysEmbed?: boolean;
249
249
  /**
250
250
  * 隐藏左侧label相关内容
251
- * @since `2.0.4`
251
+ * @since `v2.1.0`
252
252
  * @default false
253
253
  */
254
254
  hiddenLabel?: boolean;
255
255
  /**
256
256
  * 卡片模式
257
- * @since `2.0.4`
257
+ * @since `v2.1.0`
258
258
  * @default false
259
259
  */
260
260
  cardMode?: boolean;
261
261
  /**
262
262
  * 副标题
263
- * @since `2.0.4`
263
+ * @since `v2.1.0`
264
264
  */
265
265
  subLabel?: string;
266
266
  /**
267
267
  * 错误提示内嵌到placeholder
268
- * @since `2.0.4`
268
+ * @since `v2.1.0`
269
269
  * @default false
270
270
  */
271
271
  interError?: boolean;
@@ -7,6 +7,13 @@ export interface SmartNavBarProps {
7
7
  * @default ''
8
8
  */
9
9
  title?: string;
10
+ /**
11
+ * 是否显示圆角
12
+ *
13
+ * @version 2.1.0
14
+ * @default false
15
+ */
16
+ round?: boolean;
10
17
  /**
11
18
  * 左侧文案
12
19
  *
@@ -120,6 +127,12 @@ export interface SmartNavBarExternalClassName extends SmartBaseExternalClassName
120
127
  * @version 2.0.0
121
128
  */
122
129
  leftIconClass?: string;
130
+ /**
131
+ * 右侧文字样式类
132
+ *
133
+ * @version 2.1.0
134
+ */
135
+ rightTextClass?: string;
123
136
  }
124
137
  export interface SmartNavBarSlot {
125
138
  /**
@@ -103,7 +103,7 @@ export interface SmartTabsProps {
103
103
  /**
104
104
  * 标签未被选择时是否销毁tab插槽内组件
105
105
  * @description 必须在受控模式下使用,否则子节点无法渲染
106
- * @since `v2.0.4`
106
+ * @since `v2.1.0`
107
107
  */
108
108
  inactiveDestroy?: boolean;
109
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.0.1-beta-11",
3
+ "version": "2.1.0",
4
4
  "author": "睦海(李利民)",
5
5
  "description": "轻量、可靠的智能小程序 UI 组件库",
6
6
  "scripts": {
@@ -37,8 +37,7 @@
37
37
  "@ray-js/components-ty-progress-bar": "^0.1.1",
38
38
  "@ray-js/components-ty-progress-circle": "^0.1.6",
39
39
  "@ray-js/components-ty-slider": "^0.2.48",
40
- "@ray-js/smart-ui": "2.0.1-beta-9",
41
- "@tuya-miniapp/smart-ui": "2.0.2-beta-13",
40
+ "@tuya-miniapp/smart-ui": "^2.1.0",
42
41
  "lodash-es": "^4.17.21"
43
42
  },
44
43
  "devDependencies": {