@pisell/private-materials 3.4.80 → 3.4.82

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 (84) 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/meta.js +2 -2
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/booking/components/footer/index.js +26 -20
  10. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  11. package/es/components/booking/utils.d.ts +2 -2
  12. package/es/components/ecocup/hooks.js +11 -11
  13. package/es/components/eftposPay/amount.d.ts +1 -1
  14. package/es/components/eftposPay/device.d.ts +1 -1
  15. package/es/components/eftposPay/hooks.d.ts +2 -2
  16. package/es/components/eftposPay/store/index.d.ts +5 -5
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  18. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  19. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  20. package/es/hooks/useLocale.js +8 -1
  21. package/es/hooks/useThemeTokens.d.ts +7 -0
  22. package/es/hooks/useThemeTokens.js +20 -0
  23. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  24. package/es/pro/Cards/components/SKUCard/index.js +12 -3
  25. package/es/pro/Cards/components/SKUCard/index.less +2 -2
  26. package/es/pro/Cards/components/SKUCard/types.d.ts +5 -0
  27. package/es/pro/NumericStepper/index.d.ts +5 -0
  28. package/es/pro/NumericStepper/index.js +8 -2
  29. package/es/pro/NumericStepper/index.less +1 -9
  30. package/es/pro/Selector/BatchSelectorDemo.js +2 -12
  31. package/es/pro/Selector/Selector.d.ts +1 -1
  32. package/es/pro/Selector/Selector.js +6 -4
  33. package/es/pro/Selector/SelectorGroup.d.ts +1 -1
  34. package/es/pro/Selector/SelectorGroup.js +5 -1
  35. package/es/pro/Selector/components/Card/index.js +9 -7
  36. package/es/pro/Selector/components/Card/index.less +24 -15
  37. package/es/pro/Selector/components/Indicator/index.js +1 -1
  38. package/es/pro/Selector/components/Indicator/index.less +12 -12
  39. package/es/pro/Selector/components/Media/index.d.ts +1 -1
  40. package/es/pro/Selector/components/Media/index.less +1 -1
  41. package/es/pro/Selector/selectorGroup.less +9 -1
  42. package/es/pro/Selector/types.d.ts +10 -0
  43. package/es/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  44. package/lib/components/booking/components/footer/index.js +5 -0
  45. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  46. package/lib/components/booking/utils.d.ts +2 -2
  47. package/lib/components/ecocup/hooks.js +3 -3
  48. package/lib/components/eftposPay/amount.d.ts +1 -1
  49. package/lib/components/eftposPay/device.d.ts +1 -1
  50. package/lib/components/eftposPay/hooks.d.ts +2 -2
  51. package/lib/components/eftposPay/store/index.d.ts +5 -5
  52. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  53. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  54. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  55. package/lib/hooks/useLocale.js +7 -2
  56. package/lib/hooks/useThemeTokens.d.ts +7 -0
  57. package/lib/hooks/useThemeTokens.js +40 -0
  58. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  59. package/lib/pro/Cards/components/SKUCard/index.js +7 -2
  60. package/lib/pro/Cards/components/SKUCard/index.less +2 -2
  61. package/lib/pro/Cards/components/SKUCard/types.d.ts +5 -0
  62. package/lib/pro/NumericStepper/index.d.ts +5 -0
  63. package/lib/pro/NumericStepper/index.js +11 -3
  64. package/lib/pro/NumericStepper/index.less +1 -9
  65. package/lib/pro/Selector/BatchSelectorDemo.js +13 -19
  66. package/lib/pro/Selector/Selector.d.ts +1 -1
  67. package/lib/pro/Selector/Selector.js +7 -1
  68. package/lib/pro/Selector/SelectorGroup.d.ts +1 -1
  69. package/lib/pro/Selector/SelectorGroup.js +7 -1
  70. package/lib/pro/Selector/components/Card/index.js +10 -7
  71. package/lib/pro/Selector/components/Card/index.less +24 -15
  72. package/lib/pro/Selector/components/Indicator/index.js +1 -1
  73. package/lib/pro/Selector/components/Indicator/index.less +12 -12
  74. package/lib/pro/Selector/components/Media/index.d.ts +1 -1
  75. package/lib/pro/Selector/components/Media/index.js +7 -4
  76. package/lib/pro/Selector/components/Media/index.less +1 -1
  77. package/lib/pro/Selector/selectorGroup.less +9 -1
  78. package/lib/pro/Selector/types.d.ts +10 -0
  79. package/lib/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  80. package/lowcode/eco-cup-list/meta.ts +1 -1
  81. package/lowcode/eco-customer-list/meta.ts +1 -1
  82. package/lowcode/selector/meta.ts +15 -2
  83. package/lowcode/selector.group/meta.ts +15 -2
  84. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  /* Card组件样式 */
2
2
  .pisell-pro-card {
3
3
  position: relative;
4
- display: grid;
4
+ display: flex;
5
5
  border-radius: 8px;
6
6
  transition: all 0.2s;
7
7
  box-sizing: border-box;
@@ -22,6 +22,7 @@
22
22
  /* 布局样式 */
23
23
  &-vertical {
24
24
  border-radius: 12px;
25
+ flex-direction: column;
25
26
 
26
27
  .pisell-pro-card_content {
27
28
  flex: 1;
@@ -32,6 +33,7 @@
32
33
  align-items: center;
33
34
  justify-content: center;
34
35
  margin: 0;
36
+ padding: 0;
35
37
  height: 64px;
36
38
  }
37
39
 
@@ -42,12 +44,18 @@
42
44
  }
43
45
 
44
46
  &-horizontal {
45
- grid-template-columns: 1fr auto;
47
+ flex-direction: row;
46
48
  align-items: center;
47
49
  gap: 10px;
48
50
 
49
51
  &.pisell-pro-card-actions-left {
50
- grid-template-columns: auto 1fr;
52
+ .pisell-pro-card_actions {
53
+ order: 0;
54
+ }
55
+
56
+ .pisell-pro-card_content {
57
+ order: 1;
58
+ }
51
59
  }
52
60
 
53
61
  .pisell-pro-card_content {
@@ -61,6 +69,7 @@
61
69
  margin: 0;
62
70
  padding: 0;
63
71
  height: 100%;
72
+ order: 1;
64
73
  }
65
74
 
66
75
  .pisell-pro-card_actions-item {
@@ -94,34 +103,34 @@
94
103
  /* 选中状态 - outlined类型 */
95
104
  &-selected&-selected-outlined {
96
105
  &.pisell-pro-card-outlined {
97
- border-color: #7f56d9;
98
- background-color: #f9f5ff;
106
+ border-color: var(--color-primary, #5d3f9f);
107
+ background-color: var(--color-primary-bg, #f9f5ff);
99
108
  }
100
109
 
101
110
  &.pisell-pro-card-borderless {
102
- border-color: #7f56d9;
111
+ border-color: var(--color-primary, #5d3f9f);
103
112
  }
104
113
  .pisell-pro-card_content {
105
- color: #7f56d9;
114
+ color: var(--color-primary, #5d3f9f);
106
115
  }
107
116
  }
108
117
 
109
118
  /* 选中状态 - outlined-bold类型(加粗边框,使用 outline 实现不影响布局) */
110
119
  &-selected&-selected-outlined-bold {
111
120
  &.pisell-pro-card-outlined {
112
- border-color: #7f56d9;
113
- background-color: #f9f5ff;
114
- outline: 2px solid #7f56d9;
121
+ border-color: var(--color-primary, #5d3f9f);
122
+ background-color: var(--color-primary-bg, #f9f5ff);
123
+ outline: 2px solid var(--color-primary, #5d3f9f);
115
124
  outline-offset: -2px;
116
125
  }
117
126
 
118
127
  &.pisell-pro-card-borderless {
119
- border-color: #7f56d9;
120
- outline: 2px solid #7f56d9;
128
+ border-color: var(--color-primary, #5d3f9f);
129
+ outline: 2px solid var(--color-primary, #5d3f9f);
121
130
  outline-offset: -2px;
122
131
  }
123
132
  .pisell-pro-card_content {
124
- color: #7f56d9;
133
+ color: var(--color-primary, #5d3f9f);
125
134
  }
126
135
  }
127
136
 
@@ -129,9 +138,9 @@
129
138
  &-selected&-selected-filled {
130
139
  &.pisell-pro-card-outlined,
131
140
  &.pisell-pro-card-borderless {
132
- background-color: #7f56d9;
141
+ background-color: var(--color-primary, #5d3f9f);
133
142
  color: #ffffff;
134
- border-color: #7f56d9;
143
+ border-color: var(--color-primary, #5d3f9f);
135
144
 
136
145
  .pisell-pro-card_content {
137
146
  color: #ffffff;
@@ -82,7 +82,7 @@ var Indicator = function Indicator(props) {
82
82
  };
83
83
  return /*#__PURE__*/React.createElement("label", {
84
84
  className: classes,
85
- style: styles.container
85
+ style: styles === null || styles === void 0 ? void 0 : styles.container
86
86
  }, /*#__PURE__*/React.createElement("input", {
87
87
  type: mode === 'single' ? 'radio' : 'checkbox',
88
88
  className: "".concat(prefixCls, "-input"),
@@ -26,7 +26,6 @@
26
26
  position: relative;
27
27
  box-sizing: border-box;
28
28
  border: 1px solid #d0d5dd;
29
- background-color: #ffffff;
30
29
  display: flex;
31
30
  align-items: center;
32
31
  justify-content: center;
@@ -55,38 +54,39 @@
55
54
  }
56
55
 
57
56
  &-single.pisell-pro-indicator-outlined.pisell-pro-indicator-checked &-inner {
58
- border-color: #7f56d9;
59
- background-color: #ffffff;
57
+ border-color: var(--color-primary, #5d3f9f);
58
+ background-color: var(--color-primary-bg, transparent);
60
59
  }
61
60
 
62
61
  &-single.pisell-pro-indicator-outlined &-dot {
63
62
  width: 45%;
64
63
  height: 45%;
65
- background-color: #7f56d9;
64
+ background-color: var(--color-primary, #5d3f9f);
66
65
  border-radius: 50%;
67
66
  }
68
67
 
69
68
  &-single.pisell-pro-indicator-filled.pisell-pro-indicator-checked &-inner {
70
- border-color: #7f56d9;
71
- background-color: #7f56d9;
69
+ border-color: var(--color-primary, #5d3f9f);
70
+ background-color: var(--color-primary, #5d3f9f);
72
71
  }
73
72
 
74
73
  &-single.pisell-pro-indicator-filled &-check-icon {
75
74
  color: #ffffff;
76
75
  }
77
76
 
78
- &-multiple.pisell-pro-indicator-outlined.pisell-pro-indicator-checked &-inner {
79
- border-color: #7f56d9;
80
- background-color: #ffffff;
77
+ &-multiple.pisell-pro-indicator-outlined.pisell-pro-indicator-checked
78
+ &-inner {
79
+ border-color: var(--color-primary, #5d3f9f);
80
+ background-color: var(--color-primary-bg, transparent);
81
81
  }
82
82
 
83
83
  &-multiple.pisell-pro-indicator-outlined &-check-icon {
84
- color: #7f56d9;
84
+ color: var(--color-primary, #5d3f9f);
85
85
  }
86
86
 
87
87
  &-multiple.pisell-pro-indicator-filled.pisell-pro-indicator-checked &-inner {
88
- border-color: #7f56d9;
89
- background-color: #7f56d9;
88
+ border-color: var(--color-primary, #5d3f9f);
89
+ background-color: var(--color-primary, #5d3f9f);
90
90
  }
91
91
 
92
92
  &-multiple.pisell-pro-indicator-filled &-check-icon {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  import type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType } from './types';
4
- export type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType };
4
+ export type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType, };
5
5
  declare const Media: React.FC<MediaProps>;
6
6
  export default Media;
@@ -80,7 +80,7 @@
80
80
  &-selected {
81
81
  .pisell-selector_media-cover {
82
82
  border-width: 2px;
83
- border-color: #7f56d9;
83
+ border-color: var(--color-primary, #5d3f9f);
84
84
  }
85
85
 
86
86
  .pisell-selector_media-label {
@@ -1,6 +1,14 @@
1
1
  .pisell-batch-selector {
2
2
  .pisell-product-select__tabs-wrapper {
3
3
  padding: 16px 0;
4
+
5
+ .pisell-tabstruct-item--selected {
6
+ background-color: var(--color-primary, #5d3f9f);
7
+ }
8
+
9
+ .pisell-tabstruct-selection {
10
+ background-color: var(--color-primary, #5d3f9f);
11
+ }
4
12
  }
5
13
 
6
14
  &__content {
@@ -13,4 +21,4 @@
13
21
  padding-top: 16px;
14
22
  }
15
23
  }
16
- }
24
+ }
@@ -158,6 +158,11 @@ export declare type HeaderProps = {
158
158
  };
159
159
  export interface SelectorProps<T = OptionKey> extends GroupItem {
160
160
  className?: string;
161
+ theme?: {
162
+ token?: {
163
+ colorPrimary?: string;
164
+ };
165
+ };
161
166
  value?: SelectionValue<T>;
162
167
  defaultValue?: SelectionValue<T>;
163
168
  onChange?: (value: SelectionValue<T>) => void;
@@ -201,6 +206,11 @@ export interface SelectorGroupProps {
201
206
  dataSource: GroupItem[];
202
207
  defaultValue?: Record<string, SelectionValue>;
203
208
  linkageRules?: ExprRule[] | Record<string, any>;
209
+ theme?: {
210
+ token?: {
211
+ colorPrimary?: string;
212
+ };
213
+ };
204
214
  onChange?: (values: Record<string, SelectionValue>) => void;
205
215
  preserve?: boolean;
206
216
  tabProps?: {
@@ -15,11 +15,11 @@ import { locales } from '@pisell/utils';
15
15
  import { useControllableValue, useMemoizedFn } from 'ahooks';
16
16
  import classNames from 'classnames';
17
17
  import useEngineContext from "../../../../hooks/useEngineContext";
18
+ import useLocale from "../../../../hooks/useLocale";
18
19
  import useNativeScanner from "../../hooks/useNativeScanner";
19
20
  import localeTexts from "./locales";
20
21
  import "./index.less";
21
22
  var SearchSection = function SearchSection(props) {
22
- var _context$appHelper;
23
23
  var _props$isShowSearchCa = props.isShowSearchCamera,
24
24
  isShowSearchCamera = _props$isShowSearchCa === void 0 ? true : _props$isShowSearchCa,
25
25
  _props$searchIcon = props.searchIcon,
@@ -47,7 +47,8 @@ var SearchSection = function SearchSection(props) {
47
47
 
48
48
  // 初始化多语言
49
49
  var context = useEngineContext();
50
- locales.init(localeTexts, ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.storage) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.get('umi_locale')) || 'en');
50
+ var locale = useLocale();
51
+ locales.init(localeTexts, locale || 'en');
51
52
 
52
53
  // 使用 useControllableValue 管理搜索值
53
54
  var _useControllableValue = useControllableValue(props),
@@ -286,6 +286,9 @@ var Footer = (props) => {
286
286
  }
287
287
  let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
288
288
  _setLoading(true);
289
+ const loadingTimer = setTimeout(() => {
290
+ _setLoading(false);
291
+ }, 2e4);
289
292
  const { createBooking, editBooking } = getApis();
290
293
  const editApi = state.renderType === "eventBooking" ? import_serve2.editEventBooking : editBooking;
291
294
  const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
@@ -331,6 +334,7 @@ var Footer = (props) => {
331
334
  }
332
335
  }
333
336
  state == null ? void 0 : state.callback(callbackData, type);
337
+ clearTimeout(loadingTimer);
334
338
  _setLoading(false);
335
339
  return callbackData || values;
336
340
  } catch (err) {
@@ -338,6 +342,7 @@ var Footer = (props) => {
338
342
  if ((err == null ? void 0 : err.code) === 70101) {
339
343
  import_antd.message.error(err == null ? void 0 : err.message);
340
344
  }
345
+ clearTimeout(loadingTimer);
341
346
  _setLoading(false);
342
347
  }
343
348
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
166
166
  export declare const getDuration: (duration: number | {
167
167
  type: string;
168
168
  value: number;
169
- }) => number | "flexible" | {
169
+ }) => number | {
170
170
  type: string;
171
171
  value: number;
172
- };
172
+ } | "flexible";
173
173
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
174
174
  export declare const getIsEdit: (state: any) => boolean;
175
175
  export {};
@@ -42,11 +42,11 @@ __export(hooks_exports, {
42
42
  module.exports = __toCommonJS(hooks_exports);
43
43
  var import_react = require("react");
44
44
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
45
+ var import_useLocale = __toESM(require("../../hooks/useLocale"));
45
46
  var import_scanListener = __toESM(require("./utils/scanListener"));
46
47
  var useLanguage = () => {
47
- var _a, _b, _c;
48
- const context = (0, import_useEngineContext.default)();
49
- return ((_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en";
48
+ const locale = (0, import_useLocale.default)();
49
+ return locale || "en";
50
50
  };
51
51
  var useScanListener = () => {
52
52
  var _a;
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"warn" | "success" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "warn" | "success" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,10 +295,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
+ action?: "pay" | "amount" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "warn" | "success" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type CallToBookProps = {
2
3
  show: boolean;
3
4
  type: string;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const StripePayment: () => import("react").JSX.Element;
2
3
  export default StripePayment;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PageLoading: () => import("react").JSX.Element;
2
3
  export default PageLoading;
@@ -34,8 +34,13 @@ __export(useLocale_exports, {
34
34
  module.exports = __toCommonJS(useLocale_exports);
35
35
  var import_useEngineContext = __toESM(require("./useEngineContext"));
36
36
  var useLocale = () => {
37
- var _a, _b;
37
+ var _a, _b, _c, _d, _e, _f;
38
38
  const context = (0, import_useEngineContext.default)();
39
- return ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en";
39
+ const { getApp } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
40
+ const app = getApp && (getApp == null ? void 0 : getApp()) || {};
41
+ if ((_b = app == null ? void 0 : app.locales) == null ? void 0 : _b.getLocale) {
42
+ return (_d = (_c = app == null ? void 0 : app.locales) == null ? void 0 : _c.getLocale) == null ? void 0 : _d.call(_c);
43
+ }
44
+ return ((_f = (_e = context == null ? void 0 : context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.locale) || "en";
40
45
  };
41
46
  var useLocale_default = useLocale;
@@ -0,0 +1,7 @@
1
+ declare type ThemeInput = {
2
+ token?: {
3
+ colorPrimary?: string;
4
+ };
5
+ };
6
+ declare const useThemeTokens: (themeInput?: ThemeInput) => any;
7
+ export default useThemeTokens;
@@ -0,0 +1,40 @@
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/hooks/useThemeTokens.ts
20
+ var useThemeTokens_exports = {};
21
+ __export(useThemeTokens_exports, {
22
+ default: () => useThemeTokens_default
23
+ });
24
+ module.exports = __toCommonJS(useThemeTokens_exports);
25
+ var import_antd = require("antd");
26
+ var themeTokenCache = /* @__PURE__ */ new Map();
27
+ var useThemeTokens = (themeInput) => {
28
+ var _a;
29
+ const { useToken, getDesignToken } = import_antd.theme;
30
+ const { token: antdToken } = useToken();
31
+ const overrideColorPrimary = ((_a = themeInput == null ? void 0 : themeInput.token) == null ? void 0 : _a.colorPrimary) || antdToken.colorPrimary;
32
+ const cached = themeTokenCache.get(overrideColorPrimary);
33
+ if (cached) return cached;
34
+ const computed = getDesignToken({
35
+ token: { colorPrimary: overrideColorPrimary }
36
+ });
37
+ themeTokenCache.set(overrideColorPrimary, computed);
38
+ return computed;
39
+ };
40
+ var useThemeTokens_default = useThemeTokens;
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
3
3
  value?: string;
4
4
  onChange?: (val: string) => void;
5
5
  }
6
- export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
6
+ export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
7
7
  declare const ImageUpload: React.FC<ImageUploadProps>;
8
8
  export default ImageUpload;
@@ -38,6 +38,7 @@ var import_utils = require("@pisell/utils");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
40
  var import_locales = __toESM(require("./locales"));
41
+ var import_useThemeTokens = __toESM(require("../../../../hooks/useThemeTokens"));
41
42
  var import_index = require("./index.less");
42
43
  var SKUCard = ({
43
44
  cover,
@@ -50,9 +51,11 @@ var SKUCard = ({
50
51
  onClick,
51
52
  renderRight,
52
53
  skuCardConfig,
53
- skuDisabled
54
+ skuDisabled,
55
+ theme
54
56
  }) => {
55
57
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
58
+ const { colorPrimary, colorPrimaryBg } = (0, import_useThemeTokens.default)(theme);
56
59
  const context = (0, import_useEngineContext.default)();
57
60
  const language = ((_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en";
58
61
  import_utils.locales.init(import_locales.default, language);
@@ -173,7 +176,9 @@ var SKUCard = ({
173
176
  onClick == null ? void 0 : onClick();
174
177
  },
175
178
  style: {
176
- cursor: disabled ? "not-allowed" : "pointer"
179
+ cursor: disabled ? "not-allowed" : "pointer",
180
+ ["--color-primary"]: colorPrimary,
181
+ ["--color-primary-bg"]: colorPrimaryBg
177
182
  }
178
183
  },
179
184
  !!skuDisabled && !!showDisabledText && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-pro-cards-sku-card-disabled-mask" }, /* @__PURE__ */ import_react.default.createElement(
@@ -39,8 +39,8 @@
39
39
  }
40
40
 
41
41
  &-active {
42
- border: 1px solid #7f56d9;
43
- background: #fcfaff;
42
+ border: 1px solid var(--color-primary, #5d3f9f);
43
+ background: var(--color-primary-bg, #fcfaff);
44
44
  }
45
45
 
46
46
  &-disabled {
@@ -65,4 +65,9 @@ export interface SKUCardProps {
65
65
  skuCardConfig?: SkuCardConfig;
66
66
  /** SKU 是否禁用 */
67
67
  skuDisabled?: boolean;
68
+ theme?: {
69
+ token?: {
70
+ colorPrimary?: string;
71
+ };
72
+ };
68
73
  }
@@ -30,6 +30,11 @@ export interface NumericStepperProps {
30
30
  onChange?: (value: number) => void;
31
31
  /** 自定义类名 */
32
32
  className?: string;
33
+ theme?: {
34
+ token?: {
35
+ colorPrimary?: string;
36
+ };
37
+ };
33
38
  /** 自定义样式 */
34
39
  styles?: {
35
40
  container?: React.CSSProperties;
@@ -37,6 +37,7 @@ var import_react = require("react");
37
37
  var import_classnames = __toESM(require("classnames"));
38
38
  var import_utils = require("@pisell/utils");
39
39
  var import_keyboards = require("../keyboards");
40
+ var import_useThemeTokens = __toESM(require("../../hooks/useThemeTokens"));
40
41
  var import_index = require("./index.less");
41
42
  var NumericStepper = ({
42
43
  value,
@@ -55,13 +56,15 @@ var NumericStepper = ({
55
56
  horizontalPadding = 0,
56
57
  variant = "separated",
57
58
  enableInput = true,
58
- displayMaxWidth
59
+ displayMaxWidth,
60
+ theme
59
61
  }) => {
60
62
  const [open, setOpen] = (0, import_react.useState)(false);
61
63
  const [internalValue, setInternalValue] = (0, import_react.useState)(
62
64
  value !== void 0 ? value : defaultValue
63
65
  );
64
66
  const _isMobile = (0, import_react.useMemo)(() => (0, import_utils.isMobile)(), [import_utils.isMobile]);
67
+ const { colorPrimary } = (0, import_useThemeTokens.default)(theme);
65
68
  const [tempValue, setTempValue] = (0, import_react.useState)("");
66
69
  const currentValue = value !== void 0 ? value : internalValue;
67
70
  (0, import_react.useEffect)(() => {
@@ -192,7 +195,9 @@ var NumericStepper = ({
192
195
  if (isPlusOnly) {
193
196
  return null;
194
197
  }
195
- const displayWrapperStyle = variant === "capsule" && displayMaxWidth ? { maxWidth: typeof displayMaxWidth === "number" ? `${displayMaxWidth}px` : displayMaxWidth } : {};
198
+ const displayWrapperStyle = variant === "capsule" && displayMaxWidth ? {
199
+ maxWidth: typeof displayMaxWidth === "number" ? `${displayMaxWidth}px` : displayMaxWidth
200
+ } : {};
196
201
  const displayElement = /* @__PURE__ */ React.createElement(
197
202
  "span",
198
203
  {
@@ -295,7 +300,10 @@ var NumericStepper = ({
295
300
  "div",
296
301
  {
297
302
  className: stepperClasses,
298
- style: styles == null ? void 0 : styles.container,
303
+ style: {
304
+ ...(styles == null ? void 0 : styles.container) || {},
305
+ ["--color-primary"]: colorPrimary
306
+ },
299
307
  onClick: (e) => e.stopPropagation()
300
308
  },
301
309
  _minus,
@@ -1,7 +1,5 @@
1
1
  // ========== 变量定义 ==========
2
- @primary-color: #7f56d9;
3
- @primary-hover: #6b46c1;
4
- @primary-active: #553c9a;
2
+ @primary-color: var(--color-primary, #5d3f9f);
5
3
 
6
4
  @text-color: #101828;
7
5
  @text-secondary: #344054;
@@ -77,13 +75,7 @@
77
75
  align-items: center;
78
76
  display: flex;
79
77
  height: 100%;
80
-
81
- &:hover .numeric-stepper-button:not(.numeric-stepper-button-disabled) {
82
- background-color: @primary-hover;
83
- }
84
-
85
78
  &:active .numeric-stepper-button:not(.numeric-stepper-button-disabled) {
86
- background-color: @primary-active;
87
79
  transform: scale(0.95);
88
80
  }
89
81