@dmsi/wedgekit-react 0.0.161 → 0.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HorizontalDivider.js +8 -3
- package/dist/components/Radio.js +133 -5
- package/dist/components/WorldpayIframe.js +6 -3
- package/dist/components/index.cjs +28 -1040
- package/dist/components/index.js +0 -16
- package/dist/index.css +0 -6
- package/package.json +1 -1
- package/src/components/index.ts +0 -1
- package/dist/chunk-BATIOCXB.js +0 -138
- package/dist/chunk-EPQLWHCL.js +0 -11
- package/dist/chunk-NT2ZKA4W.js +0 -266
- package/dist/chunk-WFGKIR5A.js +0 -9
- package/dist/chunk-WFLOAGEI.js +0 -112
- package/dist/components/PaymentOnAccountModal.cjs +0 -2381
- package/dist/components/PaymentOnAccountModal.js +0 -35
- package/dist/components/SelectPaymentMethod.cjs +0 -1355
- package/dist/components/SelectPaymentMethod.js +0 -22
- package/src/components/PaymentOnAccountModal.tsx +0 -121
- package/src/components/SelectPaymentMethod.tsx +0 -315
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HorizontalDivider
|
|
3
|
-
} from "../chunk-EPQLWHCL.js";
|
|
4
1
|
import "../chunk-ORMEWXMH.js";
|
|
2
|
+
|
|
3
|
+
// src/components/HorizontalDivider.tsx
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function HorizontalDivider({ id, testid, hideOnMobile }) {
|
|
7
|
+
const hideOnMobileStyle = clsx(hideOnMobile && "hidden desktop:block");
|
|
8
|
+
return /* @__PURE__ */ jsx("hr", { id, "data-testid": testid, className: clsx("w-full border-t border-border-primary-normal", hideOnMobileStyle) });
|
|
9
|
+
}
|
|
5
10
|
export {
|
|
6
11
|
HorizontalDivider
|
|
7
12
|
};
|
package/dist/components/Radio.js
CHANGED
|
@@ -1,10 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Paragraph
|
|
4
|
+
} from "../chunk-HVI3CL7Y.js";
|
|
5
|
+
import {
|
|
6
|
+
baseTransition,
|
|
7
|
+
componentGap
|
|
8
|
+
} from "../chunk-RDLEIAQU.js";
|
|
9
|
+
import {
|
|
10
|
+
__objRest,
|
|
11
|
+
__spreadValues
|
|
12
|
+
} from "../chunk-ORMEWXMH.js";
|
|
13
|
+
|
|
14
|
+
// src/components/Radio.tsx
|
|
15
|
+
import clsx from "clsx";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var Radio = (_a) => {
|
|
18
|
+
var _b = _a, {
|
|
19
|
+
className,
|
|
20
|
+
label,
|
|
21
|
+
error,
|
|
22
|
+
disabled,
|
|
23
|
+
checked,
|
|
24
|
+
readOnly,
|
|
25
|
+
id,
|
|
26
|
+
testid
|
|
27
|
+
} = _b, props = __objRest(_b, [
|
|
28
|
+
"className",
|
|
29
|
+
"label",
|
|
30
|
+
"error",
|
|
31
|
+
"disabled",
|
|
32
|
+
"checked",
|
|
33
|
+
"readOnly",
|
|
34
|
+
"id",
|
|
35
|
+
"testid"
|
|
36
|
+
]);
|
|
37
|
+
const radioId = id;
|
|
38
|
+
const paragraphColor = disabled ? "text-primary-disabled" : error ? "text-primary-error" : "text-primary-normal";
|
|
39
|
+
const defaultClassName = clsx(
|
|
40
|
+
!error && !disabled && "border-border-primary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-focus:border-border-action-hover peer-focus:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active peer-checked:border-0 peer-checked:bg-background-action-secondary-hover"
|
|
41
|
+
);
|
|
42
|
+
const errorClassName = clsx(
|
|
43
|
+
error && !disabled && "border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-focus:border-border-action-critical-hover peer-focus:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active peer-checked:bg-background-action-critical-secondary-hover peer-checked:border-0 "
|
|
44
|
+
);
|
|
45
|
+
const disabledClassName = clsx(
|
|
46
|
+
disabled && "peer-disabled:bg-background-action-secondary-disabled peer-disabled:border-border-primary-normal peer-checked:border-0"
|
|
47
|
+
);
|
|
48
|
+
const readonlyClassName = clsx(
|
|
49
|
+
readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"label",
|
|
53
|
+
{
|
|
54
|
+
htmlFor: radioId,
|
|
55
|
+
className: clsx(
|
|
56
|
+
"flex items-center",
|
|
57
|
+
componentGap,
|
|
58
|
+
disabled ? "cursor-default" : "cursor-pointer",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
"input",
|
|
65
|
+
__spreadValues({
|
|
66
|
+
id: radioId,
|
|
67
|
+
"data-testid": testid,
|
|
68
|
+
type: "radio",
|
|
69
|
+
className: "sr-only peer",
|
|
70
|
+
disabled,
|
|
71
|
+
checked,
|
|
72
|
+
readOnly
|
|
73
|
+
}, props)
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: clsx(
|
|
79
|
+
"size-6 rounded-full border flex items-center justify-center",
|
|
80
|
+
baseTransition,
|
|
81
|
+
defaultClassName,
|
|
82
|
+
errorClassName,
|
|
83
|
+
disabledClassName,
|
|
84
|
+
readonlyClassName
|
|
85
|
+
),
|
|
86
|
+
children: checked && /* @__PURE__ */ jsx(
|
|
87
|
+
RadioIcon,
|
|
88
|
+
{
|
|
89
|
+
className: clsx(
|
|
90
|
+
"transition-colors",
|
|
91
|
+
!error && !disabled && "text-icon-on-action-secondary-normal hover:text-icon-on-action-secondary-hover active:text-icon-on-action-secondary-active peer-hover:text-icon-on-action-secondary-hover peer-focus:text-icon-on-action-secondary-hover peer-active:text-icon-on-action-secondary-active",
|
|
92
|
+
error && !disabled && "text-icon-action-critical-secondary-normal hover:text-icon-action-critical-secondary-hover active:text-icon-action-critical-secondary-active peer-hover:text-icon-action-critical-secondary-hover peer-focus:text-icon-action-critical-secondary-hover peer-active:text-icon-action-critical-secondary-active",
|
|
93
|
+
disabled && "text-icon-on-action-secondary-disabled",
|
|
94
|
+
readOnly && "text-icon-on-action-secondary-disabled"
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] }),
|
|
101
|
+
label && /* @__PURE__ */ jsx(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
Radio.displayName = "Radio";
|
|
107
|
+
var RadioIcon = ({ className }) => {
|
|
108
|
+
return /* @__PURE__ */ jsxs(
|
|
109
|
+
"svg",
|
|
110
|
+
{
|
|
111
|
+
className,
|
|
112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
+
width: "24",
|
|
114
|
+
height: "24",
|
|
115
|
+
viewBox: "0 0 24 24",
|
|
116
|
+
fill: "none",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
"rect",
|
|
120
|
+
{
|
|
121
|
+
x: "1",
|
|
122
|
+
y: "1",
|
|
123
|
+
width: "22",
|
|
124
|
+
height: "22",
|
|
125
|
+
rx: "11",
|
|
126
|
+
stroke: "currentColor",
|
|
127
|
+
strokeWidth: "2"
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
RadioIcon.displayName = "RadioIcon";
|
|
8
136
|
export {
|
|
9
137
|
Radio
|
|
10
138
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
WorldpayIframe
|
|
4
|
-
} from "../chunk-WFGKIR5A.js";
|
|
5
2
|
import "../chunk-ORMEWXMH.js";
|
|
3
|
+
|
|
4
|
+
// src/components/WorldpayIframe.tsx
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function WorldpayIframe({ url }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
|
|
8
|
+
}
|
|
6
9
|
export {
|
|
7
10
|
WorldpayIframe
|
|
8
11
|
};
|