@ray-js/smart-ui 1.3.0-beta-2 → 1.3.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.
@@ -72,7 +72,7 @@ export interface SmartCellProps {
72
72
  *
73
73
  * @default false
74
74
  */
75
- uselabelSlot?: boolean;
75
+ useLabelSlot?: boolean;
76
76
  /**
77
77
  * 标题样式
78
78
  */
@@ -48,8 +48,6 @@ export interface SmartCollapseItemProps {
48
48
  disabled?: boolean;
49
49
  /**
50
50
  * 标题栏大小
51
- *
52
- * @since `v1.10.3`
53
51
  */
54
52
  size?: 'large';
55
53
  }
@@ -1,6 +1,5 @@
1
1
  import { SmartComponent } from '../base';
2
- import { ThemeVars, AppThemeVars } from './theme-vars';
3
- export { AppThemeVars };
2
+ import { ThemeVars } from './theme-vars';
4
3
  export interface SmartConfigProviderProps {
5
4
  /**
6
5
  * 自定义主题变量
@@ -1,4 +1,3 @@
1
- import type lightTheme from '@tuya-miniapp/smart-ui/lib/common/theme/light';
2
1
  type ColorPaletteThemeVars = 'black' | 'white' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'gray7' | 'gray8' | 'red' | 'blue' | 'orange' | 'orangeDark' | 'orangeLight' | 'green';
3
2
  type GradientColorsThemeVars = 'gradientRed' | 'gradientOrange';
4
3
  type ComponentColorsThemeVars = 'textColor' | 'activeColor' | 'activeOpacity' | 'disabledOpacity' | 'backgroundColor' | 'backgroundColorLight' | 'textLinkColor';
@@ -57,9 +56,8 @@ type DropdownMenuThemeVars = 'dropdownMenuHeight' | 'dropdownMenuBackgroundColor
57
56
  type IndexAnchorThemeVars = 'indexAnchorPadding' | 'indexAnchorTextColor' | 'indexAnchorFontWeight' | 'indexAnchorFontSize' | 'indexAnchorLineHeight' | 'indexAnchorBackgroundColor' | 'indexAnchorActiveBackgroundColor' | 'indexAnchorActiveTextColor';
58
57
  type IndexBarThemeVars = 'indexBarIndexFontSize' | 'indexBarIndexLineHeight';
59
58
  type SkeletonThemeVars = 'skeletonPadding' | 'skeletonRowHeight' | 'skeletonRowBackgroundColor' | 'skeletonRowMarginTop' | 'skeletonAvatarBackgroundColor' | 'skeletonAnimationDuration';
60
- export type AppThemeVars = keyof typeof lightTheme;
61
59
  /**
62
60
  * 主题变量
63
61
  */
64
- export type ThemeVars = Record<ColorPaletteThemeVars | GradientColorsThemeVars | ComponentColorsThemeVars | PaddingThemeVars | FontThemeVars | AnimationThemeVars | BorderThemeVars | ActionSheetThemeVars | ButtonThemeVars | CalendarThemeVars | CardThemeVars | CellThemeVars | CellGroupThemeVars | CheckboxThemeVars | CircleThemeVars | CollapseThemeVars | CountDownThemeVars | DialogThemeVars | FieldThemeVars | GoodsActionThemeVars | ImageThemeVars | InfoThemeVars | LoadingThemeVars | NavBarThemeVars | NoticeBarThemeVars | NotifyThemeVars | OverlayThemeVars | PanelThemeVars | PickerThemeVars | PopupThemeVars | ProgressThemeVars | RadioThemeVars | RateThemeVars | SwitchThemeVars | ShareSheetThemeVars | SearchThemeVars | SidebarThemeVars | SidebarItemThemeVars | SliderThemeVars | StepThemeVars | StepsThemeVars | StepperThemeVars | SubmitBarThemeVars | TabbarThemeVars | TabbarItemThemeVars | TabThemeVars | TabsThemeVars | TagThemeVars | ToastThemeVars | GridItemThemeVars | DividerThemeVars | EmptyThemeVars | TreeSelectThemeVars | UploaderThemeVars | DropdownMenuThemeVars | IndexAnchorThemeVars | IndexBarThemeVars | SkeletonThemeVars | AppThemeVars, string>;
62
+ export type ThemeVars = Record<ColorPaletteThemeVars | GradientColorsThemeVars | ComponentColorsThemeVars | PaddingThemeVars | FontThemeVars | AnimationThemeVars | BorderThemeVars | ActionSheetThemeVars | ButtonThemeVars | CalendarThemeVars | CardThemeVars | CellThemeVars | CellGroupThemeVars | CheckboxThemeVars | CircleThemeVars | CollapseThemeVars | CountDownThemeVars | DialogThemeVars | FieldThemeVars | GoodsActionThemeVars | ImageThemeVars | InfoThemeVars | LoadingThemeVars | NavBarThemeVars | NoticeBarThemeVars | NotifyThemeVars | OverlayThemeVars | PanelThemeVars | PickerThemeVars | PopupThemeVars | ProgressThemeVars | RadioThemeVars | RateThemeVars | SwitchThemeVars | ShareSheetThemeVars | SearchThemeVars | SidebarThemeVars | SidebarItemThemeVars | SliderThemeVars | StepThemeVars | StepsThemeVars | StepperThemeVars | SubmitBarThemeVars | TabbarThemeVars | TabbarItemThemeVars | TabThemeVars | TabsThemeVars | TagThemeVars | ToastThemeVars | GridItemThemeVars | DividerThemeVars | EmptyThemeVars | TreeSelectThemeVars | UploaderThemeVars | DropdownMenuThemeVars | IndexAnchorThemeVars | IndexBarThemeVars | SkeletonThemeVars, string>;
65
63
  export {};
@@ -72,12 +72,17 @@ export interface SmartGridItemSlot {
72
72
  */
73
73
  children?: React.ReactNode;
74
74
  /**
75
- * 自定义图标,如果设置了 useSlot 或者 icon 属性则不生效
76
- */
77
- icon?: React.ReactNode;
78
- /**
79
- * 自定义文字,如果设置了 useSlot 或者 text 属性则不生效
80
- */
81
- text?: React.ReactNode;
75
+ * GridItem Slot
76
+ */
77
+ slot?: {
78
+ /**
79
+ * 自定义图标,如果设置了 useSlot 或者 icon 属性则不生效
80
+ */
81
+ icon?: React.ReactNode;
82
+ /**
83
+ * 自定义文字,如果设置了 useSlot 或者 text 属性则不生效
84
+ */
85
+ text?: React.ReactNode;
86
+ };
82
87
  }
83
88
  export type SmartGridItem = SmartComponent<SmartGridItemProps, SmartGridItemEvents, SmartGridItemExternalClassName, SmartGridItemSlot>;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="miniprogram-api-typings" />
2
+ /// <reference types="react" />
2
3
  import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
3
4
  export interface SmartRadioProps {
4
5
  /**
@@ -66,4 +67,16 @@ export interface SmartRadioExternalClassName extends SmartBaseExternalClassName
66
67
  */
67
68
  labelClass?: string;
68
69
  }
69
- export type SmartRadio = SmartComponent<SmartRadioProps, SmartRadioEvents, SmartRadioExternalClassName>;
70
+ export interface SmartRadioSlot {
71
+ children?: React.ReactNode;
72
+ /**
73
+ * Cell Slot
74
+ */
75
+ slot?: {
76
+ /**
77
+ * 自定义 icon 显示内容
78
+ */
79
+ icon?: React.ReactNode;
80
+ };
81
+ }
82
+ export type SmartRadio = SmartComponent<SmartRadioProps, SmartRadioEvents, SmartRadioExternalClassName, SmartRadioSlot>;
@@ -30,6 +30,6 @@ export interface SmartRadioGroupEvents {
30
30
  /**
31
31
  * 当绑定值变化时触发的事件
32
32
  */
33
- 'bind:change'?: SmartEventHandler<string>;
33
+ onChange?: SmartEventHandler<string>;
34
34
  }
35
35
  export type SmartRadioGroup = SmartComponent<SmartRadioGroupProps, SmartRadioGroupEvents>;
@@ -105,8 +105,6 @@ export declare interface SmartToast {
105
105
  type Toast = SmartToast;
106
106
  /**
107
107
  * @deprecated
108
- *
109
- * 将在`v1.22`移除
110
108
  */
111
109
  declare const Toast: Toast;
112
110
  export default Toast;
@@ -1,2 +1,2 @@
1
- import { SmartConfigProvider, SmartConfigProviderProps, AppThemeVars } from '../@types';
2
- export { SmartConfigProvider, SmartConfigProviderProps, AppThemeVars };
1
+ import { SmartConfigProvider, SmartConfigProviderProps } from '../@types';
2
+ export { SmartConfigProvider, SmartConfigProviderProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "1.3.0-beta-2",
3
+ "version": "1.3.1-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "description": "轻量、可靠的智能小程序 UI 组件库",
6
6
  "scripts": {
@@ -37,7 +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
- "@tuya-miniapp/smart-ui": "^1.3.0-beta-1",
40
+ "@tuya-miniapp/smart-ui": "^1.2.3",
41
41
  "lodash-es": "^4.17.21"
42
42
  },
43
43
  "devDependencies": {
@@ -45,8 +45,9 @@
45
45
  "@commitlint/cli": "^7.2.1",
46
46
  "@commitlint/config-conventional": "^9.0.1",
47
47
  "@ray-js/cli": "^1.5.6",
48
- "@ray-js/code-sandbox": "^0.0.2",
49
- "@ray-js/ray": "^1.5.6",
48
+ "@ray-js/code-sandbox": "0.0.3-beta-3",
49
+ "@ray-js/panel-sdk": "^1.13.0-storage.8",
50
+ "@ray-js/ray": "^1.5.34",
50
51
  "@tuya-miniapp/icons": "^1.0.0",
51
52
  "@types/fs-extra": "^9.0.13",
52
53
  "@types/lodash-es": "^4.17.12",
@@ -1,2 +0,0 @@
1
- export { default as defaultAppLightThemeVars } from '@tuya-miniapp/smart-ui/lib/common/theme/light';
2
- export { default as defaultAppDarkThemeVars } from '@tuya-miniapp/smart-ui/lib/common/theme/dark';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- exports.__esModule = true;
14
- exports.defaultAppDarkThemeVars = exports.defaultAppLightThemeVars = void 0;
15
- var light_1 = require("@tuya-miniapp/smart-ui/lib/common/theme/light");
16
- __createBinding(exports, light_1, "default", "defaultAppLightThemeVars");
17
- var dark_1 = require("@tuya-miniapp/smart-ui/lib/common/theme/dark");
18
- __createBinding(exports, dark_1, "default", "defaultAppDarkThemeVars");