@cartbase/storefront 0.20.1 → 0.21.0
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/package.json +261 -258
- package/src/api/http.ts +1 -0
- package/src/api/store.ts +21 -0
- package/src/cart-drawer/payment-badges.tsx +36 -96
- package/src/common/icons/cartbase-mark.ts +9 -0
- package/src/common/icons/payment-marks.ts +73 -0
- package/src/common/icons/social-marks.ts +61 -0
- package/src/common/index.ts +15 -0
- package/src/common/payment-icons.tsx +54 -0
- package/src/common/powered-by-cartbase.tsx +47 -0
- package/src/common/social-links.tsx +65 -0
- package/src/locales/bg.ts +3 -0
- package/src/locales/es.ts +3 -0
- package/src/store/labels.ts +10 -0
package/package.json
CHANGED
|
@@ -1,258 +1,261 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cartbase/storefront",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Storefront SDK + UI component library for Cartbase stores: typed API client, checkout orchestration, cart drawer, product/catalog components, tracking. Source-shipped TypeScript — add it to transpilePackages.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/Cartbase/cartbase.git",
|
|
9
|
-
"directory": "packages/storefront"
|
|
10
|
-
},
|
|
11
|
-
"type": "module",
|
|
12
|
-
"sideEffects": false,
|
|
13
|
-
"files": [
|
|
14
|
-
"src",
|
|
15
|
-
"theme",
|
|
16
|
-
"README.md"
|
|
17
|
-
],
|
|
18
|
-
"exports": {
|
|
19
|
-
".": "./src/index.ts",
|
|
20
|
-
"./api": "./src/api/index.ts",
|
|
21
|
-
"./api/http": "./src/api/http.ts",
|
|
22
|
-
"./api/types": "./src/api/types.ts",
|
|
23
|
-
"./api/products": "./src/api/products.ts",
|
|
24
|
-
"./api/collections": "./src/api/collections.ts",
|
|
25
|
-
"./api/categories": "./src/api/categories.ts",
|
|
26
|
-
"./api/regions": "./src/api/regions.ts",
|
|
27
|
-
"./api/store": "./src/api/store.ts",
|
|
28
|
-
"./api/carts": "./src/api/carts.ts",
|
|
29
|
-
"./api/gift-cards": "./src/api/gift-cards.ts",
|
|
30
|
-
"./api/checkout": "./src/api/checkout.ts",
|
|
31
|
-
"./api/orders": "./src/api/orders.ts",
|
|
32
|
-
"./api/customers": "./src/api/customers.ts",
|
|
33
|
-
"./api/auth": "./src/api/auth.ts",
|
|
34
|
-
"./api/content": "./src/api/content.ts",
|
|
35
|
-
"./api/menus": "./src/api/menus.ts",
|
|
36
|
-
"./api/metaobjects": "./src/api/metaobjects.ts",
|
|
37
|
-
"./api/reviews": "./src/api/reviews.ts",
|
|
38
|
-
"./api/search": "./src/api/search.ts",
|
|
39
|
-
"./api/integrations": "./src/api/integrations.ts",
|
|
40
|
-
"./api/consent": "./src/api/consent.ts",
|
|
41
|
-
"./api/redirects": "./src/api/redirects.ts",
|
|
42
|
-
"./theme": "./theme/index.css",
|
|
43
|
-
"./theme/tokens.css": "./theme/tokens.css",
|
|
44
|
-
"./theme/theme.css": "./theme/theme.css",
|
|
45
|
-
"./lib/utils": "./src/lib/utils.ts",
|
|
46
|
-
"./lib/money": "./src/lib/money.ts",
|
|
47
|
-
"./lib/cart-helpers": "./src/lib/cart-helpers.ts",
|
|
48
|
-
"./lib/get-product-price": "./src/lib/get-product-price.ts",
|
|
49
|
-
"./lib/get-percentage-diff": "./src/lib/get-percentage-diff.ts",
|
|
50
|
-
"./lib/product": "./src/lib/product.ts",
|
|
51
|
-
"./lib/sort-products": "./src/lib/sort-products.ts",
|
|
52
|
-
"./lib/price": "./src/lib/price.tsx",
|
|
53
|
-
"./lib/payment-constants": "./src/lib/payment-constants.ts",
|
|
54
|
-
"./lib/country-name": "./src/lib/country-name.ts",
|
|
55
|
-
"./lib/store-api-error": "./src/lib/store-api-error.ts",
|
|
56
|
-
"./lib/hooks/use-intersection": "./src/lib/hooks/use-intersection.ts",
|
|
57
|
-
"./lib/hooks/use-toggle-state": "./src/lib/hooks/use-toggle-state.ts",
|
|
58
|
-
"./lib/cookie-names": "./src/lib/cookie-names.ts",
|
|
59
|
-
"./lib/media-image": "./src/lib/media-image.tsx",
|
|
60
|
-
"./lib/platform": "./src/lib/platform.ts",
|
|
61
|
-
"./lib/visitor": "./src/lib/visitor.ts",
|
|
62
|
-
"./platform": "./src/platform/index.ts",
|
|
63
|
-
"./platform/identity": "./src/platform/identity.ts",
|
|
64
|
-
"./platform/metadata": "./src/platform/metadata.ts",
|
|
65
|
-
"./platform/platform-init": "./src/platform/platform-init.tsx",
|
|
66
|
-
"./primitives/field": "./src/primitives/field.tsx",
|
|
67
|
-
"./primitives/select-field": "./src/primitives/select-field.tsx",
|
|
68
|
-
"./primitives/ui/accordion": "./src/primitives/ui/accordion.tsx",
|
|
69
|
-
"./primitives/ui/button": "./src/primitives/ui/button.tsx",
|
|
70
|
-
"./primitives/ui/collapsible": "./src/primitives/ui/collapsible.tsx",
|
|
71
|
-
"./primitives/ui/dialog": "./src/primitives/ui/dialog.tsx",
|
|
72
|
-
"./primitives/ui/input": "./src/primitives/ui/input.tsx",
|
|
73
|
-
"./primitives/ui/label": "./src/primitives/ui/label.tsx",
|
|
74
|
-
"./primitives/ui/popover": "./src/primitives/ui/popover.tsx",
|
|
75
|
-
"./primitives/ui/select": "./src/primitives/ui/select.tsx",
|
|
76
|
-
"./primitives/ui/sheet": "./src/primitives/ui/sheet.tsx",
|
|
77
|
-
"./primitives/ui/tabs": "./src/primitives/ui/tabs.tsx",
|
|
78
|
-
"./tracking": "./src/tracking/index.ts",
|
|
79
|
-
"./tracking/types": "./src/tracking/types.ts",
|
|
80
|
-
"./tracking/consent": "./src/tracking/consent.ts",
|
|
81
|
-
"./tracking/consent-init": "./src/tracking/consent-init.tsx",
|
|
82
|
-
"./tracking/consent-banner": "./src/tracking/consent-banner.tsx",
|
|
83
|
-
"./tracking/meta-pixel": "./src/tracking/meta-pixel.tsx",
|
|
84
|
-
"./tracking/ga4": "./src/tracking/ga4.tsx",
|
|
85
|
-
"./tracking/tiktok-pixel": "./src/tracking/tiktok-pixel.tsx",
|
|
86
|
-
"./tracking/ttq": "./src/tracking/ttq.ts",
|
|
87
|
-
"./tracking/events": "./src/tracking/events.ts",
|
|
88
|
-
"./tracking/storefront-tags": "./src/tracking/storefront-tags.tsx",
|
|
89
|
-
"./tracking/track-init": "./src/tracking/track-init.tsx",
|
|
90
|
-
"./tracking/track-order-purchase": "./src/tracking/track-order-purchase.tsx",
|
|
91
|
-
"./tracking/gtm": "./src/tracking/gtm.tsx",
|
|
92
|
-
"./tracking/inline-script": "./src/tracking/inline-script.ts",
|
|
93
|
-
"./tracking/google-ads": "./src/tracking/google-ads.ts",
|
|
94
|
-
"./tracking/rybbit": "./src/tracking/rybbit.tsx",
|
|
95
|
-
"./tracking/rybbit-events": "./src/tracking/rybbit-events.ts",
|
|
96
|
-
"./tracking/fbq": "./src/tracking/fbq.ts",
|
|
97
|
-
"./tracking/gtag": "./src/tracking/gtag.ts",
|
|
98
|
-
"./tracking/attribution": "./src/tracking/attribution.ts",
|
|
99
|
-
"./tracking/get-tracking-config": "./src/tracking/get-tracking-config.ts",
|
|
100
|
-
"./tracking/use-tracking-config": "./src/tracking/use-tracking-config.ts",
|
|
101
|
-
"./tracking/get-tracking-attribution": "./src/tracking/get-tracking-attribution.ts",
|
|
102
|
-
"./tracking/use-engagement-time": "./src/tracking/use-engagement-time.ts",
|
|
103
|
-
"./tracking/page-views": "./src/tracking/page-views.tsx",
|
|
104
|
-
"./tracking/live-heartbeat": "./src/tracking/live-heartbeat.tsx",
|
|
105
|
-
"./checkout": "./src/checkout/index.ts",
|
|
106
|
-
"./checkout/context": "./src/checkout/context.tsx",
|
|
107
|
-
"./checkout/labels": "./src/checkout/labels.ts",
|
|
108
|
-
"./checkout/error-message": "./src/checkout/error-message.tsx",
|
|
109
|
-
"./checkout/stripe-wrapper": "./src/checkout/stripe-wrapper.tsx",
|
|
110
|
-
"./checkout/payment-wrapper": "./src/checkout/payment-wrapper.tsx",
|
|
111
|
-
"./checkout/payment-button": "./src/checkout/payment-button.tsx",
|
|
112
|
-
"./checkout/econt-office-selector": "./src/checkout/econt-office-selector.tsx",
|
|
113
|
-
"./checkout/boxnow-locker-selector": "./src/checkout/boxnow-locker-selector.tsx",
|
|
114
|
-
"./checkout/address-select": "./src/checkout/address-select.tsx",
|
|
115
|
-
"./checkout/company-details": "./src/checkout/company-details.tsx",
|
|
116
|
-
"./checkout/discount-section": "./src/checkout/discount-section.tsx",
|
|
117
|
-
"./checkout/gift-card-section": "./src/checkout/gift-card-section.tsx",
|
|
118
|
-
"./checkout/line-item-card": "./src/checkout/line-item-card.tsx",
|
|
119
|
-
"./checkout/order-summary": "./src/checkout/order-summary.tsx",
|
|
120
|
-
"./checkout/address-form": "./src/checkout/address-form.tsx",
|
|
121
|
-
"./checkout/shipping-method-list": "./src/checkout/shipping-method-list.tsx",
|
|
122
|
-
"./checkout/payment-method-list": "./src/checkout/payment-method-list.tsx",
|
|
123
|
-
"./checkout/checkout-client": "./src/checkout/checkout-client.tsx",
|
|
124
|
-
"./checkout/use-checkout-orchestration": "./src/checkout/use-checkout-orchestration.ts",
|
|
125
|
-
"./checkout/payment-error-copy": "./src/checkout/payment-error-copy.ts",
|
|
126
|
-
"./checkout/address-error-copy": "./src/checkout/address-error-copy.ts",
|
|
127
|
-
"./checkout/promotion-error-copy": "./src/checkout/promotion-error-copy.ts",
|
|
128
|
-
"./cart-drawer": "./src/cart-drawer/index.ts",
|
|
129
|
-
"./cart-drawer/context": "./src/cart-drawer/context.tsx",
|
|
130
|
-
"./cart-drawer/mutation-queue": "./src/cart-drawer/mutation-queue.ts",
|
|
131
|
-
"./cart-drawer/labels": "./src/cart-drawer/labels.ts",
|
|
132
|
-
"./cart-drawer/cart-drawer": "./src/cart-drawer/cart-drawer.tsx",
|
|
133
|
-
"./cart-drawer/header": "./src/cart-drawer/header.tsx",
|
|
134
|
-
"./cart-drawer/promo-banner": "./src/cart-drawer/promo-banner.tsx",
|
|
135
|
-
"./cart-drawer/tiered-progress": "./src/cart-drawer/tiered-progress.tsx",
|
|
136
|
-
"./cart-drawer/item": "./src/cart-drawer/item/index.tsx",
|
|
137
|
-
"./cart-drawer/item/quantity": "./src/cart-drawer/item/quantity.tsx",
|
|
138
|
-
"./cart-drawer/item/variant": "./src/cart-drawer/item/variant.tsx",
|
|
139
|
-
"./cart-drawer/item/upsell": "./src/cart-drawer/item/upsell.tsx",
|
|
140
|
-
"./cart-drawer/free-gift": "./src/cart-drawer/free-gift.tsx",
|
|
141
|
-
"./cart-drawer/gift-wrap": "./src/cart-drawer/gift-wrap.tsx",
|
|
142
|
-
"./cart-drawer/notes": "./src/cart-drawer/notes.tsx",
|
|
143
|
-
"./cart-drawer/rewards-points": "./src/cart-drawer/rewards-points.tsx",
|
|
144
|
-
"./cart-drawer/cross-sell-sidebar": "./src/cart-drawer/cross-sell-sidebar.tsx",
|
|
145
|
-
"./cart-drawer/cross-sell-carousel": "./src/cart-drawer/cross-sell-carousel.tsx",
|
|
146
|
-
"./cart-drawer/summary-breakdown": "./src/cart-drawer/summary-breakdown.tsx",
|
|
147
|
-
"./cart-drawer/sticky-footer": "./src/cart-drawer/sticky-footer.tsx",
|
|
148
|
-
"./cart-drawer/payment-badges": "./src/cart-drawer/payment-badges.tsx",
|
|
149
|
-
"./cart-drawer/continue-shopping": "./src/cart-drawer/continue-shopping.tsx",
|
|
150
|
-
"./cart-drawer/empty": "./src/cart-drawer/empty.tsx",
|
|
151
|
-
"./cart-drawer/template": "./src/cart-drawer/template.tsx",
|
|
152
|
-
"./products": "./src/products/index.ts",
|
|
153
|
-
"./products/context": "./src/products/context.tsx",
|
|
154
|
-
"./products/labels": "./src/products/labels.ts",
|
|
155
|
-
"./products/thumbnail": "./src/products/thumbnail.tsx",
|
|
156
|
-
"./products/preview-price": "./src/products/preview-price.tsx",
|
|
157
|
-
"./products/product-price": "./src/products/product-price.tsx",
|
|
158
|
-
"./products/option-select": "./src/products/option-select.tsx",
|
|
159
|
-
"./products/image-gallery": "./src/products/image-gallery.tsx",
|
|
160
|
-
"./products/variant-url": "./src/products/variant-url.ts",
|
|
161
|
-
"./products/sets": "./src/products/sets.ts",
|
|
162
|
-
"./products/use-product-actions": "./src/products/use-product-actions.ts",
|
|
163
|
-
"./products/product-actions": "./src/products/product-actions.tsx",
|
|
164
|
-
"./products/mobile-actions": "./src/products/mobile-actions.tsx",
|
|
165
|
-
"./products/product-tabs": "./src/products/product-tabs.tsx",
|
|
166
|
-
"./products/product-specs": "./src/products/product-specs.tsx",
|
|
167
|
-
"./products/product-promises": "./src/products/product-promises.tsx",
|
|
168
|
-
"./products/product-info": "./src/products/product-info.tsx",
|
|
169
|
-
"./products/product-preview": "./src/products/product-preview.tsx",
|
|
170
|
-
"./products/related-products": "./src/products/related-products.tsx",
|
|
171
|
-
"./products/product-actions-wrapper": "./src/products/product-actions-wrapper.tsx",
|
|
172
|
-
"./products/product-template": "./src/products/product-template.tsx",
|
|
173
|
-
"./store": "./src/store/index.ts",
|
|
174
|
-
"./store/labels": "./src/store/labels.ts",
|
|
175
|
-
"./store/pagination": "./src/store/pagination.tsx",
|
|
176
|
-
"./store/sort-select": "./src/store/sort-select.tsx",
|
|
177
|
-
"./store/paginated-products": "./src/store/paginated-products.tsx",
|
|
178
|
-
"./store/skeleton-product-grid": "./src/store/skeleton-product-grid.tsx",
|
|
179
|
-
"./store/store-template": "./src/store/store-template.tsx",
|
|
180
|
-
"./store/collection-template": "./src/store/collection-template.tsx",
|
|
181
|
-
"./store/category-template": "./src/store/category-template.tsx",
|
|
182
|
-
"./store/search-template": "./src/store/search-template.tsx",
|
|
183
|
-
"./order": "./src/order/index.ts",
|
|
184
|
-
"./order/context": "./src/order/context.tsx",
|
|
185
|
-
"./order/labels": "./src/order/labels.ts",
|
|
186
|
-
"./order/order-confirmation-header": "./src/order/order-confirmation-header.tsx",
|
|
187
|
-
"./order/order-item": "./src/order/order-item.tsx",
|
|
188
|
-
"./order/order-items-list": "./src/order/order-items-list.tsx",
|
|
189
|
-
"./order/order-totals": "./src/order/order-totals.tsx",
|
|
190
|
-
"./order/order-address-card": "./src/order/order-address-card.tsx",
|
|
191
|
-
"./order/order-delivery-card": "./src/order/order-delivery-card.tsx",
|
|
192
|
-
"./order/order-payment-card": "./src/order/order-payment-card.tsx",
|
|
193
|
-
"./order/order-timeline": "./src/order/order-timeline.tsx",
|
|
194
|
-
"./order/order-help-section": "./src/order/order-help-section.tsx",
|
|
195
|
-
"./order/order-completed-template": "./src/order/order-completed-template.tsx",
|
|
196
|
-
"./common": "./src/common/index.ts",
|
|
197
|
-
"./common/localized-link": "./src/common/localized-link.tsx",
|
|
198
|
-
"./common/cart-button": "./src/common/cart-button.tsx",
|
|
199
|
-
"./common/cart-button-client": "./src/common/cart-button-client.tsx",
|
|
200
|
-
"./common/delete-button": "./src/common/delete-button.tsx",
|
|
201
|
-
"./common/country-flag": "./src/common/country-flag.tsx",
|
|
202
|
-
"./common/market-select": "./src/common/market-select.tsx",
|
|
203
|
-
"./common/country-select": "./src/common/country-select.tsx",
|
|
204
|
-
"./common/language-select": "./src/common/language-select.tsx",
|
|
205
|
-
"./common/skeleton": "./src/common/skeleton.tsx",
|
|
206
|
-
"./
|
|
207
|
-
"./
|
|
208
|
-
"./
|
|
209
|
-
"./
|
|
210
|
-
"./locales
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
"
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"@radix-ui/react-
|
|
217
|
-
"@radix-ui/react-
|
|
218
|
-
"@radix-ui/react-
|
|
219
|
-
"@radix-ui/react-
|
|
220
|
-
"@radix-ui/react-
|
|
221
|
-
"@radix-ui/react-
|
|
222
|
-
"@
|
|
223
|
-
"@
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"
|
|
232
|
-
},
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
"
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
"
|
|
243
|
-
"optional": true
|
|
244
|
-
},
|
|
245
|
-
"react
|
|
246
|
-
"optional": true
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
"
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"
|
|
257
|
-
}
|
|
258
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@cartbase/storefront",
|
|
3
|
+
"version": "0.21.0",
|
|
4
|
+
"description": "Storefront SDK + UI component library for Cartbase stores: typed API client, checkout orchestration, cart drawer, product/catalog components, tracking. Source-shipped TypeScript — add it to transpilePackages.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Cartbase/cartbase.git",
|
|
9
|
+
"directory": "packages/storefront"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"files": [
|
|
14
|
+
"src",
|
|
15
|
+
"theme",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./src/index.ts",
|
|
20
|
+
"./api": "./src/api/index.ts",
|
|
21
|
+
"./api/http": "./src/api/http.ts",
|
|
22
|
+
"./api/types": "./src/api/types.ts",
|
|
23
|
+
"./api/products": "./src/api/products.ts",
|
|
24
|
+
"./api/collections": "./src/api/collections.ts",
|
|
25
|
+
"./api/categories": "./src/api/categories.ts",
|
|
26
|
+
"./api/regions": "./src/api/regions.ts",
|
|
27
|
+
"./api/store": "./src/api/store.ts",
|
|
28
|
+
"./api/carts": "./src/api/carts.ts",
|
|
29
|
+
"./api/gift-cards": "./src/api/gift-cards.ts",
|
|
30
|
+
"./api/checkout": "./src/api/checkout.ts",
|
|
31
|
+
"./api/orders": "./src/api/orders.ts",
|
|
32
|
+
"./api/customers": "./src/api/customers.ts",
|
|
33
|
+
"./api/auth": "./src/api/auth.ts",
|
|
34
|
+
"./api/content": "./src/api/content.ts",
|
|
35
|
+
"./api/menus": "./src/api/menus.ts",
|
|
36
|
+
"./api/metaobjects": "./src/api/metaobjects.ts",
|
|
37
|
+
"./api/reviews": "./src/api/reviews.ts",
|
|
38
|
+
"./api/search": "./src/api/search.ts",
|
|
39
|
+
"./api/integrations": "./src/api/integrations.ts",
|
|
40
|
+
"./api/consent": "./src/api/consent.ts",
|
|
41
|
+
"./api/redirects": "./src/api/redirects.ts",
|
|
42
|
+
"./theme": "./theme/index.css",
|
|
43
|
+
"./theme/tokens.css": "./theme/tokens.css",
|
|
44
|
+
"./theme/theme.css": "./theme/theme.css",
|
|
45
|
+
"./lib/utils": "./src/lib/utils.ts",
|
|
46
|
+
"./lib/money": "./src/lib/money.ts",
|
|
47
|
+
"./lib/cart-helpers": "./src/lib/cart-helpers.ts",
|
|
48
|
+
"./lib/get-product-price": "./src/lib/get-product-price.ts",
|
|
49
|
+
"./lib/get-percentage-diff": "./src/lib/get-percentage-diff.ts",
|
|
50
|
+
"./lib/product": "./src/lib/product.ts",
|
|
51
|
+
"./lib/sort-products": "./src/lib/sort-products.ts",
|
|
52
|
+
"./lib/price": "./src/lib/price.tsx",
|
|
53
|
+
"./lib/payment-constants": "./src/lib/payment-constants.ts",
|
|
54
|
+
"./lib/country-name": "./src/lib/country-name.ts",
|
|
55
|
+
"./lib/store-api-error": "./src/lib/store-api-error.ts",
|
|
56
|
+
"./lib/hooks/use-intersection": "./src/lib/hooks/use-intersection.ts",
|
|
57
|
+
"./lib/hooks/use-toggle-state": "./src/lib/hooks/use-toggle-state.ts",
|
|
58
|
+
"./lib/cookie-names": "./src/lib/cookie-names.ts",
|
|
59
|
+
"./lib/media-image": "./src/lib/media-image.tsx",
|
|
60
|
+
"./lib/platform": "./src/lib/platform.ts",
|
|
61
|
+
"./lib/visitor": "./src/lib/visitor.ts",
|
|
62
|
+
"./platform": "./src/platform/index.ts",
|
|
63
|
+
"./platform/identity": "./src/platform/identity.ts",
|
|
64
|
+
"./platform/metadata": "./src/platform/metadata.ts",
|
|
65
|
+
"./platform/platform-init": "./src/platform/platform-init.tsx",
|
|
66
|
+
"./primitives/field": "./src/primitives/field.tsx",
|
|
67
|
+
"./primitives/select-field": "./src/primitives/select-field.tsx",
|
|
68
|
+
"./primitives/ui/accordion": "./src/primitives/ui/accordion.tsx",
|
|
69
|
+
"./primitives/ui/button": "./src/primitives/ui/button.tsx",
|
|
70
|
+
"./primitives/ui/collapsible": "./src/primitives/ui/collapsible.tsx",
|
|
71
|
+
"./primitives/ui/dialog": "./src/primitives/ui/dialog.tsx",
|
|
72
|
+
"./primitives/ui/input": "./src/primitives/ui/input.tsx",
|
|
73
|
+
"./primitives/ui/label": "./src/primitives/ui/label.tsx",
|
|
74
|
+
"./primitives/ui/popover": "./src/primitives/ui/popover.tsx",
|
|
75
|
+
"./primitives/ui/select": "./src/primitives/ui/select.tsx",
|
|
76
|
+
"./primitives/ui/sheet": "./src/primitives/ui/sheet.tsx",
|
|
77
|
+
"./primitives/ui/tabs": "./src/primitives/ui/tabs.tsx",
|
|
78
|
+
"./tracking": "./src/tracking/index.ts",
|
|
79
|
+
"./tracking/types": "./src/tracking/types.ts",
|
|
80
|
+
"./tracking/consent": "./src/tracking/consent.ts",
|
|
81
|
+
"./tracking/consent-init": "./src/tracking/consent-init.tsx",
|
|
82
|
+
"./tracking/consent-banner": "./src/tracking/consent-banner.tsx",
|
|
83
|
+
"./tracking/meta-pixel": "./src/tracking/meta-pixel.tsx",
|
|
84
|
+
"./tracking/ga4": "./src/tracking/ga4.tsx",
|
|
85
|
+
"./tracking/tiktok-pixel": "./src/tracking/tiktok-pixel.tsx",
|
|
86
|
+
"./tracking/ttq": "./src/tracking/ttq.ts",
|
|
87
|
+
"./tracking/events": "./src/tracking/events.ts",
|
|
88
|
+
"./tracking/storefront-tags": "./src/tracking/storefront-tags.tsx",
|
|
89
|
+
"./tracking/track-init": "./src/tracking/track-init.tsx",
|
|
90
|
+
"./tracking/track-order-purchase": "./src/tracking/track-order-purchase.tsx",
|
|
91
|
+
"./tracking/gtm": "./src/tracking/gtm.tsx",
|
|
92
|
+
"./tracking/inline-script": "./src/tracking/inline-script.ts",
|
|
93
|
+
"./tracking/google-ads": "./src/tracking/google-ads.ts",
|
|
94
|
+
"./tracking/rybbit": "./src/tracking/rybbit.tsx",
|
|
95
|
+
"./tracking/rybbit-events": "./src/tracking/rybbit-events.ts",
|
|
96
|
+
"./tracking/fbq": "./src/tracking/fbq.ts",
|
|
97
|
+
"./tracking/gtag": "./src/tracking/gtag.ts",
|
|
98
|
+
"./tracking/attribution": "./src/tracking/attribution.ts",
|
|
99
|
+
"./tracking/get-tracking-config": "./src/tracking/get-tracking-config.ts",
|
|
100
|
+
"./tracking/use-tracking-config": "./src/tracking/use-tracking-config.ts",
|
|
101
|
+
"./tracking/get-tracking-attribution": "./src/tracking/get-tracking-attribution.ts",
|
|
102
|
+
"./tracking/use-engagement-time": "./src/tracking/use-engagement-time.ts",
|
|
103
|
+
"./tracking/page-views": "./src/tracking/page-views.tsx",
|
|
104
|
+
"./tracking/live-heartbeat": "./src/tracking/live-heartbeat.tsx",
|
|
105
|
+
"./checkout": "./src/checkout/index.ts",
|
|
106
|
+
"./checkout/context": "./src/checkout/context.tsx",
|
|
107
|
+
"./checkout/labels": "./src/checkout/labels.ts",
|
|
108
|
+
"./checkout/error-message": "./src/checkout/error-message.tsx",
|
|
109
|
+
"./checkout/stripe-wrapper": "./src/checkout/stripe-wrapper.tsx",
|
|
110
|
+
"./checkout/payment-wrapper": "./src/checkout/payment-wrapper.tsx",
|
|
111
|
+
"./checkout/payment-button": "./src/checkout/payment-button.tsx",
|
|
112
|
+
"./checkout/econt-office-selector": "./src/checkout/econt-office-selector.tsx",
|
|
113
|
+
"./checkout/boxnow-locker-selector": "./src/checkout/boxnow-locker-selector.tsx",
|
|
114
|
+
"./checkout/address-select": "./src/checkout/address-select.tsx",
|
|
115
|
+
"./checkout/company-details": "./src/checkout/company-details.tsx",
|
|
116
|
+
"./checkout/discount-section": "./src/checkout/discount-section.tsx",
|
|
117
|
+
"./checkout/gift-card-section": "./src/checkout/gift-card-section.tsx",
|
|
118
|
+
"./checkout/line-item-card": "./src/checkout/line-item-card.tsx",
|
|
119
|
+
"./checkout/order-summary": "./src/checkout/order-summary.tsx",
|
|
120
|
+
"./checkout/address-form": "./src/checkout/address-form.tsx",
|
|
121
|
+
"./checkout/shipping-method-list": "./src/checkout/shipping-method-list.tsx",
|
|
122
|
+
"./checkout/payment-method-list": "./src/checkout/payment-method-list.tsx",
|
|
123
|
+
"./checkout/checkout-client": "./src/checkout/checkout-client.tsx",
|
|
124
|
+
"./checkout/use-checkout-orchestration": "./src/checkout/use-checkout-orchestration.ts",
|
|
125
|
+
"./checkout/payment-error-copy": "./src/checkout/payment-error-copy.ts",
|
|
126
|
+
"./checkout/address-error-copy": "./src/checkout/address-error-copy.ts",
|
|
127
|
+
"./checkout/promotion-error-copy": "./src/checkout/promotion-error-copy.ts",
|
|
128
|
+
"./cart-drawer": "./src/cart-drawer/index.ts",
|
|
129
|
+
"./cart-drawer/context": "./src/cart-drawer/context.tsx",
|
|
130
|
+
"./cart-drawer/mutation-queue": "./src/cart-drawer/mutation-queue.ts",
|
|
131
|
+
"./cart-drawer/labels": "./src/cart-drawer/labels.ts",
|
|
132
|
+
"./cart-drawer/cart-drawer": "./src/cart-drawer/cart-drawer.tsx",
|
|
133
|
+
"./cart-drawer/header": "./src/cart-drawer/header.tsx",
|
|
134
|
+
"./cart-drawer/promo-banner": "./src/cart-drawer/promo-banner.tsx",
|
|
135
|
+
"./cart-drawer/tiered-progress": "./src/cart-drawer/tiered-progress.tsx",
|
|
136
|
+
"./cart-drawer/item": "./src/cart-drawer/item/index.tsx",
|
|
137
|
+
"./cart-drawer/item/quantity": "./src/cart-drawer/item/quantity.tsx",
|
|
138
|
+
"./cart-drawer/item/variant": "./src/cart-drawer/item/variant.tsx",
|
|
139
|
+
"./cart-drawer/item/upsell": "./src/cart-drawer/item/upsell.tsx",
|
|
140
|
+
"./cart-drawer/free-gift": "./src/cart-drawer/free-gift.tsx",
|
|
141
|
+
"./cart-drawer/gift-wrap": "./src/cart-drawer/gift-wrap.tsx",
|
|
142
|
+
"./cart-drawer/notes": "./src/cart-drawer/notes.tsx",
|
|
143
|
+
"./cart-drawer/rewards-points": "./src/cart-drawer/rewards-points.tsx",
|
|
144
|
+
"./cart-drawer/cross-sell-sidebar": "./src/cart-drawer/cross-sell-sidebar.tsx",
|
|
145
|
+
"./cart-drawer/cross-sell-carousel": "./src/cart-drawer/cross-sell-carousel.tsx",
|
|
146
|
+
"./cart-drawer/summary-breakdown": "./src/cart-drawer/summary-breakdown.tsx",
|
|
147
|
+
"./cart-drawer/sticky-footer": "./src/cart-drawer/sticky-footer.tsx",
|
|
148
|
+
"./cart-drawer/payment-badges": "./src/cart-drawer/payment-badges.tsx",
|
|
149
|
+
"./cart-drawer/continue-shopping": "./src/cart-drawer/continue-shopping.tsx",
|
|
150
|
+
"./cart-drawer/empty": "./src/cart-drawer/empty.tsx",
|
|
151
|
+
"./cart-drawer/template": "./src/cart-drawer/template.tsx",
|
|
152
|
+
"./products": "./src/products/index.ts",
|
|
153
|
+
"./products/context": "./src/products/context.tsx",
|
|
154
|
+
"./products/labels": "./src/products/labels.ts",
|
|
155
|
+
"./products/thumbnail": "./src/products/thumbnail.tsx",
|
|
156
|
+
"./products/preview-price": "./src/products/preview-price.tsx",
|
|
157
|
+
"./products/product-price": "./src/products/product-price.tsx",
|
|
158
|
+
"./products/option-select": "./src/products/option-select.tsx",
|
|
159
|
+
"./products/image-gallery": "./src/products/image-gallery.tsx",
|
|
160
|
+
"./products/variant-url": "./src/products/variant-url.ts",
|
|
161
|
+
"./products/sets": "./src/products/sets.ts",
|
|
162
|
+
"./products/use-product-actions": "./src/products/use-product-actions.ts",
|
|
163
|
+
"./products/product-actions": "./src/products/product-actions.tsx",
|
|
164
|
+
"./products/mobile-actions": "./src/products/mobile-actions.tsx",
|
|
165
|
+
"./products/product-tabs": "./src/products/product-tabs.tsx",
|
|
166
|
+
"./products/product-specs": "./src/products/product-specs.tsx",
|
|
167
|
+
"./products/product-promises": "./src/products/product-promises.tsx",
|
|
168
|
+
"./products/product-info": "./src/products/product-info.tsx",
|
|
169
|
+
"./products/product-preview": "./src/products/product-preview.tsx",
|
|
170
|
+
"./products/related-products": "./src/products/related-products.tsx",
|
|
171
|
+
"./products/product-actions-wrapper": "./src/products/product-actions-wrapper.tsx",
|
|
172
|
+
"./products/product-template": "./src/products/product-template.tsx",
|
|
173
|
+
"./store": "./src/store/index.ts",
|
|
174
|
+
"./store/labels": "./src/store/labels.ts",
|
|
175
|
+
"./store/pagination": "./src/store/pagination.tsx",
|
|
176
|
+
"./store/sort-select": "./src/store/sort-select.tsx",
|
|
177
|
+
"./store/paginated-products": "./src/store/paginated-products.tsx",
|
|
178
|
+
"./store/skeleton-product-grid": "./src/store/skeleton-product-grid.tsx",
|
|
179
|
+
"./store/store-template": "./src/store/store-template.tsx",
|
|
180
|
+
"./store/collection-template": "./src/store/collection-template.tsx",
|
|
181
|
+
"./store/category-template": "./src/store/category-template.tsx",
|
|
182
|
+
"./store/search-template": "./src/store/search-template.tsx",
|
|
183
|
+
"./order": "./src/order/index.ts",
|
|
184
|
+
"./order/context": "./src/order/context.tsx",
|
|
185
|
+
"./order/labels": "./src/order/labels.ts",
|
|
186
|
+
"./order/order-confirmation-header": "./src/order/order-confirmation-header.tsx",
|
|
187
|
+
"./order/order-item": "./src/order/order-item.tsx",
|
|
188
|
+
"./order/order-items-list": "./src/order/order-items-list.tsx",
|
|
189
|
+
"./order/order-totals": "./src/order/order-totals.tsx",
|
|
190
|
+
"./order/order-address-card": "./src/order/order-address-card.tsx",
|
|
191
|
+
"./order/order-delivery-card": "./src/order/order-delivery-card.tsx",
|
|
192
|
+
"./order/order-payment-card": "./src/order/order-payment-card.tsx",
|
|
193
|
+
"./order/order-timeline": "./src/order/order-timeline.tsx",
|
|
194
|
+
"./order/order-help-section": "./src/order/order-help-section.tsx",
|
|
195
|
+
"./order/order-completed-template": "./src/order/order-completed-template.tsx",
|
|
196
|
+
"./common": "./src/common/index.ts",
|
|
197
|
+
"./common/localized-link": "./src/common/localized-link.tsx",
|
|
198
|
+
"./common/cart-button": "./src/common/cart-button.tsx",
|
|
199
|
+
"./common/cart-button-client": "./src/common/cart-button-client.tsx",
|
|
200
|
+
"./common/delete-button": "./src/common/delete-button.tsx",
|
|
201
|
+
"./common/country-flag": "./src/common/country-flag.tsx",
|
|
202
|
+
"./common/market-select": "./src/common/market-select.tsx",
|
|
203
|
+
"./common/country-select": "./src/common/country-select.tsx",
|
|
204
|
+
"./common/language-select": "./src/common/language-select.tsx",
|
|
205
|
+
"./common/skeleton": "./src/common/skeleton.tsx",
|
|
206
|
+
"./common/payment-icons": "./src/common/payment-icons.tsx",
|
|
207
|
+
"./common/social-links": "./src/common/social-links.tsx",
|
|
208
|
+
"./common/powered-by-cartbase": "./src/common/powered-by-cartbase.tsx",
|
|
209
|
+
"./reviews-ui": "./src/reviews-ui/index.ts",
|
|
210
|
+
"./locales": "./src/locales/index.ts",
|
|
211
|
+
"./locales/en": "./src/locales/en.ts",
|
|
212
|
+
"./locales/es": "./src/locales/es.ts",
|
|
213
|
+
"./locales/bg": "./src/locales/bg.ts"
|
|
214
|
+
},
|
|
215
|
+
"dependencies": {
|
|
216
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
217
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
218
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
219
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
220
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
221
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
222
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
223
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
224
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
225
|
+
"@stripe/react-stripe-js": "^6.1.0",
|
|
226
|
+
"@stripe/stripe-js": "^9.1.0",
|
|
227
|
+
"class-variance-authority": "^0.7.1",
|
|
228
|
+
"clsx": "^2.1.1",
|
|
229
|
+
"flag-icons": "^7.5.0",
|
|
230
|
+
"lucide-react": "^1.8.0",
|
|
231
|
+
"tailwind-merge": "^3.5.0"
|
|
232
|
+
},
|
|
233
|
+
"scripts": {
|
|
234
|
+
"typecheck": "tsc --noEmit"
|
|
235
|
+
},
|
|
236
|
+
"peerDependencies": {
|
|
237
|
+
"next": "^16.0.0",
|
|
238
|
+
"react": "^19.0.0",
|
|
239
|
+
"react-dom": "^19.0.0"
|
|
240
|
+
},
|
|
241
|
+
"peerDependenciesMeta": {
|
|
242
|
+
"next": {
|
|
243
|
+
"optional": true
|
|
244
|
+
},
|
|
245
|
+
"react": {
|
|
246
|
+
"optional": true
|
|
247
|
+
},
|
|
248
|
+
"react-dom": {
|
|
249
|
+
"optional": true
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"devDependencies": {
|
|
253
|
+
"@types/node": "^20",
|
|
254
|
+
"@types/react": "^19",
|
|
255
|
+
"@types/react-dom": "^19",
|
|
256
|
+
"typescript": "^5"
|
|
257
|
+
},
|
|
258
|
+
"engines": {
|
|
259
|
+
"node": ">=20"
|
|
260
|
+
}
|
|
261
|
+
}
|
package/src/api/http.ts
CHANGED
package/src/api/store.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* storefront needs to title, head and foot itself without hardcoding a
|
|
6
6
|
* name. One anonymous read at layout level. Docs: docs/storefront/store.md.
|
|
7
7
|
*/
|
|
8
|
+
import type { PaymentMethod } from "../common/icons/payment-marks"
|
|
9
|
+
import type { SocialNetwork } from "../common/icons/social-marks"
|
|
8
10
|
import type { StorefrontClient } from "./http"
|
|
9
11
|
|
|
10
12
|
export interface StoreBrand {
|
|
@@ -17,8 +19,16 @@ export interface StoreBrand {
|
|
|
17
19
|
/** `#rrggbb` or null. */
|
|
18
20
|
color_secondary: string | null
|
|
19
21
|
slogan: string | null
|
|
22
|
+
/**
|
|
23
|
+
* The store's social profiles by network, only the ones set (Settings,
|
|
24
|
+
* Brand, Social links). Absent from platforms before 2026-09-17.
|
|
25
|
+
*/
|
|
26
|
+
social?: StoreSocialLinks
|
|
20
27
|
}
|
|
21
28
|
|
|
29
|
+
/** A profile address per network the kit has a mark for; `SocialLinks` (common) draws them. */
|
|
30
|
+
export type StoreSocialLinks = Partial<Record<SocialNetwork, string>>
|
|
31
|
+
|
|
22
32
|
export interface StoreIdentity {
|
|
23
33
|
/** The store's public id: what `<PlatformInit storeId>` mounts. */
|
|
24
34
|
id: string
|
|
@@ -33,3 +43,14 @@ export interface StoreIdentity {
|
|
|
33
43
|
export function getStore(client: StorefrontClient): Promise<{ store: StoreIdentity }> {
|
|
34
44
|
return client.request<{ store: StoreIdentity }>("/api/store/store")
|
|
35
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* GET /api/store/payment-marks — anon. The payment marks the store's
|
|
49
|
+
* Stripe account allows, in the kit's order (every card brand when cards
|
|
50
|
+
* are on; Apple Pay, Google Pay, PayPal, Revolut, Klarna, Bancontact,
|
|
51
|
+
* iDEAL each when its method is on); empty with no Stripe. `PaymentIcons`
|
|
52
|
+
* (common) draws them. Platforms before 2026-09-17 answer 404.
|
|
53
|
+
*/
|
|
54
|
+
export function getPaymentMarks(client: StorefrontClient): Promise<{ payment_marks: PaymentMethod[] }> {
|
|
55
|
+
return client.get<{ payment_marks: PaymentMethod[] }>("/api/store/payment-marks")
|
|
56
|
+
}
|
|
@@ -1,96 +1,36 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import type { ReactNode } from "react"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
applepay: (
|
|
38
|
-
<svg viewBox="0 0 48 32" width="42" height="28" fill="none">
|
|
39
|
-
<rect width="48" height="32" rx="4" fill="#000" />
|
|
40
|
-
<g fill="#fff">
|
|
41
|
-
<path d="M15.2 11.8c-.6.7-1.5 1.2-2.4 1.1-.1-1 .4-2 .9-2.6.6-.7 1.5-1.2 2.3-1.2.1 1-.3 2-.8 2.7zm.8 1.4c-1.3-.1-2.5.8-3.1.8s-1.6-.7-2.7-.7c-1.4 0-2.7.8-3.4 2.1-1.4 2.5-.4 6.2 1 8.2.7 1 1.5 2.1 2.6 2s1.4-.7 2.7-.7 1.6.7 2.7.7 1.8-1 2.5-2c.8-1.1 1.1-2.2 1.1-2.3-1.2-.5-2-1.8-2-3.3 0-1.3.7-2.5 1.8-3.1-.7-1-1.8-1.7-3.2-1.7z" />
|
|
42
|
-
<path d="M25 12.5v10.8h1.7v-3.7h2.3c2.1 0 3.6-1.5 3.6-3.6s-1.5-3.5-3.5-3.5H25zm1.7 1.4h1.9c1.5 0 2.3.8 2.3 2.1s-.8 2.1-2.3 2.1h-1.9v-4.2zm8.8 9.5c1.1 0 2.1-.5 2.5-1.4h0v1.3H39.6v-5.2c0-1.8-1.4-2.9-3.5-2.9-2 0-3.4 1.1-3.4 2.8h1.6c.1-.8.9-1.4 1.8-1.4 1.2 0 1.8.5 1.8 1.5v.7l-2.4.1c-2.2.1-3.4 1-3.4 2.6 0 1.6 1.2 2.7 2.9 2.7v-.8zm.4-1.3c-1 0-1.7-.5-1.7-1.3 0-.8.6-1.3 1.8-1.4l2.1-.1v.7c0 1.2-1 2.1-2.2 2.1z" />
|
|
43
|
-
</g>
|
|
44
|
-
</svg>
|
|
45
|
-
),
|
|
46
|
-
googlepay: (
|
|
47
|
-
<svg viewBox="0 0 48 32" width="42" height="28" fill="none">
|
|
48
|
-
<rect width="48" height="32" rx="4" fill="#fff" stroke="#e4e4e7" strokeWidth="1" />
|
|
49
|
-
<path
|
|
50
|
-
d="M23.5 16.7v3.1h-1v-7.6h2.7c.7 0 1.2.2 1.7.6.5.4.7.9.7 1.5s-.2 1.1-.7 1.5c-.5.4-1 .6-1.7.6h-1.7zm0-3.5v2.5h1.7c.4 0 .8-.2 1.1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1.1-.4h-1.7z"
|
|
51
|
-
fill="#3c4043"
|
|
52
|
-
/>
|
|
53
|
-
<path
|
|
54
|
-
d="M30.6 14.2c.7 0 1.3.2 1.8.6.4.4.7 1 .7 1.7v3.3h-1v-.7c-.4.6-.9.9-1.6.9-.6 0-1.1-.2-1.5-.5-.4-.3-.6-.8-.6-1.3 0-.5.2-1 .5-1.3.4-.3.9-.5 1.5-.5.6 0 1.1.2 1.4.5v-.3c0-.4-.2-.7-.4-.9-.3-.2-.6-.4-1-.4-.6 0-1 .2-1.3.7l-.8-.5c.5-.7 1.1-1 2-1h.3zm-1 4.6c.3.2.6.3 1 .3s.7-.1 1-.3c.3-.2.4-.5.4-.8s-.1-.6-.4-.8c-.3-.2-.6-.3-1-.3s-.7.1-1 .3c-.3.2-.4.5-.4.8s.2.6.4.8z"
|
|
55
|
-
fill="#3c4043"
|
|
56
|
-
/>
|
|
57
|
-
<path d="M37 14.4l-2.4 5.5h-1l.9-1.9-1.6-3.6h1.1l1 2.5 1-2.5H37z" fill="#3c4043" />
|
|
58
|
-
<path d="M18.3 16c0-.3 0-.6-.1-.9h-4.6v1.7h2.7c-.1.6-.4 1.1-.9 1.4v1.2h1.5c.9-.8 1.4-2 1.4-3.4z" fill="#4285f4" />
|
|
59
|
-
<path d="M13.6 19.7c1.2 0 2.2-.4 3-1.1l-1.5-1.2c-.4.3-.9.4-1.5.4-1.2 0-2.1-.8-2.5-1.8H9.7v1.2c.7 1.5 2.2 2.5 3.9 2.5z" fill="#34a853" />
|
|
60
|
-
<path d="M11.1 16c0-.3.1-.7.2-1v-1.2H9.7c-.4.7-.6 1.4-.6 2.2s.2 1.5.6 2.2l1.6-1.2c-.1-.3-.2-.7-.2-1z" fill="#fbbc04" />
|
|
61
|
-
<path d="M13.6 12.2c.7 0 1.3.2 1.8.7l1.3-1.3c-.8-.8-1.9-1.2-3.1-1.2-1.7 0-3.2 1-3.9 2.5l1.6 1.2c.4-1.1 1.3-1.9 2.3-1.9z" fill="#ea4335" />
|
|
62
|
-
</svg>
|
|
63
|
-
),
|
|
64
|
-
amex: (
|
|
65
|
-
<svg viewBox="0 0 48 32" width="42" height="28" fill="none">
|
|
66
|
-
<rect width="48" height="32" rx="4" fill="#006fcf" />
|
|
67
|
-
<text x="24" y="20" fill="#fff" fontSize="10" fontWeight="700" textAnchor="middle" fontFamily="Arial, sans-serif">
|
|
68
|
-
AMEX
|
|
69
|
-
</text>
|
|
70
|
-
</svg>
|
|
71
|
-
),
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
type CartPaymentBadgesProps = {
|
|
75
|
-
methods?: BadgeKey[]
|
|
76
|
-
badges?: Partial<Record<BadgeKey, ReactNode>>
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function CartPaymentBadges({
|
|
80
|
-
methods = ["visa", "mastercard", "googlepay", "applepay"],
|
|
81
|
-
badges,
|
|
82
|
-
}: CartPaymentBadgesProps) {
|
|
83
|
-
const resolved = { ...defaultBadges, ...badges }
|
|
84
|
-
return (
|
|
85
|
-
<div className="flex items-center justify-center gap-2 px-5 py-3">
|
|
86
|
-
{methods.map((method) => (
|
|
87
|
-
<div
|
|
88
|
-
key={method}
|
|
89
|
-
className="opacity-70 hover:opacity-100 transition-opacity"
|
|
90
|
-
>
|
|
91
|
-
{resolved[method]}
|
|
92
|
-
</div>
|
|
93
|
-
))}
|
|
94
|
-
</div>
|
|
95
|
-
)
|
|
96
|
-
}
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from "react"
|
|
4
|
+
import { PaymentIcon, type PaymentMethod } from "../common/payment-icons"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* CartPaymentBadges — row of small payment-method logos shown near the
|
|
8
|
+
* checkout button.
|
|
9
|
+
*
|
|
10
|
+
* Ported from `@1click/ui/src/cart-drawer/payment-badges.tsx` (v2.3.1);
|
|
11
|
+
* originally extracted from mindpages-storefront
|
|
12
|
+
* src/modules/cart-drawer/cart-payment-badges.tsx. Since 2026-09-17 the
|
|
13
|
+
* badges are the kit's payment marks (`common/payment-icons`), the same the
|
|
14
|
+
* footer shows, so any mark the kit carries can be named; a store can still
|
|
15
|
+
* pass its own badge per method through `badges`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
type CartPaymentBadgesProps = {
|
|
19
|
+
methods?: PaymentMethod[]
|
|
20
|
+
badges?: Partial<Record<PaymentMethod, ReactNode>>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function CartPaymentBadges({
|
|
24
|
+
methods = ["visa", "mastercard", "googlepay", "applepay"],
|
|
25
|
+
badges,
|
|
26
|
+
}: CartPaymentBadgesProps) {
|
|
27
|
+
return (
|
|
28
|
+
<div className="flex items-center justify-center gap-2 px-5 py-3">
|
|
29
|
+
{methods.map((method) => (
|
|
30
|
+
<div key={method} className="opacity-70 transition-opacity hover:opacity-100">
|
|
31
|
+
{badges?.[method] ?? <PaymentIcon method={method} className="h-7" />}
|
|
32
|
+
</div>
|
|
33
|
+
))}
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED by scripts/build-icons.mjs from assets/icons/cartbase. Do not
|
|
3
|
+
* edit: change the SVG file and run the script. The Cartbase wordmark, Cartbase's own.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const CARTBASE_WORDMARK = {
|
|
7
|
+
viewBox: "0 0 378 98",
|
|
8
|
+
path: "M48.3649 79.4452C29.0672 79.4452 16.5705 66.8635 16.5705 48.5009C16.5705 29.6283 29.6623 17.0465 48.6199 17.0465C57.3762 17.0465 64.8572 20.362 70.638 25.2927L63.242 35.069C58.3113 31.0735 53.8057 29.2032 48.3649 29.2032C37.7384 29.2032 30.5974 36.7693 30.5974 47.9908C30.5974 59.5524 37.9085 67.2035 48.705 67.2035C54.2307 67.2035 58.6513 65.5033 63.667 61.4227L71.0631 71.2841C65.4523 76.2998 57.7162 79.4452 48.3649 79.4452ZM87.1349 79.4452C78.5488 79.4452 72.2579 74.8546 72.2579 65.5033C72.2579 56.577 79.5689 51.3913 89.1752 51.3913C93.1708 51.3913 97.1663 52.1564 100.142 53.6016V51.8164C100.142 46.3756 96.5713 44.3353 90.4504 44.3353C86.3698 44.3353 82.0342 45.2705 77.6986 46.7157L75.2333 37.4494C81.0141 35.2391 86.0298 34.2189 92.4907 34.2189C105.753 34.2189 113.489 38.8946 113.489 50.7962V78H101.332C101.332 75.9597 101.417 73.8344 101.757 70.4339H101.502C99.2066 75.4496 93.8509 79.4452 87.1349 79.4452ZM85.5197 64.3131C85.5197 67.7986 88.1551 69.2438 91.4705 69.2438C96.0612 69.2438 99.7167 66.4384 100.397 61.5927C98.1015 60.4026 94.701 59.4674 91.9806 59.4674C88.1551 59.4674 85.5197 61.2527 85.5197 64.3131ZM120.395 78V35.6641H132.382C132.382 37.6194 132.297 39.4046 131.957 42.7201H132.212C133.827 38.1295 138.163 34.2189 144.283 34.2189C146.664 34.2189 149.044 34.814 150.319 35.3241L147.004 46.6306C145.474 46.1206 144.028 45.8655 142.668 45.8655C137.398 45.8655 133.742 49.266 133.742 55.9819V78H120.395ZM172.797 79.4452C163.106 79.4452 157.92 73.9194 157.92 63.2079V46.2056H150.779V35.6641H157.92V25.5477L171.182 24.1025V35.6641H181.638V46.2056H171.182V62.7829C171.182 66.4384 172.712 68.3087 176.027 68.3087C177.473 68.3087 179.343 67.8836 180.873 67.2035L184.019 76.9799C180.533 78.6801 177.048 79.4452 172.797 79.4452ZM213.752 79.4452C207.121 79.4452 201.935 76.2998 199.47 71.7091H199.215C199.385 74.3445 199.385 76.1297 199.385 78H187.398V18.4917H200.83V27.928C200.83 33.1138 200.575 37.7044 199.385 42.8051H199.555C202.275 37.9594 207.631 34.2189 214.517 34.2189C225.314 34.2189 233.645 42.3801 233.645 56.747C233.645 70.519 225.059 79.4452 213.752 79.4452ZM210.352 68.3937C216.387 68.3937 220.383 63.803 220.383 56.9171C220.383 49.7761 216.387 45.2705 210.267 45.2705C204.401 45.2705 200.49 49.9461 200.49 56.9171C200.49 63.888 204.486 68.3937 210.352 68.3937ZM250.364 79.4452C241.778 79.4452 235.487 74.8546 235.487 65.5033C235.487 56.577 242.798 51.3913 252.405 51.3913C256.4 51.3913 260.396 52.1564 263.371 53.6016V51.8164C263.371 46.3756 259.801 44.3353 253.68 44.3353C249.599 44.3353 245.264 45.2705 240.928 46.7157L238.463 37.4494C244.243 35.2391 249.259 34.2189 255.72 34.2189C268.982 34.2189 276.718 38.8946 276.718 50.7962V78H264.561C264.561 75.9597 264.646 73.8344 264.986 70.4339H264.731C262.436 75.4496 257.08 79.4452 250.364 79.4452ZM248.749 64.3131C248.749 67.7986 251.384 69.2438 254.7 69.2438C259.29 69.2438 262.946 66.4384 263.626 61.5927C261.331 60.4026 257.93 59.4674 255.21 59.4674C251.384 59.4674 248.749 61.2527 248.749 64.3131ZM298.842 79.4452C292.381 79.4452 286.175 78.085 280.479 75.1096L284.475 65.1632C289.745 67.5435 294.251 68.7337 299.182 68.7337C302.752 68.7337 304.707 67.3735 304.707 65.1632C304.707 62.7829 302.837 61.6777 297.481 60.9976C287.365 59.7225 281.924 54.9618 281.924 47.8208C281.924 39.5747 288.98 34.2189 299.692 34.2189C304.707 34.2189 311.168 35.6641 315.419 37.7894L311.848 47.6508C308.193 45.6955 303.092 44.5053 299.522 44.5053C296.291 44.5053 294.421 45.6955 294.421 47.9908C294.421 50.1161 296.206 51.2213 300.372 51.7314C312.188 53.1766 317.289 57.3421 317.289 65.3332C317.289 73.9194 310.148 79.4452 298.842 79.4452ZM342.222 79.4452C329.3 79.4452 318.928 71.4541 318.928 56.407C318.928 41.7 329.98 34.2189 341.711 34.2189C353.528 34.2189 362.369 41.4449 362.369 54.7068C362.369 56.407 362.199 58.2773 361.859 60.0625H332.275C332.615 66.2684 337.631 69.1588 342.902 69.1588C347.067 69.1588 351.063 67.8836 354.293 65.2482L359.904 73.1543C355.568 77.3199 349.022 79.4452 342.222 79.4452ZM332.36 52.4114H349.703C349.788 46.9707 345.962 44.2503 341.371 44.2503C336.781 44.2503 332.955 46.8857 332.36 52.4114Z",
|
|
9
|
+
} as const
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED by scripts/build-icons.mjs from assets/icons/payment. Do not
|
|
3
|
+
* edit: change the SVG file and run the script. The payment marks, from Shopify's payment_icons (MIT); each is its brand's trademark.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const PAYMENT_MARKS = {
|
|
7
|
+
visa: {
|
|
8
|
+
label: "Visa",
|
|
9
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\" fill=\"none\"><rect x=\".5\" y=\".5\" width=\"37\" height=\"23\" rx=\"2.5\" stroke=\"#000\" stroke-opacity=\".07\" fill=\"none\"/><path d=\"M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z\" fill=\"#142FBD\" style=\"fill:#142FBD;fill:color(display-p3 0.0784 0.1843 0.7412);fill-opacity:1;\"/><path d=\"M35 1C36.1 1 37 1.9 37 3V21C37 22.1 36.1 23 35 23H3C1.9 23 1 22.1 1 21V3C1 1.9 1.9 1 3 1H35Z\" fill=\"#1532CB\" style=\"fill:#1532CB;fill:color(display-p3 0.0824 0.1961 0.7961);fill-opacity:1;\"/><path d=\"M29.5944 10.2167H29.2778C28.8556 11.2722 28.5389 11.8 28.2222 13.3833H30.2278C29.9111 11.8 29.9111 11.0611 29.5944 10.2167V10.2167ZM32.6556 16.4444H30.8611C30.7556 16.4444 30.7556 16.4444 30.65 16.3389L30.4389 15.3889L30.3333 15.1778H27.8C27.6944 15.1778 27.5889 15.1778 27.5889 15.3889L27.2722 16.3389C27.2722 16.4444 27.1667 16.4444 27.1667 16.4444H24.95L25.1611 15.9167L28.2222 8.73889C28.2222 8.21111 28.5389 8 29.0667 8H30.65C30.7556 8 30.8611 8 30.8611 8.21111L32.3389 15.0722C32.4444 15.4944 32.55 15.8111 32.55 16.2333C32.6556 16.3389 32.6556 16.3389 32.6556 16.4444V16.4444ZM18.5111 16.1278L18.9333 14.2278C19.0389 14.2278 19.1444 14.3333 19.1444 14.3333C19.8833 14.65 20.6222 14.8611 21.3611 14.7556C21.5722 14.7556 21.8889 14.65 22.1 14.5444C22.6278 14.3333 22.6278 13.8056 22.2056 13.3833C21.9944 13.1722 21.6778 13.0667 21.3611 12.8556C20.9389 12.6444 20.5167 12.4333 20.2 12.1167C18.9333 11.0611 19.3556 9.58333 20.0944 8.84444C20.7278 8.42222 21.0444 8 21.8889 8C23.1556 8 24.5278 8 25.1611 8.21111H25.2667C25.1611 8.84444 25.0556 9.37222 24.8444 10.0056C24.3167 9.79444 23.7889 9.58333 23.2611 9.58333C22.9444 9.58333 22.6278 9.58333 22.3111 9.68889C22.1 9.68889 21.9944 9.79444 21.8889 9.9C21.6778 10.1111 21.6778 10.4278 21.8889 10.6389L22.4167 11.0611C22.8389 11.2722 23.2611 11.4833 23.5778 11.6944C24.1056 12.0111 24.6333 12.5389 24.7389 13.1722C24.95 14.1222 24.6333 14.9667 23.7889 15.6C23.2611 16.0222 23.05 16.2333 22.3111 16.2333C20.8333 16.2333 19.6722 16.3389 18.7222 16.0222C18.6167 16.2333 18.6167 16.2333 18.5111 16.1278V16.1278ZM14.8167 16.4444C14.9222 15.7056 14.9222 15.7056 15.0278 15.3889C15.5556 13.0667 16.0833 10.6389 16.5056 8.31667C16.6111 8.10556 16.6111 8 16.8222 8H18.7222C18.5111 9.26667 18.3 10.2167 17.9833 11.3778C17.6667 12.9611 17.35 14.5444 16.9278 16.1278C16.9278 16.3389 16.8222 16.3389 16.6111 16.3389L14.8167 16.4444ZM5 8.21111C5 8.10556 5.21111 8 5.31667 8H8.90556C9.43333 8 9.85556 8.31667 9.96111 8.84444L10.9111 13.4889C10.9111 13.5944 10.9111 13.5944 11.0167 13.7C11.0167 13.5944 11.1222 13.5944 11.1222 13.5944L13.3389 8.21111C13.2333 8.10556 13.3389 8 13.4444 8H15.6611C15.6611 8.10556 15.6611 8.10556 15.5556 8.21111L12.2833 15.9167C12.1778 16.1278 12.1778 16.2333 12.0722 16.3389C11.9667 16.4444 11.7556 16.3389 11.5444 16.3389H9.96111C9.85556 16.3389 9.75 16.3389 9.75 16.1278L8.06111 9.58333C7.85 9.37222 7.53333 9.05556 7.11111 8.95C6.47778 8.63333 5.31667 8.42222 5.10556 8.42222L5 8.21111Z\" fill=\"white\" style=\"fill:white;fill-opacity:1;\"/></svg>",
|
|
10
|
+
},
|
|
11
|
+
mastercard: {
|
|
12
|
+
label: "Mastercard",
|
|
13
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\" fill=\"none\"><rect x=\".5\" y=\".5\" width=\"37\" height=\"23\" rx=\"2.5\" stroke=\"#000\" stroke-opacity=\".07\" fill=\"none\"/><path d=\"M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z\" fill=\"#1C1C1C\" style=\"fill:#1C1C1C;fill:color(display-p3 0.1098 0.1098 0.1098);fill-opacity:1;\"/><path d=\"M35 1C36.1 1 37 1.9 37 3V21C37 22.1 36.1 23 35 23H3C1.9 23 1 22.1 1 21V3C1 1.9 1.9 1 3 1H35Z\" fill=\"#232323\" style=\"fill:#232323;fill:color(display-p3 0.1373 0.1373 0.1373);fill-opacity:1;\"/><path d=\"M14.6364 19.2727C18.8538 19.2727 22.2727 15.8538 22.2727 11.6364C22.2727 7.41892 18.8538 4 14.6364 4C10.4189 4 7 7.41892 7 11.6364C7 15.8538 10.4189 19.2727 14.6364 19.2727Z\" fill=\"#EB001B\" style=\"fill:#EB001B;fill:color(display-p3 0.9216 0.0000 0.1059);fill-opacity:1;\"/><path d=\"M23.3637 19.2727C27.5811 19.2727 31 15.8538 31 11.6364C31 7.41892 27.5811 4 23.3637 4C19.1462 4 15.7273 7.41892 15.7273 11.6364C15.7273 15.8538 19.1462 19.2727 23.3637 19.2727Z\" fill=\"#F79E1B\" style=\"fill:#F79E1B;fill:color(display-p3 0.9686 0.6196 0.1059);fill-opacity:1;\"/><path d=\"M22.2727 11.6362C22.2727 9.01797 20.9637 6.72706 19 5.41797C17.0364 6.83615 15.7273 9.12706 15.7273 11.6362C15.7273 14.1452 17.0364 16.5452 19 17.8543C20.9637 16.5452 22.2727 14.2543 22.2727 11.6362Z\" fill=\"#FF5F00\" style=\"fill:#FF5F00;fill:color(display-p3 1.0000 0.3725 0.0000);fill-opacity:1;\"/></svg>",
|
|
14
|
+
},
|
|
15
|
+
maestro: {
|
|
16
|
+
label: "Maestro",
|
|
17
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><path opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path fill=\"#fff\" d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\"/><circle fill=\"#EB001B\" cx=\"15\" cy=\"12\" r=\"7\"/><circle fill=\"#00A2E5\" cx=\"23\" cy=\"12\" r=\"7\"/><path fill=\"#7375CF\" d=\"M22 12c0-2.4-1.2-4.5-3-5.7-1.8 1.3-3 3.4-3 5.7s1.2 4.5 3 5.7c1.8-1.2 3-3.3 3-5.7z\"/></svg>",
|
|
18
|
+
},
|
|
19
|
+
amex: {
|
|
20
|
+
label: "American Express",
|
|
21
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\" fill=\"none\"><rect x=\".5\" y=\".5\" width=\"37\" height=\"23\" rx=\"2.5\" stroke=\"#000\" stroke-opacity=\".07\" fill=\"none\"/><path d=\"M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z\" fill=\"#0071CE\" style=\"fill:#0071CE;fill:color(display-p3 0.0000 0.4431 0.8078);fill-opacity:1;\"/><path d=\"M3 0.5H35C36.3348 0.5 37.5 1.58692 37.5 3V21C37.5 22.4239 36.4239 23.5 35 23.5H3C1.66524 23.5 0.5 22.4131 0.5 21V3C0.5 1.57614 1.57614 0.5 3 0.5Z\" stroke=\"black\" stroke-opacity=\"0.07\" style=\"stroke:black;stroke-opacity:0.07;\"/><path d=\"M25.8662 6.33203V3H31L31.8662 5.5332L32.7334 3H37V14.2002H36.7998L34.8672 16.2656L36.7998 18.3594H37V21.2666H33.5996L31.9336 19.3994L30.2002 21.2666H19.4668V12.666H16L20.2666 3H24.4004L25.8662 6.33203ZM20.5996 20.2656H27V18.5322H22.666V17.3994H26.8662V15.666H22.666V14.5322H27V12.7988H20.5996V20.2656ZM30.5332 16.5322L27 20.2656H29.5996L31.8662 17.8662L34.0664 20.2656H36.7324L33.1992 16.4658L36.7324 12.7988H34.1328L31.8662 15.1992L29.7324 12.7988H27L30.5332 16.5322ZM17.666 11.7324H19.9326L20.5332 10.1992H23.999L24.666 11.7324H26.999L23.666 4.19922H20.999L17.666 11.7324ZM33.5996 4.19922L31.9326 8.86621L30.1992 4.19922H27V11.666H29.0664V6.39941L31 11.666H32.7998L34.7324 6.39941V11.666H36.7324V4.13281L33.5996 4.19922ZM23.2656 8.46582H21.2656L22.2656 5.99902L23.2656 8.46582Z\" fill=\"white\" style=\"fill:white;fill-opacity:1;\"/></svg>",
|
|
22
|
+
},
|
|
23
|
+
unionpay: {
|
|
24
|
+
label: "UnionPay",
|
|
25
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"-36 25 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#005B9A\" d=\"M-36 46.8v.7-.7zM-18.3 25v24h-7.2c-1.3 0-2.1-1-1.8-2.3l4.4-19.4c.3-1.3 1.9-2.3 3.2-2.3h1.4zm12.6 0c-1.3 0-2.9 1-3.2 2.3l-4.5 19.4c-.3 1.3.5 2.3 1.8 2.3h-4.9V25h10.8z\"/><path fill=\"#E9292D\" d=\"M-19.7 25c-1.3 0-2.9 1.1-3.2 2.3l-4.4 19.4c-.3 1.3.5 2.3 1.8 2.3h-8.9c-.8 0-1.5-.6-1.5-1.4v-21c0-.8.7-1.6 1.5-1.6h14.7z\"/><path fill=\"#0E73B9\" d=\"M-5.7 25c-1.3 0-2.9 1.1-3.2 2.3l-4.4 19.4c-.3 1.3.5 2.3 1.8 2.3H-26h.5c-1.3 0-2.1-1-1.8-2.3l4.4-19.4c.3-1.3 1.9-2.3 3.2-2.3h14z\"/><path fill=\"#059DA4\" d=\"M2 26.6v21c0 .8-.6 1.4-1.5 1.4h-12.1c-1.3 0-2.1-1.1-1.8-2.3l4.5-19.4C-8.6 26-7 25-5.7 25H.5c.9 0 1.5.7 1.5 1.6z\"/><path fill=\"#fff\" d=\"M-21.122 38.645h.14c.14 0 .28-.07.28-.14l.42-.63h1.19l-.21.35h1.4l-.21.63h-1.68c-.21.28-.42.42-.7.42h-.84l.21-.63m-.21.91h3.01l-.21.7h-1.19l-.21.7h1.19l-.21.7h-1.19l-.28 1.05c-.07.14 0 .28.28.21h.98l-.21.7h-1.89c-.35 0-.49-.21-.35-.63l.35-1.33h-.77l.21-.7h.77l.21-.7h-.7l.21-.7zm4.83-1.75v.42s.56-.42 1.12-.42h1.96l-.77 2.66c-.07.28-.35.49-.77.49h-2.24l-.49 1.89c0 .07 0 .14.14.14h.42l-.14.56h-1.12c-.42 0-.56-.14-.49-.35l1.47-5.39h.91zm1.68.77h-1.75l-.21.7s.28-.21.77-.21h1.05l.14-.49zm-.63 1.68c.14 0 .21 0 .21-.14l.14-.35h-1.75l-.14.56 1.54-.07zm-1.19.84h.98v.42h.28c.14 0 .21-.07.21-.14l.07-.28h.84l-.14.49c-.07.35-.35.49-.77.56h-.56v.77c0 .14.07.21.35.21h.49l-.14.56h-1.19c-.35 0-.49-.14-.49-.49l.07-2.1zm4.2-2.45l.21-.84h1.19l-.07.28s.56-.28 1.05-.28h1.47l-.21.84h-.21l-1.12 3.85h.21l-.21.77h-.21l-.07.35h-1.19l.07-.35h-2.17l.21-.77h.21l1.12-3.85h-.28m1.26 0l-.28 1.05s.49-.21.91-.28c.07-.35.21-.77.21-.77h-.84zm-.49 1.54l-.28 1.12s.56-.28.98-.28c.14-.42.21-.77.21-.77l-.91-.07zm.21 2.31l.21-.77h-.84l-.21.77h.84zm2.87-4.69h1.12l.07.42c0 .07.07.14.21.14h.21l-.21.7h-.77c-.28 0-.49-.07-.49-.35l-.14-.91zm-.35 1.47h3.57l-.21.77h-1.19l-.21.7h1.12l-.21.77h-1.26l-.28.42h.63l.14.84c0 .07.07.14.21.14h.21l-.21.7h-.7c-.35 0-.56-.07-.56-.35l-.14-.77-.56.84c-.14.21-.35.35-.63.35h-1.05l.21-.7h.35c.14 0 .21-.07.35-.21l.84-1.26h-1.05l.21-.77h1.19l.21-.7h-1.19l.21-.77zm-19.74-5.04c-.14.7-.42 1.19-.91 1.54-.49.35-1.12.56-1.89.56-.7 0-1.26-.21-1.54-.56-.21-.28-.35-.56-.35-.98 0-.14 0-.35.07-.56l.84-3.92h1.19l-.77 3.92v.28c0 .21.07.35.14.49.14.21.35.28.7.28s.7-.07.91-.28c.21-.21.42-.42.49-.77l.77-3.92h1.19l-.84 3.92m1.12-1.54h.84l-.07.49.14-.14c.28-.28.63-.42 1.05-.42.35 0 .63.14.77.35.14.21.21.49.14.91l-.49 2.38h-.91l.42-2.17c.07-.28.07-.49 0-.56-.07-.14-.21-.14-.35-.14-.21 0-.42.07-.56.21-.14.14-.28.35-.28.63l-.42 2.03h-.91l.63-3.57m9.8 0h.84l-.07.49.14-.14c.28-.28.63-.42 1.05-.42.35 0 .63.14.77.35s.21.49.14.91l-.49 2.38h-.91l.42-2.24c.07-.21 0-.42-.07-.49-.07-.14-.21-.14-.35-.14-.21 0-.42.07-.56.21-.14.14-.28.35-.28.63l-.42 2.03h-.91l.7-3.57m-5.81 0h.98l-.77 3.5h-.98l.77-3.5m.35-1.33h.98l-.21.84h-.98l.21-.84zm1.4 4.55c-.21-.21-.35-.56-.35-.98v-.21c0-.07 0-.21.07-.28.14-.56.35-1.05.7-1.33.35-.35.84-.49 1.33-.49.42 0 .77.14 1.05.35.21.21.35.56.35.98v.21c0 .07 0 .21-.07.28-.14.56-.35.98-.7 1.33-.35.35-.84.49-1.33.49-.35 0-.7-.14-1.05-.35m1.89-.7c.14-.21.28-.49.35-.84v-.35c0-.21-.07-.35-.14-.49a.635.635 0 0 0-.49-.21c-.28 0-.49.07-.63.28-.14.21-.28.49-.35.84v.28c0 .21.07.35.14.49.14.14.28.21.49.21.28.07.42 0 .63-.21m6.51-4.69h2.52c.49 0 .84.14 1.12.35.28.21.35.56.35.91v.28c0 .07 0 .21-.07.28-.07.49-.35.98-.7 1.26-.42.35-.84.49-1.4.49h-1.4l-.42 2.03h-1.19l1.19-5.6m.56 2.59h1.12c.28 0 .49-.07.7-.21.14-.14.28-.35.35-.63v-.28c0-.21-.07-.35-.21-.42-.14-.07-.35-.14-.7-.14h-.91l-.35 1.68zm8.68 3.71c-.35.77-.7 1.26-.91 1.47-.21.21-.63.7-1.61.7l.07-.63c.84-.28 1.26-1.4 1.54-1.96l-.28-3.78h1.19l.07 2.38.91-2.31h1.05l-2.03 4.13m-2.94-3.85l-.42.28c-.42-.35-.84-.56-1.54-.21-.98.49-1.89 4.13.91 2.94l.14.21h1.12l.7-3.29-.91.07m-.56 1.82c-.21.56-.56.84-.91.77-.28-.14-.35-.63-.21-1.19.21-.56.56-.84.91-.77.28.14.35.63.21 1.19\"/></svg>",
|
|
26
|
+
},
|
|
27
|
+
discover: {
|
|
28
|
+
label: "Discover",
|
|
29
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#000\" opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32z\" fill=\"#fff\"/><path d=\"M3.57 7.16H2v5.5h1.57c.83 0 1.43-.2 1.96-.63.63-.52 1-1.3 1-2.11-.01-1.63-1.22-2.76-2.96-2.76zm1.26 4.14c-.34.3-.77.44-1.47.44h-.29V8.1h.29c.69 0 1.11.12 1.47.44.37.33.59.84.59 1.37 0 .53-.22 1.06-.59 1.39zm2.19-4.14h1.07v5.5H7.02v-5.5zm3.69 2.11c-.64-.24-.83-.4-.83-.69 0-.35.34-.61.8-.61.32 0 .59.13.86.45l.56-.73c-.46-.4-1.01-.61-1.62-.61-.97 0-1.72.68-1.72 1.58 0 .76.35 1.15 1.35 1.51.42.15.63.25.74.31.21.14.32.34.32.57 0 .45-.35.78-.83.78-.51 0-.92-.26-1.17-.73l-.69.67c.49.73 1.09 1.05 1.9 1.05 1.11 0 1.9-.74 1.9-1.81.02-.89-.35-1.29-1.57-1.74zm1.92.65c0 1.62 1.27 2.87 2.9 2.87.46 0 .86-.09 1.34-.32v-1.26c-.43.43-.81.6-1.29.6-1.08 0-1.85-.78-1.85-1.9 0-1.06.79-1.89 1.8-1.89.51 0 .9.18 1.34.62V7.38c-.47-.24-.86-.34-1.32-.34-1.61 0-2.92 1.28-2.92 2.88zm12.76.94l-1.47-3.7h-1.17l2.33 5.64h.58l2.37-5.64h-1.16l-1.48 3.7zm3.13 1.8h3.04v-.93h-1.97v-1.48h1.9v-.93h-1.9V8.1h1.97v-.94h-3.04v5.5zm7.29-3.87c0-1.03-.71-1.62-1.95-1.62h-1.59v5.5h1.07v-2.21h.14l1.48 2.21h1.32l-1.73-2.32c.81-.17 1.26-.72 1.26-1.56zm-2.16.91h-.31V8.03h.33c.67 0 1.03.28 1.03.82 0 .55-.36.85-1.05.85z\" fill=\"#231F20\"/><path d=\"M20.16 12.86a2.931 2.931 0 100-5.862 2.931 2.931 0 000 5.862z\" fill=\"url(#pi-paint0_linear)\"/><path opacity=\".65\" d=\"M20.16 12.86a2.931 2.931 0 100-5.862 2.931 2.931 0 000 5.862z\" fill=\"url(#pi-paint1_linear)\"/><path d=\"M36.57 7.506c0-.1-.07-.15-.18-.15h-.16v.48h.12v-.19l.14.19h.14l-.16-.2c.06-.01.1-.06.1-.13zm-.2.07h-.02v-.13h.02c.06 0 .09.02.09.06 0 .05-.03.07-.09.07z\" fill=\"#231F20\"/><path d=\"M36.41 7.176c-.23 0-.42.19-.42.42 0 .23.19.42.42.42.23 0 .42-.19.42-.42 0-.23-.19-.42-.42-.42zm0 .77c-.18 0-.34-.15-.34-.35 0-.19.15-.35.34-.35.18 0 .33.16.33.35 0 .19-.15.35-.33.35z\" fill=\"#231F20\"/><path d=\"M37 12.984S27.09 19.873 8.976 23h26.023a2 2 0 002-1.984l.024-3.02L37 12.985z\" fill=\"#F48120\"/><defs><linearGradient id=\"pi-paint0_linear\" x1=\"21.657\" y1=\"12.275\" x2=\"19.632\" y2=\"9.104\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#F89F20\"/><stop offset=\".25\" stop-color=\"#F79A20\"/><stop offset=\".533\" stop-color=\"#F68D20\"/><stop offset=\".62\" stop-color=\"#F58720\"/><stop offset=\".723\" stop-color=\"#F48120\"/><stop offset=\"1\" stop-color=\"#F37521\"/></linearGradient><linearGradient id=\"pi-paint1_linear\" x1=\"21.338\" y1=\"12.232\" x2=\"18.378\" y2=\"6.446\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#F58720\"/><stop offset=\".359\" stop-color=\"#E16F27\"/><stop offset=\".703\" stop-color=\"#D4602C\"/><stop offset=\".982\" stop-color=\"#D05B2E\"/></linearGradient></defs></svg>",
|
|
30
|
+
},
|
|
31
|
+
diners: {
|
|
32
|
+
label: "Diners Club",
|
|
33
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><path opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path fill=\"#fff\" d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\"/><path d=\"M12 12v3.7c0 .3-.2.3-.5.2-1.9-.8-3-3.3-2.3-5.4.4-1.1 1.2-2 2.3-2.4.4-.2.5-.1.5.2V12zm2 0V8.3c0-.3 0-.3.3-.2 2.1.8 3.2 3.3 2.4 5.4-.4 1.1-1.2 2-2.3 2.4-.4.2-.4.1-.4-.2V12zm7.2-7H13c3.8 0 6.8 3.1 6.8 7s-3 7-6.8 7h8.2c3.8 0 6.8-3.1 6.8-7s-3-7-6.8-7z\" fill=\"#3086C8\"/></svg>",
|
|
34
|
+
},
|
|
35
|
+
jcb: {
|
|
36
|
+
label: "JCB",
|
|
37
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><g fill-rule=\"nonzero\"><path d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\" fill=\"#000\" opacity=\".07\"/><path d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\" fill=\"#FFF\"/></g><path d=\"M11.5 5H15v11.5a2.5 2.5 0 0 1-2.5 2.5H9V7.5A2.5 2.5 0 0 1 11.5 5z\" fill=\"#006EBC\"/><path d=\"M18.5 5H22v11.5a2.5 2.5 0 0 1-2.5 2.5H16V7.5A2.5 2.5 0 0 1 18.5 5z\" fill=\"#F00036\"/><path d=\"M25.5 5H29v11.5a2.5 2.5 0 0 1-2.5 2.5H23V7.5A2.5 2.5 0 0 1 25.5 5z\" fill=\"#2AB419\"/><path d=\"M10.755 14.5c-1.06 0-2.122-.304-2.656-.987l.78-.676c.068 1.133 3.545 1.24 3.545-.19V9.5h1.802v3.147c0 .728-.574 1.322-1.573 1.632-.466.144-1.365.221-1.898.221zm8.116 0c-.674 0-1.388-.107-1.965-.366-.948-.425-1.312-1.206-1.3-2.199.012-1.014.436-1.782 1.468-2.165 1.319-.49 3.343-.261 3.926.27v.972c-.572-.521-1.958-.898-2.919-.46-.494.226-.737.917-.744 1.448-.006.56.245 1.252.744 1.497.953.467 2.39.04 2.919-.441v1.01c-.358.255-1.253.434-2.129.434zm8.679-2.587c.37-.235.582-.567.582-1.005 0-.438-.116-.687-.348-.939-.206-.207-.58-.469-1.238-.469H23v5h3.546c.696 0 1.097-.23 1.315-.415.283-.25.426-.53.426-.96 0-.431-.155-.908-.737-1.212zm-1.906-.281h-1.428v-1.444h1.495c.956 0 .944 1.444-.067 1.444zm.288 2.157h-1.716v-1.513h1.716c.986 0 1.083 1.513 0 1.513z\" fill=\"#FFF\" fill-rule=\"nonzero\"/></g></svg>",
|
|
38
|
+
},
|
|
39
|
+
applepay: {
|
|
40
|
+
label: "Apple Pay",
|
|
41
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 165.521 105.965\"><path fill=\"#000\" d=\"M150.698 0H14.823c-.566 0-1.133 0-1.698.003-.477.004-.953.009-1.43.022-1.039.028-2.087.09-3.113.274a10.51 10.51 0 0 0-2.958.975 9.932 9.932 0 0 0-4.35 4.35 10.463 10.463 0 0 0-.975 2.96C.113 9.611.052 10.658.024 11.696a70.22 70.22 0 0 0-.022 1.43C0 13.69 0 14.256 0 14.823v76.318c0 .567 0 1.132.002 1.699.003.476.009.953.022 1.43.028 1.036.09 2.084.275 3.11a10.46 10.46 0 0 0 .974 2.96 9.897 9.897 0 0 0 1.83 2.52 9.874 9.874 0 0 0 2.52 1.83c.947.483 1.917.79 2.96.977 1.025.183 2.073.245 3.112.273.477.011.953.017 1.43.02.565.004 1.132.004 1.698.004h135.875c.565 0 1.132 0 1.697-.004.476-.002.952-.009 1.431-.02 1.037-.028 2.085-.09 3.113-.273a10.478 10.478 0 0 0 2.958-.977 9.955 9.955 0 0 0 4.35-4.35c.483-.947.789-1.917.974-2.96.186-1.026.246-2.074.274-3.11.013-.477.02-.954.022-1.43.004-.567.004-1.132.004-1.699V14.824c0-.567 0-1.133-.004-1.699a63.067 63.067 0 0 0-.022-1.429c-.028-1.038-.088-2.085-.274-3.112a10.4 10.4 0 0 0-.974-2.96 9.94 9.94 0 0 0-4.35-4.35A10.52 10.52 0 0 0 156.939.3c-1.028-.185-2.076-.246-3.113-.274a71.417 71.417 0 0 0-1.431-.022C151.83 0 151.263 0 150.698 0z\" /><path fill=\"#FFF\" d=\"M150.698 3.532l1.672.003c.452.003.905.008 1.36.02.793.022 1.719.065 2.583.22.75.135 1.38.34 1.984.648a6.392 6.392 0 0 1 2.804 2.807c.306.6.51 1.226.645 1.983.154.854.197 1.783.218 2.58.013.45.019.9.02 1.36.005.557.005 1.113.005 1.671v76.318c0 .558 0 1.114-.004 1.682-.002.45-.008.9-.02 1.35-.022.796-.065 1.725-.221 2.589a6.855 6.855 0 0 1-.645 1.975 6.397 6.397 0 0 1-2.808 2.807c-.6.306-1.228.511-1.971.645-.881.157-1.847.2-2.574.22-.457.01-.912.017-1.379.019-.555.004-1.113.004-1.669.004H14.801c-.55 0-1.1 0-1.66-.004a74.993 74.993 0 0 1-1.35-.018c-.744-.02-1.71-.064-2.584-.22a6.938 6.938 0 0 1-1.986-.65 6.337 6.337 0 0 1-1.622-1.18 6.355 6.355 0 0 1-1.178-1.623 6.935 6.935 0 0 1-.646-1.985c-.156-.863-.2-1.788-.22-2.578a66.088 66.088 0 0 1-.02-1.355l-.003-1.327V14.474l.002-1.325a66.7 66.7 0 0 1 .02-1.357c.022-.792.065-1.717.222-2.587a6.924 6.924 0 0 1 .646-1.981c.304-.598.7-1.144 1.18-1.623a6.386 6.386 0 0 1 1.624-1.18 6.96 6.96 0 0 1 1.98-.646c.865-.155 1.792-.198 2.586-.22.452-.012.905-.017 1.354-.02l1.677-.003h135.875\" /><g><g><path fill=\"#000\" d=\"M43.508 35.77c1.404-1.755 2.356-4.112 2.105-6.52-2.054.102-4.56 1.355-6.012 3.112-1.303 1.504-2.456 3.959-2.156 6.266 2.306.2 4.61-1.152 6.063-2.858\" /><path fill=\"#000\" d=\"M45.587 39.079c-3.35-.2-6.196 1.9-7.795 1.9-1.6 0-4.049-1.8-6.698-1.751-3.447.05-6.645 2-8.395 5.1-3.598 6.2-.95 15.4 2.55 20.45 1.699 2.5 3.747 5.25 6.445 5.151 2.55-.1 3.549-1.65 6.647-1.65 3.097 0 3.997 1.65 6.696 1.6 2.798-.05 4.548-2.5 6.247-5 1.95-2.85 2.747-5.6 2.797-5.75-.05-.05-5.396-2.101-5.446-8.251-.05-5.15 4.198-7.6 4.398-7.751-2.399-3.548-6.147-3.948-7.447-4.048\" /></g><g><path fill=\"#000\" d=\"M78.973 32.11c7.278 0 12.347 5.017 12.347 12.321 0 7.33-5.173 12.373-12.529 12.373h-8.058V69.62h-5.822V32.11h14.062zm-8.24 19.807h6.68c5.07 0 7.954-2.729 7.954-7.46 0-4.73-2.885-7.434-7.928-7.434h-6.706v14.894z\" /><path fill=\"#000\" d=\"M92.764 61.847c0-4.809 3.665-7.564 10.423-7.98l7.252-.442v-2.08c0-3.04-2.001-4.704-5.562-4.704-2.938 0-5.07 1.507-5.51 3.82h-5.252c.157-4.86 4.731-8.395 10.918-8.395 6.654 0 10.995 3.483 10.995 8.89v18.663h-5.38v-4.497h-.13c-1.534 2.937-4.914 4.782-8.579 4.782-5.406 0-9.175-3.222-9.175-8.057zm17.675-2.417v-2.106l-6.472.416c-3.64.234-5.536 1.585-5.536 3.95 0 2.288 1.975 3.77 5.068 3.77 3.95 0 6.94-2.522 6.94-6.03z\" /><path fill=\"#000\" d=\"M120.975 79.652v-4.496c.364.051 1.247.103 1.715.103 2.573 0 4.029-1.09 4.913-3.899l.52-1.663-9.852-27.293h6.082l6.863 22.146h.13l6.862-22.146h5.927l-10.216 28.67c-2.34 6.577-5.017 8.735-10.683 8.735-.442 0-1.872-.052-2.261-.157z\" /></g></g></svg>",
|
|
42
|
+
},
|
|
43
|
+
googlepay: {
|
|
44
|
+
label: "Google Pay",
|
|
45
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\"><path d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\" fill=\"#000\" opacity=\".07\"/><path d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\" fill=\"#FFF\"/><path d=\"M18.093 11.976v3.2h-1.018v-7.9h2.691a2.447 2.447 0 0 1 1.747.692 2.28 2.28 0 0 1 .11 3.224l-.11.116c-.47.447-1.098.69-1.747.674l-1.673-.006zm0-3.732v2.788h1.698c.377.012.741-.135 1.005-.404a1.391 1.391 0 0 0-1.005-2.354l-1.698-.03zm6.484 1.348c.65-.03 1.286.188 1.778.613.445.43.682 1.03.65 1.649v3.334h-.969v-.766h-.049a1.93 1.93 0 0 1-1.673.931 2.17 2.17 0 0 1-1.496-.533 1.667 1.667 0 0 1-.613-1.324 1.606 1.606 0 0 1 .613-1.336 2.746 2.746 0 0 1 1.698-.515c.517-.02 1.03.093 1.49.331v-.208a1.134 1.134 0 0 0-.417-.901 1.416 1.416 0 0 0-.98-.368 1.545 1.545 0 0 0-1.319.717l-.895-.564a2.488 2.488 0 0 1 2.182-1.06zM23.29 13.52a.79.79 0 0 0 .337.662c.223.176.5.269.785.263.429-.001.84-.17 1.146-.472.305-.286.478-.685.478-1.103a2.047 2.047 0 0 0-1.324-.374 1.716 1.716 0 0 0-1.03.294.883.883 0 0 0-.392.73zm9.286-3.75l-3.39 7.79h-1.048l1.281-2.728-2.224-5.062h1.103l1.612 3.885 1.569-3.885h1.097z\" fill=\"#5F6368\"/><path d=\"M13.986 11.284c0-.308-.024-.616-.073-.92h-4.29v1.747h2.451a2.096 2.096 0 0 1-.9 1.373v1.134h1.464a4.433 4.433 0 0 0 1.348-3.334z\" fill=\"#4285F4\"/><path d=\"M9.629 15.721a4.352 4.352 0 0 0 3.01-1.097l-1.466-1.14a2.752 2.752 0 0 1-4.094-1.44H5.577v1.17a4.53 4.53 0 0 0 4.052 2.507z\" fill=\"#34A853\"/><path d=\"M7.079 12.05a2.709 2.709 0 0 1 0-1.735v-1.17H5.577a4.505 4.505 0 0 0 0 4.075l1.502-1.17z\" fill=\"#FBBC04\"/><path d=\"M9.629 8.44a2.452 2.452 0 0 1 1.74.68l1.3-1.293a4.37 4.37 0 0 0-3.065-1.183 4.53 4.53 0 0 0-4.027 2.5l1.502 1.171a2.715 2.715 0 0 1 2.55-1.875z\" fill=\"#EA4335\"/></svg>",
|
|
46
|
+
},
|
|
47
|
+
paypal: {
|
|
48
|
+
label: "PayPal",
|
|
49
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><path opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path fill=\"#fff\" d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\"/><path fill=\"#003087\" d=\"M23.9 8.3c.2-1 0-1.7-.6-2.3-.6-.7-1.7-1-3.1-1h-4.1c-.3 0-.5.2-.6.5L14 15.6c0 .2.1.4.3.4H17l.4-3.4 1.8-2.2 4.7-2.1z\"/><path fill=\"#3086C8\" d=\"M23.9 8.3l-.2.2c-.5 2.8-2.2 3.8-4.6 3.8H18c-.3 0-.5.2-.6.5l-.6 3.9-.2 1c0 .2.1.4.3.4H19c.3 0 .5-.2.5-.4v-.1l.4-2.4v-.1c0-.2.3-.4.5-.4h.3c2.1 0 3.7-.8 4.1-3.2.2-1 .1-1.8-.4-2.4-.1-.5-.3-.7-.5-.8z\"/><path fill=\"#012169\" d=\"M23.3 8.1c-.1-.1-.2-.1-.3-.1-.1 0-.2 0-.3-.1-.3-.1-.7-.1-1.1-.1h-3c-.1 0-.2 0-.2.1-.2.1-.3.2-.3.4l-.7 4.4v.1c0-.3.3-.5.6-.5h1.3c2.5 0 4.1-1 4.6-3.8v-.2c-.1-.1-.3-.2-.5-.2h-.1z\"/></svg>",
|
|
50
|
+
},
|
|
51
|
+
revolut: {
|
|
52
|
+
label: "Revolut",
|
|
53
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 38 24\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#000\" opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path fill=\"#fff\" d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\"/><path d=\"M24.041 8h1.096v6.115h-1.096V8zm8.876 2.576v-.949h-1.133V8.39h-1.096v4.51c0 .415.104.731.31.94.205.208.526.314.952.314h.967v-.949h-.708c-.154 0-.264-.034-.329-.1-.058-.062-.096-.216-.096-.394v-2.135h1.133zM17.73 9.627l-1.134 3.298-1.133-3.298h-1.151l1.635 4.488h1.298l1.636-4.488h-1.152zm11.171 2.249c0 .284-.043.53-.127.734a1.004 1.004 0 01-.36.461.987.987 0 01-.561.156c-.314 0-.55-.103-.703-.306-.155-.205-.233-.516-.233-.924v-2.37h-1.096v2.49c0 .389.049.718.144.978.096.262.228.475.392.633.163.157.354.271.567.338.212.067.44.101.678.101.343 0 .626-.062.843-.185a1.9 1.9 0 00.492-.39l.099.523h.961V9.627h-1.096v2.249z\" fill=\"#191C1F\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M21.147 9.576c.463 0 .873.097 1.219.288.346.192.618.463.81.806.191.342.288.748.288 1.206 0 .452-.097.854-.288 1.197a2.059 2.059 0 01-.81.805c-.346.192-.756.289-1.219.289-.458 0-.866-.097-1.215-.289a2.05 2.05 0 01-.814-.805 2.425 2.425 0 01-.288-1.197c0-.458.097-.864.288-1.206.192-.343.466-.614.814-.806a2.492 2.492 0 011.215-.288zm0 3.668c.248 0 .463-.058.64-.173.177-.115.317-.278.415-.483.099-.207.149-.446.149-.712 0-.272-.05-.513-.149-.716a1.203 1.203 0 00-.415-.484 1.131 1.131 0 00-.64-.178 1.133 1.133 0 00-1.055.661 1.624 1.624 0 00-.149.717c0 .266.05.506.149.712.099.205.24.368.42.483.179.115.393.173.635.173z\" fill=\"#191C1F\"/><path d=\"M6.14 9.51H5v4.605h1.14V9.51z\" fill=\"#191C1F\"/><path d=\"M7.937 8c.978 0 1.774.795 1.774 1.773 0 .94-.75 1.723-1.684 1.77l1.853 2.572H8.527l-1.85-2.565a.07.07 0 01-.012-.04v-.875a.07.07 0 01.07-.07h1.09a.785.785 0 00.564-.237.785.785 0 00.226-.569c-.008-.427-.375-.775-.818-.775H5V8h2.937z\" fill=\"#191C1F\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M13.214 9.838c-.328-.174-.718-.262-1.158-.262-.441 0-.835.097-1.172.288a2.021 2.021 0 00-.788.806c-.186.342-.28.75-.28 1.214 0 .452.096.855.284 1.197.19.344.462.613.81.802.349.188.766.284 1.24.284.378 0 .716-.07 1.007-.21.29-.14.528-.33.705-.565a1.85 1.85 0 00.338-.753l.006-.03h-1.09l-.005.018a.855.855 0 01-.347.483 1.163 1.163 0 01-.665.186c-.22 0-.418-.047-.59-.14a.973.973 0 01-.396-.393 1.38 1.38 0 01-.157-.602v-.036h3.292l.004-.02a1.51 1.51 0 00.022-.194c.003-.063.004-.127.004-.191-.006-.435-.103-.818-.289-1.137a1.934 1.934 0 00-.775-.745zm-.4.845c.188.158.304.382.347.666h-2.168c.025-.184.086-.344.183-.476a1.04 1.04 0 01.384-.32 1.12 1.12 0 01.504-.115c.304 0 .557.082.75.245z\" fill=\"#191C1F\"/></svg>",
|
|
54
|
+
},
|
|
55
|
+
klarna: {
|
|
56
|
+
label: "Klarna",
|
|
57
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\" fill=\"none\"><rect width=\"38\" height=\"24\" rx=\"2\" fill=\"#FFA8CD\"/><rect x=\".5\" y=\".5\" width=\"37\" height=\"23\" rx=\"1.5\" stroke=\"#000\" stroke-opacity=\".07\"/><path d=\"M30.62 14.755c-.662 0-1.179-.554-1.179-1.226 0-.673.517-1.226 1.18-1.226.663 0 1.18.553 1.18 1.226 0 .672-.517 1.226-1.18 1.226zm-.33 1.295c.565 0 1.286-.217 1.686-1.068l.04.02c-.176.465-.176.742-.176.81v.11h1.423v-4.786H31.84v.109c0 .069 0 .346.175.81l-.039.02c-.4-.85-1.121-1.068-1.687-1.068-1.355 0-2.31 1.088-2.31 2.522 0 1.433.955 2.521 2.31 2.521zm-4.788-5.043c-.643 0-1.15.228-1.56 1.068l-.039-.02c.175-.464.175-.741.175-.81v-.11h-1.423v4.787h1.462V13.4c0-.662.38-1.078.995-1.078.614 0 .917.356.917 1.068v2.532h1.462v-3.046c0-1.088-.838-1.869-1.989-1.869zm-4.963 1.068l-.039-.02c.176-.464.176-.741.176-.81v-.11h-1.424v4.787h1.463l.01-2.304c0-.673.35-1.078.926-1.078.156 0 .282.02.429.06v-1.464c-.644-.139-1.22.109-1.54.94zm-4.65 2.68c-.664 0-1.18-.554-1.18-1.226 0-.673.516-1.226 1.18-1.226.662 0 1.179.553 1.179 1.226 0 .672-.517 1.226-1.18 1.226zm-.332 1.295c.565 0 1.287-.217 1.687-1.068l.038.02c-.175.465-.175.742-.175.81v.11h1.424v-4.786h-1.424v.109c0 .069 0 .346.175.81l-.038.02c-.4-.85-1.122-1.068-1.687-1.068-1.356 0-2.311 1.088-2.311 2.522 0 1.433.955 2.521 2.31 2.521zm-4.349-.128h1.463V9h-1.463v6.922zM10.136 9H8.644c0 1.236-.751 2.343-1.892 3.134l-.448.317V9h-1.55v6.922h1.55V12.49l2.564 3.43h1.892L8.293 12.64c1.121-.82 1.852-2.096 1.843-3.639z\" fill=\"#0B051D\"/></svg>",
|
|
58
|
+
},
|
|
59
|
+
bancontact: {
|
|
60
|
+
label: "Bancontact",
|
|
61
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\"><path fill=\"#000\" opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z\"/><path fill=\"#fff\" d=\"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32\"/><path d=\"M4.703 3.077h28.594c.139 0 .276.023.405.068.128.045.244.11.343.194a.9.9 0 0 1 .229.29c.053.107.08.223.08.34V20.03a.829.829 0 0 1-.31.631 1.164 1.164 0 0 1-.747.262H4.703a1.23 1.23 0 0 1-.405-.068 1.09 1.09 0 0 1-.343-.194.9.9 0 0 1-.229-.29.773.773 0 0 1-.08-.34V3.97c0-.118.027-.234.08-.342a.899.899 0 0 1 .23-.29c.098-.082.214-.148.342-.193a1.23 1.23 0 0 1 .405-.068Z\" fill=\"#fff\"/><path d=\"M6.38 18.562v-3.077h1.125c.818 0 1.344.259 1.344.795 0 .304-.167.515-.401.638.338.132.536.387.536.734 0 .62-.536.91-1.37.91H6.38Zm.724-1.798h.537c.328 0 .468-.136.468-.387 0-.268-.255-.356-.599-.356h-.406v.743Zm0 1.262h.448c.438 0 .693-.093.693-.383 0-.286-.219-.404-.63-.404h-.51v.787Zm3.284.589c-.713 0-1.073-.295-1.073-.69 0-.436.422-.69 1.047-.695.156.002.31.014.464.035v-.105c0-.269-.183-.396-.531-.396a2.128 2.128 0 0 0-.688.105l-.13-.474a3.01 3.01 0 0 1 .9-.132c.767 0 1.147.343 1.147.936v1.222c-.214.093-.615.194-1.136.194Zm.438-.497v-.47a2.06 2.06 0 0 0-.37-.036c-.24 0-.427.08-.427.286 0 .185.156.281.432.281a.947.947 0 0 0 .365-.061Zm1.204.444v-2.106a3.699 3.699 0 0 1 1.177-.193c.76 0 1.198.316 1.198.9v1.399h-.719v-1.354c0-.303-.167-.444-.484-.444a1.267 1.267 0 0 0-.459.079v1.719h-.713Zm4.886-2.167-.135.479a1.834 1.834 0 0 0-.588-.11c-.422 0-.652.25-.652.664 0 .453.24.685.688.685.2-.004.397-.043.578-.114l.115.488a2.035 2.035 0 0 1-.75.128c-.865 0-1.365-.453-1.365-1.17 0-.712.495-1.182 1.323-1.182.27-.001.538.043.787.132Zm1.553 2.22c-.802 0-1.302-.47-1.302-1.178 0-.704.5-1.174 1.302-1.174.807 0 1.297.47 1.297 1.173 0 .708-.49 1.179-1.297 1.179Zm0-.502c.37 0 .563-.259.563-.677 0-.413-.193-.672-.563-.672-.364 0-.568.26-.568.672 0 .418.204.677.568.677Zm1.713.449v-2.106a3.699 3.699 0 0 1 1.177-.193c.76 0 1.198.316 1.198.9v1.399h-.719v-1.354c0-.303-.166-.444-.484-.444a1.268 1.268 0 0 0-.459.079v1.719h-.713Zm3.996.053c-.62 0-.938-.286-.938-.866v-.95h-.354v-.484h.355v-.488l.718-.03v.518h.578v.484h-.578v.94c0 .256.125.374.36.374.093 0 .185-.008.276-.026l.036.488c-.149.028-.3.041-.453.04Zm1.814 0c-.713 0-1.073-.295-1.073-.69 0-.436.422-.69 1.047-.695.155.002.31.014.464.035v-.105c0-.269-.183-.396-.532-.396a2.128 2.128 0 0 0-.687.105l-.13-.474a3.01 3.01 0 0 1 .9-.132c.766 0 1.146.343 1.146.936v1.222c-.213.093-.614.194-1.135.194Zm.438-.497v-.47a2.06 2.06 0 0 0-.37-.036c-.24 0-.427.08-.427.286 0 .185.156.281.432.281a.946.946 0 0 0 .365-.061Zm3.157-1.723-.136.479a1.834 1.834 0 0 0-.588-.11c-.422 0-.651.25-.651.664 0 .453.24.685.687.685.2-.004.397-.043.578-.114l.115.488a2.035 2.035 0 0 1-.75.128c-.865 0-1.365-.453-1.365-1.17 0-.712.495-1.182 1.323-1.182.27-.001.538.043.787.132Zm1.58 2.22c-.62 0-.938-.286-.938-.866v-.95h-.354v-.484h.354v-.488l.72-.03v.518h.577v.484h-.578v.94c0 .256.125.374.36.374.092 0 .185-.008.276-.026l.036.488c-.149.028-.3.041-.453.04Z\" fill=\"#1E3764\"/><path d=\"M11.394 13.946c3.803 0 5.705-2.14 7.606-4.28H6.38v4.28h5.014Z\" fill=\"url(#pi-bancontact-a)\"/><path d=\"M26.607 5.385c-3.804 0-5.705 2.14-7.607 4.28h12.62v-4.28h-5.013Z\" fill=\"url(#pi-bancontact-b)\"/><defs><linearGradient id=\"pi-bancontact-a\" x1=\"8.933\" y1=\"12.003\" x2=\"17.734\" y2=\"8.13\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#005AB9\"/><stop offset=\"1\" stop-color=\"#1E3764\"/></linearGradient><linearGradient id=\"pi-bancontact-b\" x1=\"19.764\" y1=\"10.037\" x2=\"29.171\" y2=\"6.235\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#FBA900\"/><stop offset=\"1\" stop-color=\"#FFD800\"/></linearGradient></defs></svg>",
|
|
62
|
+
},
|
|
63
|
+
ideal: {
|
|
64
|
+
label: "iDEAL",
|
|
65
|
+
svg: "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 38 24\"><g clip-path=\"url(#pi-clip0_19918_2)\"><path fill=\"#000\" opacity=\".07\" d=\"M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z\" /><path fill=\"#fff\" d=\"M35 1C36.1 1 37 1.9 37 3V21C37 22.1 36.1 23 35 23H3C1.9 23 1 22.1 1 21V3C1 1.9 1.9 1 3 1H35Z\" /><g clip-path=\"url(#pi-clip1_19918_2)\"><path d=\"M11.5286 5.35759V18.694H19.6782C25.0542 18.694 27.3855 15.8216 27.3855 12.0125C27.3855 8.21854 25.0542 5.35742 19.6782 5.35742L11.5286 5.35759Z\" fill=\"white\"/><path d=\"M19.7305 5.06445C26.8437 5.06445 27.9055 9.4164 27.9055 12.0098C27.9055 16.5096 25.0025 18.9876 19.7305 18.9876H11.0118V5.06462L19.7305 5.06445ZM11.6983 5.71921V18.3329H19.7305C24.5809 18.3329 27.2195 16.1772 27.2195 12.0098C27.2195 7.72736 24.3592 5.71921 19.7305 5.71921H11.6983Z\" fill=\"black\"/><path d=\"M12.7759 17.3045H15.3474V12.9372H12.7757M15.6593 10.7375C15.6593 11.5796 14.944 12.2625 14.0613 12.2625C13.179 12.2625 12.4633 11.5796 12.4633 10.7375C12.4633 10.3332 12.6316 9.94537 12.9313 9.65945C13.231 9.37352 13.6374 9.21289 14.0613 9.21289C14.4851 9.21289 14.8915 9.37352 15.1912 9.65945C15.4909 9.94537 15.6593 10.3332 15.6593 10.7375Z\" fill=\"black\"/><path d=\"M20.7043 11.4505V12.1573H18.8719V9.32029H20.6452V10.0266H19.6127V10.3556H20.5892V11.0616H19.6127V11.4503L20.7043 11.4505ZM21.06 12.158L21.9569 9.31944H23.0109L23.9075 12.158H23.1362L22.9683 11.6089H21.9995L21.8308 12.158H21.06ZM22.216 10.9028H22.7518L22.5067 10.1007H22.4623L22.216 10.9028ZM24.2797 9.31944H25.0205V11.4505H26.1178C25.8168 7.58344 22.6283 6.74805 19.7312 6.74805H16.6418V9.32063H17.0989C17.9328 9.32063 18.4505 9.86014 18.4505 10.7275C18.4505 11.6228 17.9449 12.157 17.0989 12.157H16.6422V17.3052H19.7308C24.4416 17.3052 26.081 15.218 26.1389 12.1572H24.2797V9.31944ZM16.6415 10.0273V11.4505H17.0992C17.4165 11.4505 17.7094 11.3631 17.7094 10.7278C17.7094 10.1067 17.3834 10.0271 17.0992 10.0271L16.6415 10.0273Z\" fill=\"#CC0066\"/></g></g><defs><clipPath id=\"pi-clip0_19918_2\"><rect width=\"38\" height=\"24\" fill=\"white\"/></clipPath><clipPath id=\"pi-clip1_19918_2\"><rect width=\"17\" height=\"14\" fill=\"white\" transform=\"translate(11 5)\"/></clipPath></defs></svg>",
|
|
66
|
+
},
|
|
67
|
+
} as const
|
|
68
|
+
|
|
69
|
+
/** A payment mark the kit carries. */
|
|
70
|
+
export type PaymentMethod = keyof typeof PAYMENT_MARKS
|
|
71
|
+
|
|
72
|
+
/** Every payment mark, in the default order. */
|
|
73
|
+
export const PAYMENT_METHODS = Object.keys(PAYMENT_MARKS) as PaymentMethod[]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED by scripts/build-icons.mjs from assets/icons/social. Do not
|
|
3
|
+
* edit: change the SVG file and run the script. The social networks' marks, from Simple Icons (CC0); each is its brand's trademark.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const SOCIAL_MARKS = {
|
|
7
|
+
facebook: {
|
|
8
|
+
label: "Facebook",
|
|
9
|
+
path: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
|
|
10
|
+
},
|
|
11
|
+
instagram: {
|
|
12
|
+
label: "Instagram",
|
|
13
|
+
path: "M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077",
|
|
14
|
+
},
|
|
15
|
+
tiktok: {
|
|
16
|
+
label: "TikTok",
|
|
17
|
+
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",
|
|
18
|
+
},
|
|
19
|
+
youtube: {
|
|
20
|
+
label: "YouTube",
|
|
21
|
+
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z",
|
|
22
|
+
},
|
|
23
|
+
x: {
|
|
24
|
+
label: "X",
|
|
25
|
+
path: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z",
|
|
26
|
+
},
|
|
27
|
+
linkedin: {
|
|
28
|
+
label: "LinkedIn",
|
|
29
|
+
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
|
|
30
|
+
},
|
|
31
|
+
pinterest: {
|
|
32
|
+
label: "Pinterest",
|
|
33
|
+
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z",
|
|
34
|
+
},
|
|
35
|
+
threads: {
|
|
36
|
+
label: "Threads",
|
|
37
|
+
path: "M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z",
|
|
38
|
+
},
|
|
39
|
+
snapchat: {
|
|
40
|
+
label: "Snapchat",
|
|
41
|
+
path: "M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12 1.033-.301.165-.088.344-.104.464-.104.182 0 .359.029.509.09.45.149.734.479.734.838.015.449-.39.839-1.213 1.168-.089.029-.209.075-.344.119-.45.135-1.139.36-1.333.81-.09.224-.061.524.12.868l.015.015c.06.136 1.526 3.475 4.791 4.014.255.044.435.27.42.509 0 .075-.015.149-.045.225-.24.569-1.273.988-3.146 1.271-.059.091-.12.375-.164.57-.029.179-.074.36-.134.553-.076.271-.27.405-.555.405h-.03c-.135 0-.313-.031-.538-.074-.36-.075-.765-.135-1.273-.135-.3 0-.599.015-.913.074-.6.104-1.123.464-1.723.884-.853.599-1.826 1.288-3.294 1.288-.06 0-.119-.015-.18-.015h-.149c-1.468 0-2.427-.675-3.279-1.288-.599-.42-1.107-.779-1.707-.884-.314-.045-.629-.074-.928-.074-.54 0-.958.089-1.272.149-.211.043-.391.074-.54.074-.374 0-.523-.224-.583-.42-.061-.192-.09-.389-.135-.567-.046-.181-.105-.494-.166-.57-1.918-.222-2.95-.642-3.189-1.226-.031-.063-.052-.15-.055-.225-.015-.243.165-.465.42-.509 3.264-.54 4.73-3.879 4.791-4.02l.016-.029c.18-.345.224-.645.119-.869-.195-.434-.884-.658-1.332-.809-.121-.029-.24-.074-.346-.119-1.107-.435-1.257-.93-1.197-1.273.09-.479.674-.793 1.168-.793.146 0 .27.029.383.074.42.194.789.3 1.104.3.234 0 .384-.06.465-.105l-.046-.569c-.098-1.626-.225-3.651.307-4.837C7.392 1.077 10.739.807 11.727.807l.419-.015h.06z",
|
|
42
|
+
},
|
|
43
|
+
whatsapp: {
|
|
44
|
+
label: "WhatsApp",
|
|
45
|
+
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",
|
|
46
|
+
},
|
|
47
|
+
viber: {
|
|
48
|
+
label: "Viber",
|
|
49
|
+
path: "M11.4 0C9.473.028 5.333.344 3.02 2.467 1.302 4.187.696 6.7.633 9.817.57 12.933.488 18.776 6.12 20.36h.003l-.004 2.416s-.037.977.61 1.177c.777.242 1.234-.5 1.98-1.302.407-.44.972-1.084 1.397-1.58 3.85.326 6.812-.416 7.15-.525.776-.252 5.176-.816 5.892-6.657.74-6.02-.36-9.83-2.34-11.546-.596-.55-3.006-2.3-8.375-2.323 0 0-.395-.025-1.037-.017zm.058 1.693c.545-.004.88.017.88.017 4.542.02 6.717 1.388 7.222 1.846 1.675 1.435 2.53 4.868 1.906 9.897v.002c-.604 4.878-4.174 5.184-4.832 5.395-.28.09-2.882.737-6.153.524 0 0-2.436 2.94-3.197 3.704-.12.12-.26.167-.352.144-.13-.033-.166-.188-.165-.414l.02-4.018c-4.762-1.32-4.485-6.292-4.43-8.895.054-2.604.543-4.738 1.996-6.173 1.96-1.773 5.474-2.018 7.11-2.03zm.38 2.602c-.167 0-.303.135-.304.302 0 .167.133.303.3.305 1.624.01 2.946.537 4.028 1.592 1.073 1.046 1.62 2.468 1.633 4.334.002.167.14.3.307.3.166-.002.3-.138.3-.304-.014-1.984-.618-3.596-1.816-4.764-1.19-1.16-2.692-1.753-4.447-1.765zm-3.96.695c-.19-.032-.4.005-.616.117l-.01.002c-.43.247-.816.562-1.146.932-.002.004-.006.004-.008.008-.267.323-.42.638-.46.948-.008.046-.01.093-.007.14 0 .136.022.27.065.4l.013.01c.135.48.473 1.276 1.205 2.604.42.768.903 1.5 1.446 2.186.27.344.56.673.87.984l.132.132c.31.308.64.6.984.87.686.543 1.418 1.027 2.186 1.447 1.328.733 2.126 1.07 2.604 1.206l.01.014c.13.042.265.064.402.063.046.002.092 0 .138-.008.31-.036.627-.19.948-.46.004 0 .003-.002.008-.005.37-.33.683-.72.93-1.148l.003-.01c.225-.432.15-.842-.18-1.12-.004 0-.698-.58-1.037-.83-.36-.255-.73-.492-1.113-.71-.51-.285-1.032-.106-1.248.174l-.447.564c-.23.283-.657.246-.657.246-3.12-.796-3.955-3.955-3.955-3.955s-.037-.426.248-.656l.563-.448c.277-.215.456-.737.17-1.248-.217-.383-.454-.756-.71-1.115-.25-.34-.826-1.033-.83-1.035-.137-.165-.31-.265-.502-.297zm4.49.88c-.158.002-.29.124-.3.282-.01.167.115.312.282.324 1.16.085 2.017.466 2.645 1.15.63.688.93 1.524.906 2.57-.002.168.13.306.3.31.166.003.305-.13.31-.297.025-1.175-.334-2.193-1.067-2.994-.74-.81-1.777-1.253-3.05-1.346h-.024zm.463 1.63c-.16.002-.29.127-.3.287-.008.167.12.31.288.32.523.028.875.175 1.113.422.24.245.388.62.416 1.164.01.167.15.295.318.287.167-.008.295-.15.287-.317-.03-.644-.215-1.178-.58-1.557-.367-.378-.893-.574-1.52-.607h-.018z",
|
|
50
|
+
},
|
|
51
|
+
telegram: {
|
|
52
|
+
label: "Telegram",
|
|
53
|
+
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
|
|
54
|
+
},
|
|
55
|
+
} as const
|
|
56
|
+
|
|
57
|
+
/** A social network the kit has a mark for. */
|
|
58
|
+
export type SocialNetwork = keyof typeof SOCIAL_MARKS
|
|
59
|
+
|
|
60
|
+
/** Every social network, in the default order. */
|
|
61
|
+
export const SOCIAL_NETWORKS = Object.keys(SOCIAL_MARKS) as SocialNetwork[]
|
package/src/common/index.ts
CHANGED
|
@@ -18,3 +18,18 @@ export {
|
|
|
18
18
|
type LanguageSelectProps,
|
|
19
19
|
} from "./language-select"
|
|
20
20
|
export { Skeleton, SkeletonProductPreview } from "./skeleton"
|
|
21
|
+
export {
|
|
22
|
+
PaymentIcon,
|
|
23
|
+
PaymentIcons,
|
|
24
|
+
PAYMENT_METHODS,
|
|
25
|
+
type PaymentIconsProps,
|
|
26
|
+
type PaymentMethod,
|
|
27
|
+
} from "./payment-icons"
|
|
28
|
+
export {
|
|
29
|
+
SocialIcon,
|
|
30
|
+
SocialLinks,
|
|
31
|
+
SOCIAL_NETWORKS,
|
|
32
|
+
type SocialLinksProps,
|
|
33
|
+
type SocialNetwork,
|
|
34
|
+
} from "./social-links"
|
|
35
|
+
export { PoweredByCartbase, type PoweredByCartbaseProps } from "./powered-by-cartbase"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn } from "../lib/utils"
|
|
2
|
+
import { PAYMENT_MARKS, PAYMENT_METHODS, type PaymentMethod } from "./icons/payment-marks"
|
|
3
|
+
|
|
4
|
+
export { PAYMENT_METHODS, type PaymentMethod }
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* THE PAYMENT MARKS: the cards and wallets a store accepts, each in its
|
|
8
|
+
* brand's own colours on a 38 by 24 card (Visa, Mastercard, Maestro,
|
|
9
|
+
* American Express, UnionPay, Discover, Diners Club, JCB, Apple Pay, Google
|
|
10
|
+
* Pay, PayPal, Klarna, Bancontact, iDEAL). A footer shows the row; the cart
|
|
11
|
+
* drawer's badges draw the same marks.
|
|
12
|
+
*
|
|
13
|
+
* Which marks a store shows is the store's choice (`methods`, all of them
|
|
14
|
+
* by default); the marks carry no behaviour. Source and licence:
|
|
15
|
+
* `assets/icons/README.md`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** One mark. `className` sizes it by height (24px by default); the width follows. */
|
|
19
|
+
export function PaymentIcon({ method, className }: { method: PaymentMethod; className?: string }) {
|
|
20
|
+
const mark = PAYMENT_MARKS[method]
|
|
21
|
+
return (
|
|
22
|
+
<span
|
|
23
|
+
role="img"
|
|
24
|
+
aria-label={mark.label}
|
|
25
|
+
title={mark.label}
|
|
26
|
+
className={cn("inline-block aspect-[38/24] h-6 shrink-0 [&>svg]:block [&>svg]:size-full", className)}
|
|
27
|
+
// The markup is the kit's own generated mark (src/common/icons), never input.
|
|
28
|
+
dangerouslySetInnerHTML={{ __html: mark.svg }}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type PaymentIconsProps = {
|
|
34
|
+
/** The marks, in order; every mark by default. None renders nothing. */
|
|
35
|
+
methods?: readonly PaymentMethod[]
|
|
36
|
+
/** The list's name for screen readers (`labels.store.paymentMethods`). */
|
|
37
|
+
label: string
|
|
38
|
+
className?: string
|
|
39
|
+
iconClassName?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** A row of marks that wraps. */
|
|
43
|
+
export function PaymentIcons({ methods = PAYMENT_METHODS, label, className, iconClassName }: PaymentIconsProps) {
|
|
44
|
+
if (!methods.length) return null
|
|
45
|
+
return (
|
|
46
|
+
<ul aria-label={label} className={cn("flex flex-wrap items-center gap-2", className)}>
|
|
47
|
+
{methods.map((method) => (
|
|
48
|
+
<li key={method} className="flex">
|
|
49
|
+
<PaymentIcon method={method} className={iconClassName} />
|
|
50
|
+
</li>
|
|
51
|
+
))}
|
|
52
|
+
</ul>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cn } from "../lib/utils"
|
|
2
|
+
import { CARTBASE_WORDMARK } from "./icons/cartbase-mark"
|
|
3
|
+
|
|
4
|
+
/** The wordmark's width over its height, from its own box. */
|
|
5
|
+
const [, , MARK_WIDTH, MARK_HEIGHT] = CARTBASE_WORDMARK.viewBox.split(" ")
|
|
6
|
+
|
|
7
|
+
export type PoweredByCartbaseProps = {
|
|
8
|
+
/** The words before the wordmark (`labels.store.poweredBy`). */
|
|
9
|
+
label: string
|
|
10
|
+
/** Where the mark leads. */
|
|
11
|
+
href?: string
|
|
12
|
+
className?: string
|
|
13
|
+
/** Sizes the wordmark by height (14px by default); the width follows. */
|
|
14
|
+
markClassName?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* "Powered by" and the Cartbase wordmark, a link to cartbase.ai, for the
|
|
19
|
+
* store's footer. Drawn in the text colour, so it sits on any ground.
|
|
20
|
+
*/
|
|
21
|
+
export function PoweredByCartbase({
|
|
22
|
+
label,
|
|
23
|
+
href = "https://cartbase.ai",
|
|
24
|
+
className,
|
|
25
|
+
markClassName,
|
|
26
|
+
}: PoweredByCartbaseProps) {
|
|
27
|
+
return (
|
|
28
|
+
<a
|
|
29
|
+
href={href}
|
|
30
|
+
target="_blank"
|
|
31
|
+
rel="noopener"
|
|
32
|
+
className={cn("inline-flex items-center gap-1.5 transition-opacity hover:opacity-100", className)}
|
|
33
|
+
>
|
|
34
|
+
<span>{label}</span>
|
|
35
|
+
<svg
|
|
36
|
+
viewBox={CARTBASE_WORDMARK.viewBox}
|
|
37
|
+
fill="currentColor"
|
|
38
|
+
role="img"
|
|
39
|
+
aria-label="Cartbase"
|
|
40
|
+
style={{ aspectRatio: `${MARK_WIDTH} / ${MARK_HEIGHT}` }}
|
|
41
|
+
className={cn("h-3.5 w-auto", markClassName)}
|
|
42
|
+
>
|
|
43
|
+
<path d={CARTBASE_WORDMARK.path} />
|
|
44
|
+
</svg>
|
|
45
|
+
</a>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { cn } from "../lib/utils"
|
|
2
|
+
import type { StoreSocialLinks } from "../api/store"
|
|
3
|
+
import { SOCIAL_MARKS, SOCIAL_NETWORKS, type SocialNetwork } from "./icons/social-marks"
|
|
4
|
+
|
|
5
|
+
export { SOCIAL_NETWORKS, type SocialNetwork }
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* THE STORE'S SOCIAL PROFILES: a round link per profile the merchant set in
|
|
9
|
+
* the admin (Settings, Brand, Social links), each with its network's mark
|
|
10
|
+
* drawn in the text colour. Feed it `store.brand.social` from `getStore`;
|
|
11
|
+
* a network with no address is left out, and a store with none renders
|
|
12
|
+
* nothing. Marks: Facebook, Instagram, TikTok, YouTube, X, LinkedIn,
|
|
13
|
+
* Pinterest, Threads, Snapchat, WhatsApp, Viber, Telegram. Source and
|
|
14
|
+
* licence: `assets/icons/README.md`.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** One network's mark, a 24 unit square in the text colour. `className` sizes it. */
|
|
18
|
+
export function SocialIcon({ network, className }: { network: SocialNetwork; className?: string }) {
|
|
19
|
+
return (
|
|
20
|
+
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden focusable="false" className={cn("size-5 shrink-0", className)}>
|
|
21
|
+
<path d={SOCIAL_MARKS[network].path} />
|
|
22
|
+
</svg>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type SocialLinksProps = {
|
|
27
|
+
/** The store's profiles by network (`store.brand.social`). */
|
|
28
|
+
links: StoreSocialLinks | null | undefined
|
|
29
|
+
/** The list's name for screen readers (`labels.store.socialProfiles`). */
|
|
30
|
+
label: string
|
|
31
|
+
className?: string
|
|
32
|
+
/** Each link: the round hit area. */
|
|
33
|
+
linkClassName?: string
|
|
34
|
+
iconClassName?: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** The profiles in the kit's network order, each opening in a new tab. */
|
|
38
|
+
export function SocialLinks({ links, label, className, linkClassName, iconClassName }: SocialLinksProps) {
|
|
39
|
+
const profiles = SOCIAL_NETWORKS.flatMap((network) => {
|
|
40
|
+
const href = links?.[network]
|
|
41
|
+
return href ? [{ network, href }] : []
|
|
42
|
+
})
|
|
43
|
+
if (!profiles.length) return null
|
|
44
|
+
return (
|
|
45
|
+
<ul aria-label={label} className={cn("flex flex-wrap items-center gap-2", className)}>
|
|
46
|
+
{profiles.map(({ network, href }) => (
|
|
47
|
+
<li key={network}>
|
|
48
|
+
<a
|
|
49
|
+
href={href}
|
|
50
|
+
target="_blank"
|
|
51
|
+
rel="noopener noreferrer"
|
|
52
|
+
aria-label={SOCIAL_MARKS[network].label}
|
|
53
|
+
title={SOCIAL_MARKS[network].label}
|
|
54
|
+
className={cn(
|
|
55
|
+
"inline-flex size-10 items-center justify-center rounded-full transition-colors",
|
|
56
|
+
linkClassName
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
<SocialIcon network={network} className={iconClassName} />
|
|
60
|
+
</a>
|
|
61
|
+
</li>
|
|
62
|
+
))}
|
|
63
|
+
</ul>
|
|
64
|
+
)
|
|
65
|
+
}
|
package/src/locales/bg.ts
CHANGED
|
@@ -60,6 +60,9 @@ export const bg: StorefrontLocale = {
|
|
|
60
60
|
noResults: "Няма намерени продукти",
|
|
61
61
|
filters: "Филтри",
|
|
62
62
|
clearFilters: "Изчисти филтрите",
|
|
63
|
+
poweredBy: "Създаден с",
|
|
64
|
+
paymentMethods: "Начини на плащане",
|
|
65
|
+
socialProfiles: "Последвайте ни",
|
|
63
66
|
},
|
|
64
67
|
cartDrawer: {
|
|
65
68
|
yourCart: "Вашата кошница",
|
package/src/locales/es.ts
CHANGED
|
@@ -65,6 +65,9 @@ export const es: StorefrontLocale = {
|
|
|
65
65
|
noResults: "No se han encontrado productos",
|
|
66
66
|
filters: "Filtros",
|
|
67
67
|
clearFilters: "Borrar filtros",
|
|
68
|
+
poweredBy: "Con la tecnología de",
|
|
69
|
+
paymentMethods: "Métodos de pago",
|
|
70
|
+
socialProfiles: "Síguenos",
|
|
68
71
|
},
|
|
69
72
|
cartDrawer: {
|
|
70
73
|
yourCart: "Tu carrito",
|
package/src/store/labels.ts
CHANGED
|
@@ -22,6 +22,13 @@ export type StoreLabels = {
|
|
|
22
22
|
noResults: string
|
|
23
23
|
filters: string
|
|
24
24
|
clearFilters: string
|
|
25
|
+
// the store's footer marks (common/payment-icons, social-links, powered-by-cartbase)
|
|
26
|
+
/** "Powered by", before the Cartbase wordmark. */
|
|
27
|
+
poweredBy: string
|
|
28
|
+
/** The payment marks' list name, for screen readers. */
|
|
29
|
+
paymentMethods: string
|
|
30
|
+
/** The social links' list name, for screen readers. */
|
|
31
|
+
socialProfiles: string
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
export const defaultStoreLabels: StoreLabels = {
|
|
@@ -38,6 +45,9 @@ export const defaultStoreLabels: StoreLabels = {
|
|
|
38
45
|
noResults: "No products found",
|
|
39
46
|
filters: "Filters",
|
|
40
47
|
clearFilters: "Clear filters",
|
|
48
|
+
poweredBy: "Powered by",
|
|
49
|
+
paymentMethods: "Payment methods",
|
|
50
|
+
socialProfiles: "Follow us",
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
/**
|