@payfit/unity-components 2.63.9 → 2.63.11

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.
@@ -22,49 +22,55 @@ var d = c({
22
22
  large: "uy:w-full uy:px-150 uy:py-100",
23
23
  small: "uy:pr-0 uy:pl-100 uy:py-25"
24
24
  } }
25
- }), f = ({ avatar: c, avatarPair: f, avatarVariant: p = "square", badgeLabel: m, children: h, defaultOpen: g, description: _, isOpen: v, menuTriggerDescription: y, onOpenChange: b, placement: x, title: S, uploadAvatarCallback: C, uploadAvatarDescription: w, uploadAvatarLabel: T, variant: E = "large" }) => {
26
- let D = s(null), O = o(), k = o(), A = {
25
+ }), f = c({ base: [
26
+ "uy:transition-all uy:duration-200 uy:ease-out uy:data-[entering]:opacity-100 uy:data-[exiting]:opacity-0",
27
+ "uy:data-[entering]:data-[placement=\"bottom\"]:-translate-y-100 uy:data-[exiting]:data-[placement=\"bottom\"]:translate-y-0",
28
+ "uy:data-[entering]:data-[placement=\"top\"]:translate-y-100 uy:data-[exiting]:data-[placement=\"top\"]:translate-y-0",
29
+ "uy:motion-reduce:transition-none"
30
+ ] }), p = ({ avatar: c, avatarPair: p, avatarVariant: m = "square", badgeLabel: h, children: g, defaultOpen: _, description: v, isOpen: y, menuTriggerDescription: b, onOpenChange: x, placement: S, title: C, uploadAvatarCallback: w, uploadAvatarDescription: T, uploadAvatarLabel: E, variant: D = "large" }) => {
31
+ let O = s(null), k = o(), A = o(), j = {
27
32
  avatar: c,
28
- avatarPair: f,
29
- avatarSize: E === "small" ? "md" : "lg",
30
- avatarVariant: p,
31
- badgeLabel: m,
32
- description: _,
33
- labelId: O,
34
- menuTriggerDescription: y,
35
- title: S,
36
- triggerDescriptionId: k,
37
- triggerVariant: E,
38
- uploadAvatarCallback: C,
39
- uploadAvatarDescription: w,
40
- uploadAvatarLabel: T
33
+ avatarPair: p,
34
+ avatarSize: D === "small" ? "md" : "lg",
35
+ avatarVariant: m,
36
+ badgeLabel: h,
37
+ description: v,
38
+ labelId: k,
39
+ menuTriggerDescription: b,
40
+ title: C,
41
+ triggerDescriptionId: A,
42
+ triggerVariant: D,
43
+ uploadAvatarCallback: w,
44
+ uploadAvatarDescription: T,
45
+ uploadAvatarLabel: E
41
46
  };
42
47
  return /* @__PURE__ */ u(t, {
43
- defaultOpen: g,
44
- isOpen: v,
45
- onOpenChange: b,
46
- placement: x ?? (E === "small" ? "bottom right" : "top left"),
47
- triggerRef: D,
48
+ defaultOpen: _,
49
+ isOpen: y,
50
+ onOpenChange: x,
51
+ placement: S ?? (D === "small" ? "bottom right" : "top left"),
52
+ popoverClassName: f(),
53
+ triggerRef: O,
48
54
  children: [/* @__PURE__ */ l(r, {
49
55
  asChild: !0,
50
56
  children: /* @__PURE__ */ l(e, {
51
- ref: D,
52
- "aria-describedby": k,
53
- "aria-labelledby": O,
54
- className: d({ variant: E }),
55
- children: /* @__PURE__ */ l(a, { ...A })
57
+ ref: O,
58
+ "aria-describedby": A,
59
+ "aria-labelledby": k,
60
+ className: d({ variant: D }),
61
+ children: /* @__PURE__ */ l(a, { ...j })
56
62
  })
57
63
  }), /* @__PURE__ */ u(n, {
58
64
  width: 312,
59
65
  children: [/* @__PURE__ */ l(i, {
60
66
  className: "uy:rounded-75",
61
67
  children: /* @__PURE__ */ l(a, {
62
- ...A,
68
+ ...j,
63
69
  asMenuHeader: !0
64
70
  })
65
- }), h]
71
+ }), g]
66
72
  })]
67
73
  });
68
74
  };
69
75
  //#endregion
70
- export { f as AppProfileMenuButton };
76
+ export { p as AppProfileMenuButton };
@@ -75,6 +75,7 @@ var c = ({ asMenuHeader: c = !1, avatar: l, avatarPair: u, avatarSize: d, avatar
75
75
  variant: "neutral",
76
76
  children: p
77
77
  }) : /* @__PURE__ */ a(e, {
78
+ className: y === "small" ? "uy:inline-block uy:transition-transform uy:duration-150 uy:ease-linear uy:origin-center uy:group-aria-[expanded=true]:rotate-180" : void 0,
78
79
  src: y === "small" ? "CaretDownOutlined" : "CaretUpDownOutlined",
79
80
  alt: w,
80
81
  size: 20,
@@ -2,9 +2,10 @@ import { MenuTriggerProps } from 'react-aria-components/Menu';
2
2
  import { PopoverProps } from 'react-aria-components/Popover';
3
3
  type MenuProps = Omit<MenuTriggerProps, 'className' | 'style'> & {
4
4
  placement?: PopoverProps['placement'];
5
+ popoverClassName?: string;
5
6
  triggerRef?: PopoverProps['triggerRef'];
6
7
  };
7
- export declare function Menu({ defaultOpen, children, triggerRef, placement, ...rest }: MenuProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Menu({ defaultOpen, children, popoverClassName, triggerRef, placement, ...rest }: MenuProps): import("react/jsx-runtime").JSX.Element;
8
9
  export declare namespace Menu {
9
10
  var displayName: string;
10
11
  }
@@ -1,22 +1,24 @@
1
1
  import e from "react";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { MenuTrigger as r, Popover as i } from "react-aria-components/Menu";
2
+ import { uyTv as t } from "@payfit/unity-themes";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { MenuTrigger as i, Popover as a } from "react-aria-components/Menu";
4
5
  //#region src/components/menu/Menu.tsx
5
- function a({ defaultOpen: a, children: o, triggerRef: s, placement: c, ...l }) {
6
- let [u, d] = e.Children.toArray(o);
7
- if (!u || !d) throw Error("Menu must have a trigger and a menu content");
8
- return /* @__PURE__ */ n(r, {
9
- defaultOpen: a,
10
- ...l,
11
- children: [u, /* @__PURE__ */ t(i, {
12
- triggerRef: s,
13
- placement: c,
14
- 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",
6
+ var o = t({ base: "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" });
7
+ function s({ defaultOpen: t, children: s, popoverClassName: c, triggerRef: l, placement: u, ...d }) {
8
+ let [f, p] = e.Children.toArray(s);
9
+ if (!f || !p) throw Error("Menu must have a trigger and a menu content");
10
+ return /* @__PURE__ */ r(i, {
11
+ defaultOpen: t,
12
+ ...d,
13
+ children: [f, /* @__PURE__ */ n(a, {
14
+ triggerRef: l,
15
+ placement: u,
16
+ className: o({ className: c }),
15
17
  "data-dd-privacy": "allow",
16
- children: d
18
+ children: p
17
19
  })]
18
20
  });
19
21
  }
20
- a.displayName = "Menu";
22
+ s.displayName = "Menu";
21
23
  //#endregion
22
- export { a as Menu };
24
+ export { s as Menu };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.63.9",
3
+ "version": "2.63.11",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -73,7 +73,7 @@
73
73
  "@standard-schema/spec": "1.1.0",
74
74
  "@tanstack/form-core": "1.33.3",
75
75
  "@tanstack/react-form": "1.33.3",
76
- "@tanstack/react-store": "0.11.0",
76
+ "@tanstack/react-store": "0.11.1",
77
77
  "@tanstack/react-virtual": "3.14.9",
78
78
  "@use-gesture/react": "10.3.1",
79
79
  "embla-carousel": "9.0.0-rc02",
@@ -96,7 +96,7 @@
96
96
  "tailwind-variants": "3.3.0",
97
97
  "usehooks-ts": "3.1.1",
98
98
  "zod": "4.4.3",
99
- "@payfit/unity-illustrations": "2.63.9"
99
+ "@payfit/unity-illustrations": "2.63.11"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@hookform/devtools": "^4",
@@ -108,8 +108,8 @@
108
108
  "react-hook-form": "^7",
109
109
  "react-router-dom": "^5",
110
110
  "zod": "^3 || ^4",
111
- "@payfit/unity-icons": "2.63.9",
112
- "@payfit/unity-themes": "2.63.9"
111
+ "@payfit/unity-icons": "2.63.11",
112
+ "@payfit/unity-themes": "2.63.11"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@figma/code-connect": "1.5.2",
@@ -146,7 +146,7 @@
146
146
  "react-docgen-typescript": "2.2.2",
147
147
  "react-hot-toast": "2.5.1",
148
148
  "storybook": "10.5.5",
149
- "storybook-addon-pseudo-states": "10.5.5",
149
+ "storybook-addon-pseudo-states": "10.5.6",
150
150
  "storybook-addon-tag-badges": "3.1.0",
151
151
  "storybook-addon-test-codegen": "3.0.4",
152
152
  "storybook-mock-date-decorator": "3.0.0",
@@ -158,11 +158,11 @@
158
158
  "@payfit/hr-app-eslint": "0.0.0-use.local",
159
159
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
160
160
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
161
+ "@payfit/unity-icons": "2.63.11",
162
+ "@payfit/unity-themes": "2.63.11",
161
163
  "@payfit/storybook-config": "0.0.0-use.local",
162
- "@payfit/unity-icons": "2.63.9",
163
- "@payfit/unity-illustrations": "2.63.9",
164
- "@payfit/unity-themes": "2.63.9",
165
- "@payfit/vite-configs": "0.0.0-use.local"
164
+ "@payfit/vite-configs": "0.0.0-use.local",
165
+ "@payfit/unity-illustrations": "2.63.11"
166
166
  },
167
167
  "peerDependenciesMeta": {
168
168
  "@hookform/devtools": {