@blocklet/payment-react 1.19.17 → 1.19.18

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.
@@ -50,10 +50,10 @@ export default function ProductItem({
50
50
  const maxQuantity = quantityAvailable ? Math.min(adjustableQuantity.maximum || Infinity, quantityAvailable) : adjustableQuantity.maximum || Infinity;
51
51
  const handleQuantityChange = (newQuantity) => {
52
52
  if (newQuantity >= minQuantity && newQuantity <= maxQuantity) {
53
- setLocalQuantity(newQuantity);
54
53
  if (formatQuantityInventory(item.price, newQuantity, locale)) {
55
54
  return;
56
55
  }
56
+ setLocalQuantity(newQuantity);
57
57
  onQuantityChange(item.price_id, newQuantity);
58
58
  }
59
59
  };
@@ -231,7 +231,7 @@ export default function ProductItem({
231
231
  htmlInput: {
232
232
  min: minQuantity,
233
233
  max: maxQuantity,
234
- style: { textAlign: "center", padding: "4px" }
234
+ style: { textAlign: "center", padding: "4px", minWidth: 80 }
235
235
  }
236
236
  }
237
237
  }
@@ -58,10 +58,10 @@ function ProductItem({
58
58
  const maxQuantity = quantityAvailable ? Math.min(adjustableQuantity.maximum || Infinity, quantityAvailable) : adjustableQuantity.maximum || Infinity;
59
59
  const handleQuantityChange = newQuantity => {
60
60
  if (newQuantity >= minQuantity && newQuantity <= maxQuantity) {
61
- setLocalQuantity(newQuantity);
62
61
  if ((0, _util.formatQuantityInventory)(item.price, newQuantity, locale)) {
63
62
  return;
64
63
  }
64
+ setLocalQuantity(newQuantity);
65
65
  onQuantityChange(item.price_id, newQuantity);
66
66
  }
67
67
  };
@@ -223,7 +223,8 @@ function ProductItem({
223
223
  max: maxQuantity,
224
224
  style: {
225
225
  textAlign: "center",
226
- padding: "4px"
226
+ padding: "4px",
227
+ minWidth: 80
227
228
  }
228
229
  }
229
230
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-react",
3
- "version": "1.19.17",
3
+ "version": "1.19.18",
4
4
  "description": "Reusable react components for payment kit v2",
5
5
  "keywords": [
6
6
  "react",
@@ -54,16 +54,16 @@
54
54
  }
55
55
  },
56
56
  "dependencies": {
57
- "@arcblock/did-connect-react": "^3.1.5",
58
- "@arcblock/ux": "^3.1.5",
59
- "@arcblock/ws": "^1.21.2",
60
- "@blocklet/theme": "^3.1.5",
61
- "@blocklet/ui-react": "^3.1.5",
57
+ "@arcblock/did-connect-react": "^3.1.18",
58
+ "@arcblock/ux": "^3.1.18",
59
+ "@arcblock/ws": "^1.21.3",
60
+ "@blocklet/theme": "^3.1.18",
61
+ "@blocklet/ui-react": "^3.1.18",
62
62
  "@mui/icons-material": "^7.1.2",
63
63
  "@mui/lab": "7.0.0-beta.14",
64
64
  "@mui/material": "^7.1.2",
65
65
  "@mui/system": "^7.1.1",
66
- "@ocap/util": "^1.21.2",
66
+ "@ocap/util": "^1.21.3",
67
67
  "@stripe/react-stripe-js": "^2.9.0",
68
68
  "@stripe/stripe-js": "^2.4.0",
69
69
  "@vitejs/plugin-legacy": "^7.0.0",
@@ -94,7 +94,7 @@
94
94
  "@babel/core": "^7.27.4",
95
95
  "@babel/preset-env": "^7.27.2",
96
96
  "@babel/preset-react": "^7.27.1",
97
- "@blocklet/payment-types": "1.19.17",
97
+ "@blocklet/payment-types": "1.19.18",
98
98
  "@storybook/addon-essentials": "^7.6.20",
99
99
  "@storybook/addon-interactions": "^7.6.20",
100
100
  "@storybook/addon-links": "^7.6.20",
@@ -125,5 +125,5 @@
125
125
  "vite-plugin-babel": "^1.3.1",
126
126
  "vite-plugin-node-polyfills": "^0.23.0"
127
127
  },
128
- "gitHead": "718d307a13b0c11e11316cdd28fff2f335e23de7"
128
+ "gitHead": "b57baf21f22ae453247bc31444673aa01e35e6dc"
129
129
  }
@@ -78,10 +78,10 @@ export default function ProductItem({
78
78
 
79
79
  const handleQuantityChange = (newQuantity: number) => {
80
80
  if (newQuantity >= minQuantity && newQuantity <= maxQuantity) {
81
- setLocalQuantity(newQuantity);
82
81
  if (formatQuantityInventory(item.price, newQuantity, locale)) {
83
82
  return;
84
83
  }
84
+ setLocalQuantity(newQuantity);
85
85
  onQuantityChange(item.price_id, newQuantity);
86
86
  }
87
87
  };
@@ -248,7 +248,7 @@ export default function ProductItem({
248
248
  htmlInput: {
249
249
  min: minQuantity,
250
250
  max: maxQuantity,
251
- style: { textAlign: 'center', padding: '4px' },
251
+ style: { textAlign: 'center', padding: '4px', minWidth: 80 },
252
252
  },
253
253
  }}
254
254
  />