@payfit/unity-components 2.28.3 → 2.28.4

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.
@@ -28,10 +28,10 @@ export declare const link: import('tailwind-variants').TVReturnType<{
28
28
  };
29
29
  color: {
30
30
  primary: {
31
- base: string;
31
+ base: string[];
32
32
  };
33
33
  secondary: {
34
- base: string;
34
+ base: string[];
35
35
  };
36
36
  inherit: {
37
37
  base: string;
@@ -83,10 +83,10 @@ export declare const link: import('tailwind-variants').TVReturnType<{
83
83
  };
84
84
  color: {
85
85
  primary: {
86
- base: string;
86
+ base: string[];
87
87
  };
88
88
  secondary: {
89
- base: string;
89
+ base: string[];
90
90
  };
91
91
  inherit: {
92
92
  base: string;
@@ -138,10 +138,10 @@ export declare const link: import('tailwind-variants').TVReturnType<{
138
138
  };
139
139
  color: {
140
140
  primary: {
141
- base: string;
141
+ base: string[];
142
142
  };
143
143
  secondary: {
144
- base: string;
144
+ base: string[];
145
145
  };
146
146
  inherit: {
147
147
  base: string;
@@ -1,4 +1,4 @@
1
- import { jsxs as h, jsx as w } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as w } from "react/jsx-runtime";
2
2
  import { forwardRef as k } from "react";
3
3
  import { IconSprite as D } from "@payfit/unity-icons";
4
4
  import { uyTv as z } from "@payfit/unity-themes";
@@ -33,10 +33,20 @@ const N = z({
33
33
  },
34
34
  color: {
35
35
  primary: {
36
- base: "uy:text-content-primary-enabled uy:hover:text-content-primary-hover uy:active:text-content-primary-active uy:data-[pressed]:text-content-primary-active uy:data-[current]:text-content-primary-active uy:aria-[current]:text-content-primary-active"
36
+ base: [
37
+ //legacy theme
38
+ "uy:text-content-primary-enabled uy:hover:text-content-primary-hover uy:active:text-content-primary-active uy:data-[pressed]:text-content-primary-active uy:data-[current]:text-content-primary-active uy:aria-[current]:text-content-primary-active",
39
+ //rebrand theme
40
+ "uy:theme-rebrand:text-content-neutral-enabled uy:theme-rebrand:hover:text-content-neutral-hover uy:theme-rebrand:active:text-content-neutral-active uy:theme-rebrand:data-[pressed]:text-content-neutral-pressed uy:theme-rebrand:data-[current]:text-content-neutral-active uy:theme-rebrand:aria-[current]:text-content-neutral-active"
41
+ ]
37
42
  },
38
43
  secondary: {
39
- base: "uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover uy:active:text-content-neutral-active uy:data-[pressed]:text-content-neutral-pressed uy:data-[current]:text-content-neutral-active uy:aria-[current]:text-content-neutral-active"
44
+ base: [
45
+ //legacy
46
+ "uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover uy:active:text-content-neutral-active uy:data-[pressed]:text-content-neutral-pressed uy:data-[current]:text-content-neutral-active uy:aria-[current]:text-content-neutral-active",
47
+ //rebrand
48
+ "uy:theme-rebrand:text-content-neutral-lowest-enabled uy:theme-rebrand:hover:text-content-neutral-lowest-hover uy:theme-rebrand:active:text-content-neutral-lowest-active uy:theme-rebrand:data-[pressed]:text-content-neutral-lowest-pressed uy:theme-rebrand:data-[current]:text-content-neutral-lowest-active uy:theme-rebrand:aria-[current]:text-content-neutral-lowest-active"
49
+ ]
40
50
  },
41
51
  inherit: { base: "uy:text-(color:inherit)" }
42
52
  },
@@ -53,7 +63,14 @@ const N = z({
53
63
  {
54
64
  color: "primary",
55
65
  isDisabled: !0,
56
- class: { base: "uy:data-[disabled]:text-content-primary-disabled" }
66
+ class: {
67
+ base: [
68
+ // legacy
69
+ "uy:data-[disabled]:text-content-primary-disabled",
70
+ // rebrand
71
+ "uy:theme-rebrand:data-[disabled]:text-content-neutral-disabled"
72
+ ]
73
+ }
57
74
  },
58
75
  {
59
76
  color: "secondary",
@@ -85,49 +102,49 @@ const N = z({
85
102
  }
86
103
  }), R = k(
87
104
  ({
88
- href: r,
89
- children: u,
90
- variant: y = "inline",
91
- color: c = "primary",
105
+ href: a,
106
+ children: l,
107
+ variant: c = "inline",
108
+ color: y = "primary",
92
109
  isDisabled: s = !1,
93
110
  isExact: d = !1,
94
- isCurrent: p,
95
- isExternal: b,
96
- maxCharactersTruncation: i,
111
+ isCurrent: b,
112
+ isExternal: m,
113
+ maxCharactersTruncation: n,
97
114
  maxWidthTruncation: e,
98
- size: m = "inherit",
115
+ size: p = "inherit",
99
116
  ...t
100
117
  }, v) => {
101
- const n = E(), a = b ?? L(r), o = !a && n ? n.isActive(r.toString(), d) : p, { base: f, icon: x } = N({
102
- variant: y,
103
- color: c,
118
+ const i = E(), r = m ?? L(a), o = !r && i ? i.isActive(a.toString(), d) : b, { base: x, icon: h } = N({
119
+ variant: c,
120
+ color: y,
104
121
  isDisabled: s,
105
- size: m,
106
- isTruncated: !!i || !!e
107
- }), l = i !== void 0 ? `${i}ch` : e !== void 0 ? typeof e == "number" ? `${e}px` : e : void 0, g = n && {
122
+ size: p,
123
+ isTruncated: !!n || !!e
124
+ }), u = n !== void 0 ? `${n}ch` : e !== void 0 ? typeof e == "number" ? `${e}px` : e : void 0, f = i && {
108
125
  ...o !== void 0 && {
109
126
  "data-current": o,
110
127
  "aria-current": o ? "page" : void 0
111
128
  }
112
129
  };
113
- return /* @__PURE__ */ h(
130
+ return /* @__PURE__ */ g(
114
131
  A,
115
132
  {
116
133
  "data-dd-privacy": "allow",
117
134
  ...t,
118
- href: r,
135
+ href: a,
119
136
  ref: v,
120
- style: l ? {
121
- "--uy-link-max-w": l
137
+ style: u ? {
138
+ "--uy-link-max-w": u
122
139
  } : {},
123
- className: f(),
140
+ className: x(),
124
141
  isDisabled: s,
125
- target: a ? "_blank" : t.target,
126
- rel: a && !t.rel ? "noopener noreferrer" : t.rel,
127
- ...g,
142
+ target: r ? "_blank" : t.target,
143
+ rel: r && !t.rel ? "noopener noreferrer" : t.rel,
144
+ ...f,
128
145
  children: [
129
- u,
130
- a && /* @__PURE__ */ w(
146
+ l,
147
+ r && /* @__PURE__ */ w(
131
148
  D,
132
149
  {
133
150
  src: "ArrowSquareOutOutlined",
@@ -135,7 +152,7 @@ const N = z({
135
152
  width: "1.25em",
136
153
  height: "1.25em",
137
154
  role: "presentation",
138
- className: x()
155
+ className: h()
139
156
  }
140
157
  )
141
158
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.28.3",
3
+ "version": "2.28.4",
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.28.3",
45
+ "@payfit/unity-illustrations": "2.28.4",
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.28.3",
78
- "@payfit/unity-themes": "2.28.3",
77
+ "@payfit/unity-icons": "2.28.4",
78
+ "@payfit/unity-themes": "2.28.4",
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.28.3",
93
- "@payfit/unity-illustrations": "2.28.3",
94
- "@payfit/unity-themes": "2.28.3",
92
+ "@payfit/unity-icons": "2.28.4",
93
+ "@payfit/unity-illustrations": "2.28.4",
94
+ "@payfit/unity-themes": "2.28.4",
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-app-eslint": "0.0.0-use.local",
134
133
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
135
- "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
134
+ "@payfit/hr-app-eslint": "0.0.0-use.local",
136
135
  "@payfit/storybook-config": "0.0.0-use.local",
137
- "@payfit/vite-configs": "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"
138
138
  },
139
139
  "peerDependenciesMeta": {
140
140
  "@hookform/devtools": {