@ray-js/smart-ui 2.5.1-beta-2 → 2.5.1

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/README-zh_CN.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  # @ray-js/smart-ui
4
4
 
5
+ ![npm](https://img.shields.io/npm/v/@ray-js/smart-ui)![down](https://img.shields.io/npm/dt/@ray-js/smart-ui)![ray-js](https://img.shields.io/badge/maintained%20with-Ray-cc00ff.svg)![lodash](https://img.shields.io/badge/-lodash-f16728?style=flat-square&logo=lodash&labelColor=ffffff&color=f16728)![TS](https://img.shields.io/badge/TS-TypeScript-1C6FBB)
6
+
5
7
  ## 介绍
6
8
 
7
9
  `@ray-js/smart-ui` 是一个基于 `Ray` 框架和 `@tuya-miniapp/smart-ui` 的 React 组件库,旨在提供符合智能小程序移动端设计规范的轻量、可靠的 UI 组件。通过结合 `Ray` 的规范适配中间层和内置的完善 TS 类型,我们提供了一整套适用于智能小程序的 React 组件,让开发者能够快速构建符合设计规范的移动端应用。
@@ -60,7 +62,8 @@ module.exports = config;
60
62
  ```
61
63
 
62
64
  ```!warning:注意
63
- 按需引入插件不会解析 node_modules 内的内容,所以如果引用了或者开发 SmartUI 二次封装 npm 包内部需要按需引入资源,否则会导致 SmartUI 组件库全量引入!
65
+ 按需引入插件不会解析 node_modules 内的内容,所以如果引用了或者开发 SmartUI 二次封装 npm 包内部需要按需引入资源,否则会导致 SmartUI 组件库全量引入!
66
+ 可以使用 ray 1.8.0-beta.12 版本,新增 ray doctor 命令用于检测项目依赖健康度!
64
67
  ```
65
68
 
66
69
  ## 在开发者工具中预览
@@ -76,6 +79,29 @@ $ yarn
76
79
 
77
80
  @ray-js/smart-ui 从智能小程序基础库 `2.19.0` 版本 `@ray-js/ray@^1.5.1` 及 IDE `0.6.5` 开始提供稳定的支持。
78
81
 
82
+
83
+ ## 相关链接
84
+
85
+ [SmartUI 组件库官网](https://developer.tuya.com/material/smartui?comId=help-getting-started)
86
+ [SmartUI github](https://github.com/Tuya-Community/ray-smart-ui)
87
+ [Miniapp SmartUI github](https://github.com/Tuya-Community/miniapp-smart-ui)
88
+ [小程序社区论坛](https://www.tuyaos.com/viewforum.php?f=10)
89
+ [Ray 官网](https://developer.tuya.com/cn/miniapp)
90
+ [Ray 物料市场](https://developer.tuya.com/material/library_oHEKLjj0/)
91
+ [物料&模版 对外源码集](https://github.com/Tuya-Community/tuya-ray-materials)
92
+
93
+
94
+ ## 更新日志
95
+
96
+ [官网更新日志](https://developer.tuya.com/material/smartui?comId=help-changelog)
97
+
98
+ 本项目遵从 [Angular Style Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153),更新日志请查阅 [Release](https://github.com/Tuya-Community/ray-smart-ui/releases) (从2.5.1版本开始)
99
+
100
+
101
+ ## 开发交流
102
+
103
+ [官方微信交流群](https://github.com/Tuya-Community/ray-smart-ui/issues/1)
104
+
79
105
  ## 开源协议
80
106
 
81
107
  本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
package/README.md CHANGED
@@ -2,19 +2,21 @@ English | [简体中文](./README-zh_CN.md)
2
2
 
3
3
  # @ray-js/smart-ui
4
4
 
5
+ ![npm](https://img.shields.io/npm/v/@ray-js/smart-ui)![down](https://img.shields.io/npm/dt/@ray-js/smart-ui)![ray-js](https://img.shields.io/badge/maintained%20with-Ray-cc00ff.svg)![lodash](https://img.shields.io/badge/-lodash-f16728?style=flat-square&logo=lodash&labelColor=ffffff&color=f16728)![TS](https://img.shields.io/badge/TS-TypeScript-1C6FBB)
6
+
5
7
  ## Introduction
6
8
 
7
- `@ray-js/smart-ui` is a React component library based on the `Ray` framework and `@tuya-miniapp/smart-ui`, designed to provide lightweight and reliable UI components that comply with the mobile design specifications for smart mini programs. By integrating Ray's specification adaptation intermediary layer and built-in perfect TS types, we offer a full set of React components suitable for smart mini programs, enabling developers to quickly build mobile applications that meet design specifications.
9
+ `@ray-js/smart-ui` is a React component library based on the `Ray` framework and `@tuya-miniapp/smart-ui`, designed to provide lightweight and reliable UI components that meet the mobile design specifications of smart mini programs. By combining `Ray's` specification adaptation middleware and built-in complete TS types, we offer a full set of React components suitable for smart mini programs, enabling developers to quickly build mobile applications that comply with design specifications.
8
10
 
9
11
  ## Preview
10
12
 
11
- Scan the QR code below for the smart mini program to experience the component library demo.
13
+ Scan the QR code below to experience the component library examples.
12
14
 
13
15
  <img src="https://images.tuyacn.com/content-platform/hestia/1716260412b7f2ae02271.png" width="200" height="200">
14
16
 
15
17
  ## Before Using
16
18
 
17
- Before using Smart UI, please ensure you have studied the official [Ray Development Overview](https://developer.tuya.com/cn/miniapp/develop/ray/guide/overview) and [Ray Component Introduction](https://developer.tuya.com/cn/miniapp/develop/ray/framework/component) for smart mini programs.
19
+ Before using Smart UI, make sure you have studied the official smart mini program [Ray Development Overview](https://developer.tuya.com/cn/miniapp/develop/ray/guide/overview) and [Ray Component Introduction](https://developer.tuya.com/cn/miniapp/develop/ray/framework/component).
18
20
 
19
21
  ## Installation
20
22
 
@@ -28,7 +30,7 @@ npm i @ray-js/smart-ui
28
30
 
29
31
  ## Using Components
30
32
 
31
- Taking the button component as an example
33
+ Take the Button component as an example
32
34
 
33
35
  ```jsx
34
36
  import { Button } from '@ray-js/smart-ui';
@@ -38,16 +40,16 @@ export default function Demo() {
38
40
  }
39
41
  ```
40
42
 
41
- ## Dynamic Import on Demand (Recommended)
42
- Considering the projects demand for dynamic import and overall package size concerns, the above import method might leave some component style files that impact the package size. Therefore, we recommend using the on-demand import plugin, which will automatically parse `import { Button } from '@ray-js/smart-ui';` into `import { Button } from '@ray-js/smart-ui/es/button';`.
43
+ ## Dynamic On-Demand Import (Recommended)
44
+ Considering the project's on-demand introduction and overall size issues, the above import method will lead to some component style file residuals affecting the package size. Therefore, we recommend using the on-demand import plugin, which will automatically parse `import { Button } from '@ray-js/smart-ui';` into `import { Button } from '@ray-js/smart-ui/es/button';`.
43
45
 
44
46
  1. Environment Requirements
45
47
  * \>= @ray-js/cli@1.7.4
46
48
  * esbuild build mode (does not support webpack mode)
47
- * Use of ESModule import syntax for importing
49
+ * Use ESModule import syntax for import
48
50
  * **SmartUI version 2.4.0 and above**
49
51
 
50
- 2. Simply import SmartUIAutoImport within the ray.config.ts project file:
52
+ 2. Simply introduce SmartUIAutoImport in the project file ray.config.ts:
51
53
  ```ts
52
54
  import { RayConfig } from '@ray-js/types';
53
55
  import SmartUIAutoImport from '@ray-js/smart-ui/lib/auto-import';
@@ -59,8 +61,9 @@ const config: RayConfig = {
59
61
  module.exports = config;
60
62
  ```
61
63
 
62
- ```!warning:Attention
63
- On-demand plugin import will not parse contents inside node_modules. Therefore, if you reference or develop a SmartUI secondary packaging npm package, you need to import resources on demand internally; otherwise, it will lead to the full import of the SmartUI component library!
64
+ ```!warning: 注意
65
+ The on-demand import plugin will not parse content inside node_modules, so if you reference or develop SmartUI secondary encapsulation npm packages, you need on-demand import resources internally; otherwise, it will cause a full import of the SmartUI component library!
66
+ You can use ray version 1.8.0-beta.12, which adds the ray doctor command to check the health of project dependencies!
64
67
  ```
65
68
 
66
69
  ## Preview in Developer Tools
@@ -70,12 +73,32 @@ On-demand plugin import will not parse contents inside node_modules. Therefore,
70
73
  $ yarn
71
74
  ```
72
75
 
73
- Open [Tuya MiniApp Tools](https://developer.tuya.com/cn/miniapp/devtools/tools), add the `example` directory, and you can preview the demo.
76
+ Open [Tuya MiniApp Tools](https://developer.tuya.com/cn/miniapp/devtools/tools) and add the `example` directory to preview the examples.
77
+
78
+ ## Basic Library Version
79
+
80
+ @ray-js/smart-ui provides stable support starting from smart mini program basic library version `2.19.0`, `@ray-js/ray@^1.5.1`, and IDE `0.6.5`.
81
+
82
+ ## Related Links
83
+
84
+ [SmartUI Component Library Official Website](https://developer.tuya.com/material/smartui?comId=help-getting-started)
85
+ [SmartUI github](https://github.com/Tuya-Community/ray-smart-ui)
86
+ [Miniapp SmartUI github](https://github.com/Tuya-Community/miniapp-smart-ui)
87
+ [Mini Program Community Forum](https://www.tuyaos.com/viewforum.php?f=10)
88
+ [Ray Official Website](https://developer.tuya.com/cn/miniapp)
89
+ [Ray Material Market](https://developer.tuya.com/material/library_oHEKLjj0/)
90
+ [Materials & Templates Open Source Collection](https://github.com/Tuya-Community/tuya-ray-materials)
91
+
92
+ ## Changelog
93
+
94
+ [Official Website Changelog](https://developer.tuya.com/material/smartui?comId=help-changelog)
95
+
96
+ This project follows the [Angular Style Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153). For the update log, please refer to [Release](https://github.com/Tuya-Community/ray-smart-ui/releases) (starting from version 2.5.1)
74
97
 
75
- ## Base Library Version
98
+ ## Development Communication
76
99
 
77
- @ray-js/smart-ui provides stable support from the smart mini program base library version `2.19.0` `@ray-js/ray@^1.5.1` and IDE `0.6.5`.
100
+ [Official WeChat Group](https://github.com/Tuya-Community/ray-smart-ui/issues/1)
78
101
 
79
- ## Open Source License
102
+ ## License
80
103
 
81
- This project is based on the [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) license. Please feel free to enjoy and participate in open source.
104
+ This project is based on the [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) license. Feel free to enjoy and participate in open source.
@@ -9,11 +9,11 @@ type CheckboxThemeVars = 'checkboxSize' | 'checkboxBorderColor' | 'checkboxBorde
9
9
  type CircleThemeVars = 'circleTextColor';
10
10
  type CollapseThemeVars = 'collapseItemTransitionDuration' | 'collapseItemContentPadding' | 'collapseItemContentFontSize' | 'collapseItemContentLineHeight' | 'collapseItemContentTextColor' | 'collapseItemContentBackgroundColor' | 'collapseItemTitleDisabledColor';
11
11
  type CountDownThemeVars = 'countDownTextColor' | 'countDownFontSize' | 'countDownLineHeight';
12
- type DialogThemeVars = 'dialogWidth' | 'dialogSmallScreenWidth' | 'dialogFontSize' | 'dialogBorderRadius' | 'dialogBackgroundColor' | 'dialogHeaderFontColor' | 'dialogHeaderFontWeight' | 'dialogHeaderLineHeight' | 'dialogHeaderPaddingTop' | 'dialogHeaderPadding' | 'dialogHeaderIsolatedPadding' | 'dialogMessagePadding' | 'dialogMessageFontSize' | 'dialogMessageLineHeight' | 'dialogMessageMaxHeight' | 'dialogMessageTextColor' | 'dialogHasTitleMessageFontSize' | 'dialogHasTitleMessageTextColor' | 'dialogHasTitleMessagePaddingTop' | 'dialogHeaderIconSize' | 'dialogInputHeight' | 'dialogInputBackgroundColor' | 'dialogInputMargin' | 'dialogInputPadding' | 'dialogInputBorderRadius' | 'dialogInputFontSize' | 'dialogRoundButtonBorderRadius';
12
+ type DialogThemeVars = 'dialogWidth' | 'dialogSmallScreenWidth' | 'dialogFontSize' | 'dialogBorderRadius' | 'dialogBackgroundColor' | 'dialogHeaderFontColor' | 'dialogHeaderFontWeight' | 'dialogHeaderLineHeight' | 'dialogHeaderPaddingTop' | 'dialogHeaderPadding' | 'dialogHeaderIsolatedPadding' | 'dialogMessagePadding' | 'dialogMessageFontSize' | 'dialogMessageLineHeight' | 'dialogConfirmColor' | 'dialogCancelColor' | 'dialogConfirmFontWeight' | 'dialogCancelFontWeight' | 'dialogMessageMaxHeight' | 'dialogMessageTextColor' | 'dialogHasTitleMessageFontSize' | 'dialogHasTitleMessageTextColor' | 'dialogHasTitleMessagePaddingTop' | 'dialogHeaderIconSize' | 'dialogInputHeight' | 'dialogInputBackgroundColor' | 'dialogInputMargin' | 'dialogInputPadding' | 'dialogInputBorderRadius' | 'dialogInputFontSize' | 'dialogRoundButtonBorderRadius';
13
13
  type FieldThemeVars = 'fieldLabelColor' | 'fieldInputTextColor' | 'fieldInputErrorTextColor' | 'fieldPlaceholderTextColor' | 'fieldIconSize' | 'fieldClearIconSize' | 'fieldClearIconColor' | 'fieldIconContainerColor' | 'fieldErrorMessageColor' | 'fieldErrorMessageTextFontSize' | 'fieldDisabledOpacity' | 'fieldInputTextFontSize' | 'fieldLabelFontSize' | 'fieldLabelLineHeight' | 'fieldSubLabelFontSize' | 'fieldSubLabelLineHeight' | 'fieldErrorMessageTextLineHeight' | 'fieldSubtitleTextColor' | 'fieldLeftIconMarginRight' | 'fieldLeftBodyPaddingRight' | 'fieldCardBorderRadius' | 'fieldCardBackground' | 'fieldCardWidth' | 'fieldCardHeight' | 'fieldCardPadding' | 'fieldTextareaBackground' | 'fieldTextareaBorderRadius' | 'fieldTextareaPadding' | 'fieldTextareaLimitPaddingBottom' | 'fieldTextareaMinHeight' | 'fieldWordLimitColor' | 'fieldWordLimitFontSize' | 'fieldWordLimitLineHeight' | 'fieldWordNumFullColor';
14
14
  type ImageThemeVars = 'imagePlaceholderTextColor' | 'imagePlaceholderFontSize' | 'imagePlaceholderBackgroundColor' | 'imageLoadingIconSize' | 'imageLoadingIconColor' | 'imageErrorSize';
15
15
  type LoadingThemeVars = 'loadingTextColor' | 'loadingTextFontSize' | 'loadingTextLineHeight' | 'loadingSpinnerColor' | 'loadingSpinnerSize' | 'loadingSpinnerAnimationDuration';
16
- type NavBarThemeVars = 'navBarHeight' | 'navBarRoundBorderRadius' | 'navBarRoundMinHeight' | 'navBarBackgroundColor' | 'navBarArrowColor' | 'navBarIconSize' | 'navBarIconColor' | 'navBarIconMargin' | 'navBarTextColor' | 'navBarTextFontSize' | 'navBarTitleFontSize' | 'navBarTitleFontWeight' | 'navBarTitleTextColor' | 'navBarHomeFontSize' | 'navBarHomeFontWeight' | 'navBarHomeTextColor';
16
+ type NavBarThemeVars = 'navBarHeight' | 'navBarRoundBorderRadius' | 'navBarRoundMinHeight' | 'navBarBackgroundColor' | 'navBarArrowColor' | 'navBarIconSize' | 'navBarIconColor' | 'navBarIconMargin' | 'navBarTextColor' | 'navBarTextFontSize' | 'navBarTitleFontSize' | 'navBarTitleFontWeight' | 'navBarTitleTextColor' | 'navBarRightTextColor' | 'navBarHomeFontSize' | 'navBarHomeFontWeight' | 'navBarHomeTextColor';
17
17
  type NoticeBarThemeVars = 'noticeBarHeight' | 'noticeBarPadding' | 'noticeBarWrapablePadding' | 'noticeBarFontSize' | 'noticeBarTextColor' | 'noticeBarLineHeight' | 'noticeBarBackgroundColor' | 'noticeBarBackgroundWarningColor' | 'noticeBarBackgroundErrorColor' | 'noticeBarRightIconColor' | 'noticeBarInfoColor' | 'noticeBarWarningColor' | 'noticeBarErrorColor' | 'noticeBarIconSize' | 'noticeBarBtnColor' | 'noticeBarLeftIconMarginRight' | 'noticeBarRightIconMarginLeft';
18
18
  type NotifyThemeVars = 'notifyPadding' | 'notifyFontSize' | 'notifyLineHeight' | 'notifyPrimaryBackgroundColor' | 'notifySuccessBackgroundColor' | 'notifyDangerBackgroundColor' | 'notifyWarningBackgroundColor';
19
19
  type OverlayThemeVars = 'overlayBackgroundColor';
@@ -22,13 +22,13 @@ type PopupThemeVars = 'popupBackgroundColor' | 'popupRoundBorderRadius' | 'popup
22
22
  type ProgressThemeVars = 'progressHeight' | 'progressBackgroundColor' | 'progressPivotPadding' | 'progressColor' | 'progressPivotFontSize' | 'progressPivotLineHeight' | 'progressPivotBackgroundColor' | 'progressPivotTextColor';
23
23
  type RadioThemeVars = 'radioSize' | 'radioBorderColor' | 'radioBorderRadius' | 'radioTransitionDuration' | 'radioLabelSize' | 'radioLabelMargin' | 'radioLabelColor' | 'radioCheckedIconColor' | 'radioDisabledLabelColor' | 'radioDisabledOpacity';
24
24
  type RateThemeVars = 'rateHorizontalPadding' | 'rateIconSize' | 'rateIconVoidColor' | 'rateIconFullColor' | 'rateIconDisabledColor' | 'rateIconGutter';
25
- type SwitchThemeVars = 'switchWidth' | 'switchHeight' | 'switchNodeSize' | 'switchNodeZIndex' | 'switchNodeBackgroundColor' | 'switchNodeOnBackgroundColor' | 'switchNodeBoxShadow' | 'switchBackgroundColor' | 'switchOnBackgroundColor' | 'switchTransitionDuration' | 'switchDisabledOpacity' | 'switchPadding';
25
+ type SwitchThemeVars = 'switchWidth' | 'switchHeight' | 'switchNodeSize' | 'switchNodeZIndex' | 'switchNodeBackgroundColor' | 'switchNodeOnBackgroundColor' | 'switchNodeBoxShadow' | 'switchBackgroundColor' | 'switchOnBackgroundColor' | 'switchTransitionDuration' | 'switchDisabledOpacity' | 'switchPadding' | 'switchBorder';
26
26
  type SearchThemeVars = 'searchBackgroundColor' | 'searchBodyBackgroundColor' | 'searchPadding' | 'searchInputHeight' | 'searchLabelPadding' | 'searchLabelColor' | 'searchLabelFontSize' | 'searchValueFontSize' | 'searchLeftIconColor' | 'searchActionPadding' | 'searchActionTextColor' | 'searchActionFontSize' | 'searchSubmitFontSize' | 'searchSubmitColor' | 'searchBtnHoverColor' | 'searchSubmitLineWidth' | 'searchSubmitLineHeight' | 'searchBtnHoverOpacity';
27
27
  type SidebarThemeVars = 'sidebarWidth' | 'sidebarFontSize' | 'sidebarLineHeight' | 'sidebarTextColor' | 'sidebarDisabledTextColor' | 'sidebarPadding' | 'sidebarActiveColor' | 'sidebarBackgroundColor' | 'sidebarSelectedFontWeight' | 'sidebarSelectedTextColor' | 'sidebarSelectedBorderColor' | 'sidebarSelectedBackgroundColor';
28
28
  type SliderThemeVars = 'sliderActiveBackgroundColor' | 'sliderInactiveBackgroundColor' | 'sliderDisabledOpacity' | 'sliderBarHeight' | 'sliderButtonWidth' | 'sliderButtonHeight' | 'sliderButtonBorderRadius' | 'sliderButtonBackgroundColor' | 'sliderButtonBoxShadow' | 'sliderThumbColor';
29
29
  type StepperThemeVars = 'stepperContainerBackgroundColor' | 'stepperBackgroundBorderRadius' | 'stepperPadding' | 'stepperActiveColor' | 'stepperBackgroundColor' | 'stepperButtonIconColor' | 'stepperButtonBorder' | 'stepperButtonDisabledColor' | 'stepperButtonDisabledIconColor' | 'stepperButtonRoundThemeColor' | 'stepperBtnWidth' | 'stepperBtnHeight' | 'stepperInputWidth' | 'stepperInputHeight' | 'stepperInputFontSize' | 'stepperInputLineHeight' | 'stepperInputTextColor' | 'stepperInputDisabledTextColor' | 'stepperBorderRadius' | 'stepperButtonIconFontSize';
30
30
  type StepsThemeVars = 'stepsBackgroundColor';
31
- type TabbarThemeVars = 'tabbarHeight' | 'tabbarBackgroundColor' | 'tabbarBorderColor' | 'tabbarItemFontSize' | 'tabbarItemDisabledOpacity' | 'tabbarItemTextColor' | 'tabbarItemActiveColor' | 'tabbarItemLineHeight' | 'tabbarItemIconSize' | 'tabbarItemMarginBottom';
31
+ type TabbarThemeVars = 'tabbarHeight' | 'tabbarBackgroundColor' | 'tabbarBorderColor' | 'tabbarItemFontSize' | 'tabbarItemDisabledOpacity' | 'tabbarItemTextColor' | 'tabbarItemActiveColor' | 'tabbarItemLineHeight' | 'tabbarItemIconSize' | 'tabbarItemMarginBottom' | 'tabbarItemInfoMarginTop';
32
32
  type TabThemeVars = 'tabPanelBackgroundColor' | 'tabPanelTextColor' | 'tabTextColor' | 'tabActiveTextColor' | 'tabDisabledTextColor' | 'tabFontSize' | 'tabsCardBackgroundColor' | 'tabsBackgroundColor' | 'tabsDefaultColor' | 'tabsLineHeight' | 'tabsSubLineHeight' | 'tabsBottomBarHeight' | 'tabsBottomBarColor' | 'tabsCardTextColor' | 'tabsCardTextActiveColor' | 'tabsCardHeight' | 'tabsCardBorderRadius' | 'tabsCardActiveBorderRadius' | 'tabsCardActiveBackgroundColor' | 'tabsCardActiveTop' | 'tabsCardActiveLeft' | 'tabsCardPadding';
33
33
  type TagThemeVars = 'tagPadding' | 'tagTextColor' | 'tagBorderRadius' | 'tagLineHeight' | 'tagMediumLineHeight' | 'tagLargeLineHeight' | 'tagFontSize' | 'tagMediumFontSize' | 'tagLargeFontSize' | 'tagRoundBorderRadius' | 'tagDangerColor' | 'tagPrimaryColor' | 'tagSuccessColor' | 'tagWarningColor' | 'tagDefaultColor' | 'tagPlainBackgroundColor';
34
34
  type ToastThemeVars = 'toastMaxWidth' | 'toastFontSize' | 'toastTextColor' | 'toastLineHeight' | 'toastBorderRadius' | 'toastBackgroundColor' | 'toastIconSize' | 'toastTextMinWidth' | 'toastTextPadding' | 'toastDefaultPadding' | 'toastDefaultWidth' | 'toastDefaultMinHeight';
@@ -178,7 +178,7 @@ export interface SmartDateTimePickerEvents {
178
178
  /**
179
179
  * 当值变化时触发的事件
180
180
  */
181
- onInput?: SmartEventHandler<number>;
181
+ onInput?: SmartEventHandler<string | number>;
182
182
  /**
183
183
  * 当值变化时触发的事件
184
184
  */
@@ -48,6 +48,13 @@ export interface SmartTabbarProps {
48
48
  * @default true
49
49
  */
50
50
  safeAreaInsetBottom?: boolean;
51
+ /**
52
+ * 标题和图标上下颠倒
53
+ *
54
+ * @default false
55
+ * @version 2.5.1
56
+ */
57
+ upsideDown?: boolean;
51
58
  }
52
59
  /**
53
60
  * 切换标签时触发事件
@@ -9,11 +9,11 @@ type CheckboxThemeVars = 'checkboxSize' | 'checkboxBorderColor' | 'checkboxBorde
9
9
  type CircleThemeVars = 'circleTextColor';
10
10
  type CollapseThemeVars = 'collapseItemTransitionDuration' | 'collapseItemContentPadding' | 'collapseItemContentFontSize' | 'collapseItemContentLineHeight' | 'collapseItemContentTextColor' | 'collapseItemContentBackgroundColor' | 'collapseItemTitleDisabledColor';
11
11
  type CountDownThemeVars = 'countDownTextColor' | 'countDownFontSize' | 'countDownLineHeight';
12
- type DialogThemeVars = 'dialogWidth' | 'dialogSmallScreenWidth' | 'dialogFontSize' | 'dialogBorderRadius' | 'dialogBackgroundColor' | 'dialogHeaderFontColor' | 'dialogHeaderFontWeight' | 'dialogHeaderLineHeight' | 'dialogHeaderPaddingTop' | 'dialogHeaderPadding' | 'dialogHeaderIsolatedPadding' | 'dialogMessagePadding' | 'dialogMessageFontSize' | 'dialogMessageLineHeight' | 'dialogMessageMaxHeight' | 'dialogMessageTextColor' | 'dialogHasTitleMessageFontSize' | 'dialogHasTitleMessageTextColor' | 'dialogHasTitleMessagePaddingTop' | 'dialogHeaderIconSize' | 'dialogInputHeight' | 'dialogInputBackgroundColor' | 'dialogInputMargin' | 'dialogInputPadding' | 'dialogInputBorderRadius' | 'dialogInputFontSize' | 'dialogRoundButtonBorderRadius';
12
+ type DialogThemeVars = 'dialogWidth' | 'dialogSmallScreenWidth' | 'dialogFontSize' | 'dialogBorderRadius' | 'dialogBackgroundColor' | 'dialogHeaderFontColor' | 'dialogHeaderFontWeight' | 'dialogHeaderLineHeight' | 'dialogHeaderPaddingTop' | 'dialogHeaderPadding' | 'dialogHeaderIsolatedPadding' | 'dialogMessagePadding' | 'dialogMessageFontSize' | 'dialogMessageLineHeight' | 'dialogConfirmColor' | 'dialogCancelColor' | 'dialogConfirmFontWeight' | 'dialogCancelFontWeight' | 'dialogMessageMaxHeight' | 'dialogMessageTextColor' | 'dialogHasTitleMessageFontSize' | 'dialogHasTitleMessageTextColor' | 'dialogHasTitleMessagePaddingTop' | 'dialogHeaderIconSize' | 'dialogInputHeight' | 'dialogInputBackgroundColor' | 'dialogInputMargin' | 'dialogInputPadding' | 'dialogInputBorderRadius' | 'dialogInputFontSize' | 'dialogRoundButtonBorderRadius';
13
13
  type FieldThemeVars = 'fieldLabelColor' | 'fieldInputTextColor' | 'fieldInputErrorTextColor' | 'fieldPlaceholderTextColor' | 'fieldIconSize' | 'fieldClearIconSize' | 'fieldClearIconColor' | 'fieldIconContainerColor' | 'fieldErrorMessageColor' | 'fieldErrorMessageTextFontSize' | 'fieldDisabledOpacity' | 'fieldInputTextFontSize' | 'fieldLabelFontSize' | 'fieldLabelLineHeight' | 'fieldSubLabelFontSize' | 'fieldSubLabelLineHeight' | 'fieldErrorMessageTextLineHeight' | 'fieldSubtitleTextColor' | 'fieldLeftIconMarginRight' | 'fieldLeftBodyPaddingRight' | 'fieldCardBorderRadius' | 'fieldCardBackground' | 'fieldCardWidth' | 'fieldCardHeight' | 'fieldCardPadding' | 'fieldTextareaBackground' | 'fieldTextareaBorderRadius' | 'fieldTextareaPadding' | 'fieldTextareaLimitPaddingBottom' | 'fieldTextareaMinHeight' | 'fieldWordLimitColor' | 'fieldWordLimitFontSize' | 'fieldWordLimitLineHeight' | 'fieldWordNumFullColor';
14
14
  type ImageThemeVars = 'imagePlaceholderTextColor' | 'imagePlaceholderFontSize' | 'imagePlaceholderBackgroundColor' | 'imageLoadingIconSize' | 'imageLoadingIconColor' | 'imageErrorSize';
15
15
  type LoadingThemeVars = 'loadingTextColor' | 'loadingTextFontSize' | 'loadingTextLineHeight' | 'loadingSpinnerColor' | 'loadingSpinnerSize' | 'loadingSpinnerAnimationDuration';
16
- type NavBarThemeVars = 'navBarHeight' | 'navBarRoundBorderRadius' | 'navBarRoundMinHeight' | 'navBarBackgroundColor' | 'navBarArrowColor' | 'navBarIconSize' | 'navBarIconColor' | 'navBarIconMargin' | 'navBarTextColor' | 'navBarTextFontSize' | 'navBarTitleFontSize' | 'navBarTitleFontWeight' | 'navBarTitleTextColor' | 'navBarHomeFontSize' | 'navBarHomeFontWeight' | 'navBarHomeTextColor';
16
+ type NavBarThemeVars = 'navBarHeight' | 'navBarRoundBorderRadius' | 'navBarRoundMinHeight' | 'navBarBackgroundColor' | 'navBarArrowColor' | 'navBarIconSize' | 'navBarIconColor' | 'navBarIconMargin' | 'navBarTextColor' | 'navBarTextFontSize' | 'navBarTitleFontSize' | 'navBarTitleFontWeight' | 'navBarTitleTextColor' | 'navBarRightTextColor' | 'navBarHomeFontSize' | 'navBarHomeFontWeight' | 'navBarHomeTextColor';
17
17
  type NoticeBarThemeVars = 'noticeBarHeight' | 'noticeBarPadding' | 'noticeBarWrapablePadding' | 'noticeBarFontSize' | 'noticeBarTextColor' | 'noticeBarLineHeight' | 'noticeBarBackgroundColor' | 'noticeBarBackgroundWarningColor' | 'noticeBarBackgroundErrorColor' | 'noticeBarRightIconColor' | 'noticeBarInfoColor' | 'noticeBarWarningColor' | 'noticeBarErrorColor' | 'noticeBarIconSize' | 'noticeBarBtnColor' | 'noticeBarLeftIconMarginRight' | 'noticeBarRightIconMarginLeft';
18
18
  type NotifyThemeVars = 'notifyPadding' | 'notifyFontSize' | 'notifyLineHeight' | 'notifyPrimaryBackgroundColor' | 'notifySuccessBackgroundColor' | 'notifyDangerBackgroundColor' | 'notifyWarningBackgroundColor';
19
19
  type OverlayThemeVars = 'overlayBackgroundColor';
@@ -22,13 +22,13 @@ type PopupThemeVars = 'popupBackgroundColor' | 'popupRoundBorderRadius' | 'popup
22
22
  type ProgressThemeVars = 'progressHeight' | 'progressBackgroundColor' | 'progressPivotPadding' | 'progressColor' | 'progressPivotFontSize' | 'progressPivotLineHeight' | 'progressPivotBackgroundColor' | 'progressPivotTextColor';
23
23
  type RadioThemeVars = 'radioSize' | 'radioBorderColor' | 'radioBorderRadius' | 'radioTransitionDuration' | 'radioLabelSize' | 'radioLabelMargin' | 'radioLabelColor' | 'radioCheckedIconColor' | 'radioDisabledLabelColor' | 'radioDisabledOpacity';
24
24
  type RateThemeVars = 'rateHorizontalPadding' | 'rateIconSize' | 'rateIconVoidColor' | 'rateIconFullColor' | 'rateIconDisabledColor' | 'rateIconGutter';
25
- type SwitchThemeVars = 'switchWidth' | 'switchHeight' | 'switchNodeSize' | 'switchNodeZIndex' | 'switchNodeBackgroundColor' | 'switchNodeOnBackgroundColor' | 'switchNodeBoxShadow' | 'switchBackgroundColor' | 'switchOnBackgroundColor' | 'switchTransitionDuration' | 'switchDisabledOpacity' | 'switchPadding';
25
+ type SwitchThemeVars = 'switchWidth' | 'switchHeight' | 'switchNodeSize' | 'switchNodeZIndex' | 'switchNodeBackgroundColor' | 'switchNodeOnBackgroundColor' | 'switchNodeBoxShadow' | 'switchBackgroundColor' | 'switchOnBackgroundColor' | 'switchTransitionDuration' | 'switchDisabledOpacity' | 'switchPadding' | 'switchBorder';
26
26
  type SearchThemeVars = 'searchBackgroundColor' | 'searchBodyBackgroundColor' | 'searchPadding' | 'searchInputHeight' | 'searchLabelPadding' | 'searchLabelColor' | 'searchLabelFontSize' | 'searchValueFontSize' | 'searchLeftIconColor' | 'searchActionPadding' | 'searchActionTextColor' | 'searchActionFontSize' | 'searchSubmitFontSize' | 'searchSubmitColor' | 'searchBtnHoverColor' | 'searchSubmitLineWidth' | 'searchSubmitLineHeight' | 'searchBtnHoverOpacity';
27
27
  type SidebarThemeVars = 'sidebarWidth' | 'sidebarFontSize' | 'sidebarLineHeight' | 'sidebarTextColor' | 'sidebarDisabledTextColor' | 'sidebarPadding' | 'sidebarActiveColor' | 'sidebarBackgroundColor' | 'sidebarSelectedFontWeight' | 'sidebarSelectedTextColor' | 'sidebarSelectedBorderColor' | 'sidebarSelectedBackgroundColor';
28
28
  type SliderThemeVars = 'sliderActiveBackgroundColor' | 'sliderInactiveBackgroundColor' | 'sliderDisabledOpacity' | 'sliderBarHeight' | 'sliderButtonWidth' | 'sliderButtonHeight' | 'sliderButtonBorderRadius' | 'sliderButtonBackgroundColor' | 'sliderButtonBoxShadow' | 'sliderThumbColor';
29
29
  type StepperThemeVars = 'stepperContainerBackgroundColor' | 'stepperBackgroundBorderRadius' | 'stepperPadding' | 'stepperActiveColor' | 'stepperBackgroundColor' | 'stepperButtonIconColor' | 'stepperButtonBorder' | 'stepperButtonDisabledColor' | 'stepperButtonDisabledIconColor' | 'stepperButtonRoundThemeColor' | 'stepperBtnWidth' | 'stepperBtnHeight' | 'stepperInputWidth' | 'stepperInputHeight' | 'stepperInputFontSize' | 'stepperInputLineHeight' | 'stepperInputTextColor' | 'stepperInputDisabledTextColor' | 'stepperBorderRadius' | 'stepperButtonIconFontSize';
30
30
  type StepsThemeVars = 'stepsBackgroundColor';
31
- type TabbarThemeVars = 'tabbarHeight' | 'tabbarBackgroundColor' | 'tabbarBorderColor' | 'tabbarItemFontSize' | 'tabbarItemDisabledOpacity' | 'tabbarItemTextColor' | 'tabbarItemActiveColor' | 'tabbarItemLineHeight' | 'tabbarItemIconSize' | 'tabbarItemMarginBottom';
31
+ type TabbarThemeVars = 'tabbarHeight' | 'tabbarBackgroundColor' | 'tabbarBorderColor' | 'tabbarItemFontSize' | 'tabbarItemDisabledOpacity' | 'tabbarItemTextColor' | 'tabbarItemActiveColor' | 'tabbarItemLineHeight' | 'tabbarItemIconSize' | 'tabbarItemMarginBottom' | 'tabbarItemInfoMarginTop';
32
32
  type TabThemeVars = 'tabPanelBackgroundColor' | 'tabPanelTextColor' | 'tabTextColor' | 'tabActiveTextColor' | 'tabDisabledTextColor' | 'tabFontSize' | 'tabsCardBackgroundColor' | 'tabsBackgroundColor' | 'tabsDefaultColor' | 'tabsLineHeight' | 'tabsSubLineHeight' | 'tabsBottomBarHeight' | 'tabsBottomBarColor' | 'tabsCardTextColor' | 'tabsCardTextActiveColor' | 'tabsCardHeight' | 'tabsCardBorderRadius' | 'tabsCardActiveBorderRadius' | 'tabsCardActiveBackgroundColor' | 'tabsCardActiveTop' | 'tabsCardActiveLeft' | 'tabsCardPadding';
33
33
  type TagThemeVars = 'tagPadding' | 'tagTextColor' | 'tagBorderRadius' | 'tagLineHeight' | 'tagMediumLineHeight' | 'tagLargeLineHeight' | 'tagFontSize' | 'tagMediumFontSize' | 'tagLargeFontSize' | 'tagRoundBorderRadius' | 'tagDangerColor' | 'tagPrimaryColor' | 'tagSuccessColor' | 'tagWarningColor' | 'tagDefaultColor' | 'tagPlainBackgroundColor';
34
34
  type ToastThemeVars = 'toastMaxWidth' | 'toastFontSize' | 'toastTextColor' | 'toastLineHeight' | 'toastBorderRadius' | 'toastBackgroundColor' | 'toastIconSize' | 'toastTextMinWidth' | 'toastTextPadding' | 'toastDefaultPadding' | 'toastDefaultWidth' | 'toastDefaultMinHeight';
@@ -178,7 +178,7 @@ export interface SmartDateTimePickerEvents {
178
178
  /**
179
179
  * 当值变化时触发的事件
180
180
  */
181
- onInput?: SmartEventHandler<number>;
181
+ onInput?: SmartEventHandler<string | number>;
182
182
  /**
183
183
  * 当值变化时触发的事件
184
184
  */
@@ -48,6 +48,13 @@ export interface SmartTabbarProps {
48
48
  * @default true
49
49
  */
50
50
  safeAreaInsetBottom?: boolean;
51
+ /**
52
+ * 标题和图标上下颠倒
53
+ *
54
+ * @default false
55
+ * @version 2.5.1
56
+ */
57
+ upsideDown?: boolean;
51
58
  }
52
59
  /**
53
60
  * 切换标签时触发事件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.5.1-beta-2",
3
+ "version": "2.5.1",
4
4
  "description": "轻量、可靠的智能小程序 UI 组件库",
5
5
  "scripts": {
6
6
  "syncMiniappData": "node ./build/syncMiniappData.js",
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "@ray-js/components-ty-slider": "^0.3.4",
45
45
  "@ray-js/smart-ui": "2.5.1-beta-1",
46
- "@tuya-miniapp/smart-ui": "2.5.1-beta-4",
46
+ "@tuya-miniapp/smart-ui": "^2.5.1",
47
47
  "lodash-es": "^4.17.21"
48
48
  },
49
49
  "devDependencies": {