@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.
Files changed (58) hide show
  1. package/dist/{chunk-NMVSRA5Y.js → chunk-4XA32LKR.js} +2 -3
  2. package/dist/{chunk-4T7F5BZZ.js → chunk-6LN6QT6M.js} +1 -1
  3. package/dist/{chunk-5GOJRLQO.js → chunk-FCREADUH.js} +1 -1
  4. package/dist/{chunk-IDN3IN2A.js → chunk-M3433XEJ.js} +9 -2
  5. package/dist/{chunk-YR7JUKYO.js → chunk-RLK4TBXR.js} +1 -1
  6. package/dist/{chunk-4NCDT5ZY.js → chunk-SBSHZ327.js} +1 -1
  7. package/dist/components/CalendarRange.cjs +2 -3
  8. package/dist/components/CalendarRange.js +1 -1
  9. package/dist/components/DataGridCell.cjs +1 -1
  10. package/dist/components/DataGridCell.js +3 -3
  11. package/dist/components/DataTable.cjs +1 -2
  12. package/dist/components/DataTable.js +1 -3
  13. package/dist/components/DateInput.cjs +12 -6
  14. package/dist/components/DateInput.js +3 -3
  15. package/dist/components/DateRangeInput.cjs +12 -6
  16. package/dist/components/DateRangeInput.js +3 -3
  17. package/dist/components/EditingContext.cjs +1 -2
  18. package/dist/components/EditingContext.js +1 -2
  19. package/dist/components/HorizontalDivider.js +8 -3
  20. package/dist/components/Menu.cjs +1 -1
  21. package/dist/components/Menu.js +2 -2
  22. package/dist/components/MobileDataGrid.cjs +7 -3
  23. package/dist/components/MobileDataGrid.js +7 -3
  24. package/dist/components/Modal.cjs +1 -1
  25. package/dist/components/Modal.js +2 -2
  26. package/dist/components/NavigationTabs.cjs +4 -4
  27. package/dist/components/NavigationTabs.js +4 -4
  28. package/dist/components/PDFViewer.cjs +1 -1
  29. package/dist/components/PDFViewer.js +2 -2
  30. package/dist/components/Radio.js +133 -5
  31. package/dist/components/Time.cjs +1 -1
  32. package/dist/components/Time.js +1 -1
  33. package/dist/components/WorldpayIframe.js +6 -3
  34. package/dist/components/index.cjs +29 -1041
  35. package/dist/components/index.js +3 -19
  36. package/dist/index.css +0 -6
  37. package/dist/utils/index.cjs +9 -2
  38. package/dist/utils/index.js +1 -1
  39. package/package.json +1 -1
  40. package/src/components/CalendarRange.tsx +15 -9
  41. package/src/components/DataTable.tsx +1 -3
  42. package/src/components/EditingContext.tsx +4 -3
  43. package/src/components/MobileDataGrid.tsx +12 -4
  44. package/src/components/NavigationTabs.tsx +1 -1
  45. package/src/components/index.ts +0 -1
  46. package/src/utils/date.ts +65 -35
  47. package/src/utils.ts +1 -1
  48. package/dist/chunk-BATIOCXB.js +0 -138
  49. package/dist/chunk-EPQLWHCL.js +0 -11
  50. package/dist/chunk-NT2ZKA4W.js +0 -266
  51. package/dist/chunk-RUTYNLKS.js +0 -112
  52. package/dist/chunk-WFGKIR5A.js +0 -9
  53. package/dist/components/PaymentOnAccountModal.cjs +0 -2381
  54. package/dist/components/PaymentOnAccountModal.js +0 -35
  55. package/dist/components/SelectPaymentMethod.cjs +0 -1355
  56. package/dist/components/SelectPaymentMethod.js +0 -22
  57. package/src/components/PaymentOnAccountModal.tsx +0 -121
  58. package/src/components/SelectPaymentMethod.tsx +0 -315
@@ -1,10 +1,138 @@
1
1
  "use client";
2
2
  import {
3
- Radio
4
- } from "../chunk-BATIOCXB.js";
5
- import "../chunk-HVI3CL7Y.js";
6
- import "../chunk-RDLEIAQU.js";
7
- import "../chunk-ORMEWXMH.js";
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
  };
@@ -706,7 +706,7 @@ function findDocumentRoot(element) {
706
706
  if (!element || !(element instanceof Node)) {
707
707
  return window.document.body;
708
708
  }
709
- var currentElement = element;
709
+ let currentElement = element;
710
710
  while (currentElement && currentElement.parentNode) {
711
711
  if (currentElement.parentNode === document) {
712
712
  return document.body;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  findDocumentRoot
3
- } from "../chunk-4T7F5BZZ.js";
3
+ } from "../chunk-6LN6QT6M.js";
4
4
  import {
5
5
  InputBase
6
6
  } from "../chunk-4T3DRGLF.js";
@@ -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
  };