@payfit/unity-components 2.2.5 → 2.2.7

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.
@@ -15,7 +15,7 @@ const V = z({
15
15
  slots: {
16
16
  base: [
17
17
  "uy:bg-surface-inverted uy:text-content-inverted",
18
- "uy:rounded-100 uy:shadow-raising",
18
+ "uy:rounded-100 uy:shadow-300",
19
19
  "uy:flex uy:items-center uy:gap-100 uy:md:gap-200 uy:py-50 uy:pl-50 uy:md:pl-200 uy:pr-50",
20
20
  "uy:transition-all uy:duration-200",
21
21
  "uy:max-w-full uy:min-w-0 uy:w-fit",
@@ -1,15 +1,15 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { uyTv as y } from "@payfit/unity-themes";
1
+ import { jsx as e, jsxs as y } from "react/jsx-runtime";
2
+ import { uyTv as i } from "@payfit/unity-themes";
3
3
  import { Popover as m, ListBox as c } from "react-aria-components";
4
4
  import { FormattedMessage as d } from "react-intl";
5
5
  import { Icon as p } from "../../icon/Icon.js";
6
6
  import { Text as t } from "../../text/Text.js";
7
- const f = y({
7
+ const f = i({
8
8
  slots: {
9
- base: "uy:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral uy:max-h-[312px] uy:shadow-floating",
9
+ base: "uy:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral uy:max-h-[312px] uy:shadow-300",
10
10
  list: "uy:overflow-y-auto uy:max-h-[296px] uy:p-100"
11
11
  }
12
- }), g = () => /* @__PURE__ */ i("div", { className: "uy:flex uy:flex-col uy:gap-200 uy:items-center uy:justify-center uy:h-[312px]", children: [
12
+ }), g = () => /* @__PURE__ */ y("div", { className: "uy:flex uy:flex-col uy:gap-200 uy:items-center uy:justify-center uy:h-[312px]", children: [
13
13
  /* @__PURE__ */ e(
14
14
  t,
15
15
  {
@@ -26,14 +26,14 @@ const f = y({
26
26
  }
27
27
  ) })
28
28
  ] }), h = (r) => {
29
- const { children: o, panelWidth: s, searchRef: a, ...u } = r, { base: l, list: n } = f();
29
+ const { children: o, panelWidth: s, searchRef: u, ...a } = r, { base: l, list: n } = f();
30
30
  return /* @__PURE__ */ e(
31
31
  m,
32
32
  {
33
- ...u,
33
+ ...a,
34
34
  className: l(),
35
35
  offset: 1,
36
- triggerRef: a,
36
+ triggerRef: u,
37
37
  isNonModal: !0,
38
38
  style: { "--trigger-width": s },
39
39
  children: /* @__PURE__ */ e(c, { className: n(), renderEmptyState: g, children: o })
@@ -11,6 +11,12 @@ export declare const card: import('tailwind-variants').TVReturnType<{
11
11
  flying: {
12
12
  base: string;
13
13
  };
14
+ '100': {
15
+ base: string;
16
+ };
17
+ '300': {
18
+ base: string;
19
+ };
14
20
  };
15
21
  bgColor: {
16
22
  'surface.neutral': {
@@ -48,6 +54,12 @@ export declare const card: import('tailwind-variants').TVReturnType<{
48
54
  flying: {
49
55
  base: string;
50
56
  };
57
+ '100': {
58
+ base: string;
59
+ };
60
+ '300': {
61
+ base: string;
62
+ };
51
63
  };
52
64
  bgColor: {
53
65
  'surface.neutral': {
@@ -85,6 +97,12 @@ export declare const card: import('tailwind-variants').TVReturnType<{
85
97
  flying: {
86
98
  base: string;
87
99
  };
100
+ '100': {
101
+ base: string;
102
+ };
103
+ '300': {
104
+ base: string;
105
+ };
88
106
  };
89
107
  bgColor: {
90
108
  'surface.neutral': {
@@ -1,5 +1,5 @@
1
1
  import { jsx as y } from "react/jsx-runtime";
2
- import { forwardRef as h, useRef as C, useState as E, useLayoutEffect as _ } from "react";
2
+ import { forwardRef as g, useRef as C, useState as E, useLayoutEffect as _ } from "react";
3
3
  import { uyTv as S } from "@payfit/unity-themes";
4
4
  import { useId as x } from "react-aria";
5
5
  import { CardContext as N } from "./Card.context.js";
@@ -14,10 +14,16 @@ const V = S({
14
14
  base: "uy:shadow-none"
15
15
  },
16
16
  raising: {
17
- base: "uy:shadow-raising"
17
+ base: "uy:shadow-100"
18
18
  },
19
19
  flying: {
20
- base: "uy:shadow-flying"
20
+ base: "uy:shadow-300"
21
+ },
22
+ 100: {
23
+ base: "uy:shadow-100"
24
+ },
25
+ 300: {
26
+ base: "uy:shadow-300"
21
27
  }
22
28
  },
23
29
  bgColor: {
@@ -48,9 +54,9 @@ const V = S({
48
54
  shadow: "none",
49
55
  bgColor: "surface.neutral"
50
56
  }
51
- }), I = h(
57
+ }), I = g(
52
58
  ({ shadow: o, bgColor: s, children: l, ...a }, r) => {
53
- const n = x(), u = C(null), [c, b] = E(!1), v = a.id ?? `unity-card-${n}`, d = `unity-card-${n}__title`, t = a["aria-label"];
59
+ const n = x(), u = C(null), [d, b] = E(!1), w = a.id ?? `unity-card-${n}`, c = `unity-card-${n}__title`, t = a["aria-label"];
54
60
  _(() => {
55
61
  const e = u.current;
56
62
  if (!e) return;
@@ -61,24 +67,24 @@ const V = S({
61
67
  "Card: A Card must have either a CardTitle child or an aria-label prop for accessibility."
62
68
  );
63
69
  }, [l, t]);
64
- const i = (s ?? "surface.neutral") === "surface.neutral" && (o ?? "none") !== "none", w = i ? o : "none", { base: m } = V({
65
- shadow: w,
70
+ const i = (s ?? "surface.neutral") === "surface.neutral" && (o ?? "none") !== "none", v = i ? o : "none", { base: m } = V({
71
+ shadow: v,
66
72
  bgColor: s
67
- }), g = {
68
- titleId: d
73
+ }), h = {
74
+ titleId: c
69
75
  }, p = a.asElement ?? "section";
70
- return /* @__PURE__ */ y(N.Provider, { value: g, children: /* @__PURE__ */ y(
76
+ return /* @__PURE__ */ y(N.Provider, { value: h, children: /* @__PURE__ */ y(
71
77
  p,
72
78
  {
73
79
  "data-dd-privacy": "show",
74
80
  ...a,
75
- id: v,
81
+ id: w,
76
82
  ref: (e) => {
77
83
  u.current = e, typeof r == "function" ? r(e) : r && (r.current = e);
78
84
  },
79
85
  className: m(),
80
- "aria-labelledby": c ? d : void 0,
81
- "aria-label": c ? void 0 : t,
86
+ "aria-labelledby": d ? c : void 0,
87
+ "aria-label": d ? void 0 : t,
82
88
  "data-unity-component": "card",
83
89
  "data-unity-variant": i ? "shadow" : void 0,
84
90
  children: l
@@ -59,7 +59,7 @@ const z = b({
59
59
  }
60
60
  ]
61
61
  }), A = b({
62
- base: "uy:overflow-auto uy:shadow-floating uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-md uy:sm:rounded-75",
62
+ base: "uy:overflow-auto uy:shadow-300 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-md uy:sm:rounded-75",
63
63
  variants: {
64
64
  isEntering: {
65
65
  true: "uy:animate-in uy:fade-in uy:data-[placement-bottom]:slide-in-from-top-1 uy:data-[placement-top]:slide-in-from-bottom-1 uy:duration-200 uy:ease-out"
@@ -23,7 +23,7 @@ const T = f({
23
23
  "uy:m-0",
24
24
  "uy:rounded-t-300 uy:md:rounded-200",
25
25
  "uy:overflow-hidden uy:bg-white uy:p-300 uy:pt-400 uy:md:p-400",
26
- "uy:text-left uy:align-middle uy:shadow-floating",
26
+ "uy:text-left uy:align-middle uy:shadow-400",
27
27
  "uy:bg-surface-neutral",
28
28
  "uy:data-[entering]:animate-slide-up-fade-in uy:data-[exiting]:animate-slide-down-fade-out",
29
29
  "uy:md:[animation-delay:100ms] uy:md:data-[entering]:animate-zoom-in uy:md:data-[exiting]:animate-zoom-out"
@@ -6,7 +6,7 @@ import { Button as r } from "../../button/Button.js";
6
6
  const x = m({
7
7
  slots: {
8
8
  popover: [
9
- "uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-sm uy:shadow-floating uy:min-w-[320px] uy:max-w-[800px] uy:relative uy:isolate uy:overflow-hidden",
9
+ "uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-sm uy:shadow-300 uy:min-w-[320px] uy:max-w-[800px] uy:relative uy:isolate uy:overflow-hidden",
10
10
  "uy:transition-all uy:duration-200 uy:linear uy:data-[entering]:opacity-100 uy:data-[exiting]:opacity-0",
11
11
  'uy:data-[entering]:data-[placement="bottom"]:-translate-y-100 uy:data-[entering]:data-[placement="bottom"]:translate-x-0 uy:data-[exiting]:data-[placement="bottom"]:translate-y-0',
12
12
  'uy:data-[entering]:data-[placement="top"]:translate-y-100 uy:data-[entering]:data-[placement="top"]:translate-x-0 uy:data-[exiting]:data-[placement="top"]:translate-y-0',
@@ -12,7 +12,7 @@ function s({
12
12
  {
13
13
  triggerRef: t,
14
14
  placement: o,
15
- className: "uy:flex uy:flex-col uy:justify-end uy:items-start uy:p-100 uy:rounded-100 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:shadow-floating",
15
+ className: "uy:flex uy:flex-col uy:justify-end uy:items-start uy:p-100 uy:rounded-100 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:shadow-300",
16
16
  "data-dd-privacy": "allow",
17
17
  children: /* @__PURE__ */ u(y, { autoFocus: "first", className: `uy:min-w-[320px] ${n}`, children: r })
18
18
  }
@@ -6,7 +6,7 @@ import { Icon as g } from "../../icon/Icon.js";
6
6
  import { MultiSelectContext as w } from "../Multiselect.context.js";
7
7
  const S = t({
8
8
  slots: {
9
- base: "uy:shadow-floating uy:absolute uy:top-full uy:left-0 uy:z-50 uy:w-full uy:rounded-100 uy:sm:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:overflow-auto uy:max-h-[min(var(--popover-available-height,300px),300px)] uy:outline-none",
9
+ base: "uy:shadow-300 uy:absolute uy:top-full uy:left-0 uy:z-50 uy:w-full uy:rounded-100 uy:sm:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:overflow-auto uy:max-h-[min(var(--popover-available-height,300px),300px)] uy:outline-none",
10
10
  list: "uy:p-100"
11
11
  }
12
12
  }), N = t({
@@ -80,7 +80,7 @@ const pe = Y({
80
80
  ],
81
81
  selectPopover: [
82
82
  //common
83
- "uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral-enabled",
83
+ "uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral-enabled uy:shadow-300",
84
84
  // mobile
85
85
  "uy:rounded-100",
86
86
  // desktop
@@ -7,7 +7,7 @@ import { PopoverHeader as f } from "./parts/PopoverHeader.js";
7
7
  const x = p({
8
8
  slots: {
9
9
  base: [
10
- "uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-200 uy:p-200 uy:shadow-floating uy:min-w-[320px] uy:max-w-[800px] uy:overflow-auto",
10
+ "uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-200 uy:p-200 uy:shadow-300 uy:min-w-[320px] uy:max-w-[800px] uy:overflow-auto",
11
11
  "uy:transition-all uy:duration-200 uy:linear uy:data-[entering]:opacity-100 uy:data-[exiting]:opacity-0",
12
12
  'uy:data-[entering]:data-[placement="bottom"]:-translate-y-100 uy:data-[entering]:data-[placement="bottom"]:translate-x-0 uy:data-[exiting]:data-[placement="bottom"]:translate-y-0',
13
13
  'uy:data-[entering]:data-[placement="top"]:translate-y-100 uy:data-[entering]:data-[placement="top"]:translate-x-0 uy:data-[exiting]:data-[placement="top"]:translate-y-0',
@@ -27,7 +27,7 @@ const k = N({
27
27
  "uy:m-0",
28
28
  "uy:rounded-t-300 uy:md:rounded-300",
29
29
  "uy:bg-surface-neutral",
30
- "uy:text-left uy:align-middle uy:shadow-floating",
30
+ "uy:text-left uy:align-middle uy:shadow-400",
31
31
  // Mobile: enter/leave animation
32
32
  "uy:data-[entering]:animate-slide-up-fade-in uy:data-[exiting]:animate-slide-down-fade-out",
33
33
  "uy:md:[animation-delay:100ms]",
@@ -8,7 +8,7 @@ import { SelectButton as V } from "./parts/SelectButton.js";
8
8
  const $ = F({
9
9
  slots: {
10
10
  base: "uy:flex uy:flex-col uy:gap-100 uy:w-full",
11
- popover: "uy:rounded-100 uy:sm:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral",
11
+ popover: "uy:rounded-100 uy:sm:rounded-75 uy:border uy:border-solid uy:border-border-neutral uy:w-[var(--trigger-width)] uy:bg-surface-neutral uy:shadow-300",
12
12
  listbox: "uy:overflow-y-auto uy:max-h-[296px] uy:pt-100 uy:pb-100"
13
13
  }
14
14
  }), k = ({
@@ -17,8 +17,8 @@ const $ = F({
17
17
  placeholder: r,
18
18
  isDisabled: s,
19
19
  isInvalid: l,
20
- isReadOnly: n,
21
- value: a,
20
+ isReadOnly: a,
21
+ value: n,
22
22
  defaultValue: m,
23
23
  onChange: i,
24
24
  isSearchable: f = !1,
@@ -27,8 +27,8 @@ const $ = F({
27
27
  searchInputAriaLabel: x,
28
28
  ...S
29
29
  }, g) => {
30
- const v = T(), [w, N] = C(!1), { contains: O } = I({ sensitivity: "base" }), { base: L, popover: P, listbox: u } = $(), j = a !== void 0 || i !== void 0 ? {
31
- value: a,
30
+ const v = T(), [w, N] = C(!1), { contains: O } = I({ sensitivity: "base" }), { base: L, popover: P, listbox: u } = $(), j = n !== void 0 || i !== void 0 ? {
31
+ value: n,
32
32
  onChange: i
33
33
  } : { defaultValue: m };
34
34
  return /* @__PURE__ */ c(
@@ -39,7 +39,7 @@ const $ = F({
39
39
  ref: g,
40
40
  className: L(),
41
41
  placeholder: s ? void 0 : r,
42
- isDisabled: s || n,
42
+ isDisabled: s || a,
43
43
  isInvalid: l,
44
44
  onBlur: b,
45
45
  ...j,
@@ -49,7 +49,7 @@ const $ = F({
49
49
  {
50
50
  isDisabled: s,
51
51
  isInvalid: l,
52
- isReadOnly: n,
52
+ isReadOnly: a,
53
53
  isOpen: w
54
54
  }
55
55
  ),
@@ -8,7 +8,7 @@ import { ToastTitle as x } from "./parts/ToastTitle.js";
8
8
  import { ToastProvider as T } from "./Toast.context.js";
9
9
  const v = p({
10
10
  slots: {
11
- base: "uy:sm:w-[416px] uy:border uy:border-solid uy:rounded-150 uy:text-content-neutral uy:bg-surface-neutral uy:shadow-floating uy:p-100 uy:flex uy:gap-125 uy:border-border-neutral",
11
+ base: "uy:sm:w-[416px] uy:border uy:border-solid uy:rounded-150 uy:text-content-neutral uy:bg-surface-neutral uy:shadow-300 uy:p-100 uy:flex uy:gap-125 uy:border-border-neutral",
12
12
  contentWrapper: "uy:flex uy:grow uy:ml-125",
13
13
  divider: "uy:border-l-[1px] uy:border-solid uy:border-border-neutral uy:self-stretch"
14
14
  },
@@ -1,24 +1,24 @@
1
1
  import { jsxs as y, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { TooltipTrigger as p, Tooltip as u, Button as i } from "react-aria-components";
3
+ import { TooltipTrigger as u, Tooltip as p, Button as i } from "react-aria-components";
4
4
  import { Button as d } from "../button/Button.js";
5
5
  const c = (o) => o.type === d || o.type === i, m = {
6
6
  short: [100, 150],
7
7
  standard: [150, 200],
8
8
  long: [200, 300],
9
9
  "very-long": [300, 400]
10
- }, T = n(
10
+ }, w = n(
11
11
  ({ title: o, children: t, duration: a = "standard" }, e) => {
12
12
  const [l, s] = m[a];
13
- return /* @__PURE__ */ y(p, { delay: l, closeDelay: s, children: [
13
+ return /* @__PURE__ */ y(u, { delay: l, closeDelay: s, children: [
14
14
  t,
15
15
  /* @__PURE__ */ r(
16
- u,
16
+ p,
17
17
  {
18
18
  ref: e,
19
19
  "data-dd-privacy": "allow",
20
20
  offset: c(t) ? 6 : 8,
21
- className: "uy:inline-flex uy:rounded-50 uy:pl-100 uy:pr-100 uy:pt-50 uy:pb-50 uy:bg-grayscale-l12 uy:max-w-[300px]",
21
+ className: "uy:inline-flex uy:rounded-50 uy:pl-100 uy:pr-100 uy:pt-50 uy:pb-50 uy:bg-grayscale-l12 uy:max-w-[300px] uy:shadow-100",
22
22
  children: /* @__PURE__ */ r("p", { className: "uy:typography-body-small uy:text-content-inverted uy:overflow-hidden uy:text-ellipsis uy:line-clamp-3", children: o })
23
23
  }
24
24
  )
@@ -26,5 +26,5 @@ const c = (o) => o.type === d || o.type === i, m = {
26
26
  }
27
27
  );
28
28
  export {
29
- T as Tooltip
29
+ w as Tooltip
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
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.10.0",
45
- "@payfit/unity-illustrations": "2.2.5",
45
+ "@payfit/unity-illustrations": "2.2.7",
46
46
  "@radix-ui/react-avatar": "1.1.11",
47
47
  "@radix-ui/react-slot": "1.2.4",
48
48
  "@react-aria/interactions": "3.25.6",
@@ -70,8 +70,8 @@
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@hookform/devtools": "^4",
73
- "@payfit/unity-icons": "2.2.5",
74
- "@payfit/unity-themes": "2.2.5",
73
+ "@payfit/unity-icons": "2.2.7",
74
+ "@payfit/unity-themes": "2.2.7",
75
75
  "@storybook/react-vite": "^10.2.2",
76
76
  "@tanstack/react-query": "^5",
77
77
  "@tanstack/react-router": "^1.131",
@@ -90,16 +90,16 @@
90
90
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
91
91
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
92
92
  "@payfit/storybook-config": "0.0.0-use.local",
93
- "@payfit/unity-icons": "2.2.5",
94
- "@payfit/unity-illustrations": "2.2.5",
95
- "@payfit/unity-themes": "2.2.5",
93
+ "@payfit/unity-icons": "2.2.7",
94
+ "@payfit/unity-illustrations": "2.2.7",
95
+ "@payfit/unity-themes": "2.2.7",
96
96
  "@payfit/vite-configs": "0.0.0-use.local",
97
97
  "@storybook/addon-a11y": "10.2.2",
98
98
  "@storybook/addon-docs": "10.2.2",
99
99
  "@storybook/addon-links": "10.2.2",
100
100
  "@storybook/addon-vitest": "10.2.2",
101
101
  "@storybook/react-vite": "10.2.2",
102
- "@tanstack/react-devtools": "0.9.3",
102
+ "@tanstack/react-devtools": "0.9.4",
103
103
  "@tanstack/react-form-devtools": "0.2.13",
104
104
  "@tanstack/react-query": "5.90.20",
105
105
  "@tanstack/react-router": "1.133.13",