@pisell/materials 6.12.50 → 6.12.51

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 (75) 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 +1 -1
  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/PisellCards/index.d.ts +0 -1
  10. package/es/components/PisellFields/index.d.ts +0 -1
  11. package/es/components/PisellLayouts/index.d.ts +0 -1
  12. package/es/components/PisellMetrics/index.d.ts +0 -1
  13. package/es/components/appVersionControl/types.d.ts +0 -1
  14. package/es/components/calendar/index.d.ts +0 -1
  15. package/es/components/checkbox/index.d.ts +0 -1
  16. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  17. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
  18. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
  19. package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
  20. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
  21. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
  22. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
  23. package/es/components/date-picker/index.d.ts +0 -1
  24. package/es/components/drag-sort-tree/types.d.ts +0 -1
  25. package/es/components/filter/components/FilterButton/types.d.ts +0 -1
  26. package/es/components/input/index.d.ts +0 -1
  27. package/es/components/pisell-config-provider/context.d.ts +0 -1
  28. package/es/components/pisellDatePicker/index.d.ts +0 -1
  29. package/es/components/pisellGridPro/ToolBar/type.d.ts +0 -1
  30. package/es/components/pisellMenu/types.d.ts +0 -1
  31. package/es/components/pisellQuickFilter/type.d.ts +0 -1
  32. package/es/components/productCard/cartSkuCard/index.js +22 -13
  33. package/es/components/productCard/cartSkuCard/types.d.ts +1 -0
  34. package/es/components/productCard/cartSkuCard/variants/A12/index.js +8 -6
  35. package/es/components/productCard/cartSkuCard/variants/A12/index.less +44 -13
  36. package/es/components/radio/index.d.ts +0 -1
  37. package/es/components/section-footers/index.d.ts +0 -1
  38. package/es/components/skeleton/index.d.ts +0 -1
  39. package/es/components/time-picker/index.d.ts +0 -1
  40. package/es/components/upload/index.d.ts +0 -1
  41. package/es/components/virtual-keyboard/Amount/types.d.ts +0 -1
  42. package/lib/components/PisellCards/index.d.ts +0 -1
  43. package/lib/components/PisellFields/index.d.ts +0 -1
  44. package/lib/components/PisellLayouts/index.d.ts +0 -1
  45. package/lib/components/PisellMetrics/index.d.ts +0 -1
  46. package/lib/components/appVersionControl/types.d.ts +0 -1
  47. package/lib/components/calendar/index.d.ts +0 -1
  48. package/lib/components/checkbox/index.d.ts +0 -1
  49. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  50. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
  51. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
  52. package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
  53. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
  54. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
  55. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
  56. package/lib/components/date-picker/index.d.ts +0 -1
  57. package/lib/components/drag-sort-tree/types.d.ts +0 -1
  58. package/lib/components/filter/components/FilterButton/types.d.ts +0 -1
  59. package/lib/components/input/index.d.ts +0 -1
  60. package/lib/components/pisell-config-provider/context.d.ts +0 -1
  61. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  62. package/lib/components/pisellGridPro/ToolBar/type.d.ts +0 -1
  63. package/lib/components/pisellMenu/types.d.ts +0 -1
  64. package/lib/components/pisellQuickFilter/type.d.ts +0 -1
  65. package/lib/components/productCard/cartSkuCard/index.js +22 -13
  66. package/lib/components/productCard/cartSkuCard/types.d.ts +1 -0
  67. package/lib/components/productCard/cartSkuCard/variants/A12/index.js +8 -6
  68. package/lib/components/productCard/cartSkuCard/variants/A12/index.less +44 -13
  69. package/lib/components/radio/index.d.ts +0 -1
  70. package/lib/components/section-footers/index.d.ts +0 -1
  71. package/lib/components/skeleton/index.d.ts +0 -1
  72. package/lib/components/time-picker/index.d.ts +0 -1
  73. package/lib/components/upload/index.d.ts +0 -1
  74. package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -1
  75. package/package.json +2 -2
@@ -66,7 +66,7 @@ function getPresentationStyle(presentation) {
66
66
  return style;
67
67
  }
68
68
  const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOriginalPrice = false, isShowEditProduct = false, disabled = false, disabledEditClick = false, slots, presentation, onDelete, onEditProduct }) => {
69
- var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to;
69
+ var _ref8, _dataSource$num, _dataSource$total, _dataSource$origin_to, _slots$contentFooter;
70
70
  const display = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.a12) || {};
71
71
  const specificationsData = (0, react.useMemo)(() => resolveSpecifications(dataSource), [dataSource]);
72
72
  const weighingInfo = (0, react.useMemo)(() => (0, _pisell_utils.resolveWeighingSnapshot)(dataSource), [dataSource]);
@@ -84,6 +84,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
84
84
  key: specification.key
85
85
  }, specification.label ? /* @__PURE__ */ react.default.createElement("span", { className: `${require_index$2.PREFIX}-a12__specification-label` }, specification.label) : null, /* @__PURE__ */ react.default.createElement("strong", { className: `${require_index$2.PREFIX}-a12__specification-value` }, specification.value)))) : (dataSource === null || dataSource === void 0 ? void 0 : dataSource.product_option_string) ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__specification-summary` }, dataSource.product_option_string) : null;
86
86
  const specifications = (slots === null || slots === void 0 ? void 0 : slots.specifications) ? slots.specifications(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, slotContext), {}, { defaultSpecifications })) : defaultSpecifications;
87
+ const contentFooter = slots === null || slots === void 0 || (_slots$contentFooter = slots.contentFooter) === null || _slots$contentFooter === void 0 ? void 0 : _slots$contentFooter.call(slots, slotContext);
87
88
  const defaultPrice = /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__price` }, /* @__PURE__ */ react.default.createElement("strong", null, (0, _pisell_utils.formatAmount)(lineTotal, 2, symbol)), isShowOriginalPrice && originalTotal > 0 && originalTotal !== lineTotal ? /* @__PURE__ */ react.default.createElement("del", null, (0, _pisell_utils.formatAmount)(originalTotal, 2, symbol)) : null);
88
89
  const defaultEdit = Boolean(isShowEditProduct && onEditProduct) ? /* @__PURE__ */ react.default.createElement("button", {
89
90
  type: "button",
@@ -95,17 +96,18 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
95
96
  onEditProduct === null || onEditProduct === void 0 || onEditProduct(dataSource);
96
97
  }
97
98
  }, _pisell_utils.locales.getText("pisell2.product.card.edit")) : null;
98
- const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-fallback` }, isShowDelete && onDelete ? /* @__PURE__ */ react.default.createElement("button", {
99
+ const defaultQuantityControl = (slots === null || slots === void 0 ? void 0 : slots.quantityControl) ? slots.quantityControl(slotContext) : /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-fallback` }, /* @__PURE__ */ react.default.createElement("span", null, display.quantityText || `× ${quantity}`));
100
+ const defaultActionRail = /* @__PURE__ */ react.default.createElement("aside", { className: `${require_index$2.PREFIX}-a12__rail` }, isShowDelete && onDelete ? /* @__PURE__ */ react.default.createElement("button", {
99
101
  type: "button",
100
- "aria-label": "Delete item",
102
+ className: `${require_index$2.PREFIX}-a12__delete`,
103
+ "aria-label": _pisell_utils.locales.getText("pisell2.cart.sku-card.actions.delete"),
101
104
  disabled,
102
105
  onClick: (event) => {
103
106
  event.preventDefault();
104
107
  event.stopPropagation();
105
108
  onDelete(dataSource);
106
109
  }
107
- }, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, /* @__PURE__ */ react.default.createElement("span", null, display.quantityText || `× ${quantity}`));
108
- const defaultActionRail = /* @__PURE__ */ react.default.createElement("aside", { className: `${require_index$2.PREFIX}-a12__rail` }, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-control` }, defaultQuantityControl));
110
+ }, /* @__PURE__ */ react.default.createElement(require_index.default, { type: "pisell2-trash-01" })) : null, defaultPrice, defaultEdit, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__quantity-control` }, defaultQuantityControl));
109
111
  const actionRail = (slots === null || slots === void 0 ? void 0 : slots.actionRail) ? slots.actionRail(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, slotContext), {}, {
110
112
  defaultPrice,
111
113
  defaultEdit,
@@ -121,7 +123,7 @@ const A12 = ({ dataSource, isShowImage = true, isShowDelete = false, isShowOrigi
121
123
  }) : /* @__PURE__ */ react.default.createElement("span", { "aria-hidden": "true" }, String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.name) || "").slice(0, 2))) : null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__content` }, display.eyebrow ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__eyebrow` }, display.eyebrow) : null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__name` }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.name), weighingInfo ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__weighing` }, /* @__PURE__ */ react.default.createElement(require_index$1.default, {
122
124
  dataSource: weighingInfo,
123
125
  symbol
124
- })) : null, specifications), actionRail);
126
+ })) : null, specifications, contentFooter ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$2.PREFIX}-a12__content-footer` }, contentFooter) : null), actionRail);
125
127
  };
126
128
  //#endregion
127
129
  exports.default = A12;
@@ -4,7 +4,7 @@
4
4
  --pc-a12-radius: 18px;
5
5
  --pc-a12-min-height: 164px;
6
6
  --pc-a12-media-width: 228px;
7
- --pc-a12-rail-width: 174px;
7
+ --pc-a12-rail-width: 190px;
8
8
  --pc-a12-content-padding: 20px 22px;
9
9
  --pc-a12-rail-padding: 18px 20px;
10
10
  --pc-a12-accent: #b20d12;
@@ -67,6 +67,15 @@
67
67
  padding: var(--pc-a12-content-padding);
68
68
  }
69
69
 
70
+ &__content-footer {
71
+ margin-top: auto;
72
+ padding-top: 12px;
73
+
74
+ .ant-divider {
75
+ margin-bottom: 16px !important;
76
+ }
77
+ }
78
+
70
79
  &--align-center &__content {
71
80
  justify-content: center;
72
81
  }
@@ -145,6 +154,7 @@
145
154
  }
146
155
 
147
156
  &__rail {
157
+ position: relative;
148
158
  display: flex;
149
159
  min-width: 0;
150
160
  flex-direction: column;
@@ -154,6 +164,39 @@
154
164
  border-left: 1px solid var(--pc-a12-border-color);
155
165
  }
156
166
 
167
+ &__delete {
168
+ position: absolute;
169
+ top: 6px;
170
+ right: 6px;
171
+ display: grid;
172
+ width: 42px;
173
+ height: 42px;
174
+ padding: 0;
175
+ place-items: center;
176
+ border: 0;
177
+ border-radius: 50%;
178
+ background: transparent;
179
+ color: var(--pc-a12-accent);
180
+ font-size: 26px;
181
+ cursor: pointer;
182
+
183
+ .anticon,
184
+ svg {
185
+ width: 30px;
186
+ height: 30px;
187
+ font-size: 30px;
188
+ }
189
+
190
+ &:active {
191
+ background: #fef3f2;
192
+ }
193
+
194
+ &:disabled {
195
+ cursor: not-allowed;
196
+ opacity: 0.5;
197
+ }
198
+ }
199
+
157
200
  &__price {
158
201
  display: flex;
159
202
  flex-direction: column;
@@ -210,18 +253,6 @@
210
253
  justify-content: center;
211
254
  gap: 16px;
212
255
  font-weight: 700;
213
-
214
- button {
215
- display: grid;
216
- width: 40px;
217
- height: 40px;
218
- place-items: center;
219
- border: 1px solid #f5b7ba;
220
- border-radius: 50%;
221
- background: #fff;
222
- color: var(--pc-a12-accent);
223
- cursor: pointer;
224
- }
225
256
  }
226
257
 
227
258
  &--compact {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/radio/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/section-footers/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/skeleton/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/time-picker/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _$react from "react";
3
2
 
4
3
  //#region src/components/upload/index.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseNumberKeyboardProps } from "../BaseNumberKeyboard/index.js";
3
2
 
4
3
  //#region src/components/virtual-keyboard/Amount/types.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.12.50",
3
+ "version": "6.12.51",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -95,8 +95,8 @@
95
95
  "swiper": "^8.4.7",
96
96
  "antd-mobile": "^5.38.1",
97
97
  "vod-js-sdk-v6": "^1.4.11",
98
- "@pisell/utils": "3.0.4",
99
98
  "@pisell/date-picker": "3.0.10",
99
+ "@pisell/utils": "3.0.4",
100
100
  "@pisell/icon": "0.0.11"
101
101
  },
102
102
  "peerDependencies": {