@pisell/materials 6.2.24 → 6.2.25

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 (194) 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 +146 -146
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +36 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +41 -32
  11. package/es/components/DragSortList/index.js +6 -6
  12. package/es/components/classicLayout/index.js +4 -5
  13. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  14. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  15. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  16. package/es/components/icon/index.js +5 -5
  17. package/es/components/iconfont/index.js +1 -1
  18. package/es/components/list/index.js +6 -6
  19. package/es/components/pisellAdjustPrice/index.d.ts +1 -6
  20. package/es/components/pisellAdjustPrice/index.js +64 -8
  21. package/es/components/pisellAdjustPrice/index.less +35 -6
  22. package/es/components/pisellAdjustPrice/status.js +32 -0
  23. package/es/components/pisellAdjustPrice/type.js +1 -0
  24. package/es/components/pisellToast/index.js +3 -0
  25. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  26. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
  27. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
  28. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  29. package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
  30. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  31. package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
  32. package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  33. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  34. package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
  35. package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  36. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  37. package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
  38. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  39. package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
  40. package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
  41. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  42. package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
  43. package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  44. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  45. package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
  46. package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
  47. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  48. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
  49. package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
  50. package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
  51. package/es/components/productCard/cartSkuCard/index.js +195 -0
  52. package/es/components/productCard/cartSkuCard/index.less +69 -0
  53. package/es/components/productCard/cartSkuCard/locales.js +30 -0
  54. package/es/components/productCard/components/Header/index.js +4 -3
  55. package/es/components/productCard/components/Sales/index.js +2 -2
  56. package/es/components/productCard/index.d.ts +3 -1
  57. package/es/components/productCard/index.js +2 -0
  58. package/es/components/qrcode/index.js +1 -1
  59. package/es/components/sort/components/InlineMenu/index.js +1 -1
  60. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  61. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  62. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
  63. package/es/components/table/Header/Buttons/index.js +5 -5
  64. package/es/components/table/Table/AddFieldModal/index.js +6 -6
  65. package/es/components/table/Table/SelectField/index.js +4 -4
  66. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  67. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  68. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  69. package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
  70. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  71. package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
  72. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  73. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  74. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  75. package/es/components/table/Table/utils.d.ts +1 -1
  76. package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
  77. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  78. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  79. package/es/components/translation/utils.js +5 -5
  80. package/es/components/virtual-keyboard/Amount/index.d.ts +3 -20
  81. package/es/components/virtual-keyboard/Amount/index.js +79 -7
  82. package/es/components/virtual-keyboard/Amount/index.less +39 -0
  83. package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
  84. package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
  85. package/es/components/virtual-keyboard/Amount/types.js +1 -0
  86. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  87. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
  88. package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
  89. package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
  90. package/es/components/virtual-keyboard/Number/index.js +77 -7
  91. package/es/components/virtual-keyboard/Number/index.less +39 -0
  92. package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
  93. package/es/components/virtual-keyboard/Number/types.js +1 -0
  94. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
  95. package/es/components/virtual-keyboard/index.d.ts +11 -0
  96. package/es/components/virtual-keyboard/index.js +88 -3
  97. package/es/components/virtual-keyboard/index.less +33 -1
  98. package/es/hooks/useResponsive.js +2 -2
  99. package/es/utils/hoc.js +1 -1
  100. package/es/utils/miniRedux.js +8 -9
  101. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  102. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  103. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  104. package/lib/components/iconfont/index.js +1 -1
  105. package/lib/components/lowCodePage/index.js +1 -2
  106. package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
  107. package/lib/components/pisellAdjustPrice/index.js +119 -57
  108. package/lib/components/pisellAdjustPrice/index.less +35 -6
  109. package/lib/components/pisellAdjustPrice/status.js +60 -0
  110. package/lib/components/pisellAdjustPrice/type.js +17 -0
  111. package/lib/components/pisellToast/index.js +3 -0
  112. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  113. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
  114. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
  115. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  116. package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
  117. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  118. package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
  119. package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  120. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  121. package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
  122. package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  123. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  124. package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
  125. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  126. package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
  127. package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
  128. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  129. package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
  130. package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  131. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  132. package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
  133. package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
  134. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  135. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
  136. package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
  137. package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
  138. package/lib/components/productCard/cartSkuCard/index.js +216 -0
  139. package/lib/components/productCard/cartSkuCard/index.less +69 -0
  140. package/lib/components/productCard/cartSkuCard/locales.js +61 -0
  141. package/lib/components/productCard/components/Header/index.js +4 -3
  142. package/lib/components/productCard/components/Sales/index.js +2 -2
  143. package/lib/components/productCard/index.d.ts +3 -1
  144. package/lib/components/productCard/index.js +2 -0
  145. package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
  146. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
  147. package/lib/components/table/Table/fields/utils/index.js +1 -2
  148. package/lib/components/table/Table/utils.d.ts +1 -1
  149. package/lib/components/virtual-keyboard/Amount/index.d.ts +3 -20
  150. package/lib/components/virtual-keyboard/Amount/index.js +72 -16
  151. package/lib/components/virtual-keyboard/Amount/index.less +39 -0
  152. package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
  153. package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
  154. package/lib/components/virtual-keyboard/Amount/types.js +17 -0
  155. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  156. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
  157. package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
  158. package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
  159. package/lib/components/virtual-keyboard/Number/index.js +65 -11
  160. package/lib/components/virtual-keyboard/Number/index.less +39 -0
  161. package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
  162. package/lib/components/virtual-keyboard/Number/types.js +17 -0
  163. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
  164. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  165. package/lib/components/virtual-keyboard/index.js +60 -2
  166. package/lib/components/virtual-keyboard/index.less +33 -1
  167. package/lib/hooks/useResponsive.js +3 -6
  168. package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
  169. package/lowcode/pisell-adjust-price/meta.ts +168 -0
  170. package/lowcode/pisell-adjust-price/snippets.ts +1 -0
  171. package/lowcode/pisell-number-keyboard/meta.ts +167 -0
  172. package/lowcode/pisell-price-keyboard/meta.ts +167 -0
  173. package/lowcode/virtual-keyboard/meta.ts +131 -0
  174. package/package.json +1 -1
  175. package/dist/umd/materials.min.css +0 -1
  176. package/dist/umd/materials.min.js +0 -1
  177. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  178. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  179. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  180. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  181. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  182. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
  183. package/es/components/iconfont/index.d.ts +0 -8
  184. package/es/components/productCard/locales.d.ts +0 -84
  185. package/es/components/productCard/status.d.ts +0 -32
  186. package/es/components/productCard/types.d.ts +0 -84
  187. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  188. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
  189. package/lib/components/iconfont/index.d.ts +0 -8
  190. package/lib/components/productCard/locales.d.ts +0 -84
  191. package/lib/components/productCard/status.d.ts +0 -32
  192. package/lib/components/productCard/types.d.ts +0 -84
  193. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  194. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
@@ -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("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("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })) : 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
+ );
98
112
  };
99
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 {
@@ -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
- needAdjust
229
+ autoAdjust
230
230
  triggerType="click"
231
231
  closable={false}
232
232
  alignEdge
233
- align="lt"
233
+ align="l"
234
+ v2
234
235
  style={{ width: 300 }}
235
236
  >
236
237
  <div className="lc-antd-icon-setter-header">
@@ -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
  },