@payfit/unity-components 2.29.0 → 2.29.2

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.
@@ -6,7 +6,7 @@ declare const badge: import('tailwind-variants').TVReturnType<{
6
6
  warning: string;
7
7
  danger: string;
8
8
  neutral: string;
9
- promo: string;
9
+ promo: string[];
10
10
  attention: string;
11
11
  numeric: string;
12
12
  contextual: string;
@@ -17,7 +17,7 @@ declare const badge: import('tailwind-variants').TVReturnType<{
17
17
  warning: string;
18
18
  danger: string;
19
19
  neutral: string;
20
- promo: string;
20
+ promo: string[];
21
21
  attention: string;
22
22
  numeric: string;
23
23
  contextual: string;
@@ -28,7 +28,7 @@ declare const badge: import('tailwind-variants').TVReturnType<{
28
28
  warning: string;
29
29
  danger: string;
30
30
  neutral: string;
31
- promo: string;
31
+ promo: string[];
32
32
  attention: string;
33
33
  numeric: string;
34
34
  contextual: string;
@@ -10,7 +10,10 @@ const g = y({
10
10
  warning: "uy:bg-surface-warning-low uy:text-content-warning-high",
11
11
  danger: "uy:bg-surface-danger-low uy:text-content-danger-high",
12
12
  neutral: "uy:bg-surface-neutral-lowest uy:text-content-neutral",
13
- promo: "uy:bg-surface-promo-low uy:text-content-promo-high",
13
+ promo: [
14
+ "uy:theme-legacy:bg-surface-promo-low uy:theme-legacy:text-content-promo-high",
15
+ "uy:theme-rebrand:bg-surface-decorative-purple-low uy:theme-rebrand:text-content-decorative-purple-high"
16
+ ],
14
17
  attention: "uy:bg-surface-danger uy:text-content-inverted",
15
18
  numeric: "uy:bg-surface-info-low uy:text-content-info-high",
16
19
  contextual: "uy:bg-surface-neutral uy:border uy:border-solid uy:border-border-neutral uy:text-content-neutral"
@@ -28,30 +31,30 @@ const g = y({
28
31
  attention: "alert",
29
32
  contextual: "status",
30
33
  numeric: "status"
31
- }, f = l(
34
+ }, p = l(
32
35
  ({
33
- className: e,
34
- variant: t = "neutral",
35
- role: n,
36
+ className: t,
37
+ variant: e = "neutral",
38
+ role: r,
36
39
  asChild: a = !1,
37
- children: r,
40
+ children: n,
38
41
  ...u
39
42
  }, o) => {
40
- const s = n ?? d[t] ?? "status";
43
+ const s = r ?? d[e] ?? "status";
41
44
  return /* @__PURE__ */ c(
42
45
  a ? i : "span",
43
46
  {
44
47
  "data-dd-privacy": "allow",
45
48
  ref: o,
46
- className: g({ variant: t, className: e }),
49
+ className: g({ variant: e, className: t }),
47
50
  role: s,
48
51
  ...u,
49
- children: r
52
+ children: n
50
53
  }
51
54
  );
52
55
  }
53
56
  );
54
- f.displayName = "Badge";
57
+ p.displayName = "Badge";
55
58
  export {
56
- f as Badge
59
+ p as Badge
57
60
  };
@@ -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: "uy:bg-surface-primary uy:text-content-inverted",
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 = (t, r) => {
27
- const e = 10 ** r - 1;
28
- return t > e ? `${e}+` : t.toString();
29
- }, d = c(
30
- ({ variant: t = "critical", isVisible: r = !0, maxDigits: e = 2, value: a, ...l }, n) => {
31
- const i = p(Math.abs(a), e), u = y({
32
- variant: t,
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: i.length === 1 ? "circle" : "pill"
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: i
50
+ children: a
46
51
  }
47
52
  );
48
53
  }
49
54
  );
50
- d.displayName = "Pill";
55
+ m.displayName = "Pill";
51
56
  export {
52
- d as Pill
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.0",
3
+ "version": "2.29.2",
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.0",
45
+ "@payfit/unity-illustrations": "2.29.2",
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.1.0",
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.0",
78
- "@payfit/unity-themes": "2.29.0",
77
+ "@payfit/unity-icons": "2.29.2",
78
+ "@payfit/unity-themes": "2.29.2",
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.0",
93
- "@payfit/unity-illustrations": "2.29.0",
94
- "@payfit/unity-themes": "2.29.0",
92
+ "@payfit/unity-icons": "2.29.2",
93
+ "@payfit/unity-illustrations": "2.29.2",
94
+ "@payfit/unity-themes": "2.29.2",
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.1.0",
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",