@pisell/materials 2.2.86 → 2.2.88

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 (94) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +144 -160
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +25 -35
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +30 -40
  11. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  12. package/es/components/dataSourceComponents/fields/index.d.ts +18 -18
  13. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
  14. package/es/components/pisellAdjustPrice/index.d.ts +2 -6
  15. package/es/components/pisellAdjustPrice/index.js +63 -8
  16. package/es/components/pisellAdjustPrice/index.less +35 -6
  17. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  18. package/es/components/pisellAdjustPrice/status.js +32 -0
  19. package/es/components/pisellAdjustPrice/type.d.ts +20 -0
  20. package/es/components/pisellAdjustPrice/type.js +1 -0
  21. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  22. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  23. package/es/components/select-time/index.d.ts +0 -1
  24. package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  25. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  26. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  27. package/es/components/virtual-keyboard/Amount/index.d.ts +4 -20
  28. package/es/components/virtual-keyboard/Amount/index.js +79 -7
  29. package/es/components/virtual-keyboard/Amount/index.less +39 -0
  30. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  31. package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
  32. package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
  33. package/es/components/virtual-keyboard/Amount/types.js +1 -0
  34. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  35. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
  36. package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
  37. package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
  38. package/es/components/virtual-keyboard/Number/index.js +77 -7
  39. package/es/components/virtual-keyboard/Number/index.less +39 -0
  40. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  41. package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
  42. package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
  43. package/es/components/virtual-keyboard/Number/types.js +1 -0
  44. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  45. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
  46. package/es/components/virtual-keyboard/index.d.ts +11 -0
  47. package/es/components/virtual-keyboard/index.js +88 -3
  48. package/es/components/virtual-keyboard/index.less +33 -1
  49. package/es/utils/platform.d.ts +1 -1
  50. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  51. package/lib/components/dataSourceComponents/fields/index.d.ts +18 -18
  52. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
  53. package/lib/components/pisellAdjustPrice/index.d.ts +2 -6
  54. package/lib/components/pisellAdjustPrice/index.js +118 -57
  55. package/lib/components/pisellAdjustPrice/index.less +35 -6
  56. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  57. package/lib/components/pisellAdjustPrice/status.js +60 -0
  58. package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
  59. package/lib/components/pisellAdjustPrice/type.js +17 -0
  60. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  61. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  62. package/lib/components/select-time/index.d.ts +0 -1
  63. package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  64. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  65. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  66. package/lib/components/virtual-keyboard/Amount/index.d.ts +4 -20
  67. package/lib/components/virtual-keyboard/Amount/index.js +72 -16
  68. package/lib/components/virtual-keyboard/Amount/index.less +39 -0
  69. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  70. package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
  71. package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
  72. package/lib/components/virtual-keyboard/Amount/types.js +17 -0
  73. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  74. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
  75. package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
  76. package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
  77. package/lib/components/virtual-keyboard/Number/index.js +65 -11
  78. package/lib/components/virtual-keyboard/Number/index.less +39 -0
  79. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  80. package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
  81. package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
  82. package/lib/components/virtual-keyboard/Number/types.js +17 -0
  83. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  84. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -27
  85. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  86. package/lib/components/virtual-keyboard/index.js +60 -2
  87. package/lib/components/virtual-keyboard/index.less +33 -1
  88. package/lib/utils/platform.d.ts +1 -1
  89. package/lowcode/pisell-adjust-price/meta.ts +168 -0
  90. package/lowcode/pisell-adjust-price/snippets.ts +1 -0
  91. package/lowcode/pisell-number-keyboard/meta.ts +167 -0
  92. package/lowcode/pisell-price-keyboard/meta.ts +167 -0
  93. package/lowcode/virtual-keyboard/meta.ts +131 -0
  94. package/package.json +3 -3
@@ -0,0 +1,39 @@
1
+ .pisell-number-keyboard-wrap {
2
+ background-color: var(--pisell-number-background-color, #ffffff);
3
+
4
+ &.pisell-number-keyboard-dark {
5
+ background-color: var(--pisell-number-background-color, rgba(0, 0, 0, 0.70));
6
+ }
7
+
8
+ &.pisell-number-keyboard-light {
9
+ background-color: var(--pisell-number-background-color, #ffffff);
10
+ }
11
+
12
+ .pisell-virtual-keyboard-input {
13
+ background-color: var(--pisell-number-container-background-color, #d0d5dd);
14
+ color: var(--pisell-number-text-color, #000000);
15
+ }
16
+
17
+ .pisell-keyboard {
18
+ background-color: var(--pisell-number-keyboard-background-color, #f9f9f9);
19
+
20
+ .pisell-keyboard-item {
21
+ background-color: var(--pisell-number-keyboard-button-background-color, #ffffff);
22
+ color: var(--pisell-number-keyboard-button-text-color, #000000);
23
+
24
+ &:hover {
25
+ background-color: var(--pisell-number-keyboard-button-hover-color, #f5f5f5);
26
+ }
27
+ }
28
+
29
+ .pisell-keyboard-reset-button {
30
+ background-color: var(--pisell-number-reset-button-background-color, #ffffff);
31
+ color: var(--pisell-number-reset-button-text-color, #d92d20);
32
+ }
33
+
34
+ .pisell-keyboard-done-button {
35
+ background-color: var(--pisell-number-done-button-background-color, #4ca30d);
36
+ color: var(--pisell-number-done-button-text-color, #ffffff);
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,32 @@
1
+ export declare const numberThemeConfig: {
2
+ dark: {
3
+ backgroundColor: string;
4
+ containerBackgroundColor: string;
5
+ buttonBackgroundColor: string;
6
+ textColor: string;
7
+ resetButtonBackgroundColor: string;
8
+ resetButtonTextColor: string;
9
+ isDoneButtonFollowTheme: boolean;
10
+ doneButtonBackgroundColor: string;
11
+ doneButtonTextColor: string;
12
+ keyboardBackgroundColor: string;
13
+ keyboardButtonBackgroundColor: string;
14
+ keyboardButtonTextColor: string;
15
+ keyboardButtonHoverColor: string;
16
+ };
17
+ light: {
18
+ backgroundColor: string;
19
+ containerBackgroundColor: string;
20
+ buttonBackgroundColor: string;
21
+ textColor: string;
22
+ resetButtonBackgroundColor: string;
23
+ resetButtonTextColor: string;
24
+ isDoneButtonFollowTheme: boolean;
25
+ doneButtonBackgroundColor: string;
26
+ doneButtonTextColor: string;
27
+ keyboardBackgroundColor: string;
28
+ keyboardButtonBackgroundColor: string;
29
+ keyboardButtonTextColor: string;
30
+ keyboardButtonHoverColor: string;
31
+ };
32
+ };
@@ -0,0 +1,60 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/virtual-keyboard/Number/themeConfig.ts
20
+ var themeConfig_exports = {};
21
+ __export(themeConfig_exports, {
22
+ numberThemeConfig: () => numberThemeConfig
23
+ });
24
+ module.exports = __toCommonJS(themeConfig_exports);
25
+ var numberThemeConfig = {
26
+ dark: {
27
+ backgroundColor: "rgba(0, 0, 0, 0.70)",
28
+ containerBackgroundColor: "rgba(0, 0, 0, 0.40)",
29
+ buttonBackgroundColor: "#ffffff",
30
+ textColor: "#000000",
31
+ resetButtonBackgroundColor: "#ffffff",
32
+ resetButtonTextColor: "#d92d20",
33
+ isDoneButtonFollowTheme: true,
34
+ doneButtonBackgroundColor: "#4ca30d",
35
+ doneButtonTextColor: "#ffffff",
36
+ keyboardBackgroundColor: "rgba(0, 0, 0, 0.40)",
37
+ keyboardButtonBackgroundColor: "#ffffff",
38
+ keyboardButtonTextColor: "#000000",
39
+ keyboardButtonHoverColor: "#f5f5f5"
40
+ },
41
+ light: {
42
+ backgroundColor: "#ffffff",
43
+ containerBackgroundColor: "#d0d5dd",
44
+ buttonBackgroundColor: "#ffffff",
45
+ textColor: "#000000",
46
+ resetButtonBackgroundColor: "#ffffff",
47
+ resetButtonTextColor: "#d92d20",
48
+ isDoneButtonFollowTheme: true,
49
+ doneButtonBackgroundColor: "#4ca30d",
50
+ doneButtonTextColor: "#ffffff",
51
+ keyboardBackgroundColor: "#f9f9f9",
52
+ keyboardButtonBackgroundColor: "#ffffff",
53
+ keyboardButtonTextColor: "#000000",
54
+ keyboardButtonHoverColor: "#f5f5f5"
55
+ }
56
+ };
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ numberThemeConfig
60
+ });
@@ -0,0 +1,25 @@
1
+ export interface NumberProps {
2
+ max?: number;
3
+ min?: number;
4
+ doneText?: string;
5
+ resetText: string;
6
+ defaultValue?: string | number;
7
+ placeholder?: string;
8
+ value?: string | number;
9
+ onChange?: (val: string | number) => void;
10
+ onEnter?: (val: string | number) => void;
11
+ selectType?: 'light' | 'dark';
12
+ backgroundColor?: string;
13
+ containerBackgroundColor?: string;
14
+ buttonBackgroundColor?: string;
15
+ textColor?: string;
16
+ resetButtonBackgroundColor?: string;
17
+ resetButtonTextColor?: string;
18
+ isDoneButtonFollowTheme?: boolean;
19
+ doneButtonBackgroundColor?: string;
20
+ doneButtonTextColor?: string;
21
+ keyboardBackgroundColor?: string;
22
+ keyboardButtonBackgroundColor?: string;
23
+ keyboardButtonTextColor?: string;
24
+ keyboardButtonHoverColor?: string;
25
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/virtual-keyboard/Number/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { InputProps } from 'antd';
2
3
  import './index.less';
3
4
  export interface VirtualKeyInputProps extends InputProps {
@@ -6,6 +7,7 @@ export interface VirtualKeyInputProps extends InputProps {
6
7
  showDelete?: boolean;
7
8
  onValueSelect?: (selected: boolean) => void;
8
9
  defaultSelect?: boolean;
10
+ style?: React.CSSProperties;
9
11
  }
10
12
  declare const VirtualKeyInput: (props: VirtualKeyInputProps) => JSX.Element;
11
13
  export default VirtualKeyInput;
@@ -46,7 +46,8 @@ var VirtualKeyInput = (props) => {
46
46
  value,
47
47
  showDelete = true,
48
48
  onValueSelect,
49
- defaultSelect
49
+ defaultSelect,
50
+ style
50
51
  } = props;
51
52
  const [select, setSelect] = (0, import_react.useState)(defaultSelect ?? false);
52
53
  (0, import_ahooks.useEventListener)("keydown", (ev) => {
@@ -72,35 +73,41 @@ var VirtualKeyInput = (props) => {
72
73
  _val = _val.slice(0, _val.length - 1);
73
74
  props.onChange && props.onChange({ target: { value: _val } });
74
75
  };
75
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-wrap" }, props.renderInput ? /* @__PURE__ */ import_react.default.createElement(
76
+ return /* @__PURE__ */ import_react.default.createElement(
76
77
  "div",
77
78
  {
78
- className: (0, import_classnames.default)("virtual-keyboard-input", {
79
- "virtual-keyboard-input-select": select
80
- }),
81
- onClick: () => {
82
- if (value) {
83
- handleSelectChange(!select);
84
- }
79
+ className: "virtual-keyboard-input-wrap",
80
+ style: {
81
+ backgroundColor: (style == null ? void 0 : style.backgroundColor) || "#ffffff"
85
82
  }
86
83
  },
87
- props.renderInput(props)
88
- ) : /* @__PURE__ */ import_react.default.createElement(
89
- import_antd.Input,
90
- {
91
- className: "virtual-keyboard-input",
92
- bordered: false,
93
- ...props,
94
- readOnly: true,
95
- value: previewValue
96
- }
97
- ), ((_a = `${value ?? ""}`) == null ? void 0 : _a.length) && showDelete ? /* @__PURE__ */ import_react.default.createElement(
98
- "div",
99
- {
100
- className: "virtual-keyboard-input-delete",
101
- onClick: _onDelete
102
- },
103
- /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })
104
- ) : null);
84
+ props.renderInput ? /* @__PURE__ */ import_react.default.createElement(
85
+ "div",
86
+ {
87
+ className: (0, import_classnames.default)("virtual-keyboard-input", {
88
+ "virtual-keyboard-input-select": select
89
+ }),
90
+ onClick: () => {
91
+ if (value) {
92
+ handleSelectChange(!select);
93
+ }
94
+ },
95
+ style: {
96
+ color: (style == null ? void 0 : style.color) || "#000000"
97
+ }
98
+ },
99
+ props.renderInput(props)
100
+ ) : /* @__PURE__ */ import_react.default.createElement(
101
+ import_antd.Input,
102
+ {
103
+ className: "virtual-keyboard-input",
104
+ bordered: false,
105
+ ...props,
106
+ readOnly: true,
107
+ value: previewValue
108
+ }
109
+ ),
110
+ ((_a = `${value ?? ""}`) == null ? void 0 : _a.length) && showDelete ? /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })) : null
111
+ );
105
112
  };
106
113
  var VirtualKeyInput_default = VirtualKeyInput;
@@ -9,6 +9,17 @@ interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  style?: React.CSSProperties;
10
10
  onChange?: (value?: any) => void;
11
11
  value?: string;
12
+ selectType?: 'light' | 'dark';
13
+ backgroundColor?: string;
14
+ containerBackgroundColor?: string;
15
+ buttonBackgroundColor?: string;
16
+ textColor?: string;
17
+ keyboardBackgroundColor?: string;
18
+ keyboardButtonBackgroundColor?: string;
19
+ keyboardButtonTextColor?: string;
20
+ keyboardButtonHoverColor?: string;
21
+ primaryButtonBackgroundColor?: string;
22
+ primaryButtonTextColor?: string;
12
23
  }
13
24
  declare const VirtualKeyboard: (props: VirtualKeyboardProps) => JSX.Element;
14
25
  export default VirtualKeyboard;
@@ -37,6 +37,8 @@ var import_Keyboard = __toESM(require("./Keyboard"));
37
37
  var import_VirtualKeyInput = __toESM(require("./VirtualKeyInput"));
38
38
  var import_index = require("./index.less");
39
39
  var import_classnames = __toESM(require("classnames"));
40
+ var import_utils = require("@pisell/utils");
41
+ var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
40
42
  var items = [
41
43
  {
42
44
  value: 1,
@@ -105,6 +107,32 @@ var items = [
105
107
  type: "primary"
106
108
  }
107
109
  ];
110
+ var virtualKeyboardThemeConfig = {
111
+ dark: {
112
+ backgroundColor: "rgba(0, 0, 0, 0.70)",
113
+ containerBackgroundColor: "rgba(0, 0, 0, 0.40)",
114
+ buttonBackgroundColor: "#ffffff",
115
+ textColor: "#000000",
116
+ keyboardBackgroundColor: "rgba(0, 0, 0, 0.40)",
117
+ keyboardButtonBackgroundColor: "#ffffff",
118
+ keyboardButtonTextColor: "#000000",
119
+ keyboardButtonHoverColor: "#f5f5f5",
120
+ primaryButtonBackgroundColor: "#4ca30d",
121
+ primaryButtonTextColor: "#ffffff"
122
+ },
123
+ light: {
124
+ backgroundColor: "#ffffff",
125
+ containerBackgroundColor: "#d0d5dd",
126
+ buttonBackgroundColor: "#ffffff",
127
+ textColor: "#000000",
128
+ keyboardBackgroundColor: "#f9f9f9",
129
+ keyboardButtonBackgroundColor: "#ffffff",
130
+ keyboardButtonTextColor: "#000000",
131
+ keyboardButtonHoverColor: "#f5f5f5",
132
+ primaryButtonBackgroundColor: "#4ca30d",
133
+ primaryButtonTextColor: "#ffffff"
134
+ }
135
+ };
108
136
  var VirtualKeyboard = (props) => {
109
137
  const {
110
138
  virtualKeyInputProps,
@@ -113,15 +141,45 @@ var VirtualKeyboard = (props) => {
113
141
  keyboardProps,
114
142
  onChange,
115
143
  value,
116
- rightPanel
144
+ rightPanel,
145
+ selectType = "light",
146
+ ...others
117
147
  } = props;
148
+ const config = (0, import_usePisellConfig.default)();
118
149
  (0, import_react.useEffect)(() => {
119
150
  document.body.id = "body";
120
151
  }, []);
152
+ const configColor = (0, import_react.useMemo)(() => {
153
+ const currentConfig = virtualKeyboardThemeConfig[selectType];
154
+ const validProps = Object.entries(props).reduce((acc, [key, value2]) => {
155
+ if (value2 !== void 0 && key in currentConfig) {
156
+ acc[key] = value2;
157
+ }
158
+ return acc;
159
+ }, {});
160
+ return { ...currentConfig, ...validProps };
161
+ }, [selectType, props]);
162
+ (0, import_react.useEffect)(() => {
163
+ (0, import_utils.setTheme)({
164
+ "--virtual-keyboard-background-color": configColor.backgroundColor,
165
+ "--virtual-keyboard-container-background-color": configColor.containerBackgroundColor,
166
+ "--virtual-keyboard-button-background-color": configColor.buttonBackgroundColor,
167
+ "--virtual-keyboard-text-color": configColor.textColor,
168
+ "--virtual-keyboard-keyboard-background-color": configColor.keyboardBackgroundColor,
169
+ "--virtual-keyboard-keyboard-button-background-color": configColor.keyboardButtonBackgroundColor,
170
+ "--virtual-keyboard-keyboard-button-text-color": configColor.keyboardButtonTextColor,
171
+ "--virtual-keyboard-keyboard-button-hover-color": configColor.keyboardButtonHoverColor,
172
+ "--virtual-keyboard-primary-button-background-color": configColor.primaryButtonBackgroundColor,
173
+ "--virtual-keyboard-primary-button-text-color": configColor.primaryButtonTextColor
174
+ });
175
+ }, [configColor]);
121
176
  return /* @__PURE__ */ import_react.default.createElement(
122
177
  "div",
123
178
  {
124
- className: (0, import_classnames.default)("virtual-keyboard-component", className),
179
+ className: (0, import_classnames.default)("virtual-keyboard-component", className, {
180
+ "virtual-keyboard-component-dark": selectType === "dark",
181
+ "virtual-keyboard-component-light": selectType === "light"
182
+ }),
125
183
  style
126
184
  },
127
185
  /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("virtual-keyboard-component-left") }, /* @__PURE__ */ import_react.default.createElement(import_VirtualKeyInput.default, { ...virtualKeyInputProps }), /* @__PURE__ */ import_react.default.createElement(import_Keyboard.default, { items, ...keyboardProps })),
@@ -2,14 +2,46 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: 20px;
5
+ background-color: var(--virtual-keyboard-background-color, #ffffff);
6
+
7
+ &.virtual-keyboard-component-dark {
8
+ background-color: var(--virtual-keyboard-background-color, rgba(0, 0, 0, 0.70));
9
+ }
10
+
11
+ &.virtual-keyboard-component-light {
12
+ background-color: var(--virtual-keyboard-background-color, #ffffff);
13
+ }
5
14
  }
6
15
 
7
16
  .virtual-keyboard-component-left {
8
17
  padding: 10px;
9
18
  width: 380px;
10
19
  border-radius: 10px;
11
- background: var(--Gray-300, #D0D5DD);
20
+ background: var(--virtual-keyboard-container-background-color, #D0D5DD);
12
21
  backdrop-filter: blur(50px);
22
+
23
+ .pisell-virtual-keyboard-input {
24
+ background-color: var(--virtual-keyboard-button-background-color, #ffffff);
25
+ color: var(--virtual-keyboard-text-color, #000000);
26
+ }
27
+
28
+ .pisell-keyboard {
29
+ background-color: var(--virtual-keyboard-keyboard-background-color, #f9f9f9);
30
+
31
+ .pisell-keyboard-item {
32
+ background-color: var(--virtual-keyboard-keyboard-button-background-color, #ffffff);
33
+ color: var(--virtual-keyboard-keyboard-button-text-color, #000000);
34
+
35
+ &:hover {
36
+ background-color: var(--virtual-keyboard-keyboard-button-hover-color, #f5f5f5);
37
+ }
38
+
39
+ &.pisell-keyboard-item-primary {
40
+ background-color: var(--virtual-keyboard-primary-button-background-color, #4ca30d);
41
+ color: var(--virtual-keyboard-primary-button-text-color, #ffffff);
42
+ }
43
+ }
44
+ }
13
45
  }
14
46
 
15
47
  .virtual-keyboard-component-right {
@@ -1 +1 @@
1
- export declare const isMobile: () => any;
1
+ export declare const isMobile: () => boolean;
@@ -17,6 +17,174 @@ export default {
17
17
  subName: "",
18
18
  },
19
19
  props: [
20
+ {
21
+ name: 'selectType',
22
+ title: { label: '选择类型', tip: 'selectType | 选择类型' },
23
+ setter: {
24
+ componentName: 'RadioGroupSetter',
25
+ props: {
26
+ options: [
27
+ { title: 'Light', value: 'light' },
28
+ { title: 'Dark', value: 'dark' },
29
+ ],
30
+ },
31
+ },
32
+ defaultValue: 'light',
33
+ extraProps: {
34
+ onChange: (value: string, target: any) => {
35
+ // 根据主题切换自动设置颜色
36
+ const isLight = value === 'light';
37
+
38
+ target.getProps().setPropValue('backgroundColor', isLight ? '#ffffff' : 'rgba(0, 0, 0, 0.70)');
39
+ target.getProps().setPropValue('containerBackgroundColor', isLight ? '#d0d5dd' : 'rgba(0, 0, 0, 0.40)');
40
+ target.getProps().setPropValue('buttonBackgroundColor', '#ffffff');
41
+ target.getProps().setPropValue('textColor', "#000000");
42
+ target.getProps().setPropValue('resetButtonBackgroundColor', '#ffffff');
43
+ target.getProps().setPropValue('resetButtonTextColor', "#d92d20");
44
+ target.getProps().setPropValue('doneButtonBackgroundColor', "#4ca30d");
45
+ target.getProps().setPropValue('doneButtonTextColor', "#ffffff");
46
+ target.getProps().setPropValue('isDoneButtonFollowTheme', true);
47
+ target.getProps().setPropValue('isShowMainText', true);
48
+ target.getProps().setPropValue('isShowSubText', true);
49
+ target.getProps().setPropValue('mainTextColor', isLight ? '#101828' : '#ffffff');
50
+ target.getProps().setPropValue('subTextColor', isLight ? '#667085' : '#d0d5dd');
51
+ }
52
+ }
53
+ },
54
+ {
55
+ name: "backgroundColor",
56
+ title: {
57
+ label: "背景色",
58
+ tip: "backgroundColor | 背景色",
59
+ },
60
+ propType: "string",
61
+ setter: "ColorSetter",
62
+ defaultValue: "#ffffff",
63
+
64
+ },
65
+ {
66
+ name: "containerBackgroundColor",
67
+ title: {
68
+ label: "容器背景色",
69
+ tip: "containerBackgroundColor | 容器背景色",
70
+ },
71
+ propType: "string",
72
+ setter: "ColorSetter",
73
+ defaultValue: "#d0d5dd",
74
+ },
75
+ {
76
+ name: "buttonBackgroundColor",
77
+ title: {
78
+ label: "按钮背景色",
79
+ tip: "buttonBackgroundColor | 按钮背景色",
80
+ },
81
+ propType: "string",
82
+ setter: "ColorSetter",
83
+ defaultValue: "#ffffff",
84
+ },
85
+ {
86
+ name: "textColor",
87
+ title: {
88
+ label: "文本颜色",
89
+ tip: "textColor | 文本颜色",
90
+ },
91
+ propType: "string",
92
+ setter: "ColorSetter",
93
+ defaultValue: "#000000",
94
+ },
95
+ {
96
+ name: "resetButtonBackgroundColor",
97
+ title: {
98
+ label: "重置按钮背景色",
99
+ tip: "resetButtonBackgroundColor | 重置按钮背景色",
100
+ },
101
+ propType: "string",
102
+ setter: "ColorSetter",
103
+ defaultValue: "#ffffff",
104
+ },
105
+ {
106
+ name: "resetButtonTextColor",
107
+ title: {
108
+ label: "重置按钮文本颜色",
109
+ tip: "resetButtonTextColor | 重置按钮文本颜色",
110
+ },
111
+ propType: "string",
112
+ setter: "ColorSetter",
113
+ defaultValue: "#d92d20",
114
+ },
115
+ {
116
+ name: 'isDoneButtonFollowTheme',
117
+ title: { label: 'Done按钮颜色跟随主题色', tip: 'isDoneButtonFollowTheme | Done按钮颜色跟随主题色' },
118
+ propType: 'bool',
119
+ defaultValue: true,
120
+ setter: 'BoolSetter'
121
+ },
122
+ {
123
+ name: "doneButtonBackgroundColor",
124
+ title: {
125
+ label: "Done按钮背景色",
126
+ tip: "doneButtonBackgroundColor | Done按钮背景色",
127
+ },
128
+ propType: "string",
129
+ setter: "ColorSetter",
130
+ defaultValue: "#4ca30d",
131
+ condition(target: any) {
132
+ return !target.getProps().getPropValue("isDoneButtonFollowTheme");
133
+ },
134
+ },
135
+ {
136
+ name: "doneButtonTextColor",
137
+ title: {
138
+ label: "Done按钮文本颜色",
139
+ tip: "doneButtonTextColor | Done按钮文本颜色",
140
+ },
141
+ propType: "string",
142
+ setter: "ColorSetter",
143
+ defaultValue: "#ffffff",
144
+ condition(target: any) {
145
+ return !target.getProps().getPropValue("isDoneButtonFollowTheme");
146
+ },
147
+ },
148
+ {
149
+ name: 'isShowMainText',
150
+ title: { label: '显示主文案', tip: 'isShowMainText | 显示主文案' },
151
+ propType: 'bool',
152
+ defaultValue: true,
153
+ setter: 'BoolSetter'
154
+ },
155
+ {
156
+ name: "mainTextColor",
157
+ title: {
158
+ label: "主文案颜色",
159
+ tip: "mainTextColor | 主文案颜色",
160
+ },
161
+ propType: "string",
162
+ setter: "ColorSetter",
163
+ defaultValue: "#101828",
164
+ condition(target: any) {
165
+ return target.getProps().getPropValue("isShowMainText");
166
+ },
167
+ },
168
+ {
169
+ name: 'isShowSubText',
170
+ title: { label: '显示副文案', tip: 'isShowSubText | 显示副文案' },
171
+ propType: 'bool',
172
+ defaultValue: true,
173
+ setter: 'BoolSetter'
174
+ },
175
+ {
176
+ name: "subTextColor",
177
+ title: {
178
+ label: "副文案颜色",
179
+ tip: "subTextColor | 副文案颜色",
180
+ },
181
+ propType: "string",
182
+ setter: "ColorSetter",
183
+ defaultValue: "#667085",
184
+ condition(target: any) {
185
+ return target.getProps().getPropValue("isShowSubText");
186
+ },
187
+ },
20
188
  {
21
189
  name: 'defaultValue',
22
190
  title: { label: '默认值', tip: '默认值' },
@@ -4,6 +4,7 @@ export default [
4
4
  schema: {
5
5
  componentName: 'PisellAdjustPrice',
6
6
  props: {
7
+ selectType: 'light',
7
8
  },
8
9
  },
9
10
  },