@superlogic/spree-pay 0.5.1 → 0.5.2

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-AXNTOSBU.js";
3
+ } from "./chunk-ABVIUWRK.js";
4
4
  import {
5
5
  InfoBanner,
6
6
  Legal,
@@ -14,7 +14,7 @@ import {
14
14
  useSpreePayRegister,
15
15
  useSpreePaymentMethod,
16
16
  useStaticConfig
17
- } from "./chunk-PTEQVWLJ.js";
17
+ } from "./chunk-ECIGRDXS.js";
18
18
 
19
19
  // src/components/CryptoComTab/CryptoComTab.tsx
20
20
  import { useCallback, useEffect } from "react";
@@ -2,7 +2,7 @@ import {
2
2
  CheckoutButton,
3
3
  PointsSwitch,
4
4
  cn as cn2
5
- } from "./chunk-4BM6VTMT.js";
5
+ } from "./chunk-VBGTP4XP.js";
6
6
  import {
7
7
  Dialog,
8
8
  DialogContent,
@@ -18,7 +18,7 @@ import {
18
18
  useSpreePayConfig,
19
19
  useSpreePayRegister,
20
20
  useSpreePaymentMethod
21
- } from "./chunk-PTEQVWLJ.js";
21
+ } from "./chunk-ECIGRDXS.js";
22
22
 
23
23
  // src/components/CryptoTab/Crypto/CryptoWrapper.tsx
24
24
  import { useMemo as useMemo2 } from "react";
@@ -3,7 +3,7 @@ import {
3
3
  DialogContent,
4
4
  DialogDescription,
5
5
  DialogTitle
6
- } from "./chunk-PTEQVWLJ.js";
6
+ } from "./chunk-ECIGRDXS.js";
7
7
 
8
8
  // src/modals/Iframe3ds.tsx
9
9
  import { useEffect } from "react";
@@ -86,7 +86,7 @@ var settlePaymentResult = (res, fallbackMessage, failureCode = "PAYMENT_ERROR" /
86
86
  };
87
87
 
88
88
  // package.json
89
- var version = "0.5.1";
89
+ var version = "0.5.2";
90
90
 
91
91
  // src/utils/logger.ts
92
92
  var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
@@ -833,7 +833,7 @@ function DialogContent({
833
833
  DialogPrimitive.Close,
834
834
  {
835
835
  "data-slot": "dialog-close",
836
- className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-(--accent) data-[state=open]:text-(--secondary) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
836
+ className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-(--s-default) transition-opacity hover:opacity-100 focus:ring-2 focus:ring-(--b-tertiary) focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-(--accent) data-[state=open]:text-(--secondary) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
837
837
  children: [
838
838
  /* @__PURE__ */ jsx6(XIcon, {}),
839
839
  /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Close" })
@@ -7,7 +7,7 @@ import {
7
7
  useSpreePayEnv,
8
8
  useSpreePaymentMethod,
9
9
  useStaticConfig
10
- } from "./chunk-PTEQVWLJ.js";
10
+ } from "./chunk-ECIGRDXS.js";
11
11
 
12
12
  // src/components/common/PointsSwitch.tsx
13
13
  import { useId } from "react";
@@ -45,7 +45,7 @@ function Switch({ className, ...props }) {
45
45
  {
46
46
  "data-slot": "switch",
47
47
  className: cn(
48
- "peer focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--s-brand) data-[state=unchecked]:bg-(--s-tertiary)",
48
+ "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--s-brand) data-[state=unchecked]:bg-(--s-tertiary)",
49
49
  className
50
50
  ),
51
51
  ...props,
package/build/index.cjs CHANGED
@@ -133,7 +133,7 @@ var init_errors = __esm({
133
133
  var version;
134
134
  var init_package = __esm({
135
135
  "package.json"() {
136
- version = "0.5.1";
136
+ version = "0.5.2";
137
137
  }
138
138
  });
139
139
 
@@ -590,7 +590,7 @@ function DialogContent({
590
590
  DialogPrimitive.Close,
591
591
  {
592
592
  "data-slot": "dialog-close",
593
- className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-(--accent) data-[state=open]:text-(--secondary) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
593
+ className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-(--s-default) transition-opacity hover:opacity-100 focus:ring-2 focus:ring-(--b-tertiary) focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-(--accent) data-[state=open]:text-(--secondary) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
594
594
  children: [
595
595
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.XIcon, {}),
596
596
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "Close" })
@@ -1143,7 +1143,7 @@ function Switch({ className, ...props }) {
1143
1143
  {
1144
1144
  "data-slot": "switch",
1145
1145
  className: cn(
1146
- "peer focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--s-brand) data-[state=unchecked]:bg-(--s-tertiary)",
1146
+ "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--s-brand) data-[state=unchecked]:bg-(--s-tertiary)",
1147
1147
  className
1148
1148
  ),
1149
1149
  ...props,
@@ -3367,15 +3367,15 @@ var import_class_variance_authority = require("class-variance-authority");
3367
3367
  init_utils();
3368
3368
  var import_jsx_runtime14 = require("react/jsx-runtime");
3369
3369
  var buttonVariants = (0, import_class_variance_authority.cva)(
3370
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
3370
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-(--b-tertiary)/50 focus-visible:ring-[3px] aria-invalid:ring-(--negative)/20 dark:aria-invalid:ring-(--negative)/40 aria-invalid:border-(--negative)",
3371
3371
  {
3372
3372
  variants: {
3373
3373
  variant: {
3374
3374
  default: "bg-(--primary) text-(--inverse) shadow-xs hover:bg-(--primary)/90 ",
3375
- destructive: "bg-destructive text-(--inverse) shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
3376
- outline: "border bg-background shadow-xs hover:bg-(--accent) hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
3377
- secondary: "bg-(--secondary) text-secondary-foreground shadow-xs hover:bg-(--secondary)/80",
3378
- ghost: "hover:bg-(--accent) hover:text-accent-foreground dark:hover:bg-(--accent)/50",
3375
+ destructive: "bg-(--negative) text-(--inverse) shadow-xs hover:bg-(--negative)/90 focus-visible:ring-(--negative)/20 dark:focus-visible:ring-(--negative)/40 dark:bg-(--negative)/60",
3376
+ outline: "border bg-(--s-default) shadow-xs hover:bg-(--accent) hover:text-(--brand-primary) dark:bg-(--s-primary)/30 dark:border-(--b-tertiary) dark:hover:bg-(--s-primary)/50",
3377
+ secondary: "bg-(--secondary) text-(--inverse) shadow-xs hover:bg-(--secondary)/80",
3378
+ ghost: "hover:bg-(--accent) hover:text-(--brand-primary) dark:hover:bg-(--accent)/50",
3379
3379
  link: "text-(--brand-primary) underline-offset-4 hover:underline"
3380
3380
  },
3381
3381
  size: {
@@ -3414,7 +3414,7 @@ function Checkbox({ className, ...props }) {
3414
3414
  {
3415
3415
  "data-slot": "checkbox",
3416
3416
  className: cn(
3417
- "peer border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-sm border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-(--s-brand) data-[state=checked]:bg-(--s-brand) data-[state=checked]:text-(--inverse)",
3417
+ "peer size-4 shrink-0 rounded-sm border border-(--b-tertiary) shadow-xs transition-shadow outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-(--negative) aria-invalid:ring-(--negative)/20 data-[state=checked]:border-(--s-brand) data-[state=checked]:bg-(--s-brand) data-[state=checked]:text-(--inverse) dark:bg-(--s-primary)/30 dark:aria-invalid:ring-(--negative)/40",
3418
3418
  className
3419
3419
  ),
3420
3420
  ...props,
@@ -3436,9 +3436,9 @@ init_logger();
3436
3436
  var import_jsx_runtime16 = require("react/jsx-runtime");
3437
3437
  var cardFormLogger = logger.child("card-form");
3438
3438
  var stripeElementClasses = {
3439
- base: "w-full rounded-[12px] bg-(--s-primary) px-5 py-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
3440
- invalid: "focus-visible:ring-destructive",
3441
- focus: "border-ring ring-ring/50 ring-2"
3439
+ base: "w-full rounded-[12px] bg-(--s-primary) px-5 py-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--b-tertiary) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
3440
+ invalid: "focus-visible:ring-(--negative)",
3441
+ focus: "border-(--b-tertiary) ring-(--b-tertiary)/50 ring-2"
3442
3442
  };
3443
3443
  var CreditCardForm = ({ cancel, saveCard }) => {
3444
3444
  const [cardError, setCardError] = (0, import_react9.useState)(void 0);
@@ -3540,7 +3540,7 @@ var CreditCardForm = ({ cancel, saveCard }) => {
3540
3540
  }
3541
3541
  )
3542
3542
  ] }),
3543
- cardError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-destructive mt-1 text-sm", children: cardError })
3543
+ cardError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 text-sm text-(--negative)", children: cardError })
3544
3544
  ] }),
3545
3545
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-2", children: [
3546
3546
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Checkbox, { checked: shouldSaveCard, onCheckedChange: (v) => setShouldSaveCard(v === true), id: "saveCard" }),
@@ -3674,9 +3674,9 @@ function Input({ className, type, ...props }) {
3674
3674
  type,
3675
3675
  "data-slot": "input",
3676
3676
  className: cn(
3677
- "file:text-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-(--brand-primary) shadow-xs transition-[color,box-shadow] outline-none selection:bg-(--primary) selection:text-(--inverse) 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",
3678
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
3679
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
3677
+ "flex h-9 w-full min-w-0 rounded-md border border-(--b-tertiary) bg-transparent px-3 py-1 text-base text-(--brand-primary) shadow-xs transition-[color,box-shadow] outline-none selection:bg-(--primary) selection:text-(--inverse) file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-(--primary) placeholder:text-(--tertiary) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-(--s-primary)/30",
3678
+ "focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50",
3679
+ "aria-invalid:border-(--negative) aria-invalid:ring-(--negative)/20 dark:aria-invalid:ring-(--negative)/40",
3680
3680
  className
3681
3681
  ),
3682
3682
  ...props
@@ -4633,7 +4633,7 @@ function Slider2(props) {
4633
4633
  Thumb2,
4634
4634
  {
4635
4635
  "data-slot": "slider-thumb",
4636
- className: "ring-ring/50 block size-5 shrink-0 rounded-full border border-(--b-inverse) bg-(--primary) shadow-(--primary)/20 shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
4636
+ className: "block size-5 shrink-0 rounded-full border border-(--b-inverse) bg-(--primary) shadow-(--primary)/20 shadow-sm ring-(--b-tertiary)/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
4637
4637
  },
4638
4638
  index
4639
4639
  ))
package/build/index.css CHANGED
@@ -243,6 +243,9 @@
243
243
  .sl-spreepay .pointer-events-none {
244
244
  pointer-events: none;
245
245
  }
246
+ .sl-spreepay .invisible {
247
+ visibility: hidden;
248
+ }
246
249
  .sl-spreepay .sr-only {
247
250
  position: absolute;
248
251
  width: 1px;
@@ -667,6 +670,9 @@
667
670
  .sl-spreepay .bg-\(--crypto-pay-bg\) {
668
671
  background-color: var(--crypto-pay-bg);
669
672
  }
673
+ .sl-spreepay .bg-\(--negative\) {
674
+ background-color: var(--negative);
675
+ }
670
676
  .sl-spreepay .bg-\(--overlay\) {
671
677
  background-color: var(--overlay);
672
678
  }
@@ -1005,6 +1011,15 @@
1005
1011
  .sl-spreepay .ring-\(--b-brand\) {
1006
1012
  --tw-ring-color: var(--b-brand);
1007
1013
  }
1014
+ .sl-spreepay .ring-\(--b-tertiary\)\/50 {
1015
+ --tw-ring-color: var(--b-tertiary);
1016
+ @supports (color: color-mix(in lab, red, red)) {
1017
+ --tw-ring-color: color-mix(in oklab, var(--b-tertiary) 50%, transparent);
1018
+ }
1019
+ }
1020
+ .sl-spreepay .ring-offset-\(--s-default\) {
1021
+ --tw-ring-offset-color: var(--s-default);
1022
+ }
1008
1023
  .sl-spreepay .outline {
1009
1024
  outline-style: var(--tw-outline-style);
1010
1025
  outline-width: 1px;
@@ -1122,6 +1137,11 @@
1122
1137
  font-weight: var(--font-weight-medium);
1123
1138
  }
1124
1139
  }
1140
+ .sl-spreepay .file\:text-\(--primary\) {
1141
+ &::file-selector-button {
1142
+ color: var(--primary);
1143
+ }
1144
+ }
1125
1145
  .sl-spreepay .placeholder\:text-\(--tertiary\) {
1126
1146
  &::placeholder {
1127
1147
  color: var(--tertiary);
@@ -1141,6 +1161,16 @@
1141
1161
  }
1142
1162
  }
1143
1163
  }
1164
+ .sl-spreepay .hover\:bg-\(--negative\)\/90 {
1165
+ &:hover {
1166
+ @media (hover: hover) {
1167
+ background-color: var(--negative);
1168
+ @supports (color: color-mix(in lab, red, red)) {
1169
+ background-color: color-mix(in oklab, var(--negative) 90%, transparent);
1170
+ }
1171
+ }
1172
+ }
1173
+ }
1144
1174
  .sl-spreepay .hover\:bg-\(--primary\)\/90 {
1145
1175
  &:hover {
1146
1176
  @media (hover: hover) {
@@ -1234,6 +1264,11 @@
1234
1264
  var(--tw-shadow);
1235
1265
  }
1236
1266
  }
1267
+ .sl-spreepay .focus\:ring-\(--b-tertiary\) {
1268
+ &:focus {
1269
+ --tw-ring-color: var(--b-tertiary);
1270
+ }
1271
+ }
1237
1272
  .sl-spreepay .focus\:ring-offset-2 {
1238
1273
  &:focus {
1239
1274
  --tw-ring-offset-width: 2px;
@@ -1250,6 +1285,11 @@
1250
1285
  }
1251
1286
  }
1252
1287
  }
1288
+ .sl-spreepay .focus-visible\:border-\(--b-tertiary\) {
1289
+ &:focus-visible {
1290
+ border-color: var(--b-tertiary);
1291
+ }
1292
+ }
1253
1293
  .sl-spreepay .focus-visible\:ring-1 {
1254
1294
  &:focus-visible {
1255
1295
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -1283,6 +1323,32 @@
1283
1323
  var(--tw-shadow);
1284
1324
  }
1285
1325
  }
1326
+ .sl-spreepay .focus-visible\:ring-\(--b-tertiary\) {
1327
+ &:focus-visible {
1328
+ --tw-ring-color: var(--b-tertiary);
1329
+ }
1330
+ }
1331
+ .sl-spreepay .focus-visible\:ring-\(--b-tertiary\)\/50 {
1332
+ &:focus-visible {
1333
+ --tw-ring-color: var(--b-tertiary);
1334
+ @supports (color: color-mix(in lab, red, red)) {
1335
+ --tw-ring-color: color-mix(in oklab, var(--b-tertiary) 50%, transparent);
1336
+ }
1337
+ }
1338
+ }
1339
+ .sl-spreepay .focus-visible\:ring-\(--negative\) {
1340
+ &:focus-visible {
1341
+ --tw-ring-color: var(--negative);
1342
+ }
1343
+ }
1344
+ .sl-spreepay .focus-visible\:ring-\(--negative\)\/20 {
1345
+ &:focus-visible {
1346
+ --tw-ring-color: var(--negative);
1347
+ @supports (color: color-mix(in lab, red, red)) {
1348
+ --tw-ring-color: color-mix(in oklab, var(--negative) 20%, transparent);
1349
+ }
1350
+ }
1351
+ }
1286
1352
  .sl-spreepay .focus-visible\:ring-offset-1 {
1287
1353
  &:focus-visible {
1288
1354
  --tw-ring-offset-width: 1px;
@@ -1360,6 +1426,19 @@
1360
1426
  padding-inline: calc(var(--spacing) * 6);
1361
1427
  }
1362
1428
  }
1429
+ .sl-spreepay .aria-invalid\:border-\(--negative\) {
1430
+ &[aria-invalid=true] {
1431
+ border-color: var(--negative);
1432
+ }
1433
+ }
1434
+ .sl-spreepay .aria-invalid\:ring-\(--negative\)\/20 {
1435
+ &[aria-invalid=true] {
1436
+ --tw-ring-color: var(--negative);
1437
+ @supports (color: color-mix(in lab, red, red)) {
1438
+ --tw-ring-color: color-mix(in oklab, var(--negative) 20%, transparent);
1439
+ }
1440
+ }
1441
+ }
1363
1442
  .sl-spreepay .data-disabled\:opacity-50 {
1364
1443
  &[data-disabled] {
1365
1444
  opacity: 50%;
@@ -1583,6 +1662,27 @@
1583
1662
  font-size: 22px;
1584
1663
  }
1585
1664
  }
1665
+ .sl-spreepay .dark\:border-\(--b-tertiary\) {
1666
+ &:is(.dark *) {
1667
+ border-color: var(--b-tertiary);
1668
+ }
1669
+ }
1670
+ .sl-spreepay .dark\:bg-\(--negative\)\/60 {
1671
+ &:is(.dark *) {
1672
+ background-color: var(--negative);
1673
+ @supports (color: color-mix(in lab, red, red)) {
1674
+ background-color: color-mix(in oklab, var(--negative) 60%, transparent);
1675
+ }
1676
+ }
1677
+ }
1678
+ .sl-spreepay .dark\:bg-\(--s-primary\)\/30 {
1679
+ &:is(.dark *) {
1680
+ background-color: var(--s-primary);
1681
+ @supports (color: color-mix(in lab, red, red)) {
1682
+ background-color: color-mix(in oklab, var(--s-primary) 30%, transparent);
1683
+ }
1684
+ }
1685
+ }
1586
1686
  .sl-spreepay .dark\:hover\:bg-\(--accent\)\/50 {
1587
1687
  &:is(.dark *) {
1588
1688
  &:hover {
@@ -1595,6 +1695,38 @@
1595
1695
  }
1596
1696
  }
1597
1697
  }
1698
+ .sl-spreepay .dark\:hover\:bg-\(--s-primary\)\/50 {
1699
+ &:is(.dark *) {
1700
+ &:hover {
1701
+ @media (hover: hover) {
1702
+ background-color: var(--s-primary);
1703
+ @supports (color: color-mix(in lab, red, red)) {
1704
+ background-color: color-mix(in oklab, var(--s-primary) 50%, transparent);
1705
+ }
1706
+ }
1707
+ }
1708
+ }
1709
+ }
1710
+ .sl-spreepay .dark\:focus-visible\:ring-\(--negative\)\/40 {
1711
+ &:is(.dark *) {
1712
+ &:focus-visible {
1713
+ --tw-ring-color: var(--negative);
1714
+ @supports (color: color-mix(in lab, red, red)) {
1715
+ --tw-ring-color: color-mix(in oklab, var(--negative) 40%, transparent);
1716
+ }
1717
+ }
1718
+ }
1719
+ }
1720
+ .sl-spreepay .dark\:aria-invalid\:ring-\(--negative\)\/40 {
1721
+ &:is(.dark *) {
1722
+ &[aria-invalid=true] {
1723
+ --tw-ring-color: var(--negative);
1724
+ @supports (color: color-mix(in lab, red, red)) {
1725
+ --tw-ring-color: color-mix(in oklab, var(--negative) 40%, transparent);
1726
+ }
1727
+ }
1728
+ }
1729
+ }
1598
1730
  .sl-spreepay .\[\&_a\]\:underline {
1599
1731
  & a {
1600
1732
  text-decoration-line: underline;
package/build/index.js CHANGED
@@ -8,10 +8,10 @@ import {
8
8
  getSplitAmount,
9
9
  getTransactionFee,
10
10
  useSlapiBalance
11
- } from "./chunk-4BM6VTMT.js";
11
+ } from "./chunk-VBGTP4XP.js";
12
12
  import {
13
13
  Iframe3ds
14
- } from "./chunk-AXNTOSBU.js";
14
+ } from "./chunk-ABVIUWRK.js";
15
15
  import {
16
16
  InfoBanner,
17
17
  LogLevel,
@@ -42,7 +42,7 @@ import {
42
42
  useSpreePayRegister,
43
43
  useSpreePaymentMethod,
44
44
  useStaticConfig
45
- } from "./chunk-PTEQVWLJ.js";
45
+ } from "./chunk-ECIGRDXS.js";
46
46
 
47
47
  // src/SpreePay.tsx
48
48
  import { useCallback as useCallback8, useEffect as useEffect8, useMemo as useMemo9, useState as useState12 } from "react";
@@ -677,15 +677,15 @@ import { Slot } from "@radix-ui/react-slot";
677
677
  import { cva } from "class-variance-authority";
678
678
  import { jsx as jsx2 } from "react/jsx-runtime";
679
679
  var buttonVariants = cva(
680
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
680
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-(--b-tertiary)/50 focus-visible:ring-[3px] aria-invalid:ring-(--negative)/20 dark:aria-invalid:ring-(--negative)/40 aria-invalid:border-(--negative)",
681
681
  {
682
682
  variants: {
683
683
  variant: {
684
684
  default: "bg-(--primary) text-(--inverse) shadow-xs hover:bg-(--primary)/90 ",
685
- destructive: "bg-destructive text-(--inverse) shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
686
- outline: "border bg-background shadow-xs hover:bg-(--accent) hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
687
- secondary: "bg-(--secondary) text-secondary-foreground shadow-xs hover:bg-(--secondary)/80",
688
- ghost: "hover:bg-(--accent) hover:text-accent-foreground dark:hover:bg-(--accent)/50",
685
+ destructive: "bg-(--negative) text-(--inverse) shadow-xs hover:bg-(--negative)/90 focus-visible:ring-(--negative)/20 dark:focus-visible:ring-(--negative)/40 dark:bg-(--negative)/60",
686
+ outline: "border bg-(--s-default) shadow-xs hover:bg-(--accent) hover:text-(--brand-primary) dark:bg-(--s-primary)/30 dark:border-(--b-tertiary) dark:hover:bg-(--s-primary)/50",
687
+ secondary: "bg-(--secondary) text-(--inverse) shadow-xs hover:bg-(--secondary)/80",
688
+ ghost: "hover:bg-(--accent) hover:text-(--brand-primary) dark:hover:bg-(--accent)/50",
689
689
  link: "text-(--brand-primary) underline-offset-4 hover:underline"
690
690
  },
691
691
  size: {
@@ -723,7 +723,7 @@ function Checkbox({ className, ...props }) {
723
723
  {
724
724
  "data-slot": "checkbox",
725
725
  className: cn(
726
- "peer border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-sm border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-(--s-brand) data-[state=checked]:bg-(--s-brand) data-[state=checked]:text-(--inverse)",
726
+ "peer size-4 shrink-0 rounded-sm border border-(--b-tertiary) shadow-xs transition-shadow outline-none focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-(--negative) aria-invalid:ring-(--negative)/20 data-[state=checked]:border-(--s-brand) data-[state=checked]:bg-(--s-brand) data-[state=checked]:text-(--inverse) dark:bg-(--s-primary)/30 dark:aria-invalid:ring-(--negative)/40",
727
727
  className
728
728
  ),
729
729
  ...props,
@@ -743,9 +743,9 @@ function Checkbox({ className, ...props }) {
743
743
  import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
744
744
  var cardFormLogger = logger.child("card-form");
745
745
  var stripeElementClasses = {
746
- base: "w-full rounded-[12px] bg-(--s-primary) px-5 py-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
747
- invalid: "focus-visible:ring-destructive",
748
- focus: "border-ring ring-ring/50 ring-2"
746
+ base: "w-full rounded-[12px] bg-(--s-primary) px-5 py-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--b-tertiary) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
747
+ invalid: "focus-visible:ring-(--negative)",
748
+ focus: "border-(--b-tertiary) ring-(--b-tertiary)/50 ring-2"
749
749
  };
750
750
  var CreditCardForm = ({ cancel, saveCard }) => {
751
751
  const [cardError, setCardError] = useState2(void 0);
@@ -847,7 +847,7 @@ var CreditCardForm = ({ cancel, saveCard }) => {
847
847
  }
848
848
  )
849
849
  ] }),
850
- cardError && /* @__PURE__ */ jsx4("p", { className: "text-destructive mt-1 text-sm", children: cardError })
850
+ cardError && /* @__PURE__ */ jsx4("p", { className: "mt-1 text-sm text-(--negative)", children: cardError })
851
851
  ] }),
852
852
  /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
853
853
  /* @__PURE__ */ jsx4(Checkbox, { checked: shouldSaveCard, onCheckedChange: (v) => setShouldSaveCard(v === true), id: "saveCard" }),
@@ -964,9 +964,9 @@ function Input({ className, type, ...props }) {
964
964
  type,
965
965
  "data-slot": "input",
966
966
  className: cn(
967
- "file:text-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-(--brand-primary) shadow-xs transition-[color,box-shadow] outline-none selection:bg-(--primary) selection:text-(--inverse) 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",
968
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
969
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
967
+ "flex h-9 w-full min-w-0 rounded-md border border-(--b-tertiary) bg-transparent px-3 py-1 text-base text-(--brand-primary) shadow-xs transition-[color,box-shadow] outline-none selection:bg-(--primary) selection:text-(--inverse) file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-(--primary) placeholder:text-(--tertiary) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-(--s-primary)/30",
968
+ "focus-visible:border-(--b-tertiary) focus-visible:ring-[3px] focus-visible:ring-(--b-tertiary)/50",
969
+ "aria-invalid:border-(--negative) aria-invalid:ring-(--negative)/20 dark:aria-invalid:ring-(--negative)/40",
970
970
  className
971
971
  ),
972
972
  ...props
@@ -1922,7 +1922,7 @@ function Slider2(props) {
1922
1922
  Thumb,
1923
1923
  {
1924
1924
  "data-slot": "slider-thumb",
1925
- className: "ring-ring/50 block size-5 shrink-0 rounded-full border border-(--b-inverse) bg-(--primary) shadow-(--primary)/20 shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
1925
+ className: "block size-5 shrink-0 rounded-full border border-(--b-inverse) bg-(--primary) shadow-(--primary)/20 shadow-sm ring-(--b-tertiary)/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
1926
1926
  },
1927
1927
  index
1928
1928
  ))
@@ -2284,9 +2284,9 @@ var TabButtons = (props) => {
2284
2284
 
2285
2285
  // src/SpreePayContent.tsx
2286
2286
  import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
2287
- var CryptoTab = lazy(() => import("./CryptoTab-632DRL2D.js").then((module) => ({ default: module.CryptoTab })));
2287
+ var CryptoTab = lazy(() => import("./CryptoTab-XJZHGZ5E.js").then((module) => ({ default: module.CryptoTab })));
2288
2288
  var CryptoComTab = lazy(
2289
- () => import("./CryptoComTab-ZAWBJUCM.js").then((module) => ({ default: module.CryptoComTab }))
2289
+ () => import("./CryptoComTab-EKWP4XOV.js").then((module) => ({ default: module.CryptoComTab }))
2290
2290
  );
2291
2291
  var TabLoadingFallback = () => /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center px-5 py-8 md:px-7", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center gap-3", children: [
2292
2292
  /* @__PURE__ */ jsx18("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-(--border-component-specific-card) border-t-(--brand-primary)" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superlogic/spree-pay",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Spree-pay React component and utilities",
5
5
  "private": false,
6
6
  "type": "module",