@pisell/materials 6.2.24 → 6.2.26
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +36 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +41 -32
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/icon/index.js +5 -5
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.js +6 -6
- package/es/components/pisellAdjustPrice/index.js +64 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -0
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/index.js +2 -0
- package/es/components/qrcode/index.js +1 -1
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.js +6 -6
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/translation/utils.js +5 -5
- package/es/components/virtual-keyboard/Amount/index.js +79 -7
- 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/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- 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/VirtualKeyInput/index.js +10 -3
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisellAdjustPrice/index.js +119 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -0
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/index.js +2 -0
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/virtual-keyboard/Amount/index.js +72 -16
- 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/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- 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/VirtualKeyInput/index.js +34 -20
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lib/hooks/useResponsive.js +3 -6
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- 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/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/pisellAdjustPrice/index.d.ts +0 -9
- package/es/components/pisellToast/index.d.ts +0 -16
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/index.d.ts +0 -5
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -84
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -19
- 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 -11
- package/es/components/virtual-keyboard/index.d.ts +0 -14
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -9
- package/lib/components/pisellToast/index.d.ts +0 -16
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/index.d.ts +0 -5
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -84
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -19
- 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 -11
- package/lib/components/virtual-keyboard/index.d.ts +0 -14
|
@@ -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/Amount/themeConfig.ts
|
|
20
|
+
var themeConfig_exports = {};
|
|
21
|
+
__export(themeConfig_exports, {
|
|
22
|
+
amountThemeConfig: () => amountThemeConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(themeConfig_exports);
|
|
25
|
+
var amountThemeConfig = {
|
|
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
|
+
amountThemeConfig
|
|
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/Amount/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -127,7 +127,8 @@ var BaseNumberKeyboard = (props) => {
|
|
|
127
127
|
min,
|
|
128
128
|
onEnter,
|
|
129
129
|
presets,
|
|
130
|
-
defaultSelect
|
|
130
|
+
defaultSelect,
|
|
131
|
+
rightItemsStyle
|
|
131
132
|
} = props;
|
|
132
133
|
const [value, setValue] = (0, import_ahooks.useControllableValue)(props, {
|
|
133
134
|
defaultValue
|
|
@@ -142,7 +143,11 @@ var BaseNumberKeyboard = (props) => {
|
|
|
142
143
|
value: "delete",
|
|
143
144
|
label: /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" }),
|
|
144
145
|
disabled: false,
|
|
145
|
-
type: "text"
|
|
146
|
+
type: "text",
|
|
147
|
+
style: {
|
|
148
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000",
|
|
149
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#ffffff"
|
|
150
|
+
}
|
|
146
151
|
},
|
|
147
152
|
{
|
|
148
153
|
value: "reset",
|
|
@@ -151,7 +156,8 @@ var BaseNumberKeyboard = (props) => {
|
|
|
151
156
|
type: "text",
|
|
152
157
|
style: {
|
|
153
158
|
fontSize: "18px",
|
|
154
|
-
color: "#D92D20"
|
|
159
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonTextColor) || "#D92D20",
|
|
160
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonBackgroundColor) || "#ffffff"
|
|
155
161
|
}
|
|
156
162
|
},
|
|
157
163
|
{
|
|
@@ -162,12 +168,25 @@ var BaseNumberKeyboard = (props) => {
|
|
|
162
168
|
size: 2,
|
|
163
169
|
style: {
|
|
164
170
|
fontSize: "18px",
|
|
165
|
-
background: "var(--
|
|
166
|
-
color: "#
|
|
171
|
+
background: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "var(--theme-color)" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonBackgroundColor) || "#5d3f9f",
|
|
172
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "#ffffff" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonTextColor) || "#ffffff"
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
];
|
|
170
|
-
}, [doneText, resetText]);
|
|
176
|
+
}, [doneText, resetText, rightItemsStyle]);
|
|
177
|
+
const itemsWithStyle = (0, import_react.useMemo)(() => {
|
|
178
|
+
return items.map((item) => ({
|
|
179
|
+
...item,
|
|
180
|
+
style: {
|
|
181
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#fff",
|
|
182
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000"
|
|
183
|
+
}
|
|
184
|
+
}));
|
|
185
|
+
}, [
|
|
186
|
+
items,
|
|
187
|
+
rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor,
|
|
188
|
+
rightItemsStyle == null ? void 0 : rightItemsStyle.textColor
|
|
189
|
+
]);
|
|
171
190
|
const checkValue = (val) => {
|
|
172
191
|
if ((0, import_utils.isNumber)(max) && Number(val) > max) {
|
|
173
192
|
const newValue = Math.min(Number(val), Number(max));
|
|
@@ -229,12 +248,16 @@ var BaseNumberKeyboard = (props) => {
|
|
|
229
248
|
},
|
|
230
249
|
showDelete: false,
|
|
231
250
|
onValueSelect: setSelect,
|
|
232
|
-
defaultSelect
|
|
251
|
+
defaultSelect,
|
|
252
|
+
style: {
|
|
253
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#fff",
|
|
254
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000"
|
|
255
|
+
}
|
|
233
256
|
}
|
|
234
257
|
), /* @__PURE__ */ import_react.default.createElement(import_Presets.default, { presets, onChange: handleChangeValue }), /* @__PURE__ */ import_react.default.createElement(
|
|
235
258
|
import_Keyboard.default,
|
|
236
259
|
{
|
|
237
|
-
items,
|
|
260
|
+
items: itemsWithStyle,
|
|
238
261
|
rightItems,
|
|
239
262
|
onChange: handleKeyboardChange
|
|
240
263
|
}
|
|
@@ -124,7 +124,8 @@ var Keyboard = (props) => {
|
|
|
124
124
|
className: "virtual-keyboard-item-button",
|
|
125
125
|
style: {
|
|
126
126
|
fontSize: ((_a = item.style) == null ? void 0 : _a.fontSize) || 25,
|
|
127
|
-
color: item.type === "primary" ? "#fff" : ((_b = item.style) == null ? void 0 : _b.color) || void 0
|
|
127
|
+
color: item.type === "primary" ? "#fff" : ((_b = item.style) == null ? void 0 : _b.color) || void 0,
|
|
128
|
+
...item.type === "primary" ? item.style || {} : {}
|
|
128
129
|
},
|
|
129
130
|
disabled: item.disabled,
|
|
130
131
|
onClick: (e) => {
|
|
@@ -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);
|
|
@@ -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,28 +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(
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
76
77
|
"div",
|
|
77
78
|
{
|
|
78
|
-
className:
|
|
79
|
-
|
|
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(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
+
);
|
|
98
112
|
};
|
|
99
113
|
var VirtualKeyInput_default = VirtualKeyInput;
|
|
@@ -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 {
|
|
@@ -35,8 +35,7 @@ var responsiveConfig = {
|
|
|
35
35
|
function handleResize() {
|
|
36
36
|
const oldInfo = info;
|
|
37
37
|
calculate();
|
|
38
|
-
if (oldInfo === info)
|
|
39
|
-
return;
|
|
38
|
+
if (oldInfo === info) return;
|
|
40
39
|
for (const subscriber of subscribers) {
|
|
41
40
|
subscriber();
|
|
42
41
|
}
|
|
@@ -58,8 +57,7 @@ function calculate() {
|
|
|
58
57
|
}
|
|
59
58
|
function configResponsive(config) {
|
|
60
59
|
responsiveConfig = config;
|
|
61
|
-
if (info)
|
|
62
|
-
calculate();
|
|
60
|
+
if (info) calculate();
|
|
63
61
|
}
|
|
64
62
|
function useResponsive() {
|
|
65
63
|
if (import_utils.isBrowser && !listening) {
|
|
@@ -70,8 +68,7 @@ function useResponsive() {
|
|
|
70
68
|
}
|
|
71
69
|
const [state, setState] = (0, import_react.useState)(info);
|
|
72
70
|
(0, import_react.useEffect)(() => {
|
|
73
|
-
if (!import_utils.isBrowser)
|
|
74
|
-
return;
|
|
71
|
+
if (!import_utils.isBrowser) return;
|
|
75
72
|
if (!listening) {
|
|
76
73
|
window.addEventListener("resize", handleResize);
|
|
77
74
|
}
|
|
@@ -226,11 +226,12 @@ const AntdIconSetter = (props: AntdIconSetterProps) => {
|
|
|
226
226
|
<Balloon
|
|
227
227
|
className="lc-antd-icon-setter-balloon"
|
|
228
228
|
trigger={triggerNode}
|
|
229
|
-
|
|
229
|
+
autoAdjust
|
|
230
230
|
triggerType="click"
|
|
231
231
|
closable={false}
|
|
232
232
|
alignEdge
|
|
233
|
-
align="
|
|
233
|
+
align="l"
|
|
234
|
+
v2
|
|
234
235
|
style={{ width: 300 }}
|
|
235
236
|
>
|
|
236
237
|
<div className="lc-antd-icon-setter-header">
|