@payfit/unity-components 2.29.1 → 2.29.3
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.
|
@@ -3,7 +3,7 @@ import { AriaAttributes } from 'react';
|
|
|
3
3
|
declare const pill: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
variant: {
|
|
5
5
|
critical: string;
|
|
6
|
-
info: string;
|
|
6
|
+
info: string[];
|
|
7
7
|
neutral: string;
|
|
8
8
|
};
|
|
9
9
|
shape: {
|
|
@@ -17,7 +17,7 @@ declare const pill: import('tailwind-variants').TVReturnType<{
|
|
|
17
17
|
}, undefined, "uy:min-w-200 uy:h-200 uy:max-w-400 uy:inline-flex uy:items-center uy:justify-center uy:text-center uy:typography-body-small-strong", {
|
|
18
18
|
variant: {
|
|
19
19
|
critical: string;
|
|
20
|
-
info: string;
|
|
20
|
+
info: string[];
|
|
21
21
|
neutral: string;
|
|
22
22
|
};
|
|
23
23
|
shape: {
|
|
@@ -31,7 +31,7 @@ declare const pill: import('tailwind-variants').TVReturnType<{
|
|
|
31
31
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
32
32
|
variant: {
|
|
33
33
|
critical: string;
|
|
34
|
-
info: string;
|
|
34
|
+
info: string[];
|
|
35
35
|
neutral: string;
|
|
36
36
|
};
|
|
37
37
|
shape: {
|
|
@@ -6,7 +6,12 @@ const y = o({
|
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
critical: "uy:bg-surface-danger uy:text-content-inverted",
|
|
9
|
-
info:
|
|
9
|
+
info: [
|
|
10
|
+
//legacy
|
|
11
|
+
"uy:theme-legacy:bg-surface-primary uy:theme-legacy:text-content-inverted",
|
|
12
|
+
//rebrand
|
|
13
|
+
"uy:theme-rebrand:bg-surface-info uy:theme-rebrand:text-content-info-high"
|
|
14
|
+
],
|
|
10
15
|
neutral: "uy:bg-surface-neutral-lowest uy:text-content-neutral"
|
|
11
16
|
},
|
|
12
17
|
shape: {
|
|
@@ -23,15 +28,15 @@ const y = o({
|
|
|
23
28
|
shape: "pill",
|
|
24
29
|
isVisible: !0
|
|
25
30
|
}
|
|
26
|
-
}), p = (
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
({ variant:
|
|
31
|
-
const
|
|
32
|
-
variant:
|
|
31
|
+
}), p = (e, r) => {
|
|
32
|
+
const t = 10 ** r - 1;
|
|
33
|
+
return e > t ? `${t}+` : e.toString();
|
|
34
|
+
}, m = c(
|
|
35
|
+
({ variant: e = "critical", isVisible: r = !0, maxDigits: t = 2, value: i, ...l }, n) => {
|
|
36
|
+
const a = p(Math.abs(i), t), u = y({
|
|
37
|
+
variant: e,
|
|
33
38
|
isVisible: r,
|
|
34
|
-
shape:
|
|
39
|
+
shape: a.length === 1 ? "circle" : "pill"
|
|
35
40
|
});
|
|
36
41
|
return /* @__PURE__ */ s(
|
|
37
42
|
"span",
|
|
@@ -42,12 +47,12 @@ const y = o({
|
|
|
42
47
|
role: "status",
|
|
43
48
|
className: u,
|
|
44
49
|
"aria-atomic": "true",
|
|
45
|
-
children:
|
|
50
|
+
children: a
|
|
46
51
|
}
|
|
47
52
|
);
|
|
48
53
|
}
|
|
49
54
|
);
|
|
50
|
-
|
|
55
|
+
m.displayName = "Pill";
|
|
51
56
|
export {
|
|
52
|
-
|
|
57
|
+
m as Pill
|
|
53
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.3",
|
|
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.3",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"embla-carousel": "9.0.0-rc02",
|
|
57
57
|
"embla-carousel-accessibility": "9.0.0-rc01",
|
|
58
58
|
"embla-carousel-react": "9.0.0-rc02",
|
|
59
|
-
"prettier": "3.
|
|
59
|
+
"prettier": "~3.6.2",
|
|
60
60
|
"react": "18.3.1",
|
|
61
61
|
"react-aria": "3.48.0",
|
|
62
62
|
"react-aria-components": "1.17.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.3",
|
|
78
|
+
"@payfit/unity-themes": "2.29.3",
|
|
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.3",
|
|
93
|
+
"@payfit/unity-illustrations": "2.29.3",
|
|
94
|
+
"@payfit/unity-themes": "2.29.3",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"msw": "2.8.4",
|
|
118
118
|
"msw-storybook-addon": "^2.0.6",
|
|
119
119
|
"playwright": "1.55.1",
|
|
120
|
-
"prettier": "3.
|
|
120
|
+
"prettier": "~3.6.2",
|
|
121
121
|
"react-docgen-typescript": "2.2.2",
|
|
122
122
|
"react-hot-toast": "2.5.1",
|
|
123
123
|
"storybook": "10.3.5",
|