logix-payment-shift4 1.0.4 → 1.0.6

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/dist/index.cjs.js CHANGED
@@ -184,7 +184,6 @@ function _unsupportedIterableToArray(r, a) {
184
184
  function PaymentForm(_ref) {
185
185
  var amount = _ref.amount,
186
186
  currency = _ref.currency,
187
- currencyIcon = _ref.currencyIcon,
188
187
  color = _ref.color,
189
188
  _ref$formwidth = _ref.formwidth,
190
189
  formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
@@ -192,7 +191,8 @@ function PaymentForm(_ref) {
192
191
  formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
193
192
  _ref$formbackgroundCo = _ref.formbackgroundColor,
194
193
  formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo,
195
- companyLogo = _ref.companyLogo;
194
+ _ref$inputpadding = _ref.inputpadding,
195
+ inputpadding = _ref$inputpadding === void 0 ? 12 : _ref$inputpadding;
196
196
  var formRef = React.useRef();
197
197
  var initializedRef = React.useRef(false); // yalnız bir dəfə mount üçün
198
198
  var shift4Ref = React.useRef(null);
@@ -335,7 +335,6 @@ function PaymentForm(_ref) {
335
335
  display: "flex",
336
336
  justifyContent: "center",
337
337
  width: "100%",
338
- padding: "20px",
339
338
  boxSizing: "border-box"
340
339
  }
341
340
  }, /*#__PURE__*/React.createElement("form", {
@@ -346,59 +345,13 @@ function PaymentForm(_ref) {
346
345
  style: {
347
346
  display: "grid",
348
347
  gap: "12px",
349
- padding: "24px",
348
+ padding: "20px",
350
349
  backgroundColor: formbackgroundColor,
351
350
  borderRadius: formborderRadius,
352
351
  width: formwidth,
353
- // səhifənin 1/4-ü
354
352
  boxSizing: "border-box"
355
353
  }
356
354
  }, /*#__PURE__*/React.createElement("div", {
357
- style: {
358
- textAlign: "center",
359
- marginBottom: 20
360
- }
361
- }, /*#__PURE__*/React.createElement("img", {
362
- src: companyLogo,
363
- alt: "Logo",
364
- style: {
365
- height: "40px",
366
- width: "auto",
367
- marginBottom: 10
368
- }
369
- }), /*#__PURE__*/React.createElement("div", {
370
- style: {
371
- display: "flex",
372
- alignItems: "center",
373
- gap: "12px",
374
- marginTop: 10
375
- }
376
- }, /*#__PURE__*/React.createElement("div", {
377
- style: {
378
- flex: 1,
379
- height: "1px",
380
- backgroundColor: "#e5e7eb"
381
- }
382
- }), /*#__PURE__*/React.createElement("div", {
383
- style: {
384
- fontSize: "22px",
385
- fontWeight: "700",
386
- color: "#1f2937",
387
- margin: "0 12px"
388
- }
389
- }, "Total Amount:"), /*#__PURE__*/React.createElement("div", {
390
- style: {
391
- fontSize: "22px",
392
- fontWeight: "700",
393
- color: "#16a34a"
394
- }
395
- }, currencyIcon, " ", Math.round(amount * 100)), /*#__PURE__*/React.createElement("div", {
396
- style: {
397
- flex: 1,
398
- height: "1px",
399
- backgroundColor: "#e5e7eb"
400
- }
401
- }))), /*#__PURE__*/React.createElement("div", {
402
355
  style: {
403
356
  display: "grid",
404
357
  gap: "8px"
@@ -412,7 +365,7 @@ function PaymentForm(_ref) {
412
365
  "data-shift4": "number",
413
366
  className: "form-control",
414
367
  style: {
415
- padding: "12px",
368
+ padding: inputpadding,
416
369
  borderRadius: "10px",
417
370
  border: "1px solid #ccc",
418
371
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -433,7 +386,7 @@ function PaymentForm(_ref) {
433
386
  "data-shift4": "expiry",
434
387
  className: "form-control",
435
388
  style: {
436
- padding: "12px",
389
+ padding: inputpadding,
437
390
  borderRadius: "10px",
438
391
  border: "1px solid #ccc",
439
392
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -447,7 +400,7 @@ function PaymentForm(_ref) {
447
400
  "data-shift4": "cvc",
448
401
  className: "form-control",
449
402
  style: {
450
- padding: "12px",
403
+ padding: inputpadding,
451
404
  borderRadius: "10px",
452
405
  border: "1px solid #ccc",
453
406
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -458,7 +411,7 @@ function PaymentForm(_ref) {
458
411
  style: {
459
412
  marginTop: "16px",
460
413
  width: "100%",
461
- padding: "14px",
414
+ padding: inputpadding,
462
415
  backgroundColor: color,
463
416
  color: "white",
464
417
  border: "none",
package/dist/index.esm.js CHANGED
@@ -182,7 +182,6 @@ function _unsupportedIterableToArray(r, a) {
182
182
  function PaymentForm(_ref) {
183
183
  var amount = _ref.amount,
184
184
  currency = _ref.currency,
185
- currencyIcon = _ref.currencyIcon,
186
185
  color = _ref.color,
187
186
  _ref$formwidth = _ref.formwidth,
188
187
  formwidth = _ref$formwidth === void 0 ? 400 : _ref$formwidth,
@@ -190,7 +189,8 @@ function PaymentForm(_ref) {
190
189
  formborderRadius = _ref$formborderRadius === void 0 ? 20 : _ref$formborderRadius,
191
190
  _ref$formbackgroundCo = _ref.formbackgroundColor,
192
191
  formbackgroundColor = _ref$formbackgroundCo === void 0 ? "#fff" : _ref$formbackgroundCo,
193
- companyLogo = _ref.companyLogo;
192
+ _ref$inputpadding = _ref.inputpadding,
193
+ inputpadding = _ref$inputpadding === void 0 ? 12 : _ref$inputpadding;
194
194
  var formRef = useRef();
195
195
  var initializedRef = useRef(false); // yalnız bir dəfə mount üçün
196
196
  var shift4Ref = useRef(null);
@@ -333,7 +333,6 @@ function PaymentForm(_ref) {
333
333
  display: "flex",
334
334
  justifyContent: "center",
335
335
  width: "100%",
336
- padding: "20px",
337
336
  boxSizing: "border-box"
338
337
  }
339
338
  }, /*#__PURE__*/React.createElement("form", {
@@ -344,59 +343,13 @@ function PaymentForm(_ref) {
344
343
  style: {
345
344
  display: "grid",
346
345
  gap: "12px",
347
- padding: "24px",
346
+ padding: "20px",
348
347
  backgroundColor: formbackgroundColor,
349
348
  borderRadius: formborderRadius,
350
349
  width: formwidth,
351
- // səhifənin 1/4-ü
352
350
  boxSizing: "border-box"
353
351
  }
354
352
  }, /*#__PURE__*/React.createElement("div", {
355
- style: {
356
- textAlign: "center",
357
- marginBottom: 20
358
- }
359
- }, /*#__PURE__*/React.createElement("img", {
360
- src: companyLogo,
361
- alt: "Logo",
362
- style: {
363
- height: "40px",
364
- width: "auto",
365
- marginBottom: 10
366
- }
367
- }), /*#__PURE__*/React.createElement("div", {
368
- style: {
369
- display: "flex",
370
- alignItems: "center",
371
- gap: "12px",
372
- marginTop: 10
373
- }
374
- }, /*#__PURE__*/React.createElement("div", {
375
- style: {
376
- flex: 1,
377
- height: "1px",
378
- backgroundColor: "#e5e7eb"
379
- }
380
- }), /*#__PURE__*/React.createElement("div", {
381
- style: {
382
- fontSize: "22px",
383
- fontWeight: "700",
384
- color: "#1f2937",
385
- margin: "0 12px"
386
- }
387
- }, "Total Amount:"), /*#__PURE__*/React.createElement("div", {
388
- style: {
389
- fontSize: "22px",
390
- fontWeight: "700",
391
- color: "#16a34a"
392
- }
393
- }, currencyIcon, " ", Math.round(amount * 100)), /*#__PURE__*/React.createElement("div", {
394
- style: {
395
- flex: 1,
396
- height: "1px",
397
- backgroundColor: "#e5e7eb"
398
- }
399
- }))), /*#__PURE__*/React.createElement("div", {
400
353
  style: {
401
354
  display: "grid",
402
355
  gap: "8px"
@@ -410,7 +363,7 @@ function PaymentForm(_ref) {
410
363
  "data-shift4": "number",
411
364
  className: "form-control",
412
365
  style: {
413
- padding: "12px",
366
+ padding: inputpadding,
414
367
  borderRadius: "10px",
415
368
  border: "1px solid #ccc",
416
369
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -431,7 +384,7 @@ function PaymentForm(_ref) {
431
384
  "data-shift4": "expiry",
432
385
  className: "form-control",
433
386
  style: {
434
- padding: "12px",
387
+ padding: inputpadding,
435
388
  borderRadius: "10px",
436
389
  border: "1px solid #ccc",
437
390
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -445,7 +398,7 @@ function PaymentForm(_ref) {
445
398
  "data-shift4": "cvc",
446
399
  className: "form-control",
447
400
  style: {
448
- padding: "12px",
401
+ padding: inputpadding,
449
402
  borderRadius: "10px",
450
403
  border: "1px solid #ccc",
451
404
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -456,7 +409,7 @@ function PaymentForm(_ref) {
456
409
  style: {
457
410
  marginTop: "16px",
458
411
  width: "100%",
459
- padding: "14px",
412
+ padding: inputpadding,
460
413
  backgroundColor: color,
461
414
  color: "white",
462
415
  border: "none",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logix-payment-shift4",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "description": "A React component library for integrating Shift4 payments with Logix applications.",
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
 
3
- export default function PaymentForm({amount,currency,currencyIcon,color,formwidth=400,formborderRadius=20,formbackgroundColor="#fff",companyLogo}) {
3
+ export default function PaymentForm({amount,currency,color,formwidth=400,formborderRadius=20,formbackgroundColor="#fff",inputpadding=12}) {
4
4
  const formRef = useRef();
5
5
  const initializedRef = useRef(false); // yalnız bir dəfə mount üçün
6
6
  const shift4Ref = useRef(null);
@@ -95,7 +95,6 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
95
95
  display: "flex",
96
96
  justifyContent: "center",
97
97
  width: "100%",
98
- padding: "20px",
99
98
  boxSizing: "border-box"
100
99
  }}
101
100
  >
@@ -107,33 +106,14 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
107
106
  style={{
108
107
  display: "grid",
109
108
  gap: "12px",
110
- padding: "24px",
109
+ padding: "20px",
111
110
  backgroundColor: formbackgroundColor,
112
111
  borderRadius: formborderRadius,
113
- width: formwidth, // səhifənin 1/4-ü
112
+ width: formwidth,
114
113
  boxSizing: "border-box"
115
114
  }}
116
115
  >
117
- {/* Logo + Total */}
118
- <div style={{ textAlign: "center", marginBottom: 20 }}>
119
- <img
120
- src={companyLogo}
121
- alt="Logo"
122
- style={{ height: "40px", width: "auto", marginBottom: 10 }}
123
- />
124
-
125
- {/* Product Name + Price inline with line */}
126
- <div style={{ display: "flex", alignItems: "center", gap: "12px", marginTop: 10 }}>
127
- <div style={{ flex: 1, height: "1px", backgroundColor: "#e5e7eb" }} />
128
- <div style={{ fontSize: "22px", fontWeight: "700", color: "#1f2937", margin: "0 12px" }}>
129
- Total Amount:
130
- </div>
131
- <div style={{ fontSize: "22px", fontWeight: "700", color: "#16a34a" }}>
132
- {currencyIcon} {Math.round(amount * 100)}
133
- </div>
134
- <div style={{ flex: 1, height: "1px", backgroundColor: "#e5e7eb" }} />
135
- </div>
136
- </div>
116
+
137
117
 
138
118
  {/* Card Number */}
139
119
  <div style={{ display: "grid", gap: "8px" }}>
@@ -142,7 +122,7 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
142
122
  data-shift4="number"
143
123
  className="form-control"
144
124
  style={{
145
- padding: "12px",
125
+ padding: inputpadding,
146
126
  borderRadius: "10px",
147
127
  border: "1px solid #ccc",
148
128
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -158,7 +138,7 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
158
138
  data-shift4="expiry"
159
139
  className="form-control"
160
140
  style={{
161
- padding: "12px",
141
+ padding: inputpadding,
162
142
  borderRadius: "10px",
163
143
  border: "1px solid #ccc",
164
144
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -171,7 +151,7 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
171
151
  data-shift4="cvc"
172
152
  className="form-control"
173
153
  style={{
174
- padding: "12px",
154
+ padding: inputpadding,
175
155
  borderRadius: "10px",
176
156
  border: "1px solid #ccc",
177
157
  boxShadow: "inset 0 2px 4px rgba(0,0,0,0.05)"
@@ -187,7 +167,7 @@ export default function PaymentForm({amount,currency,currencyIcon,color,formwidt
187
167
  style={{
188
168
  marginTop: "16px",
189
169
  width: "100%",
190
- padding: "14px",
170
+ padding: inputpadding,
191
171
  backgroundColor: color,
192
172
  color: "white",
193
173
  border: "none",