@pisell/private-materials 6.4.42 → 6.4.43
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 +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/components/actionButtons/index.js +37 -42
- package/es/components/booking/components/actionButtons/index.less +0 -28
- package/es/components/booking/components/footer/amount.d.ts +3 -3
- package/es/components/booking/components/footer/amount.js +13 -2
- package/es/components/booking/components/footer/index.js +168 -68
- package/es/components/booking/components/footer/utils.js +62 -33
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/index.js +2 -1
- package/es/components/booking/info2/index.js +42 -2
- package/es/components/booking/info2/service/addService/index.js +2 -1
- package/es/components/booking/info2/service/editService/index.js +12 -4
- package/es/components/checkout/PaymentModal.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +395 -240
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +161 -54
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
- package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
- package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/components/WalletPassModule/index.js +3 -2
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +2 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +33 -0
- package/es/components/checkout/locales.js +39 -3
- package/es/components/checkout/types.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +143 -71
- package/es/components/shoppingCart/components/Cart/index.js +1 -1
- package/es/components/shoppingCart/components/Cart/index.less +31 -0
- package/es/components/shoppingCart/locales.d.ts +3 -0
- package/es/components/shoppingCart/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.js +2 -1
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
- package/es/pro/priceKeyboard/index.d.ts +3 -0
- package/es/pro/priceKeyboard/index.js +3 -0
- package/es/pro/priceKeyboard/index.less +215 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/priceKeyboard/utils.js +51 -0
- package/es/pro/skuDetailModal/index.js +19 -16
- package/lib/components/booking/components/actionButtons/index.js +31 -28
- package/lib/components/booking/components/actionButtons/index.less +0 -28
- package/lib/components/booking/components/footer/amount.d.ts +3 -3
- package/lib/components/booking/components/footer/amount.js +10 -4
- package/lib/components/booking/components/footer/index.js +107 -40
- package/lib/components/booking/components/footer/utils.js +35 -7
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/addService/index.js +2 -1
- package/lib/components/booking/info2/index.js +18 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/editService/index.js +12 -4
- package/lib/components/checkout/PaymentModal.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +152 -73
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +114 -40
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
- package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/components/WalletPassModule/index.js +3 -2
- package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +33 -0
- package/lib/components/checkout/locales.js +39 -3
- package/lib/components/checkout/types.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
- package/lib/components/shoppingCart/components/Cart/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.less +31 -0
- package/lib/components/shoppingCart/locales.d.ts +3 -0
- package/lib/components/shoppingCart/locales.js +6 -3
- package/lib/components/ticketBooking/index.js +5 -1
- package/lib/components/ticketBooking/utils/index.js +2 -1
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
- package/lib/pro/priceKeyboard/index.d.ts +3 -0
- package/lib/pro/priceKeyboard/index.js +45 -0
- package/lib/pro/priceKeyboard/index.less +215 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/priceKeyboard/utils.js +75 -0
- package/lib/pro/skuDetailModal/index.js +18 -22
- package/package.json +4 -4
@@ -0,0 +1,81 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/pro/priceKeyboard/hooks/rightItems.tsx
|
30
|
+
var rightItems_exports = {};
|
31
|
+
__export(rightItems_exports, {
|
32
|
+
default: () => rightItems_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(rightItems_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_materials = require("@pisell/materials");
|
37
|
+
var useRightItems = (props) => {
|
38
|
+
const { rightItemsStyle, doneText, resetText } = props;
|
39
|
+
const rightItems = (0, import_react.useMemo)(() => {
|
40
|
+
return [
|
41
|
+
{
|
42
|
+
value: "delete",
|
43
|
+
label: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "pisell2-delete" }),
|
44
|
+
disabled: false,
|
45
|
+
type: "text",
|
46
|
+
style: {
|
47
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000",
|
48
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#ffffff",
|
49
|
+
...(rightItemsStyle == null ? void 0 : rightItemsStyle.deleteButtonStyle) || {}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
{
|
53
|
+
value: "reset",
|
54
|
+
label: resetText || "Reset",
|
55
|
+
disabled: false,
|
56
|
+
type: "text",
|
57
|
+
style: {
|
58
|
+
fontSize: "18px",
|
59
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonTextColor) || "#D92D20",
|
60
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonBackgroundColor) || "#ffffff",
|
61
|
+
...(rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonStyle) || {}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
value: "done",
|
66
|
+
label: doneText || "Done",
|
67
|
+
disabled: false,
|
68
|
+
type: "primary",
|
69
|
+
size: 2,
|
70
|
+
style: {
|
71
|
+
fontSize: "18px",
|
72
|
+
background: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "var(--theme-color)" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonBackgroundColor) || "#5d3f9f",
|
73
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "#ffffff" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonTextColor) || "#ffffff",
|
74
|
+
...(rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonStyle) || {}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
];
|
78
|
+
}, [doneText, resetText, rightItemsStyle]);
|
79
|
+
return rightItems;
|
80
|
+
};
|
81
|
+
var rightItems_default = useRightItems;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/pro/priceKeyboard/index.tsx
|
30
|
+
var priceKeyboard_exports = {};
|
31
|
+
__export(priceKeyboard_exports, {
|
32
|
+
CashKeyboard: () => import_cashKeyboard.default,
|
33
|
+
DiscountKeyboard: () => import_discountKeyboard.default,
|
34
|
+
PaymentKeyboard: () => import_paymentKeyboard.default
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(priceKeyboard_exports);
|
37
|
+
var import_cashKeyboard = __toESM(require("./components/cashKeyboard"));
|
38
|
+
var import_paymentKeyboard = __toESM(require("./components/paymentKeyboard"));
|
39
|
+
var import_discountKeyboard = __toESM(require("./components/discountKeyboard"));
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
41
|
+
0 && (module.exports = {
|
42
|
+
CashKeyboard,
|
43
|
+
DiscountKeyboard,
|
44
|
+
PaymentKeyboard
|
45
|
+
});
|
@@ -0,0 +1,215 @@
|
|
1
|
+
.price-keyboard {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
gap: 20px;
|
5
|
+
background-color: #ffffff;
|
6
|
+
border-radius: 12px;
|
7
|
+
padding: 20px;
|
8
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
9
|
+
}
|
10
|
+
|
11
|
+
.price-keyboard-inputs {
|
12
|
+
display: flex;
|
13
|
+
flex-direction: column;
|
14
|
+
gap: 16px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.price-keyboard-inputs-default {
|
18
|
+
display: flex;
|
19
|
+
flex-direction: column;
|
20
|
+
gap: 16px;
|
21
|
+
}
|
22
|
+
|
23
|
+
.price-keyboard-input-wrapper {
|
24
|
+
display: flex;
|
25
|
+
align-items: center;
|
26
|
+
padding: 12px 16px;
|
27
|
+
background-color: #f9fafb;
|
28
|
+
border: 1px solid #d0d5dd;
|
29
|
+
border-radius: 8px;
|
30
|
+
transition: all 0.2s ease;
|
31
|
+
|
32
|
+
&:hover {
|
33
|
+
border-color: #98a2b3;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:focus-within {
|
37
|
+
border-color: #1570ef;
|
38
|
+
box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.price-keyboard-input {
|
43
|
+
flex: 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
.price-keyboard-keyboard {
|
47
|
+
display: flex;
|
48
|
+
gap: 12px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.price-keyboard-keyboard-numbers {
|
52
|
+
flex: 1;
|
53
|
+
display: grid;
|
54
|
+
grid-template-columns: repeat(3, 1fr);
|
55
|
+
gap: 8px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.price-keyboard-keyboard-actions {
|
59
|
+
display: flex;
|
60
|
+
flex-direction: column;
|
61
|
+
gap: 8px;
|
62
|
+
width: 80px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.price-keyboard-key {
|
66
|
+
display: flex;
|
67
|
+
align-items: center;
|
68
|
+
justify-content: center;
|
69
|
+
height: 48px;
|
70
|
+
border: 1px solid #d0d5dd;
|
71
|
+
border-radius: 8px;
|
72
|
+
background-color: #ffffff;
|
73
|
+
color: #344054;
|
74
|
+
font-size: 16px;
|
75
|
+
font-weight: 500;
|
76
|
+
cursor: pointer;
|
77
|
+
transition: all 0.2s ease;
|
78
|
+
outline: none;
|
79
|
+
|
80
|
+
&:hover {
|
81
|
+
background-color: #f9fafb;
|
82
|
+
border-color: #98a2b3;
|
83
|
+
}
|
84
|
+
|
85
|
+
&:active {
|
86
|
+
background-color: #f2f4f7;
|
87
|
+
transform: translateY(1px);
|
88
|
+
}
|
89
|
+
|
90
|
+
&:disabled {
|
91
|
+
opacity: 0.5;
|
92
|
+
cursor: not-allowed;
|
93
|
+
|
94
|
+
&:hover {
|
95
|
+
background-color: #ffffff;
|
96
|
+
border-color: #d0d5dd;
|
97
|
+
transform: none;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
&.price-keyboard-key-primary {
|
102
|
+
background-color: #1570ef;
|
103
|
+
color: #ffffff;
|
104
|
+
border-color: #1570ef;
|
105
|
+
|
106
|
+
&:hover {
|
107
|
+
background-color: #1366d9;
|
108
|
+
border-color: #1366d9;
|
109
|
+
}
|
110
|
+
|
111
|
+
&:active {
|
112
|
+
background-color: #0f5bc4;
|
113
|
+
border-color: #0f5bc4;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
&.price-keyboard-key-size-2 {
|
118
|
+
height: 104px; /* 48px * 2 + 8px gap */
|
119
|
+
}
|
120
|
+
|
121
|
+
&.price-keyboard-key-size-3 {
|
122
|
+
height: 160px; /* 48px * 3 + 16px gap */
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
.price-keyboard-delete-icon {
|
127
|
+
width: 20px;
|
128
|
+
height: 20px;
|
129
|
+
}
|
130
|
+
|
131
|
+
/* 响应式设计 */
|
132
|
+
@media (max-width: 768px) {
|
133
|
+
.price-keyboard {
|
134
|
+
padding: 16px;
|
135
|
+
gap: 16px;
|
136
|
+
}
|
137
|
+
|
138
|
+
.price-keyboard-keyboard {
|
139
|
+
flex-direction: column;
|
140
|
+
gap: 16px;
|
141
|
+
}
|
142
|
+
|
143
|
+
.price-keyboard-keyboard-actions {
|
144
|
+
flex-direction: row;
|
145
|
+
width: auto;
|
146
|
+
height: auto;
|
147
|
+
}
|
148
|
+
|
149
|
+
.price-keyboard-key {
|
150
|
+
height: 44px;
|
151
|
+
font-size: 14px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.price-keyboard-key.price-keyboard-key-size-2 {
|
155
|
+
height: 44px;
|
156
|
+
flex: 2;
|
157
|
+
}
|
158
|
+
|
159
|
+
.price-keyboard-key.price-keyboard-key-size-3 {
|
160
|
+
height: 44px;
|
161
|
+
flex: 3;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
/* 深色主题支持 */
|
166
|
+
@media (prefers-color-scheme: dark) {
|
167
|
+
.price-keyboard {
|
168
|
+
background-color: #1f2937;
|
169
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
170
|
+
}
|
171
|
+
|
172
|
+
.price-keyboard-input-wrapper {
|
173
|
+
background-color: #374151;
|
174
|
+
border-color: #4b5563;
|
175
|
+
|
176
|
+
&:hover {
|
177
|
+
border-color: #6b7280;
|
178
|
+
}
|
179
|
+
|
180
|
+
&:focus-within {
|
181
|
+
border-color: #3b82f6;
|
182
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.price-keyboard-key {
|
187
|
+
background-color: #374151;
|
188
|
+
border-color: #4b5563;
|
189
|
+
color: #f9fafb;
|
190
|
+
|
191
|
+
&:hover {
|
192
|
+
background-color: #4b5563;
|
193
|
+
border-color: #6b7280;
|
194
|
+
}
|
195
|
+
|
196
|
+
&:active {
|
197
|
+
background-color: #6b7280;
|
198
|
+
}
|
199
|
+
|
200
|
+
&.price-keyboard-key-primary {
|
201
|
+
background-color: #3b82f6;
|
202
|
+
border-color: #3b82f6;
|
203
|
+
|
204
|
+
&:hover {
|
205
|
+
background-color: #2563eb;
|
206
|
+
border-color: #2563eb;
|
207
|
+
}
|
208
|
+
|
209
|
+
&:active {
|
210
|
+
background-color: #1d4ed8;
|
211
|
+
border-color: #1d4ed8;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare const DEFAULT_THEME_CONFIG: {
|
2
|
+
dark: {
|
3
|
+
titleColor: string;
|
4
|
+
subtitleColor: string;
|
5
|
+
keyboardBgColor: string;
|
6
|
+
keyboardWrapperBgColor: string;
|
7
|
+
bgColor: string;
|
8
|
+
bgColorGray200: string;
|
9
|
+
bgColorGray300: string;
|
10
|
+
textGray500: string;
|
11
|
+
textGray600: string;
|
12
|
+
textGray900: string;
|
13
|
+
};
|
14
|
+
light: {
|
15
|
+
titleColor: string;
|
16
|
+
subtitleColor: string;
|
17
|
+
keyboardBgColor: string;
|
18
|
+
keyboardWrapperBgColor: string;
|
19
|
+
bgColor: string;
|
20
|
+
bgColorGray200: string;
|
21
|
+
bgColorGray300: string;
|
22
|
+
textGray500: string;
|
23
|
+
textGray600: string;
|
24
|
+
textGray900: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* 设置键盘主题
|
29
|
+
* @param theme 主题
|
30
|
+
*/
|
31
|
+
export declare const setKeyboardTheme: (theme?: 'dark' | 'light') => void;
|
@@ -0,0 +1,75 @@
|
|
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/pro/priceKeyboard/utils.ts
|
20
|
+
var utils_exports = {};
|
21
|
+
__export(utils_exports, {
|
22
|
+
DEFAULT_THEME_CONFIG: () => DEFAULT_THEME_CONFIG,
|
23
|
+
setKeyboardTheme: () => setKeyboardTheme
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
26
|
+
var import_utils = require("@pisell/utils");
|
27
|
+
var DEFAULT_THEME_CONFIG = {
|
28
|
+
dark: {
|
29
|
+
titleColor: "#FFFFFF",
|
30
|
+
subtitleColor: "#D0D5DD",
|
31
|
+
keyboardBgColor: "rgba(0, 0, 0, 0.4)",
|
32
|
+
keyboardWrapperBgColor: "rgba(0, 0, 0, 0.7)",
|
33
|
+
bgColor: "rgba(0, 0, 0, 0.70)",
|
34
|
+
bgColorGray200: "rgba(0, 0, 0, 0.40)",
|
35
|
+
bgColorGray300: "rgba(0, 0, 0, 0.40)",
|
36
|
+
textGray500: "#D0D5DD",
|
37
|
+
textGray600: "#FFFFFF",
|
38
|
+
textGray900: "#FFFFFF"
|
39
|
+
},
|
40
|
+
light: {
|
41
|
+
titleColor: "#101828",
|
42
|
+
subtitleColor: "#667085",
|
43
|
+
keyboardBgColor: "#D0D5DD",
|
44
|
+
keyboardWrapperBgColor: "white",
|
45
|
+
bgColor: "#FFFFFF",
|
46
|
+
bgColorGray200: "#EAECF0",
|
47
|
+
bgColorGray300: "#D0D5DD",
|
48
|
+
textGray500: "#667085",
|
49
|
+
textGray600: "#475467",
|
50
|
+
textGray900: "#101828"
|
51
|
+
}
|
52
|
+
};
|
53
|
+
var setKeyboardTheme = (theme) => {
|
54
|
+
const currentTheme = DEFAULT_THEME_CONFIG[theme || "light"];
|
55
|
+
(0, import_utils.setTheme)({
|
56
|
+
// 标题颜色
|
57
|
+
"--pisell-pro-price-keyboard-title-color": currentTheme.titleColor,
|
58
|
+
// 副标题颜色
|
59
|
+
"--pisell-pro-price-keyboard-subtitle-color": currentTheme.subtitleColor,
|
60
|
+
// 背景颜色梯度
|
61
|
+
"--pisell-pro-price-keyboard-wrapper-bg-color": currentTheme.keyboardWrapperBgColor,
|
62
|
+
"--pisell-pro-price-keyboard-bg-color": currentTheme.keyboardBgColor,
|
63
|
+
"--pisell-pro-price-keyboard-bg-color-gray-200": currentTheme.bgColorGray200,
|
64
|
+
"--pisell-pro-price-keyboard-bg-color-gray-300": currentTheme.bgColorGray300,
|
65
|
+
// 文本颜色梯度
|
66
|
+
"--pisell-pro-price-keyboard-text-gray-500": currentTheme.textGray500,
|
67
|
+
"--pisell-pro-price-keyboard-text-gray-600": currentTheme.textGray600,
|
68
|
+
"--pisell-pro-price-keyboard-text-gray-900": currentTheme.textGray900
|
69
|
+
});
|
70
|
+
};
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
72
|
+
0 && (module.exports = {
|
73
|
+
DEFAULT_THEME_CONFIG,
|
74
|
+
setKeyboardTheme
|
75
|
+
});
|
@@ -35,8 +35,6 @@ module.exports = __toCommonJS(skuDetailModal_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
36
36
|
var import_materials = require("@pisell/materials");
|
37
37
|
var import_decimal = __toESM(require("decimal.js"));
|
38
|
-
var import_materials2 = require("@pisell/materials");
|
39
|
-
var import_react_dom = require("react-dom");
|
40
38
|
var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
|
41
39
|
var import_utils = require("@pisell/utils");
|
42
40
|
var import_Delete_wght300_24px = __toESM(require("@pisell/icon/es/Delete_wght300_24px"));
|
@@ -45,6 +43,7 @@ var import_index = require("./index.less");
|
|
45
43
|
var import_pisellNumberSelector = __toESM(require("../pisellNumberSelector"));
|
46
44
|
var import_noteModal = __toESM(require("../../plus/noteModal"));
|
47
45
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
46
|
+
var import_priceKeyboard = require("../priceKeyboard");
|
48
47
|
var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
|
49
48
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
50
49
|
const [open, setOpen] = (0, import_react.useState)(false);
|
@@ -301,26 +300,23 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
|
|
301
300
|
onDelete: onNoteDelete
|
302
301
|
}
|
303
302
|
),
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
{
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
}
|
322
|
-
))),
|
323
|
-
document.body
|
303
|
+
/* @__PURE__ */ import_react.default.createElement(
|
304
|
+
import_priceKeyboard.DiscountKeyboard,
|
305
|
+
{
|
306
|
+
containerProps: {
|
307
|
+
renderType: "modal",
|
308
|
+
open: showPriceAdjustModal,
|
309
|
+
onCancel: () => setShowPriceAdjustModal(false)
|
310
|
+
},
|
311
|
+
enableExceedMaxAmount: true,
|
312
|
+
originalValue: priceOverride,
|
313
|
+
defaultValue: priceOverride,
|
314
|
+
onEnter: (discountAmount) => {
|
315
|
+
const finalPrice = new import_decimal.default(priceOverride || 0).minus(discountAmount).toNumber();
|
316
|
+
handlePriceAdjustConfirm(finalPrice);
|
317
|
+
},
|
318
|
+
selectType: "dark"
|
319
|
+
}
|
324
320
|
)
|
325
321
|
));
|
326
322
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.4.
|
3
|
+
"version": "6.4.43",
|
4
4
|
"main": "./lib/index.js",
|
5
5
|
"module": "./es/index.js",
|
6
6
|
"types": "./lib/index.d.ts",
|
@@ -59,10 +59,10 @@
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
60
60
|
"react-resizable": "^3.0.5",
|
61
61
|
"styled-components": "^6.0.0-rc.3",
|
62
|
-
"@pisell/
|
63
|
-
"@pisell/utils": "3.0.2",
|
62
|
+
"@pisell/date-picker": "3.0.7",
|
64
63
|
"@pisell/materials": "6.4.8",
|
65
|
-
"@pisell/
|
64
|
+
"@pisell/utils": "3.0.2",
|
65
|
+
"@pisell/icon": "0.0.11"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react": "^18.0.0",
|