@payfit/unity-components 2.28.4 → 2.29.0
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.
|
@@ -7,11 +7,11 @@ declare const avatarPlaceholder: import('tailwind-variants').TVReturnType<{
|
|
|
7
7
|
background: string;
|
|
8
8
|
foreground: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
yellow: {
|
|
11
11
|
background: string;
|
|
12
12
|
foreground: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
purple: {
|
|
15
15
|
background: string;
|
|
16
16
|
foreground: string;
|
|
17
17
|
};
|
|
@@ -133,7 +133,7 @@ type AvatarFallbackPlaceholderProps = AvatarFallbackBaseProps & {
|
|
|
133
133
|
/** The variant of the fallback, should be 'placeholder' */
|
|
134
134
|
variant: 'placeholder';
|
|
135
135
|
/**
|
|
136
|
-
* The color variant for the placeholder. Can be one of: `blue`, `
|
|
136
|
+
* The color variant for the placeholder. Can be one of: `blue`, `purple`, `yellow`. Only available when variant is set to `placeholder`
|
|
137
137
|
* @default 'blue'
|
|
138
138
|
*/
|
|
139
139
|
color?: VariantProps<typeof avatarPlaceholder>['color'];
|
|
@@ -3,10 +3,10 @@ import * as m from "react";
|
|
|
3
3
|
import { uyTv as n, uyMerge as b } from "@payfit/unity-themes";
|
|
4
4
|
import * as e from "@radix-ui/react-avatar";
|
|
5
5
|
import { useAvatarContext as f } from "../Avatar.context.js";
|
|
6
|
-
import { avatarBase as
|
|
7
|
-
import { getInitials as
|
|
8
|
-
const
|
|
9
|
-
extend:
|
|
6
|
+
import { avatarBase as u } from "../Avatar.variants.js";
|
|
7
|
+
import { getInitials as v } from "../utils.js";
|
|
8
|
+
const h = n({
|
|
9
|
+
extend: u,
|
|
10
10
|
slots: {
|
|
11
11
|
base: "uy:absolute uy:overflow-hidden",
|
|
12
12
|
background: "",
|
|
@@ -15,21 +15,21 @@ const v = n({
|
|
|
15
15
|
variants: {
|
|
16
16
|
color: {
|
|
17
17
|
blue: {
|
|
18
|
-
background: "uy:bg-blue-
|
|
19
|
-
foreground: "uy:fill-blue-
|
|
18
|
+
background: "uy:bg-blue-l4",
|
|
19
|
+
foreground: "uy:fill-blue-l3"
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
background: "uy:bg-
|
|
23
|
-
foreground: "uy:fill-
|
|
21
|
+
yellow: {
|
|
22
|
+
background: "uy:bg-yellow-l4",
|
|
23
|
+
foreground: "uy:fill-yellow-l3"
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
background: "uy:bg-
|
|
27
|
-
foreground: "uy:fill-
|
|
25
|
+
purple: {
|
|
26
|
+
background: "uy:bg-purple-l4",
|
|
27
|
+
foreground: "uy:fill-purple-l3"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}), w = n({
|
|
32
|
-
extend:
|
|
32
|
+
extend: u,
|
|
33
33
|
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
34
|
variants: {
|
|
35
35
|
size: {
|
|
@@ -40,26 +40,26 @@ const v = n({
|
|
|
40
40
|
xl: "uy:typography-h2"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
}), x = m.forwardRef(({ variant:
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
const { base:
|
|
43
|
+
}), x = m.forwardRef(({ variant: s, color: i, children: y, ...r }, l) => {
|
|
44
|
+
const d = f(), { size: o, variant: t } = d;
|
|
45
|
+
if (s === "placeholder") {
|
|
46
|
+
const { base: c, background: p, foreground: g } = h({
|
|
47
47
|
color: i,
|
|
48
|
-
size:
|
|
49
|
-
variant:
|
|
48
|
+
size: o,
|
|
49
|
+
variant: t
|
|
50
50
|
});
|
|
51
|
-
return /* @__PURE__ */ a(e.Fallback, { ref:
|
|
51
|
+
return /* @__PURE__ */ a(e.Fallback, { ref: l, role: "presentation", ...r, children: /* @__PURE__ */ a(
|
|
52
52
|
"svg",
|
|
53
53
|
{
|
|
54
54
|
role: "img",
|
|
55
55
|
"aria-hidden": !0,
|
|
56
56
|
xmlns: "http://www.w3.org/2000/svg",
|
|
57
57
|
viewBox: "0 0 16 16",
|
|
58
|
-
className: b(
|
|
58
|
+
className: b(c(), p()),
|
|
59
59
|
children: /* @__PURE__ */ a(
|
|
60
60
|
"path",
|
|
61
61
|
{
|
|
62
|
-
className:
|
|
62
|
+
className: g(),
|
|
63
63
|
fillRule: "evenodd",
|
|
64
64
|
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
65
|
clipRule: "evenodd"
|
|
@@ -71,11 +71,11 @@ const v = n({
|
|
|
71
71
|
return /* @__PURE__ */ a(
|
|
72
72
|
e.Fallback,
|
|
73
73
|
{
|
|
74
|
-
ref:
|
|
74
|
+
ref: l,
|
|
75
75
|
role: "presentation",
|
|
76
|
-
className: w({ size:
|
|
76
|
+
className: w({ size: o, variant: t }),
|
|
77
77
|
...r,
|
|
78
|
-
children:
|
|
78
|
+
children: v(y)
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0",
|
|
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.
|
|
45
|
+
"@payfit/unity-illustrations": "2.29.0",
|
|
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.
|
|
78
|
-
"@payfit/unity-themes": "2.
|
|
77
|
+
"@payfit/unity-icons": "2.29.0",
|
|
78
|
+
"@payfit/unity-themes": "2.29.0",
|
|
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.
|
|
93
|
-
"@payfit/unity-illustrations": "2.
|
|
94
|
-
"@payfit/unity-themes": "2.
|
|
92
|
+
"@payfit/unity-icons": "2.29.0",
|
|
93
|
+
"@payfit/unity-illustrations": "2.29.0",
|
|
94
|
+
"@payfit/unity-themes": "2.29.0",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
"vite-plugin-node-polyfills": "0.24.0",
|
|
131
131
|
"vitest": "4.1.0",
|
|
132
132
|
"@payfit/code-pushup-tools": "0.0.0-use.local",
|
|
133
|
-
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
134
133
|
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
134
|
+
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
135
|
+
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
135
136
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
136
|
-
"@payfit/vite-configs": "0.0.0-use.local"
|
|
137
|
-
"@payfit/storybook-addon-console-errors": "0.0.0-use.local"
|
|
137
|
+
"@payfit/vite-configs": "0.0.0-use.local"
|
|
138
138
|
},
|
|
139
139
|
"peerDependenciesMeta": {
|
|
140
140
|
"@hookform/devtools": {
|