@payfit/unity-components 2.29.10 → 2.29.11
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/esm/components/avatar/parts/AvatarFallback.d.ts +34 -96
- package/dist/esm/components/avatar/parts/AvatarFallback.js +30 -33
- package/dist/esm/components/checkbox/Checkbox.js +60 -51
- package/dist/esm/components/checkbox/Checkbox.variants.d.ts +3 -0
- package/dist/esm/components/checkbox/Checkbox.variants.js +6 -5
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +33 -16
- package/package.json +7 -7
|
@@ -21,106 +21,44 @@ declare const avatarPlaceholder: import('tailwind-variants').TVReturnType<{
|
|
|
21
21
|
background: string;
|
|
22
22
|
foreground: string;
|
|
23
23
|
}, undefined, {
|
|
24
|
-
size: {
|
|
25
|
-
xs: string;
|
|
26
|
-
sm: string;
|
|
27
|
-
md: string;
|
|
28
|
-
lg: string;
|
|
29
|
-
xl: string;
|
|
30
|
-
};
|
|
31
|
-
variant: {
|
|
32
|
-
circle: string;
|
|
33
|
-
square: string;
|
|
34
|
-
};
|
|
35
|
-
color: {
|
|
36
|
-
teal: string;
|
|
37
|
-
plum: string;
|
|
38
|
-
purple: string;
|
|
39
|
-
orange: string;
|
|
40
|
-
neutral: string;
|
|
41
|
-
warning: string;
|
|
42
|
-
success: string;
|
|
43
|
-
info: string;
|
|
44
|
-
danger: string;
|
|
45
|
-
promo: string;
|
|
46
|
-
primary: string;
|
|
47
|
-
};
|
|
48
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
49
|
-
size: {
|
|
50
|
-
xs: string;
|
|
51
|
-
sm: string;
|
|
52
|
-
md: string;
|
|
53
|
-
lg: string;
|
|
54
|
-
xl: string;
|
|
55
|
-
};
|
|
56
|
-
variant: {
|
|
57
|
-
circle: string;
|
|
58
|
-
square: string;
|
|
59
|
-
};
|
|
60
24
|
color: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, undefined, undefined, {
|
|
74
|
-
size: {
|
|
75
|
-
xs: string;
|
|
76
|
-
sm: string;
|
|
77
|
-
md: string;
|
|
78
|
-
lg: string;
|
|
79
|
-
xl: string;
|
|
80
|
-
};
|
|
81
|
-
variant: {
|
|
82
|
-
circle: string;
|
|
83
|
-
square: string;
|
|
84
|
-
};
|
|
85
|
-
color: {
|
|
86
|
-
teal: string;
|
|
87
|
-
plum: string;
|
|
88
|
-
purple: string;
|
|
89
|
-
orange: string;
|
|
90
|
-
neutral: string;
|
|
91
|
-
warning: string;
|
|
92
|
-
success: string;
|
|
93
|
-
info: string;
|
|
94
|
-
danger: string;
|
|
95
|
-
promo: string;
|
|
96
|
-
primary: string;
|
|
97
|
-
};
|
|
98
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
99
|
-
size: {
|
|
100
|
-
xs: string;
|
|
101
|
-
sm: string;
|
|
102
|
-
md: string;
|
|
103
|
-
lg: string;
|
|
104
|
-
xl: string;
|
|
105
|
-
};
|
|
106
|
-
variant: {
|
|
107
|
-
circle: string;
|
|
108
|
-
square: string;
|
|
25
|
+
blue: {
|
|
26
|
+
background: string;
|
|
27
|
+
foreground: string;
|
|
28
|
+
};
|
|
29
|
+
yellow: {
|
|
30
|
+
background: string;
|
|
31
|
+
foreground: string;
|
|
32
|
+
};
|
|
33
|
+
purple: {
|
|
34
|
+
background: string;
|
|
35
|
+
foreground: string;
|
|
36
|
+
};
|
|
109
37
|
};
|
|
38
|
+
}, {
|
|
39
|
+
base: string;
|
|
40
|
+
background: string;
|
|
41
|
+
foreground: string;
|
|
42
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
110
43
|
color: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
44
|
+
blue: {
|
|
45
|
+
background: string;
|
|
46
|
+
foreground: string;
|
|
47
|
+
};
|
|
48
|
+
yellow: {
|
|
49
|
+
background: string;
|
|
50
|
+
foreground: string;
|
|
51
|
+
};
|
|
52
|
+
purple: {
|
|
53
|
+
background: string;
|
|
54
|
+
foreground: string;
|
|
55
|
+
};
|
|
122
56
|
};
|
|
123
|
-
},
|
|
57
|
+
}, {
|
|
58
|
+
base: string;
|
|
59
|
+
background: string;
|
|
60
|
+
foreground: string;
|
|
61
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
124
62
|
type AvatarFallbackBaseProps = Pick<React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>, 'delayMs'>;
|
|
125
63
|
type AvatarFallbackInitialsProps = AvatarFallbackBaseProps & {
|
|
126
64
|
/** The fallback's variant. It can be one of: `initials`, `placeholder` */
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import * as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { uyTv as y, uyMerge as h } from "@payfit/unity-themes";
|
|
4
|
+
import * as l from "@radix-ui/react-avatar";
|
|
5
5
|
import { useAvatarContext as f } from "../Avatar.context.js";
|
|
6
|
-
import { avatarBase as
|
|
6
|
+
import { avatarBase as i } from "../Avatar.variants.js";
|
|
7
7
|
import { getInitials as v } from "../utils.js";
|
|
8
|
-
const
|
|
9
|
-
extend: u,
|
|
8
|
+
const w = y({
|
|
10
9
|
slots: {
|
|
11
10
|
base: "uy:absolute uy:overflow-hidden",
|
|
12
11
|
background: "",
|
|
@@ -15,21 +14,21 @@ const h = n({
|
|
|
15
14
|
variants: {
|
|
16
15
|
color: {
|
|
17
16
|
blue: {
|
|
18
|
-
background: "uy:bg-blue-l4",
|
|
19
|
-
foreground: "uy:fill-blue-l3"
|
|
17
|
+
background: "uy:theme-legacy:bg-blue-l4 uy:theme-rebrand:bg-blue-l3",
|
|
18
|
+
foreground: "uy:theme-legacy:fill-blue-l3 uy:theme-rebrand:fill-blue-l4"
|
|
20
19
|
},
|
|
21
20
|
yellow: {
|
|
22
|
-
background: "uy:bg-yellow-l4",
|
|
23
|
-
foreground: "uy:fill-yellow-l3"
|
|
21
|
+
background: "uy:theme-legacy:bg-yellow-l4 uy:theme-rebrand:bg-yellow-l3",
|
|
22
|
+
foreground: "uy:theme-legacy:fill-yellow-l3 uy:theme-rebrand:fill-yellow-l4"
|
|
24
23
|
},
|
|
25
24
|
purple: {
|
|
26
|
-
background: "uy:bg-purple-l4",
|
|
27
|
-
foreground: "uy:fill-purple-l3"
|
|
25
|
+
background: "uy:theme-legacy:bg-purple-l4 uy:theme-rebrand:bg-purple-l3",
|
|
26
|
+
foreground: "uy:theme-legacy:fill-purple-l3 uy:theme-rebrand:fill-purple-l4"
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
}),
|
|
32
|
-
extend:
|
|
30
|
+
}), x = y({
|
|
31
|
+
extend: i,
|
|
33
32
|
base: "uy:absolute uy:flex uy:h-full uy:w-full uy:items-center uy:justify-center uy:text-content-neutral uy:bg-surface-neutral-lowest",
|
|
34
33
|
variants: {
|
|
35
34
|
size: {
|
|
@@ -40,26 +39,24 @@ const h = n({
|
|
|
40
39
|
xl: "uy:typography-h2"
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
}),
|
|
42
|
+
}), k = b.forwardRef(({ variant: c, color: g, children: m, ...a }, r) => {
|
|
44
43
|
const d = f(), { size: o, variant: t } = d;
|
|
45
|
-
if (
|
|
46
|
-
const { base:
|
|
47
|
-
color:
|
|
48
|
-
size: o,
|
|
49
|
-
variant: t
|
|
44
|
+
if (c === "placeholder") {
|
|
45
|
+
const p = i({ size: o, variant: t }), { base: n, background: u, foreground: s } = w({
|
|
46
|
+
color: g
|
|
50
47
|
});
|
|
51
|
-
return /* @__PURE__ */
|
|
48
|
+
return console.log("BASE", n()), console.log("FG", s()), console.log("BG", u()), /* @__PURE__ */ e(l.Fallback, { ref: r, role: "presentation", ...a, children: /* @__PURE__ */ e(
|
|
52
49
|
"svg",
|
|
53
50
|
{
|
|
54
51
|
role: "img",
|
|
55
52
|
"aria-hidden": !0,
|
|
56
53
|
xmlns: "http://www.w3.org/2000/svg",
|
|
57
54
|
viewBox: "0 0 16 16",
|
|
58
|
-
className:
|
|
59
|
-
children: /* @__PURE__ */
|
|
55
|
+
className: h(p, n(), u()),
|
|
56
|
+
children: /* @__PURE__ */ e(
|
|
60
57
|
"path",
|
|
61
58
|
{
|
|
62
|
-
className:
|
|
59
|
+
className: s(),
|
|
63
60
|
fillRule: "evenodd",
|
|
64
61
|
d: "M0 8.322c.245.06.49.117.732.17 2.113.455 3.727.487 4.79.12.478-.166.824-.405 1.09-.732.276-.336.567-.888.737-1.82.4-2.19.02-3.485-.47-4.283C6.407 1.012 5.665.432 4.732 0h6.861c.904 1.906 1.173 4.227.674 6.959-.29 1.587-.871 2.97-1.784 4.086-.921 1.126-2.08 1.86-3.328 2.292-2.283.789-4.872.574-7.156.11V8.322Z",
|
|
65
62
|
clipRule: "evenodd"
|
|
@@ -68,18 +65,18 @@ const h = n({
|
|
|
68
65
|
}
|
|
69
66
|
) });
|
|
70
67
|
}
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
|
|
68
|
+
return /* @__PURE__ */ e(
|
|
69
|
+
l.Fallback,
|
|
73
70
|
{
|
|
74
|
-
ref:
|
|
71
|
+
ref: r,
|
|
75
72
|
role: "presentation",
|
|
76
|
-
className:
|
|
77
|
-
...
|
|
78
|
-
children: v(
|
|
73
|
+
className: x({ size: o, variant: t }),
|
|
74
|
+
...a,
|
|
75
|
+
children: v(m)
|
|
79
76
|
}
|
|
80
77
|
);
|
|
81
78
|
});
|
|
82
|
-
|
|
79
|
+
k.displayName = l.Fallback.displayName;
|
|
83
80
|
export {
|
|
84
|
-
|
|
81
|
+
k as AvatarFallback
|
|
85
82
|
};
|
|
@@ -1,97 +1,106 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { Text as
|
|
6
|
-
import { checkbox as
|
|
7
|
-
import { CheckboxIndicator as
|
|
8
|
-
const
|
|
9
|
-
({ children:
|
|
10
|
-
const
|
|
11
|
-
isDisabled:
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as R, isValidElement as h, cloneElement as f } from "react";
|
|
3
|
+
import { Checkbox as D } from "react-aria-components/Checkbox";
|
|
4
|
+
import { useId as E } from "react-aria/useId";
|
|
5
|
+
import { Text as N } from "../text/Text.js";
|
|
6
|
+
import { checkbox as V } from "./Checkbox.variants.js";
|
|
7
|
+
import { CheckboxIndicator as F } from "./parts/CheckboxIndicator.js";
|
|
8
|
+
const L = R(
|
|
9
|
+
({ children: u, helperText: i, feedbackText: l, ...o }, v) => {
|
|
10
|
+
const a = E(), {
|
|
11
|
+
isDisabled: t,
|
|
12
12
|
isReadOnly: d,
|
|
13
|
-
isInvalid:
|
|
13
|
+
isInvalid: s,
|
|
14
14
|
isRequired: n,
|
|
15
15
|
requiredVariant: c = "required",
|
|
16
16
|
...x
|
|
17
17
|
} = o, {
|
|
18
18
|
base: g,
|
|
19
19
|
wrapper: $,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
label: k,
|
|
21
|
+
asterisk: C,
|
|
22
|
+
optionalTag: q,
|
|
23
|
+
descriptionsContainer: w,
|
|
23
24
|
helperText: m,
|
|
24
25
|
feedbackText: b
|
|
25
|
-
} =
|
|
26
|
-
isDisabled:
|
|
26
|
+
} = V({
|
|
27
|
+
isDisabled: t,
|
|
27
28
|
isReadOnly: d,
|
|
28
|
-
isInvalid:
|
|
29
|
-
}), y = [o["aria-labelledby"], `${
|
|
29
|
+
isInvalid: s
|
|
30
|
+
}), y = [o["aria-labelledby"], `${a}-label`].filter(Boolean), p = [
|
|
30
31
|
o["aria-describedby"],
|
|
31
|
-
typeof i == "string" ? `${
|
|
32
|
-
typeof
|
|
33
|
-
].filter(Boolean),
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
32
|
+
typeof i == "string" ? `${a}-helper-text` : void 0,
|
|
33
|
+
typeof l == "string" ? `${a}-feedback-text` : void 0
|
|
34
|
+
].filter(Boolean), I = y.length > 0 ? y.join(" ") : void 0, S = p.length > 0 ? p.join(" ") : void 0;
|
|
35
|
+
return /* @__PURE__ */ r("div", { className: g(), children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
D,
|
|
37
38
|
{
|
|
38
39
|
...x,
|
|
39
|
-
isInvalid:
|
|
40
|
-
ref:
|
|
40
|
+
isInvalid: s,
|
|
41
|
+
ref: v,
|
|
41
42
|
className: $(),
|
|
42
|
-
"aria-labelledby":
|
|
43
|
-
"aria-describedby":
|
|
44
|
-
isDisabled:
|
|
43
|
+
"aria-labelledby": I,
|
|
44
|
+
"aria-describedby": S,
|
|
45
|
+
isDisabled: t,
|
|
45
46
|
isReadOnly: d,
|
|
46
|
-
children: (
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
47
|
+
children: (j) => /* @__PURE__ */ r(B, { children: [
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
F,
|
|
49
50
|
{
|
|
50
|
-
...
|
|
51
|
+
...j,
|
|
51
52
|
className: "uy:mt-50 uy:sm:mt-25 uy:ml-0"
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
id: `${a}-label`,
|
|
59
|
+
className: k(),
|
|
60
|
+
"data-dd-privacy": "allow",
|
|
61
|
+
children: u
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
c === "required" && n && /* @__PURE__ */ r("span", { className: C(), children: [
|
|
56
65
|
"*",
|
|
57
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ e("span", { className: "uy:sr-only", children: "required" })
|
|
58
67
|
] }),
|
|
59
|
-
c === "optional" && !n && /* @__PURE__ */
|
|
68
|
+
c === "optional" && !n && /* @__PURE__ */ e("span", { className: q(), children: "(optional)" })
|
|
60
69
|
] })
|
|
61
70
|
}
|
|
62
71
|
),
|
|
63
|
-
(i ||
|
|
64
|
-
typeof i == "string" ? /* @__PURE__ */
|
|
65
|
-
|
|
72
|
+
(i || l) && /* @__PURE__ */ r("div", { className: w(), "data-dd-privacy": "allow", children: [
|
|
73
|
+
typeof i == "string" ? /* @__PURE__ */ e(
|
|
74
|
+
N,
|
|
66
75
|
{
|
|
67
76
|
variant: "bodySmall",
|
|
68
77
|
color: "content.neutral.low",
|
|
69
|
-
id: `${
|
|
78
|
+
id: `${a}-helper-text`,
|
|
70
79
|
className: m(),
|
|
71
80
|
children: i
|
|
72
81
|
}
|
|
73
82
|
) : h(i) && f(i, {
|
|
74
|
-
"data-id": `${
|
|
83
|
+
"data-id": `${a}-helper-text`,
|
|
75
84
|
className: m()
|
|
76
85
|
}),
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
s && (typeof l == "string" ? /* @__PURE__ */ e(
|
|
87
|
+
N,
|
|
79
88
|
{
|
|
80
89
|
variant: "bodySmallStrong",
|
|
81
90
|
color: "content.form.invalid",
|
|
82
|
-
id: `${
|
|
91
|
+
id: `${a}-feedback-text`,
|
|
83
92
|
className: b(),
|
|
84
|
-
children:
|
|
93
|
+
children: l
|
|
85
94
|
}
|
|
86
|
-
) : h(
|
|
87
|
-
"data-id": `${
|
|
95
|
+
) : h(l) && f(l, {
|
|
96
|
+
"data-id": `${a}-feedback-text`,
|
|
88
97
|
className: b()
|
|
89
98
|
}))
|
|
90
99
|
] })
|
|
91
100
|
] });
|
|
92
101
|
}
|
|
93
102
|
);
|
|
94
|
-
|
|
103
|
+
L.displayName = "Checkbox";
|
|
95
104
|
export {
|
|
96
|
-
|
|
105
|
+
L as Checkbox
|
|
97
106
|
};
|
|
@@ -15,6 +15,7 @@ export declare const checkbox: import('tailwind-variants').TVReturnType<{
|
|
|
15
15
|
}, {
|
|
16
16
|
base: string[];
|
|
17
17
|
wrapper: string[];
|
|
18
|
+
label: string;
|
|
18
19
|
asterisk: string;
|
|
19
20
|
optionalTag: string;
|
|
20
21
|
descriptionsContainer: string;
|
|
@@ -37,6 +38,7 @@ export declare const checkbox: import('tailwind-variants').TVReturnType<{
|
|
|
37
38
|
}, {
|
|
38
39
|
base: string[];
|
|
39
40
|
wrapper: string[];
|
|
41
|
+
label: string;
|
|
40
42
|
asterisk: string;
|
|
41
43
|
optionalTag: string;
|
|
42
44
|
descriptionsContainer: string;
|
|
@@ -59,6 +61,7 @@ export declare const checkbox: import('tailwind-variants').TVReturnType<{
|
|
|
59
61
|
}, {
|
|
60
62
|
base: string[];
|
|
61
63
|
wrapper: string[];
|
|
64
|
+
label: string;
|
|
62
65
|
asterisk: string;
|
|
63
66
|
optionalTag: string;
|
|
64
67
|
descriptionsContainer: string;
|
|
@@ -11,14 +11,15 @@ const r = e({
|
|
|
11
11
|
"uy:has-data-[readonly=true]:border-border-neutral-disabled"
|
|
12
12
|
],
|
|
13
13
|
wrapper: [
|
|
14
|
-
"uy:sm:rounded-25 uy:leading-none uy:sm:leading-[1lh]",
|
|
15
|
-
"uy:inline-flex uy:items-start
|
|
14
|
+
"uy:group uy:sm:rounded-25 uy:leading-none uy:sm:leading-[1lh]",
|
|
15
|
+
"uy:inline-flex uy:items-start",
|
|
16
16
|
"uy:typography-body uy:text-content-form-enabled",
|
|
17
17
|
"uy:data-[disabled=true]:text-content-form-disabled uy:data-[disabled]:cursor-not-allowed",
|
|
18
|
-
"uy:data-[readonly=true]:cursor-not-allowed"
|
|
18
|
+
"uy:data-[readonly=true]:cursor-not-allowed uy:theme-rebrand:data-[readonly=true]:text-content-form-read-only"
|
|
19
19
|
],
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
label: "uy:ml-75",
|
|
21
|
+
asterisk: "uy:text-content-danger uy:ml-25",
|
|
22
|
+
optionalTag: "uy:typography-body uy:leading-1 uy:ml-25",
|
|
22
23
|
descriptionsContainer: "uy:ml-300 uy:leading-1 uy:inline-flex uy:flex-col",
|
|
23
24
|
helperText: [
|
|
24
25
|
"uy:block uy:typography-body-small uy:text-content-neutral-low uy:mt-50"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { uyTv as u } from "@payfit/unity-themes";
|
|
3
|
-
const
|
|
3
|
+
const n = u({
|
|
4
4
|
slots: {
|
|
5
5
|
base: [
|
|
6
6
|
"uy:flex uy:items-center uy:justify-center uy:rounded-50 uy:m-25 uy:w-200 uy:h-200 uy:text-content-inverted uy:border uy:border-solid uy:transition-all uy:duration-100"
|
|
@@ -11,9 +11,7 @@ const c = u({
|
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
13
|
isSelected: {
|
|
14
|
-
true:
|
|
15
|
-
base: "uy:border-border-form-selected uy:bg-surface-form-active uy:hover:border-border-form-active"
|
|
16
|
-
}
|
|
14
|
+
true: ""
|
|
17
15
|
},
|
|
18
16
|
isDisabled: {
|
|
19
17
|
true: ""
|
|
@@ -38,7 +36,20 @@ const c = u({
|
|
|
38
36
|
isInvalid: !1,
|
|
39
37
|
isReadOnly: !1,
|
|
40
38
|
className: {
|
|
41
|
-
base: "uy:border-border-form-enabled uy:bg-surface-form-enabled"
|
|
39
|
+
base: "uy:border-border-form-enabled uy:group-data-[focus-visible=true]:border-border-form-focus uy:bg-surface-form-enabled"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
isSelected: !0,
|
|
44
|
+
isDisabled: !1,
|
|
45
|
+
isInvalid: !1,
|
|
46
|
+
isReadOnly: !1,
|
|
47
|
+
className: {
|
|
48
|
+
base: [
|
|
49
|
+
"uy:bg-surface-form-active",
|
|
50
|
+
"uy:theme-legacy:border-border-form-selected uy:theme-legacy:hover:border-border-form-active",
|
|
51
|
+
"uy:theme-rebrand:border-transparent uy:theme-rebrand:hover:border-transparent"
|
|
52
|
+
]
|
|
42
53
|
}
|
|
43
54
|
},
|
|
44
55
|
{
|
|
@@ -53,7 +64,7 @@ const c = u({
|
|
|
53
64
|
isSelected: !0,
|
|
54
65
|
isDisabled: !0,
|
|
55
66
|
className: {
|
|
56
|
-
base: "uy:bg-surface-form-disabled! uy:border-border-form-disabled",
|
|
67
|
+
base: "uy:bg-surface-form-disabled! uy:border-border-form-disabled!",
|
|
57
68
|
checkmark: "uy:text-border-form-disabled"
|
|
58
69
|
}
|
|
59
70
|
},
|
|
@@ -67,9 +78,15 @@ const c = u({
|
|
|
67
78
|
},
|
|
68
79
|
{
|
|
69
80
|
isSelected: !0,
|
|
81
|
+
isDisabled: !1,
|
|
70
82
|
isInvalid: !0,
|
|
83
|
+
isReadOnly: !1,
|
|
71
84
|
className: {
|
|
72
|
-
base:
|
|
85
|
+
base: [
|
|
86
|
+
"uy:bg-surface-danger!",
|
|
87
|
+
"uy:theme-legacy:border-border-form-error!",
|
|
88
|
+
"uy:theme-rebrand:border-transparent!"
|
|
89
|
+
],
|
|
73
90
|
checkmark: "uy:text-content-inverted"
|
|
74
91
|
}
|
|
75
92
|
},
|
|
@@ -91,28 +108,28 @@ const c = u({
|
|
|
91
108
|
}
|
|
92
109
|
]
|
|
93
110
|
});
|
|
94
|
-
function
|
|
111
|
+
function c({
|
|
95
112
|
isSelected: r,
|
|
96
113
|
isDisabled: s,
|
|
97
114
|
isIndeterminate: a,
|
|
98
115
|
isInvalid: t,
|
|
99
|
-
isReadOnly:
|
|
100
|
-
className:
|
|
116
|
+
isReadOnly: d,
|
|
117
|
+
className: o
|
|
101
118
|
}) {
|
|
102
|
-
const { base:
|
|
119
|
+
const { base: l, checkmark: i } = n({
|
|
103
120
|
isSelected: r || a,
|
|
104
121
|
isDisabled: s,
|
|
105
122
|
isInvalid: t,
|
|
106
|
-
isReadOnly:
|
|
123
|
+
isReadOnly: d
|
|
107
124
|
});
|
|
108
|
-
return /* @__PURE__ */ e("div", { className:
|
|
125
|
+
return /* @__PURE__ */ e("div", { className: l({ className: o }), "data-dd-privacy": "mask", children: /* @__PURE__ */ e(
|
|
109
126
|
"svg",
|
|
110
127
|
{
|
|
111
128
|
fill: "none",
|
|
112
129
|
stroke: "currentColor",
|
|
113
130
|
viewBox: "0 0 16 16",
|
|
114
131
|
"aria-hidden": "true",
|
|
115
|
-
className:
|
|
132
|
+
className: i(),
|
|
116
133
|
style: {
|
|
117
134
|
strokeDashoffset: r ? 44 : 66
|
|
118
135
|
},
|
|
@@ -140,7 +157,7 @@ function n({
|
|
|
140
157
|
}
|
|
141
158
|
) });
|
|
142
159
|
}
|
|
143
|
-
|
|
160
|
+
c.displayName = "CheckboxIndicator";
|
|
144
161
|
export {
|
|
145
|
-
|
|
162
|
+
c as CheckboxIndicator
|
|
146
163
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.11",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@hookform/devtools": "4.4.0",
|
|
43
43
|
"@hookform/resolvers": "5.2.1",
|
|
44
44
|
"@internationalized/date": "3.12.1",
|
|
45
|
-
"@payfit/unity-illustrations": "2.29.
|
|
45
|
+
"@payfit/unity-illustrations": "2.29.11",
|
|
46
46
|
"@radix-ui/react-avatar": "1.1.11",
|
|
47
47
|
"@radix-ui/react-slot": "1.2.4",
|
|
48
48
|
"@react-aria/interactions": "3.28.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@hookform/devtools": "^4",
|
|
77
|
-
"@payfit/unity-icons": "2.29.
|
|
78
|
-
"@payfit/unity-themes": "2.29.
|
|
77
|
+
"@payfit/unity-icons": "2.29.11",
|
|
78
|
+
"@payfit/unity-themes": "2.29.11",
|
|
79
79
|
"@storybook/react-vite": "^10.3.2",
|
|
80
80
|
"@tanstack/react-query": "^5",
|
|
81
81
|
"@tanstack/react-router": "^1.131",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@figma/code-connect": "1.4.3",
|
|
90
90
|
"@hookform/devtools": "4.4.0",
|
|
91
91
|
"@internationalized/date": "3.12.1",
|
|
92
|
-
"@payfit/unity-icons": "2.29.
|
|
93
|
-
"@payfit/unity-illustrations": "2.29.
|
|
94
|
-
"@payfit/unity-themes": "2.29.
|
|
92
|
+
"@payfit/unity-icons": "2.29.11",
|
|
93
|
+
"@payfit/unity-illustrations": "2.29.11",
|
|
94
|
+
"@payfit/unity-themes": "2.29.11",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|