@payfit/unity-components 2.29.10 → 2.29.12

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.
@@ -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
- teal: string;
62
- plum: string;
63
- purple: string;
64
- orange: string;
65
- neutral: string;
66
- warning: string;
67
- success: string;
68
- info: string;
69
- danger: string;
70
- promo: string;
71
- primary: string;
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
- teal: string;
112
- plum: string;
113
- purple: string;
114
- orange: string;
115
- neutral: string;
116
- warning: string;
117
- success: string;
118
- info: string;
119
- danger: string;
120
- promo: string;
121
- primary: string;
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
- }, undefined, undefined, unknown, unknown, undefined>>>;
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 a } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { uyTv as n, uyMerge as b } from "@payfit/unity-themes";
4
- import * as e from "@radix-ui/react-avatar";
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 u } from "../Avatar.variants.js";
6
+ import { avatarBase as i } from "../Avatar.variants.js";
7
7
  import { getInitials as v } from "../utils.js";
8
- const h = n({
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
- }), w = n({
32
- extend: u,
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
- }), x = m.forwardRef(({ variant: s, color: i, children: y, ...r }, l) => {
42
+ }), k = b.forwardRef(({ variant: c, color: g, children: m, ...a }, r) => {
44
43
  const d = f(), { size: o, variant: t } = d;
45
- if (s === "placeholder") {
46
- const { base: c, background: p, foreground: g } = h({
47
- color: i,
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__ */ a(e.Fallback, { ref: l, role: "presentation", ...r, children: /* @__PURE__ */ a(
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: b(c(), p()),
59
- children: /* @__PURE__ */ a(
55
+ className: h(p, n(), u()),
56
+ children: /* @__PURE__ */ e(
60
57
  "path",
61
58
  {
62
- className: g(),
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__ */ a(
72
- e.Fallback,
68
+ return /* @__PURE__ */ e(
69
+ l.Fallback,
73
70
  {
74
- ref: l,
71
+ ref: r,
75
72
  role: "presentation",
76
- className: w({ size: o, variant: t }),
77
- ...r,
78
- children: v(y)
73
+ className: x({ size: o, variant: t }),
74
+ ...a,
75
+ children: v(m)
79
76
  }
80
77
  );
81
78
  });
82
- x.displayName = e.Fallback.displayName;
79
+ k.displayName = l.Fallback.displayName;
83
80
  export {
84
- x as AvatarFallback
81
+ k as AvatarFallback
85
82
  };
@@ -1,97 +1,106 @@
1
- import { jsxs as l, jsx as a, Fragment as j } from "react/jsx-runtime";
2
- import { forwardRef as B, isValidElement as h, cloneElement as f } from "react";
3
- import { Checkbox as R } from "react-aria-components/Checkbox";
4
- import { useId as D } from "react-aria/useId";
5
- import { Text as u } from "../text/Text.js";
6
- import { checkbox as E } from "./Checkbox.variants.js";
7
- import { CheckboxIndicator as V } from "./parts/CheckboxIndicator.js";
8
- const F = B(
9
- ({ children: v, helperText: i, feedbackText: r, ...o }, N) => {
10
- const e = D(), {
11
- isDisabled: s,
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: t,
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
- asterisk: k,
21
- optionalTag: C,
22
- descriptionsContainer: q,
20
+ label: k,
21
+ asterisk: C,
22
+ optionalTag: q,
23
+ descriptionsContainer: w,
23
24
  helperText: m,
24
25
  feedbackText: b
25
- } = E({
26
- isDisabled: s,
26
+ } = V({
27
+ isDisabled: t,
27
28
  isReadOnly: d,
28
- isInvalid: t
29
- }), y = [o["aria-labelledby"], `${e}-label`].filter(Boolean), p = [
29
+ isInvalid: s
30
+ }), y = [o["aria-labelledby"], `${a}-label`].filter(Boolean), p = [
30
31
  o["aria-describedby"],
31
- typeof i == "string" ? `${e}-helper-text` : void 0,
32
- typeof r == "string" ? `${e}-feedback-text` : void 0
33
- ].filter(Boolean), w = y.length > 0 ? y.join(" ") : void 0, I = p.length > 0 ? p.join(" ") : void 0;
34
- return /* @__PURE__ */ l("div", { className: g(), children: [
35
- /* @__PURE__ */ a(
36
- R,
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: t,
40
- ref: N,
40
+ isInvalid: s,
41
+ ref: v,
41
42
  className: $(),
42
- "aria-labelledby": w,
43
- "aria-describedby": I,
44
- isDisabled: s,
43
+ "aria-labelledby": I,
44
+ "aria-describedby": S,
45
+ isDisabled: t,
45
46
  isReadOnly: d,
46
- children: (S) => /* @__PURE__ */ l(j, { children: [
47
- /* @__PURE__ */ a(
48
- V,
47
+ children: (j) => /* @__PURE__ */ r(B, { children: [
48
+ /* @__PURE__ */ e(
49
+ F,
49
50
  {
50
- ...S,
51
+ ...j,
51
52
  className: "uy:mt-50 uy:sm:mt-25 uy:ml-0"
52
53
  }
53
54
  ),
54
- /* @__PURE__ */ a("span", { id: `${e}-label`, "data-dd-privacy": "allow", children: v }),
55
- c === "required" && n && /* @__PURE__ */ l("span", { className: k(), children: [
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__ */ a("span", { className: "uy:sr-only", children: "required" })
66
+ /* @__PURE__ */ e("span", { className: "uy:sr-only", children: "required" })
58
67
  ] }),
59
- c === "optional" && !n && /* @__PURE__ */ a("span", { className: C(), children: "(optional)" })
68
+ c === "optional" && !n && /* @__PURE__ */ e("span", { className: q(), children: "(optional)" })
60
69
  ] })
61
70
  }
62
71
  ),
63
- (i || r) && /* @__PURE__ */ l("div", { className: q(), "data-dd-privacy": "allow", children: [
64
- typeof i == "string" ? /* @__PURE__ */ a(
65
- u,
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: `${e}-helper-text`,
78
+ id: `${a}-helper-text`,
70
79
  className: m(),
71
80
  children: i
72
81
  }
73
82
  ) : h(i) && f(i, {
74
- "data-id": `${e}-helper-text`,
83
+ "data-id": `${a}-helper-text`,
75
84
  className: m()
76
85
  }),
77
- t && (typeof r == "string" ? /* @__PURE__ */ a(
78
- u,
86
+ s && (typeof l == "string" ? /* @__PURE__ */ e(
87
+ N,
79
88
  {
80
89
  variant: "bodySmallStrong",
81
90
  color: "content.form.invalid",
82
- id: `${e}-feedback-text`,
91
+ id: `${a}-feedback-text`,
83
92
  className: b(),
84
- children: r
93
+ children: l
85
94
  }
86
- ) : h(r) && f(r, {
87
- "data-id": `${e}-feedback-text`,
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
- F.displayName = "Checkbox";
103
+ L.displayName = "Checkbox";
95
104
  export {
96
- F as Checkbox
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 uy:gap-75",
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
- asterisk: "uy:text-content-danger",
21
- optionalTag: "uy:typography-body uy:leading-1",
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 c = u({
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: "uy:border-border-form-error! uy:bg-surface-danger!",
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 n({
111
+ function c({
95
112
  isSelected: r,
96
113
  isDisabled: s,
97
114
  isIndeterminate: a,
98
115
  isInvalid: t,
99
- isReadOnly: o,
100
- className: d
116
+ isReadOnly: d,
117
+ className: o
101
118
  }) {
102
- const { base: i, checkmark: l } = c({
119
+ const { base: l, checkmark: i } = n({
103
120
  isSelected: r || a,
104
121
  isDisabled: s,
105
122
  isInvalid: t,
106
- isReadOnly: o
123
+ isReadOnly: d
107
124
  });
108
- return /* @__PURE__ */ e("div", { className: i({ className: d }), "data-dd-privacy": "mask", children: /* @__PURE__ */ e(
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: l(),
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
- n.displayName = "CheckboxIndicator";
160
+ c.displayName = "CheckboxIndicator";
144
161
  export {
145
- n as CheckboxIndicator
162
+ c as CheckboxIndicator
146
163
  };
@@ -1,20 +1,21 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as l } from "react";
3
- import { Text as m } from "../../text/Text.js";
4
- import { useFieldA11yContext as n } from "../TanstackFormField.context.js";
5
- const d = l(({ children: e, ...t }, r) => {
6
- const o = n();
7
- return /* @__PURE__ */ a(
8
- m,
3
+ import { Text as n } from "../../text/Text.js";
4
+ import { useFieldA11yContext as m } from "../TanstackFormField.context.js";
5
+ const d = l(({ children: e, ...t }, a) => {
6
+ const r = m();
7
+ return /* @__PURE__ */ o(
8
+ n,
9
9
  {
10
10
  "data-dd-privacy": "allow",
11
11
  ...t,
12
- id: o.helperTextId || t.id,
12
+ id: r.helperTextId || t.id,
13
13
  "data-unity-slot": "form-field-helper-text",
14
14
  variant: "bodySmall",
15
15
  asElement: "span",
16
16
  color: "content.neutral.low",
17
- ref: r,
17
+ className: "uy:[&>a]:text-content-neutral-enabled",
18
+ ref: a,
18
19
  children: e
19
20
  }
20
21
  );
@@ -1,45 +1,46 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as e } from "react";
3
- import { Button as s } from "react-aria-components/Button";
4
- import { RawLink as m } from "../../link/RawLink.js";
5
- import { useFieldA11yContext as c } from "../TanstackFormField.context.js";
6
- const u = e((t, a) => {
7
- const { children: o, href: n, onPress: d, ...i } = t, r = c();
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as s } from "react";
3
+ import { useUnityTheme as c } from "@payfit/unity-themes";
4
+ import { Button as u } from "react-aria-components/Button";
5
+ import { RawLink as y } from "../../link/RawLink.js";
6
+ import { useFieldA11yContext as f } from "../TanstackFormField.context.js";
7
+ const k = s((t, a) => {
8
+ const { children: o, href: n, onPress: l, ...r } = t, i = f(), { theme: d } = c(), m = d === "rebrand" ? "primary" : "secondary";
8
9
  return n ? (
9
10
  // @ts-expect-error - it's okay in this case
10
- /* @__PURE__ */ l(
11
- m,
11
+ /* @__PURE__ */ e(
12
+ y,
12
13
  {
13
- id: r.contextualLinkId || t.id,
14
+ id: i.contextualLinkId || t.id,
14
15
  size: "small",
15
- color: "secondary",
16
+ color: m,
16
17
  variant: "standalone",
17
18
  "data-unity-slot": "form-field-contextual-link",
18
19
  href: n,
19
20
  ref: a,
20
21
  "data-dd-privacy": "allow",
21
- ...i,
22
+ ...r,
22
23
  children: o
23
24
  }
24
25
  )
25
26
  ) : (
26
27
  // @ts-expect-error - it's okay in this case
27
- /* @__PURE__ */ l(
28
- s,
28
+ /* @__PURE__ */ e(
29
+ u,
29
30
  {
30
- id: r.contextualLinkId || t.id,
31
- onPress: d,
31
+ id: i.contextualLinkId || t.id,
32
+ onPress: l,
32
33
  "data-unity-slot": "contextual-link",
33
34
  className: "uy:typography-body-small uy:w-fit",
34
35
  ref: a,
35
36
  "data-dd-privacy": "allow",
36
- ...i,
37
+ ...r,
37
38
  children: o
38
39
  }
39
40
  )
40
41
  );
41
42
  });
42
- u.displayName = "TanstackRawFormContextualLink";
43
+ k.displayName = "TanstackRawFormContextualLink";
43
44
  export {
44
- u as TanstackRawFormContextualLink
45
+ k as TanstackRawFormContextualLink
45
46
  };
@@ -9,11 +9,11 @@ import { Spinner as C } from "../spinner/Spinner.js";
9
9
  const O = h({
10
10
  slots: {
11
11
  base: "uy:flex uy:h-5.5 uy:sm:h-500 uy:border uy:border-solid uy:rounded-100 uy:sm:rounded-75 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:border-border-form-active",
12
- prefix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-r uy:border-solid uy:rounded-l-100 uy:sm:rounded-l-75 uy:active:border-border-form-active",
12
+ prefix: "uy:flex-grow-0 uy:text-content-form-enabled uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-r uy:border-solid uy:rounded-l-100 uy:sm:rounded-l-75 uy:active:border-border-form-active",
13
13
  inputWrapper: "uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:py-125 uy:sm:py-100 uy:px-150 uy:rounded-100 uy:sm:rounded-75 uy:max-w-full uy:justify-between",
14
14
  input: "uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:min-w-0 uy:max-w-full",
15
15
  state: "uy:flex uy:gap-50 uy:items-center uy:shrink-0",
16
- suffix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-l uy:border-solid uy:rounded-r-100 uy:sm:rounded-r-75 uy:active:border-border-form-active"
16
+ suffix: "uy:flex-grow-0 uy:text-content-form-enabled uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-l uy:border-solid uy:rounded-r-100 uy:sm:rounded-r-75 uy:active:border-border-form-active"
17
17
  },
18
18
  variants: {
19
19
  isInvalid: {
@@ -8,7 +8,7 @@ import { mergeProps as N } from "react-aria/mergeProps";
8
8
  import { useIntl as q } from "react-intl";
9
9
  const x = b({
10
10
  slots: {
11
- base: "uy:typography-body-strong uy:text-content-form-enabled uy:leading-[1lh]",
11
+ base: "uy:typography-body-strong uy:text-content-neutral-enabled uy:leading-[1lh]",
12
12
  asterisk: "uy:text-content-danger uy:inline-block uy:ml-25",
13
13
  optionalTag: "uy:typography-body uy:inline-block uy:ml-25"
14
14
  },
@@ -1,11 +1,11 @@
1
1
  import { jsxs as g, jsx as w } from "react/jsx-runtime";
2
2
  import { forwardRef as k } from "react";
3
- import { IconSprite as D } from "@payfit/unity-icons";
4
- import { uyTv as z } from "@payfit/unity-themes";
3
+ import { IconSprite as z } from "@payfit/unity-icons";
4
+ import { uyTv as D } from "@payfit/unity-themes";
5
5
  import { Link as A } from "react-aria-components/Link";
6
6
  import { useRouter as E } from "../../providers/router/RouterProvider.js";
7
7
  import { isExternalUrl as L } from "./utils.js";
8
- const N = z({
8
+ const N = D({
9
9
  slots: {
10
10
  base: [
11
11
  "uy:rounded-50 uy:underline uy:transition-colors uy:underline-offset-3",
@@ -18,11 +18,11 @@ const N = z({
18
18
  variant: {
19
19
  inline: {
20
20
  base: "uy:inline uy:text-(length:inherit) uy:font-medium uy:leading-inherit",
21
- icon: "uy:align-top"
21
+ icon: "uy:align-text-top uy:w-[0.95em] uy:h-[1.2em]"
22
22
  },
23
23
  standalone: {
24
24
  base: "uy:typography-action uy:flex uy:gap-x-25 uy:items-end uy:py-50 uy:sm:p-0",
25
- icon: "uy:self-center"
25
+ icon: "uy:self-center uy:size-[1.1em]"
26
26
  }
27
27
  },
28
28
  size: {
@@ -145,12 +145,10 @@ const N = z({
145
145
  children: [
146
146
  l,
147
147
  r && /* @__PURE__ */ w(
148
- D,
148
+ z,
149
149
  {
150
150
  src: "ArrowSquareOutOutlined",
151
151
  color: "currentColor",
152
- width: "1.25em",
153
- height: "1.25em",
154
152
  role: "presentation",
155
153
  className: h()
156
154
  }
@@ -1,4 +1,4 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import { memo as D, forwardRef as k, useContext as A, useMemo as K } from "react";
3
3
  import { useSelectContext as R, useStoreState as $, Select as L } from "@ariakit/react";
4
4
  import { uyTv as P } from "@payfit/unity-themes";
@@ -14,7 +14,7 @@ const H = P({
14
14
  base: "uy:h-5.5 uy:sm:h-500 uy:flex uy:items-center uy:justify-between uy:py-125 uy:sm:py-100 uy:px-150 uy:w-full uy:border uy:border-solid uy:rounded-100 uy:sm:rounded-75 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:not([disabled]):border-border-form-active uy:pointer-events-auto!",
15
15
  inputValue: "uy:flex-1 uy:typography-body uy:text-left uy:line-clamp-1",
16
16
  state: "uy:grow-0 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:inline-flex uy:gap-50 uy:items-center uy:px-100",
17
- suffix: "uy:text-content-neutral-low"
17
+ suffix: "uy:text-content-neutral-lowest"
18
18
  },
19
19
  variants: {
20
20
  isDisabled: {
@@ -37,8 +37,8 @@ const H = P({
37
37
  true: {
38
38
  base: "uy:bg-surface-form-error uy:border-border-form-error",
39
39
  inputValue: "uy:text-content-form-error",
40
- state: "uy:text-content-form-error",
41
- suffix: "uy:text-content-form-error"
40
+ state: "uy:text-content-form-error"
41
+ // suffix: 'uy:text-content-form-error',
42
42
  }
43
43
  },
44
44
  isEmpty: {
@@ -58,8 +58,7 @@ const H = P({
58
58
  className: {
59
59
  base: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
60
60
  inputValue: "uy:text-content-form-enabled uy:bg-surface-form-enabled",
61
- state: "uy:text-content-neutral-disabled",
62
- suffix: "uy:border-border-form-enabled uy:text-content-form-enabled"
61
+ state: "uy:text-content-neutral-disabled"
63
62
  }
64
63
  },
65
64
  {
@@ -86,20 +85,20 @@ function J({
86
85
  onFocus: h,
87
86
  ...S
88
87
  }, v) {
89
- const m = T(), u = U(), C = R(), I = $(C, "open"), f = A(G), a = f.maxVisibleItems ?? 0, l = f.selectedKeys ?? /* @__PURE__ */ new Set(), o = Array.from(x), { base: M, inputValue: V, state: B, suffix: N } = H({
88
+ const m = T(), u = U(), C = R(), I = $(C, "open"), y = A(G), a = y.maxVisibleItems ?? 0, i = y.selectedKeys ?? /* @__PURE__ */ new Set(), o = Array.from(x), { base: M, inputValue: V, state: B, suffix: N } = H({
90
89
  isDisabled: !!n,
91
90
  isReadOnly: !!t,
92
91
  isInvalid: !!r,
93
- isEmpty: l.size === 0
94
- }), y = Math.max(
92
+ isEmpty: i.size === 0
93
+ }), f = Math.max(
95
94
  o.length - a,
96
95
  0
97
- ), O = l.size > 0 && !n && !t && !c, z = K(() => {
96
+ ), O = i.size > 0 && !n && !t && !c, z = K(() => {
98
97
  if (o.length === 0) return s;
99
98
  const E = o.slice(0, a), j = new Set(E);
100
99
  return d(j);
101
100
  }, [o, a, d, s]);
102
- return /* @__PURE__ */ i(
101
+ return /* @__PURE__ */ l(
103
102
  L,
104
103
  {
105
104
  ...S,
@@ -113,8 +112,8 @@ function J({
113
112
  onBlur: w,
114
113
  onFocus: h,
115
114
  children: [
116
- /* @__PURE__ */ e("span", { id: `${m}-select-button-label`, className: V(), children: l.size > 0 ? z : s }),
117
- /* @__PURE__ */ i("div", { className: B(), children: [
115
+ /* @__PURE__ */ e("span", { id: `${m}-select-button-label`, className: V(), children: i.size > 0 ? z : s }),
116
+ /* @__PURE__ */ l("div", { className: B(), children: [
118
117
  c && /* @__PURE__ */ e(
119
118
  F,
120
119
  {
@@ -137,9 +136,9 @@ function J({
137
136
  })
138
137
  }
139
138
  ),
140
- y > 0 && /* @__PURE__ */ i(W, { variant: "numeric", children: [
139
+ f > 0 && /* @__PURE__ */ l(W, { variant: "numeric", children: [
141
140
  "+",
142
- y
141
+ f
143
142
  ] }),
144
143
  O && /* @__PURE__ */ e(
145
144
  q,
@@ -158,7 +157,6 @@ function J({
158
157
  /* @__PURE__ */ e(
159
158
  b,
160
159
  {
161
- color: "content.neutral.low",
162
160
  className: N(),
163
161
  src: I ? "CaretUpOutlined" : "CaretDownOutlined",
164
162
  role: "presentation"
@@ -19,7 +19,7 @@ const x = b({
19
19
  true: {
20
20
  base: "uy:border-border-form-disabled uy:bg-surface-form-disabled",
21
21
  selectValue: "uy:text-content-form-disabled",
22
- icon: "uy:text-content-form-disabled"
22
+ icon: "uy:text-content-neutral-lowest-disabled"
23
23
  }
24
24
  },
25
25
  isInvalid: {
@@ -31,7 +31,7 @@ const x = b({
31
31
  true: {
32
32
  base: "uy:border-border-form-disabled uy:bg-surface-form-disabled",
33
33
  selectValue: "uy:text-content-form-readonly",
34
- icon: "uy:text-content-primary-disabled"
34
+ icon: "uy:text-content-neutral-lowest-disabled"
35
35
  }
36
36
  }
37
37
  },
@@ -42,8 +42,8 @@ const x = b({
42
42
  isReadOnly: !1,
43
43
  className: {
44
44
  base: "uy:border-border-form-enabled uy:hover:border-border-form-hover uy:bg-surface-form-enabled uy:hover:bg-surface-form-hover uy:active:border-border-form-active",
45
- selectValue: "uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover",
46
- icon: "uy:text-content-neutral-low uy:hover:text-content-form-hover"
45
+ selectValue: "uy:text-content-form-enabled uy:hover:text-content-form-hover",
46
+ icon: "uy:text-content-neutral-lowest uy:hover:text-content-neutral-lowest-hover"
47
47
  }
48
48
  }
49
49
  ],
@@ -47,7 +47,7 @@ const N = h({
47
47
  base: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
48
48
  inputWrapper: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
49
49
  input: "uy:text-content-form-enabled uy:bg-surface-form-enabled",
50
- state: "uy:text-content-neutral-disabled"
50
+ state: "uy:text-content-form-disabled"
51
51
  }
52
52
  }
53
53
  ],
@@ -59,7 +59,7 @@ const N = h({
59
59
  }), W = x(
60
60
  ({
61
61
  isInvalid: o,
62
- isLoading: s,
62
+ isLoading: n,
63
63
  isDisabled: r,
64
64
  isReadOnly: t,
65
65
  isResizable: i = !1,
@@ -81,14 +81,14 @@ const N = h({
81
81
  ...d,
82
82
  ref: f,
83
83
  className: c(),
84
- "aria-busy": s,
84
+ "aria-busy": n,
85
85
  "aria-invalid": o,
86
86
  readOnly: t,
87
87
  disabled: r
88
88
  }
89
89
  ),
90
90
  /* @__PURE__ */ a("div", { className: p(), children: [
91
- s && /* @__PURE__ */ e(
91
+ n && /* @__PURE__ */ e(
92
92
  L,
93
93
  {
94
94
  color: "inherit",
@@ -123,8 +123,8 @@ const N = h({
123
123
  id: "unity:component:form-field:textarea:resize-handle:label",
124
124
  defaultMessage: "Resize textarea"
125
125
  }),
126
- onKeyDown: (n) => {
127
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), l.current?.querySelector("textarea")?.focus());
126
+ onKeyDown: (s) => {
127
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), l.current?.querySelector("textarea")?.focus());
128
128
  },
129
129
  children: /* @__PURE__ */ a(
130
130
  "svg",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.29.10",
3
+ "version": "2.29.12",
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.10",
45
+ "@payfit/unity-illustrations": "2.29.12",
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.10",
78
- "@payfit/unity-themes": "2.29.10",
77
+ "@payfit/unity-icons": "2.29.12",
78
+ "@payfit/unity-themes": "2.29.12",
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.10",
93
- "@payfit/unity-illustrations": "2.29.10",
94
- "@payfit/unity-themes": "2.29.10",
92
+ "@payfit/unity-icons": "2.29.12",
93
+ "@payfit/unity-illustrations": "2.29.12",
94
+ "@payfit/unity-themes": "2.29.12",
95
95
  "@storybook/addon-a11y": "10.3.5",
96
96
  "@storybook/addon-designs": "11.1.3",
97
97
  "@storybook/addon-docs": "10.3.5",