@pisell/materials 2.2.87 → 2.2.89
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +160 -144
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +36 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +40 -30
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellWalletPassCard/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/index.js +1 -1
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/cartSkuCard/locales.js +6 -3
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.js +73 -6
- package/es/components/virtual-keyboard/Amount/index.less +39 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Amount/types.js +1 -0
- package/es/components/virtual-keyboard/Number/index.js +77 -7
- package/es/components/virtual-keyboard/Number/index.less +39 -0
- package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Number/types.js +1 -0
- package/es/components/virtual-keyboard/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/cartSkuCard/locales.js +6 -3
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.js +68 -17
- package/lib/components/virtual-keyboard/Amount/index.less +39 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Amount/types.js +17 -0
- package/lib/components/virtual-keyboard/Number/index.js +65 -11
- package/lib/components/virtual-keyboard/Number/index.less +39 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Number/types.js +17 -0
- package/lib/components/virtual-keyboard/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lowcode/pisell-number-keyboard/meta.ts +167 -0
- package/lowcode/pisell-price-keyboard/meta.ts +167 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +1 -1
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -20
- package/es/components/productCard/components/Warning/index.d.ts +0 -7
- package/es/components/productCard/index.d.ts +0 -7
- package/es/components/productCard/utils.d.ts +0 -31
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -32
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -13
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/index.d.ts +0 -140
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
- package/lib/components/productCard/components/Warning/index.d.ts +0 -7
- package/lib/components/productCard/index.d.ts +0 -7
- package/lib/components/productCard/utils.d.ts +0 -31
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -32
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/index.d.ts +0 -140
|
@@ -34,7 +34,12 @@ __export(Number_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Number_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
37
39
|
var import_BaseNumberKeyboard = __toESM(require("../BaseNumberKeyboard"));
|
|
40
|
+
var import_usePisellConfig = __toESM(require("../../pisell-config-provider/hooks/usePisellConfig"));
|
|
41
|
+
var import_themeConfig = require("./themeConfig");
|
|
42
|
+
var import_index = require("./index.less");
|
|
38
43
|
var Number = (props) => {
|
|
39
44
|
const {
|
|
40
45
|
min,
|
|
@@ -43,23 +48,72 @@ var Number = (props) => {
|
|
|
43
48
|
resetText,
|
|
44
49
|
defaultValue,
|
|
45
50
|
placeholder,
|
|
46
|
-
onEnter
|
|
51
|
+
onEnter,
|
|
52
|
+
selectType = "light",
|
|
53
|
+
...others
|
|
47
54
|
} = props;
|
|
55
|
+
const config = (0, import_usePisellConfig.default)();
|
|
48
56
|
const [value, setValue] = (0, import_ahooks.useControllableValue)(props, {
|
|
49
57
|
defaultValue: defaultValue || ""
|
|
50
58
|
});
|
|
59
|
+
(0, import_react.useEffect)(() => {
|
|
60
|
+
document.body.id = "body";
|
|
61
|
+
}, []);
|
|
62
|
+
const configColor = (0, import_react.useMemo)(() => {
|
|
63
|
+
const currentConfig = import_themeConfig.numberThemeConfig[selectType];
|
|
64
|
+
const validProps = Object.entries(props).reduce((acc, [key, value2]) => {
|
|
65
|
+
if (value2 !== void 0 && key in currentConfig) {
|
|
66
|
+
acc[key] = value2;
|
|
67
|
+
}
|
|
68
|
+
return acc;
|
|
69
|
+
}, {});
|
|
70
|
+
return { ...currentConfig, ...validProps };
|
|
71
|
+
}, [selectType, props]);
|
|
72
|
+
(0, import_react.useEffect)(() => {
|
|
73
|
+
(0, import_utils.setTheme)({
|
|
74
|
+
"--pisell-number-background-color": configColor.backgroundColor,
|
|
75
|
+
"--pisell-number-container-background-color": configColor.containerBackgroundColor,
|
|
76
|
+
"--pisell-number-text-color": configColor.textColor,
|
|
77
|
+
"--pisell-number-keyboard-background-color": configColor.keyboardBackgroundColor,
|
|
78
|
+
"--pisell-number-keyboard-button-background-color": configColor.keyboardButtonBackgroundColor,
|
|
79
|
+
"--pisell-number-keyboard-button-text-color": configColor.keyboardButtonTextColor,
|
|
80
|
+
"--pisell-number-keyboard-button-hover-color": configColor.keyboardButtonHoverColor,
|
|
81
|
+
"--pisell-number-reset-button-background-color": configColor.resetButtonBackgroundColor,
|
|
82
|
+
"--pisell-number-reset-button-text-color": configColor.resetButtonTextColor,
|
|
83
|
+
"--pisell-number-done-button-background-color": configColor.doneButtonBackgroundColor,
|
|
84
|
+
"--pisell-number-done-button-text-color": configColor.doneButtonTextColor
|
|
85
|
+
});
|
|
86
|
+
}, [configColor]);
|
|
51
87
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
-
|
|
88
|
+
"div",
|
|
53
89
|
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
90
|
+
className: (0, import_classnames.default)("pisell-number-keyboard-wrap", {
|
|
91
|
+
"pisell-number-keyboard-dark": selectType === "dark",
|
|
92
|
+
"pisell-number-keyboard-light": selectType === "light"
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
import_BaseNumberKeyboard.default,
|
|
97
|
+
{
|
|
98
|
+
max,
|
|
99
|
+
min,
|
|
100
|
+
value,
|
|
101
|
+
onChange: setValue,
|
|
102
|
+
placeholder,
|
|
103
|
+
doneText,
|
|
104
|
+
resetText,
|
|
105
|
+
onEnter,
|
|
106
|
+
rightItemsStyle: {
|
|
107
|
+
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
108
|
+
textColor: configColor.textColor,
|
|
109
|
+
resetButtonBackgroundColor: configColor.resetButtonBackgroundColor,
|
|
110
|
+
resetButtonTextColor: configColor.resetButtonTextColor,
|
|
111
|
+
isDoneButtonFollowTheme: configColor.isDoneButtonFollowTheme,
|
|
112
|
+
doneButtonBackgroundColor: configColor.doneButtonBackgroundColor,
|
|
113
|
+
doneButtonTextColor: configColor.doneButtonTextColor
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
)
|
|
63
117
|
);
|
|
64
118
|
};
|
|
65
119
|
var Number_default = Number;
|
|
@@ -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,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,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);
|
|
@@ -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(--
|
|
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 {
|
|
@@ -54,6 +54,173 @@ const PisellNumberKeyboardMeta: ComponentMetadata = {
|
|
|
54
54
|
propType: "string",
|
|
55
55
|
setter: "PisellI18nSetter",
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
name: 'selectType',
|
|
59
|
+
title: { label: '选择类型', tip: 'selectType | 选择类型' },
|
|
60
|
+
setter: {
|
|
61
|
+
componentName: 'RadioGroupSetter',
|
|
62
|
+
props: {
|
|
63
|
+
options: [
|
|
64
|
+
{ title: 'Light', value: 'light' },
|
|
65
|
+
{ title: 'Dark', value: 'dark' },
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
defaultValue: 'light',
|
|
70
|
+
extraProps: {
|
|
71
|
+
onChange: (value: string, target: any) => {
|
|
72
|
+
// 根据主题切换自动设置颜色
|
|
73
|
+
const isLight = value === 'light';
|
|
74
|
+
|
|
75
|
+
target.getProps().setPropValue('backgroundColor', isLight ? '#ffffff' : 'rgba(0, 0, 0, 0.70)');
|
|
76
|
+
target.getProps().setPropValue('containerBackgroundColor', isLight ? '#d0d5dd' : 'rgba(0, 0, 0, 0.40)');
|
|
77
|
+
target.getProps().setPropValue('buttonBackgroundColor', '#ffffff');
|
|
78
|
+
target.getProps().setPropValue('textColor', "#000000");
|
|
79
|
+
target.getProps().setPropValue('resetButtonBackgroundColor', '#ffffff');
|
|
80
|
+
target.getProps().setPropValue('resetButtonTextColor', "#d92d20");
|
|
81
|
+
target.getProps().setPropValue('doneButtonBackgroundColor', "#4ca30d");
|
|
82
|
+
target.getProps().setPropValue('doneButtonTextColor', "#ffffff");
|
|
83
|
+
target.getProps().setPropValue('isDoneButtonFollowTheme', true);
|
|
84
|
+
target.getProps().setPropValue('keyboardBackgroundColor', isLight ? '#f9f9f9' : 'rgba(0, 0, 0, 0.40)');
|
|
85
|
+
target.getProps().setPropValue('keyboardButtonBackgroundColor', '#ffffff');
|
|
86
|
+
target.getProps().setPropValue('keyboardButtonTextColor', '#000000');
|
|
87
|
+
target.getProps().setPropValue('keyboardButtonHoverColor', '#f5f5f5');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "backgroundColor",
|
|
93
|
+
title: {
|
|
94
|
+
label: "背景色",
|
|
95
|
+
tip: "backgroundColor | 背景色",
|
|
96
|
+
},
|
|
97
|
+
propType: "string",
|
|
98
|
+
setter: "ColorSetter",
|
|
99
|
+
defaultValue: "#ffffff",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "containerBackgroundColor",
|
|
103
|
+
title: {
|
|
104
|
+
label: "容器背景色",
|
|
105
|
+
tip: "containerBackgroundColor | 容器背景色",
|
|
106
|
+
},
|
|
107
|
+
propType: "string",
|
|
108
|
+
setter: "ColorSetter",
|
|
109
|
+
defaultValue: "#d0d5dd",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "buttonBackgroundColor",
|
|
113
|
+
title: {
|
|
114
|
+
label: "按钮背景色",
|
|
115
|
+
tip: "buttonBackgroundColor | 按钮背景色",
|
|
116
|
+
},
|
|
117
|
+
propType: "string",
|
|
118
|
+
setter: "ColorSetter",
|
|
119
|
+
defaultValue: "#ffffff",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "textColor",
|
|
123
|
+
title: {
|
|
124
|
+
label: "文本颜色",
|
|
125
|
+
tip: "textColor | 文本颜色",
|
|
126
|
+
},
|
|
127
|
+
propType: "string",
|
|
128
|
+
setter: "ColorSetter",
|
|
129
|
+
defaultValue: "#000000",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "resetButtonBackgroundColor",
|
|
133
|
+
title: {
|
|
134
|
+
label: "重置按钮背景色",
|
|
135
|
+
tip: "resetButtonBackgroundColor | 重置按钮背景色",
|
|
136
|
+
},
|
|
137
|
+
propType: "string",
|
|
138
|
+
setter: "ColorSetter",
|
|
139
|
+
defaultValue: "#ffffff",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "resetButtonTextColor",
|
|
143
|
+
title: {
|
|
144
|
+
label: "重置按钮文本颜色",
|
|
145
|
+
tip: "resetButtonTextColor | 重置按钮文本颜色",
|
|
146
|
+
},
|
|
147
|
+
propType: "string",
|
|
148
|
+
setter: "ColorSetter",
|
|
149
|
+
defaultValue: "#d92d20",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'isDoneButtonFollowTheme',
|
|
153
|
+
title: { label: 'Done按钮颜色跟随主题色', tip: 'isDoneButtonFollowTheme | Done按钮颜色跟随主题色' },
|
|
154
|
+
propType: 'bool',
|
|
155
|
+
defaultValue: true,
|
|
156
|
+
setter: 'BoolSetter'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "doneButtonBackgroundColor",
|
|
160
|
+
title: {
|
|
161
|
+
label: "Done按钮背景色",
|
|
162
|
+
tip: "doneButtonBackgroundColor | Done按钮背景色",
|
|
163
|
+
},
|
|
164
|
+
propType: "string",
|
|
165
|
+
setter: "ColorSetter",
|
|
166
|
+
defaultValue: "#4ca30d",
|
|
167
|
+
condition(target: any) {
|
|
168
|
+
return !target.getProps().getPropValue("isDoneButtonFollowTheme");
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "doneButtonTextColor",
|
|
173
|
+
title: {
|
|
174
|
+
label: "Done按钮文本颜色",
|
|
175
|
+
tip: "doneButtonTextColor | Done按钮文本颜色",
|
|
176
|
+
},
|
|
177
|
+
propType: "string",
|
|
178
|
+
setter: "ColorSetter",
|
|
179
|
+
defaultValue: "#ffffff",
|
|
180
|
+
condition(target: any) {
|
|
181
|
+
return !target.getProps().getPropValue("isDoneButtonFollowTheme");
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "keyboardBackgroundColor",
|
|
186
|
+
title: {
|
|
187
|
+
label: "键盘背景色",
|
|
188
|
+
tip: "keyboardBackgroundColor | 键盘背景色",
|
|
189
|
+
},
|
|
190
|
+
propType: "string",
|
|
191
|
+
setter: "ColorSetter",
|
|
192
|
+
defaultValue: "#f9f9f9",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "keyboardButtonBackgroundColor",
|
|
196
|
+
title: {
|
|
197
|
+
label: "键盘按钮背景色",
|
|
198
|
+
tip: "keyboardButtonBackgroundColor | 键盘按钮背景色",
|
|
199
|
+
},
|
|
200
|
+
propType: "string",
|
|
201
|
+
setter: "ColorSetter",
|
|
202
|
+
defaultValue: "#ffffff",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "keyboardButtonTextColor",
|
|
206
|
+
title: {
|
|
207
|
+
label: "键盘按钮文本颜色",
|
|
208
|
+
tip: "keyboardButtonTextColor | 键盘按钮文本颜色",
|
|
209
|
+
},
|
|
210
|
+
propType: "string",
|
|
211
|
+
setter: "ColorSetter",
|
|
212
|
+
defaultValue: "#000000",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "keyboardButtonHoverColor",
|
|
216
|
+
title: {
|
|
217
|
+
label: "键盘按钮悬停颜色",
|
|
218
|
+
tip: "keyboardButtonHoverColor | 键盘按钮悬停颜色",
|
|
219
|
+
},
|
|
220
|
+
propType: "string",
|
|
221
|
+
setter: "ColorSetter",
|
|
222
|
+
defaultValue: "#f5f5f5",
|
|
223
|
+
},
|
|
57
224
|
],
|
|
58
225
|
configure: {
|
|
59
226
|
supports: {
|