@gem-sdk/plugin-cart-drawer 1.58.0 → 1.60.13
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/cjs/components/CartDrawer.js +4 -2
- package/dist/cjs/components/CartLineItem.js +2 -31
- package/dist/cjs/components/CartLineQuantityAdjustButton.js +4 -62
- package/dist/cjs/components/DiscountCodeItem.js +2 -31
- package/dist/esm/components/CartDrawer.js +4 -2
- package/dist/esm/components/CartLineItem.js +2 -31
- package/dist/esm/components/CartLineQuantityAdjustButton.js +4 -62
- package/dist/esm/components/DiscountCodeItem.js +2 -31
- package/package.json +4 -4
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var core = require('@gem-sdk/core');
|
|
7
6
|
var react = require('react');
|
|
8
7
|
var reactTransitionGroup = require('react-transition-group');
|
|
8
|
+
var components = require('@gem-sdk/components');
|
|
9
|
+
var core = require('@gem-sdk/core');
|
|
9
10
|
var CartDiscountCode = require('./CartDiscountCode.js');
|
|
10
11
|
var CartFooter = require('./CartFooter.js');
|
|
11
12
|
var CartLineItem = require('./CartLineItem.js');
|
|
@@ -50,7 +51,8 @@ const CartDrawer = ({ className, style, setting })=>{
|
|
|
50
51
|
style: {
|
|
51
52
|
...style,
|
|
52
53
|
...defaultStyle,
|
|
53
|
-
...transitionStyles[state]
|
|
54
|
+
...transitionStyles[state],
|
|
55
|
+
zIndex: components.ELEMENT_Z_INDEX.CART_DRAWER
|
|
54
56
|
},
|
|
55
57
|
children: [
|
|
56
58
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -96,40 +96,11 @@ const CartLineItem = ()=>{
|
|
|
96
96
|
buttons: [
|
|
97
97
|
{
|
|
98
98
|
label: 'Cancel',
|
|
99
|
-
className: 'gp-w-[130px]'
|
|
100
|
-
styles: {
|
|
101
|
-
backgroundColor: {
|
|
102
|
-
normal: 'bg-1'
|
|
103
|
-
},
|
|
104
|
-
roundedBtn: {
|
|
105
|
-
normal: {
|
|
106
|
-
radiusType: 'small'
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
btnSpacing: {
|
|
110
|
-
type: 'small'
|
|
111
|
-
}
|
|
112
|
-
}
|
|
99
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
113
100
|
},
|
|
114
101
|
{
|
|
115
102
|
label: 'Delete',
|
|
116
|
-
className: 'gp-w-[130px]',
|
|
117
|
-
styles: {
|
|
118
|
-
textColor: {
|
|
119
|
-
normal: 'text-3'
|
|
120
|
-
},
|
|
121
|
-
backgroundColor: {
|
|
122
|
-
normal: 'error'
|
|
123
|
-
},
|
|
124
|
-
roundedBtn: {
|
|
125
|
-
normal: {
|
|
126
|
-
radiusType: 'small'
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
btnSpacing: {
|
|
130
|
-
type: 'small'
|
|
131
|
-
}
|
|
132
|
-
},
|
|
103
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
133
104
|
onClick: ()=>{
|
|
134
105
|
if (cartId && line.id) {
|
|
135
106
|
removeCartLine({
|
|
@@ -50,40 +50,11 @@ var Trash = require('./icons/Trash.js');
|
|
|
50
50
|
buttons: [
|
|
51
51
|
{
|
|
52
52
|
label: 'Cancel',
|
|
53
|
-
className: 'gp-w-[130px]'
|
|
54
|
-
styles: {
|
|
55
|
-
backgroundColor: {
|
|
56
|
-
normal: 'bg-1'
|
|
57
|
-
},
|
|
58
|
-
roundedBtn: {
|
|
59
|
-
normal: {
|
|
60
|
-
radiusType: 'small'
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
btnSpacing: {
|
|
64
|
-
type: 'small'
|
|
65
|
-
}
|
|
66
|
-
}
|
|
53
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
67
54
|
},
|
|
68
55
|
{
|
|
69
56
|
label: 'Delete',
|
|
70
|
-
className: 'gp-w-[130px]',
|
|
71
|
-
styles: {
|
|
72
|
-
textColor: {
|
|
73
|
-
normal: 'text-3'
|
|
74
|
-
},
|
|
75
|
-
backgroundColor: {
|
|
76
|
-
normal: 'error'
|
|
77
|
-
},
|
|
78
|
-
roundedBtn: {
|
|
79
|
-
normal: {
|
|
80
|
-
radiusType: 'small'
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
btnSpacing: {
|
|
84
|
-
type: 'small'
|
|
85
|
-
}
|
|
86
|
-
},
|
|
57
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
87
58
|
onClick: ()=>{
|
|
88
59
|
if (cartLine.id) {
|
|
89
60
|
removeLines({
|
|
@@ -125,40 +96,11 @@ var Trash = require('./icons/Trash.js');
|
|
|
125
96
|
buttons: [
|
|
126
97
|
{
|
|
127
98
|
label: 'Cancel',
|
|
128
|
-
className: 'gp-w-[130px]'
|
|
129
|
-
styles: {
|
|
130
|
-
backgroundColor: {
|
|
131
|
-
normal: 'bg-1'
|
|
132
|
-
},
|
|
133
|
-
roundedBtn: {
|
|
134
|
-
normal: {
|
|
135
|
-
radiusType: 'small'
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
btnSpacing: {
|
|
139
|
-
type: 'small'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
99
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
142
100
|
},
|
|
143
101
|
{
|
|
144
102
|
label: 'Delete',
|
|
145
|
-
className: 'gp-w-[130px]',
|
|
146
|
-
styles: {
|
|
147
|
-
textColor: {
|
|
148
|
-
normal: 'text-3'
|
|
149
|
-
},
|
|
150
|
-
backgroundColor: {
|
|
151
|
-
normal: 'error'
|
|
152
|
-
},
|
|
153
|
-
roundedBtn: {
|
|
154
|
-
normal: {
|
|
155
|
-
radiusType: 'small'
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
btnSpacing: {
|
|
159
|
-
type: 'small'
|
|
160
|
-
}
|
|
161
|
-
},
|
|
103
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
162
104
|
onClick: ()=>{
|
|
163
105
|
if (cartLine.id) {
|
|
164
106
|
removeLines({
|
|
@@ -38,40 +38,11 @@ const DiscountCodeItem = ({ item })=>{
|
|
|
38
38
|
buttons: [
|
|
39
39
|
{
|
|
40
40
|
label: 'Cancel',
|
|
41
|
-
className: 'gp-w-[130px]'
|
|
42
|
-
styles: {
|
|
43
|
-
backgroundColor: {
|
|
44
|
-
normal: 'bg-1'
|
|
45
|
-
},
|
|
46
|
-
roundedBtn: {
|
|
47
|
-
normal: {
|
|
48
|
-
radiusType: 'small'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
btnSpacing: {
|
|
52
|
-
type: 'small'
|
|
53
|
-
}
|
|
54
|
-
}
|
|
41
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
55
42
|
},
|
|
56
43
|
{
|
|
57
44
|
label: 'Delete',
|
|
58
|
-
className: 'gp-w-[130px]',
|
|
59
|
-
styles: {
|
|
60
|
-
textColor: {
|
|
61
|
-
normal: 'text-3'
|
|
62
|
-
},
|
|
63
|
-
backgroundColor: {
|
|
64
|
-
normal: 'error'
|
|
65
|
-
},
|
|
66
|
-
roundedBtn: {
|
|
67
|
-
normal: {
|
|
68
|
-
radiusType: 'small'
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
btnSpacing: {
|
|
72
|
-
type: 'small'
|
|
73
|
-
}
|
|
74
|
-
},
|
|
45
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
75
46
|
onClick: ()=>{
|
|
76
47
|
if (cartId) {
|
|
77
48
|
updateCartDiscountCode({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useCartData, useCartUI, cls, CartLineProvider } from '@gem-sdk/core';
|
|
3
2
|
import { useRef } from 'react';
|
|
4
3
|
import { Transition } from 'react-transition-group';
|
|
4
|
+
import { ELEMENT_Z_INDEX } from '@gem-sdk/components';
|
|
5
|
+
import { useCartData, useCartUI, cls, CartLineProvider } from '@gem-sdk/core';
|
|
5
6
|
import CartDiscountCode from './CartDiscountCode.js';
|
|
6
7
|
import CartFooter from './CartFooter.js';
|
|
7
8
|
import CartLineItem from './CartLineItem.js';
|
|
@@ -46,7 +47,8 @@ const CartDrawer = ({ className, style, setting })=>{
|
|
|
46
47
|
style: {
|
|
47
48
|
...style,
|
|
48
49
|
...defaultStyle,
|
|
49
|
-
...transitionStyles[state]
|
|
50
|
+
...transitionStyles[state],
|
|
51
|
+
zIndex: ELEMENT_Z_INDEX.CART_DRAWER
|
|
50
52
|
},
|
|
51
53
|
children: [
|
|
52
54
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -92,40 +92,11 @@ const CartLineItem = ()=>{
|
|
|
92
92
|
buttons: [
|
|
93
93
|
{
|
|
94
94
|
label: 'Cancel',
|
|
95
|
-
className: 'gp-w-[130px]'
|
|
96
|
-
styles: {
|
|
97
|
-
backgroundColor: {
|
|
98
|
-
normal: 'bg-1'
|
|
99
|
-
},
|
|
100
|
-
roundedBtn: {
|
|
101
|
-
normal: {
|
|
102
|
-
radiusType: 'small'
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
btnSpacing: {
|
|
106
|
-
type: 'small'
|
|
107
|
-
}
|
|
108
|
-
}
|
|
95
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
109
96
|
},
|
|
110
97
|
{
|
|
111
98
|
label: 'Delete',
|
|
112
|
-
className: 'gp-w-[130px]',
|
|
113
|
-
styles: {
|
|
114
|
-
textColor: {
|
|
115
|
-
normal: 'text-3'
|
|
116
|
-
},
|
|
117
|
-
backgroundColor: {
|
|
118
|
-
normal: 'error'
|
|
119
|
-
},
|
|
120
|
-
roundedBtn: {
|
|
121
|
-
normal: {
|
|
122
|
-
radiusType: 'small'
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
btnSpacing: {
|
|
126
|
-
type: 'small'
|
|
127
|
-
}
|
|
128
|
-
},
|
|
99
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
129
100
|
onClick: ()=>{
|
|
130
101
|
if (cartId && line.id) {
|
|
131
102
|
removeCartLine({
|
|
@@ -46,40 +46,11 @@ import Trash from './icons/Trash.js';
|
|
|
46
46
|
buttons: [
|
|
47
47
|
{
|
|
48
48
|
label: 'Cancel',
|
|
49
|
-
className: 'gp-w-[130px]'
|
|
50
|
-
styles: {
|
|
51
|
-
backgroundColor: {
|
|
52
|
-
normal: 'bg-1'
|
|
53
|
-
},
|
|
54
|
-
roundedBtn: {
|
|
55
|
-
normal: {
|
|
56
|
-
radiusType: 'small'
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
btnSpacing: {
|
|
60
|
-
type: 'small'
|
|
61
|
-
}
|
|
62
|
-
}
|
|
49
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
63
50
|
},
|
|
64
51
|
{
|
|
65
52
|
label: 'Delete',
|
|
66
|
-
className: 'gp-w-[130px]',
|
|
67
|
-
styles: {
|
|
68
|
-
textColor: {
|
|
69
|
-
normal: 'text-3'
|
|
70
|
-
},
|
|
71
|
-
backgroundColor: {
|
|
72
|
-
normal: 'error'
|
|
73
|
-
},
|
|
74
|
-
roundedBtn: {
|
|
75
|
-
normal: {
|
|
76
|
-
radiusType: 'small'
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
btnSpacing: {
|
|
80
|
-
type: 'small'
|
|
81
|
-
}
|
|
82
|
-
},
|
|
53
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
83
54
|
onClick: ()=>{
|
|
84
55
|
if (cartLine.id) {
|
|
85
56
|
removeLines({
|
|
@@ -121,40 +92,11 @@ import Trash from './icons/Trash.js';
|
|
|
121
92
|
buttons: [
|
|
122
93
|
{
|
|
123
94
|
label: 'Cancel',
|
|
124
|
-
className: 'gp-w-[130px]'
|
|
125
|
-
styles: {
|
|
126
|
-
backgroundColor: {
|
|
127
|
-
normal: 'bg-1'
|
|
128
|
-
},
|
|
129
|
-
roundedBtn: {
|
|
130
|
-
normal: {
|
|
131
|
-
radiusType: 'small'
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
btnSpacing: {
|
|
135
|
-
type: 'small'
|
|
136
|
-
}
|
|
137
|
-
}
|
|
95
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
138
96
|
},
|
|
139
97
|
{
|
|
140
98
|
label: 'Delete',
|
|
141
|
-
className: 'gp-w-[130px]',
|
|
142
|
-
styles: {
|
|
143
|
-
textColor: {
|
|
144
|
-
normal: 'text-3'
|
|
145
|
-
},
|
|
146
|
-
backgroundColor: {
|
|
147
|
-
normal: 'error'
|
|
148
|
-
},
|
|
149
|
-
roundedBtn: {
|
|
150
|
-
normal: {
|
|
151
|
-
radiusType: 'small'
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
btnSpacing: {
|
|
155
|
-
type: 'small'
|
|
156
|
-
}
|
|
157
|
-
},
|
|
99
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
158
100
|
onClick: ()=>{
|
|
159
101
|
if (cartLine.id) {
|
|
160
102
|
removeLines({
|
|
@@ -34,40 +34,11 @@ const DiscountCodeItem = ({ item })=>{
|
|
|
34
34
|
buttons: [
|
|
35
35
|
{
|
|
36
36
|
label: 'Cancel',
|
|
37
|
-
className: 'gp-w-[130px]'
|
|
38
|
-
styles: {
|
|
39
|
-
backgroundColor: {
|
|
40
|
-
normal: 'bg-1'
|
|
41
|
-
},
|
|
42
|
-
roundedBtn: {
|
|
43
|
-
normal: {
|
|
44
|
-
radiusType: 'small'
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
btnSpacing: {
|
|
48
|
-
type: 'small'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
37
|
+
className: 'gp-w-[130px] !gp-bg-g-bg-1'
|
|
51
38
|
},
|
|
52
39
|
{
|
|
53
40
|
label: 'Delete',
|
|
54
|
-
className: 'gp-w-[130px]',
|
|
55
|
-
styles: {
|
|
56
|
-
textColor: {
|
|
57
|
-
normal: 'text-3'
|
|
58
|
-
},
|
|
59
|
-
backgroundColor: {
|
|
60
|
-
normal: 'error'
|
|
61
|
-
},
|
|
62
|
-
roundedBtn: {
|
|
63
|
-
normal: {
|
|
64
|
-
radiusType: 'small'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
btnSpacing: {
|
|
68
|
-
type: 'small'
|
|
69
|
-
}
|
|
70
|
-
},
|
|
41
|
+
className: '!gp-bg-g-error !gp-text-g-text-3 !font-g-body gp-w-[130px]',
|
|
71
42
|
onClick: ()=>{
|
|
72
43
|
if (cartId) {
|
|
73
44
|
updateCartDiscountCode({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/plugin-cart-drawer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.60.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"test": "jest -c ./../../helpers/jest.config.ts"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@gem-sdk/components": "1.
|
|
23
|
-
"@gem-sdk/core": "1.
|
|
24
|
-
"@gem-sdk/styles": "1.
|
|
22
|
+
"@gem-sdk/components": "1.60.13",
|
|
23
|
+
"@gem-sdk/core": "1.60.7",
|
|
24
|
+
"@gem-sdk/styles": "1.60.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^17 || ^18",
|