@dmsi/wedgekit-react 0.0.160 → 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/{chunk-NMVSRA5Y.js → chunk-4XA32LKR.js} +2 -3
- package/dist/{chunk-4T7F5BZZ.js → chunk-6LN6QT6M.js} +1 -1
- package/dist/{chunk-5GOJRLQO.js → chunk-FCREADUH.js} +1 -1
- package/dist/{chunk-IDN3IN2A.js → chunk-M3433XEJ.js} +9 -2
- package/dist/{chunk-YR7JUKYO.js → chunk-RLK4TBXR.js} +1 -1
- package/dist/{chunk-4NCDT5ZY.js → chunk-SBSHZ327.js} +1 -1
- package/dist/components/CalendarRange.cjs +2 -3
- package/dist/components/CalendarRange.js +1 -1
- package/dist/components/DataGridCell.cjs +1 -1
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DataTable.cjs +1 -2
- package/dist/components/DataTable.js +1 -3
- package/dist/components/DateInput.cjs +12 -6
- package/dist/components/DateInput.js +3 -3
- package/dist/components/DateRangeInput.cjs +12 -6
- package/dist/components/DateRangeInput.js +3 -3
- package/dist/components/EditingContext.cjs +1 -2
- package/dist/components/EditingContext.js +1 -2
- package/dist/components/HorizontalDivider.js +8 -3
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.js +2 -2
- package/dist/components/MobileDataGrid.cjs +7 -3
- package/dist/components/MobileDataGrid.js +7 -3
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.js +2 -2
- package/dist/components/NavigationTabs.cjs +4 -4
- package/dist/components/NavigationTabs.js +4 -4
- package/dist/components/PDFViewer.cjs +1 -1
- package/dist/components/PDFViewer.js +2 -2
- package/dist/components/Radio.js +133 -5
- package/dist/components/Time.cjs +1 -1
- package/dist/components/Time.js +1 -1
- package/dist/components/WorldpayIframe.js +6 -3
- package/dist/components/index.cjs +29 -1041
- package/dist/components/index.js +3 -19
- package/dist/index.css +0 -6
- package/dist/utils/index.cjs +9 -2
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/src/components/CalendarRange.tsx +15 -9
- package/src/components/DataTable.tsx +1 -3
- package/src/components/EditingContext.tsx +4 -3
- package/src/components/MobileDataGrid.tsx +12 -4
- package/src/components/NavigationTabs.tsx +1 -1
- package/src/components/index.ts +0 -1
- package/src/utils/date.ts +65 -35
- package/src/utils.ts +1 -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-RUTYNLKS.js +0 -112
- package/dist/chunk-WFGKIR5A.js +0 -9
- 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
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
|
};
|
package/dist/components/Time.cjs
CHANGED
|
@@ -706,7 +706,7 @@ function findDocumentRoot(element) {
|
|
|
706
706
|
if (!element || !(element instanceof Node)) {
|
|
707
707
|
return window.document.body;
|
|
708
708
|
}
|
|
709
|
-
|
|
709
|
+
let currentElement = element;
|
|
710
710
|
while (currentElement && currentElement.parentNode) {
|
|
711
711
|
if (currentElement.parentNode === document) {
|
|
712
712
|
return document.body;
|
package/dist/components/Time.js
CHANGED
|
@@ -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
|
};
|