@payfit/unity-components 2.34.0 → 2.35.0

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.
@@ -1,16 +1,16 @@
1
1
  import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
- import { isValidElement as l, Fragment as d, Children as m } from "react";
2
+ import { isValidElement as l, Fragment as m, Children as d } from "react";
3
3
  import { uyTv as p } from "@payfit/unity-themes";
4
4
  import { useIntl as f } from "react-intl";
5
- import { IconButton as b } from "../icon-button/IconButton.js";
6
- import { Icon as g } from "../icon/Icon.js";
7
- import { ToastTitle as x } from "./parts/ToastTitle.js";
8
- import { ToastProvider as T } from "./Toast.context.js";
9
- const v = p({
5
+ import { IconButton as g } from "../icon-button/IconButton.js";
6
+ import { Icon as h } from "../icon/Icon.js";
7
+ import { ToastTitle as b } from "./parts/ToastTitle.js";
8
+ import { ToastProvider as x } from "./Toast.context.js";
9
+ const T = 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-300 uy:p-100 uy:flex uy:gap-125 uy:border-border-neutral",
11
+ base: "uy:sm:w-[416px] uy:border uy:border-solid uy:theme-legacy:rounded-150 uy:theme-rebrand:rounded-125 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
- divider: "uy:border-l-[1px] uy:border-solid uy:border-border-neutral uy:self-stretch"
13
+ divider: "uy:theme-legacy:border-l-[1px] uy:theme-legacy:border-solid uy:theme-legacy:border-border-neutral uy:theme-legacy:self-stretch uy:theme-rebrand:hidden"
14
14
  },
15
15
  variants: {
16
16
  variant: {
@@ -26,10 +26,10 @@ const v = p({
26
26
  }
27
27
  }
28
28
  }
29
- }), h = (e) => {
30
- const s = l(e) && e.type === d ? e.props.children : e;
31
- if (m.toArray(s).filter(
32
- (r) => l(r) && r.type === x
29
+ }), v = (e) => {
30
+ const s = l(e) && e.type === m ? e.props.children : e;
31
+ if (d.toArray(s).filter(
32
+ (r) => l(r) && r.type === b
33
33
  ).length !== 1)
34
34
  throw new Error("UnityToast must have one ToastTitle component");
35
35
  }, w = ({
@@ -40,12 +40,12 @@ const v = p({
40
40
  ...i
41
41
  }) => {
42
42
  const a = f();
43
- h(e);
44
- const { base: u, contentWrapper: c, divider: y } = v({
43
+ v(e);
44
+ const { base: u, contentWrapper: c, divider: y } = T({
45
45
  variant: t,
46
46
  isInline: r
47
47
  });
48
- return /* @__PURE__ */ o(T, { inline: r, children: /* @__PURE__ */ n(
48
+ return /* @__PURE__ */ o(x, { inline: r, children: /* @__PURE__ */ n(
49
49
  "div",
50
50
  {
51
51
  "data-dd-privacy": "mask",
@@ -58,7 +58,7 @@ const v = p({
58
58
  children: [
59
59
  /* @__PURE__ */ n("div", { className: "uy:flex uy:flex-row uy:grow", children: [
60
60
  /* @__PURE__ */ o(
61
- g,
61
+ h,
62
62
  {
63
63
  src: t === "success" ? "CheckCircleFilled" : "WarningCircleFilled",
64
64
  color: t === "success" ? "content.success" : "content.danger",
@@ -73,7 +73,7 @@ const v = p({
73
73
  ] }),
74
74
  /* @__PURE__ */ o("div", { role: "presentation", className: y() }),
75
75
  /* @__PURE__ */ o(
76
- b,
76
+ g,
77
77
  {
78
78
  icon: "CloseOutlined",
79
79
  iconRole: "presentation",
@@ -1,12 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Button as i } from "../../button/Button.js";
3
- function a({
2
+ import { useUnityTheme as e } from "@payfit/unity-themes";
3
+ import { Button as a } from "../../button/Button.js";
4
+ function i({
4
5
  children: t,
5
6
  onPress: r
6
7
  }) {
7
- return /* @__PURE__ */ o("div", { className: "uy:self-end", children: /* @__PURE__ */ o(i, { variant: "ghost", color: "primary", onPress: r, children: t }) });
8
+ const { theme: n } = e();
9
+ return /* @__PURE__ */ o("div", { className: "uy:self-end", children: /* @__PURE__ */ o(a, { variant: n === "rebrand" ? "secondary" : "ghost", color: "primary", onPress: r, children: t }) });
8
10
  }
9
- a.displayName = "ToastAction";
11
+ i.displayName = "ToastAction";
10
12
  export {
11
- a as ToastAction
13
+ i as ToastAction
12
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.34.0",
3
+ "version": "2.35.0",
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.34.0",
45
+ "@payfit/unity-illustrations": "2.35.0",
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.34.0",
78
- "@payfit/unity-themes": "2.34.0",
77
+ "@payfit/unity-icons": "2.35.0",
78
+ "@payfit/unity-themes": "2.35.0",
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.34.0",
93
- "@payfit/unity-illustrations": "2.34.0",
94
- "@payfit/unity-themes": "2.34.0",
92
+ "@payfit/unity-icons": "2.35.0",
93
+ "@payfit/unity-illustrations": "2.35.0",
94
+ "@payfit/unity-themes": "2.35.0",
95
95
  "@storybook/addon-a11y": "10.3.5",
96
96
  "@storybook/addon-designs": "11.1.3",
97
97
  "@storybook/addon-docs": "10.3.5",
@@ -132,8 +132,8 @@
132
132
  "@payfit/code-pushup-tools": "0.0.0-use.local",
133
133
  "@payfit/hr-app-eslint": "0.0.0-use.local",
134
134
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
135
- "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
136
135
  "@payfit/storybook-config": "0.0.0-use.local",
136
+ "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
137
137
  "@payfit/vite-configs": "0.0.0-use.local"
138
138
  },
139
139
  "peerDependenciesMeta": {