@superlogic/spree-pay 0.4.2 → 0.4.8

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Iframe3ds
3
- } from "./chunk-4ELDS4N4.js";
3
+ } from "./chunk-EXKCBGNL.js";
4
4
  import {
5
5
  InfoBanner,
6
6
  Legal,
@@ -12,7 +12,7 @@ import {
12
12
  useSpreePayRegister,
13
13
  useSpreePaymentMethod,
14
14
  useStaticConfig
15
- } from "./chunk-I35SE3K2.js";
15
+ } from "./chunk-SKM7ZAUY.js";
16
16
 
17
17
  // src/components/CryptoComTab/CryptoComTab.tsx
18
18
  import { useCallback, useEffect } from "react";
@@ -2,7 +2,7 @@ import {
2
2
  CheckoutButton,
3
3
  PointsSwitch,
4
4
  cn as cn2
5
- } from "./chunk-LXX5P2LL.js";
5
+ } from "./chunk-W43VOUYP.js";
6
6
  import {
7
7
  Dialog,
8
8
  DialogContent,
@@ -16,7 +16,7 @@ import {
16
16
  useSpreePayConfig,
17
17
  useSpreePayRegister,
18
18
  useSpreePaymentMethod
19
- } from "./chunk-I35SE3K2.js";
19
+ } from "./chunk-SKM7ZAUY.js";
20
20
 
21
21
  // src/components/CryptoTab/Crypto/CryptoWrapper.tsx
22
22
  import { useMemo as useMemo2 } from "react";
@@ -409,7 +409,7 @@ function Input({ className, type, ...props }) {
409
409
  type,
410
410
  "data-slot": "input",
411
411
  className: cn2(
412
- "file:text-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base text-(--primary) shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-(--tertiary) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
412
+ "file:text-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input px-universal-2xs py-universal-6xs rounded-radius-universal-xs text-body-m file:text-label-s file:font-label-primary flex h-9 w-full min-w-0 border bg-transparent text-(--color-text-icons-primary-default) shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent placeholder:text-(--color-text-icons-tertiary-default) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
413
413
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
414
414
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
415
415
  className
@@ -501,7 +501,7 @@ function Separator2({
501
501
  decorative,
502
502
  orientation,
503
503
  className: cn2(
504
- "shrink-0 bg-(--b-secondary) data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
504
+ "shrink-0 bg-(--color-border-default) data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
505
505
  className
506
506
  ),
507
507
  ...props
@@ -2,7 +2,7 @@ import {
2
2
  Dialog,
3
3
  DialogContent,
4
4
  DialogTitle
5
- } from "./chunk-I35SE3K2.js";
5
+ } from "./chunk-SKM7ZAUY.js";
6
6
 
7
7
  // src/modals/Iframe3ds.tsx
8
8
  import { useEffect } from "react";
@@ -1,4 +1,5 @@
1
1
  // src/types/payments.ts
2
+ var isNewCard = (card) => !("cardId" in card);
2
3
  var PaymentType = /* @__PURE__ */ ((PaymentType2) => {
3
4
  PaymentType2["CREDIT_CARD"] = "CREDIT_CARD";
4
5
  PaymentType2["CRYPTO"] = "CRYPTO";
@@ -9,7 +10,7 @@ var PaymentType = /* @__PURE__ */ ((PaymentType2) => {
9
10
  })(PaymentType || {});
10
11
 
11
12
  // package.json
12
- var version = "0.4.2";
13
+ var version = "0.4.8";
13
14
 
14
15
  // src/utils/logger.ts
15
16
  var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
@@ -775,6 +776,7 @@ function DialogDescription({ className, ...props }) {
775
776
 
776
777
  export {
777
778
  PaymentError,
779
+ isNewCard,
778
780
  PaymentType,
779
781
  LogLevel,
780
782
  logger,
@@ -6,7 +6,7 @@ import {
6
6
  useSpreePayEnv,
7
7
  useSpreePaymentMethod,
8
8
  useStaticConfig
9
- } from "./chunk-I35SE3K2.js";
9
+ } from "./chunk-SKM7ZAUY.js";
10
10
 
11
11
  // src/components/common/PointsSwitch.tsx
12
12
  import { useId } from "react";
@@ -283,7 +283,56 @@ var CheckoutButton = ({ isLoggedIn }) => {
283
283
 
284
284
  // ../ui/src/lib/utils.ts
285
285
  import { clsx } from "clsx";
286
- import { twMerge } from "tailwind-merge";
286
+ import { extendTailwindMerge } from "tailwind-merge";
287
+ var isUniversalSpacing = (value) => value.startsWith("universal-");
288
+ var isLayoutToken = (value) => value.startsWith("universal-") || value.startsWith("layout-");
289
+ var isUniversalRadius = (value) => value.startsWith("radius-universal-");
290
+ var isTypography = (value) => value.startsWith("heading-") || value.startsWith("body-") || value.startsWith("label-") || value.startsWith("menu-");
291
+ var twMerge = extendTailwindMerge({
292
+ extend: {
293
+ classGroups: {
294
+ "font-size": [{ text: [isTypography] }],
295
+ leading: [{ leading: [isTypography] }],
296
+ "font-weight": [{ font: [isTypography] }],
297
+ p: [{ p: [isUniversalSpacing] }],
298
+ px: [{ px: [isUniversalSpacing] }],
299
+ py: [{ py: [isUniversalSpacing] }],
300
+ pt: [{ pt: [isUniversalSpacing] }],
301
+ pb: [{ pb: [isUniversalSpacing] }],
302
+ pl: [{ pl: [isUniversalSpacing] }],
303
+ pr: [{ pr: [isUniversalSpacing] }],
304
+ m: [{ m: [isUniversalSpacing] }],
305
+ mx: [{ mx: [isUniversalSpacing] }],
306
+ my: [{ my: [isUniversalSpacing] }],
307
+ mt: [{ mt: [isUniversalSpacing] }],
308
+ mb: [{ mb: [isUniversalSpacing] }],
309
+ ml: [{ ml: [isUniversalSpacing] }],
310
+ mr: [{ mr: [isUniversalSpacing] }],
311
+ gap: [{ gap: [isUniversalSpacing] }],
312
+ "gap-x": [{ "gap-x": [isUniversalSpacing] }],
313
+ "gap-y": [{ "gap-y": [isUniversalSpacing] }],
314
+ "space-x": [{ "space-x": [isUniversalSpacing] }],
315
+ "space-y": [{ "space-y": [isUniversalSpacing] }],
316
+ w: [{ w: [isLayoutToken] }],
317
+ "min-w": [{ "min-w": [isLayoutToken] }],
318
+ "max-w": [{ "max-w": [isLayoutToken] }],
319
+ h: [{ h: [isLayoutToken] }],
320
+ "min-h": [{ "min-h": [isLayoutToken] }],
321
+ "max-h": [{ "max-h": [isLayoutToken] }],
322
+ rounded: [{ rounded: [isUniversalRadius] }],
323
+ "rounded-s": [{ "rounded-s": [isUniversalRadius] }],
324
+ "rounded-e": [{ "rounded-e": [isUniversalRadius] }],
325
+ "rounded-t": [{ "rounded-t": [isUniversalRadius] }],
326
+ "rounded-r": [{ "rounded-r": [isUniversalRadius] }],
327
+ "rounded-b": [{ "rounded-b": [isUniversalRadius] }],
328
+ "rounded-l": [{ "rounded-l": [isUniversalRadius] }],
329
+ "rounded-tl": [{ "rounded-tl": [isUniversalRadius] }],
330
+ "rounded-tr": [{ "rounded-tr": [isUniversalRadius] }],
331
+ "rounded-br": [{ "rounded-br": [isUniversalRadius] }],
332
+ "rounded-bl": [{ "rounded-bl": [isUniversalRadius] }]
333
+ }
334
+ }
335
+ });
287
336
  function cn2(...inputs) {
288
337
  return twMerge(clsx(inputs));
289
338
  }