@payfit/unity-components 3.16.18 → 3.16.20

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,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DisclosureProps } from 'react-aria-components/Disclosure';
3
3
  import { collapsible } from './Collapsible.variants.js';
4
- import { VariantProps } from 'tailwind-variants';
4
+ import { VariantProps } from '@payfit/unity-themes';
5
5
  export interface CollapsibleProps extends VariantProps<typeof collapsible>, Omit<DisclosureProps, 'className'> {
6
6
  /**
7
7
  * The content of the collapsible component.
@@ -6,12 +6,12 @@ import { Code as i } from "../code/Code.js";
6
6
  import { initConfig as a } from "./initConfig.js";
7
7
  import { Collapsible as o } from "./parts/Collapsible.js";
8
8
  import { forwardRef as s, useCallback as c, useRef as l } from "react";
9
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
- import { useIntl as f } from "react-intl";
11
- import { Illustration as p } from "@payfit/unity-illustrations";
12
- import { tv as m } from "tailwind-variants";
9
+ import { uyTv as u } from "@payfit/unity-themes";
10
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { useIntl as p } from "react-intl";
12
+ import { Illustration as m } from "@payfit/unity-illustrations";
13
13
  //#region src/core/components/error-state/ErrorState.tsx
14
- var h = m({ slots: {
14
+ var h = u({ slots: {
15
15
  container: ["uy:@container uy:w-full uy:h-full uy:content-center uy:flex-1"],
16
16
  wrapper: [
17
17
  "uy:border-solid uy:border-border-neutral uy:border uy:rounded-200 uy:p-300",
@@ -41,14 +41,14 @@ var h = m({ slots: {
41
41
  h3: ["uy:hidden uy:@section:@max-page:block"],
42
42
  h4: ["uy:block uy:@section:hidden"],
43
43
  description: ["uy:hidden uy:@section:block uy:@section:w-full"]
44
- } }), g = (e, t) => /* @__PURE__ */ d(o, { children: [/* @__PURE__ */ u("div", {
44
+ } }), g = (e, t) => /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d("div", {
45
45
  className: "uy:mb-200",
46
46
  children: e.detailDescription ?? t?.detailDescription
47
- }), /* @__PURE__ */ u(i, { children: e.error.message })] }), _ = (e, n) => {
47
+ }), /* @__PURE__ */ d(i, { children: e.error.message })] }), _ = (e, n) => {
48
48
  let r = e.backButtonLabel ?? n?.backButtonLabel;
49
- return /* @__PURE__ */ u("div", {
49
+ return /* @__PURE__ */ d("div", {
50
50
  className: "uy:mt-200 uy:@section:block uy:hidden",
51
- children: /* @__PURE__ */ u(t, {
51
+ children: /* @__PURE__ */ d(t, {
52
52
  onPress: e.onBackButtonPress ?? n?.onBackButtonPress,
53
53
  color: "primary",
54
54
  variant: "ghost",
@@ -56,24 +56,24 @@ var h = m({ slots: {
56
56
  })
57
57
  });
58
58
  }, v = (e, t) => e === "generic" ? t ? "known" : "unknown" : e, y = s((i, o) => {
59
- let { icon: s, illustration: m, onButtonPress: y, buttonLabel: b, mainTitle: x, mainDescription: S, mainDescriptionComponent: C, type: w, error: T, entityName: E, role: D = "status" } = i, { base: O, content: k, container: A, wrapper: j, illustration: M, icon: N, informationContainer: P, information: F, informationComponent: I, description: ee, h1: L, h2: R, h3: z, h4: B } = h(), V = f(), H = a(V, { noPermissionEntityName: E }), U = l(null), { level: W } = r({ ref: U }), G = c((e) => {
59
+ let { icon: s, illustration: u, onButtonPress: y, buttonLabel: b, mainTitle: x, mainDescription: S, mainDescriptionComponent: C, type: w, error: T, entityName: E, role: D = "status" } = i, { base: O, content: k, container: A, wrapper: j, illustration: M, icon: N, informationContainer: P, information: F, informationComponent: I, description: ee, h1: L, h2: R, h3: z, h4: B } = h(), V = p(), H = a(V, { noPermissionEntityName: E }), U = l(null), { level: W } = r({ ref: U }), G = c((e) => {
60
60
  U.current = e, o && (typeof o == "function" ? o(e) : o.current = e);
61
- }, [o]), K = v(w, T), q = H.get(K), J = m ?? q?.illustration, Y = s ?? q?.icon, X = b ?? q?.buttonLabel, Z = x ?? q?.mainTitle, Q = S ?? q?.mainDescription, $ = C ?? q?.mainDescriptionComponent;
62
- return /* @__PURE__ */ u("div", {
61
+ }, [o]), K = v(w, T), q = H.get(K), J = u ?? q?.illustration, Y = s ?? q?.icon, X = b ?? q?.buttonLabel, Z = x ?? q?.mainTitle, Q = S ?? q?.mainDescription, $ = C ?? q?.mainDescriptionComponent;
62
+ return /* @__PURE__ */ d("div", {
63
63
  "data-dd-privacy": "allow",
64
64
  role: D,
65
65
  className: A(),
66
66
  ref: G,
67
67
  "data-container-level": W,
68
- children: /* @__PURE__ */ u("div", {
68
+ children: /* @__PURE__ */ d("div", {
69
69
  className: j(),
70
- children: /* @__PURE__ */ d("div", {
70
+ children: /* @__PURE__ */ f("div", {
71
71
  className: O(),
72
72
  children: [
73
- /* @__PURE__ */ d("div", {
73
+ /* @__PURE__ */ f("div", {
74
74
  className: k(),
75
75
  children: [
76
- J && /* @__PURE__ */ u(p, {
76
+ J && /* @__PURE__ */ d(m, {
77
77
  src: J,
78
78
  variant: "picture",
79
79
  alt: V.formatMessage({
@@ -83,7 +83,7 @@ var h = m({ slots: {
83
83
  className: M(),
84
84
  isDecorative: !0
85
85
  }),
86
- Y && /* @__PURE__ */ u(e, {
86
+ Y && /* @__PURE__ */ d(e, {
87
87
  src: Y,
88
88
  size: 24,
89
89
  color: "content.neutral.low",
@@ -93,45 +93,45 @@ var h = m({ slots: {
93
93
  }),
94
94
  className: N()
95
95
  }),
96
- /* @__PURE__ */ d("div", {
96
+ /* @__PURE__ */ f("div", {
97
97
  className: P(),
98
98
  children: [
99
- /* @__PURE__ */ u(n, {
99
+ /* @__PURE__ */ d(n, {
100
100
  asElement: "h1",
101
101
  variant: "h1",
102
102
  color: "content.neutral",
103
103
  className: L(),
104
104
  children: Z
105
105
  }),
106
- /* @__PURE__ */ u(n, {
106
+ /* @__PURE__ */ d(n, {
107
107
  asElement: "h2",
108
108
  variant: "h2",
109
109
  color: "content.neutral",
110
110
  className: R(),
111
111
  children: Z
112
112
  }),
113
- /* @__PURE__ */ u(n, {
113
+ /* @__PURE__ */ d(n, {
114
114
  asElement: "h3",
115
115
  variant: "h3",
116
116
  color: "content.neutral",
117
117
  className: z(),
118
118
  children: Z
119
119
  }),
120
- /* @__PURE__ */ u(n, {
120
+ /* @__PURE__ */ d(n, {
121
121
  asElement: "h4",
122
122
  variant: "h4",
123
123
  color: "content.neutral",
124
124
  className: B(),
125
125
  children: Z
126
126
  }),
127
- /* @__PURE__ */ u(n, {
127
+ /* @__PURE__ */ d(n, {
128
128
  asElement: "p",
129
129
  variant: "body",
130
130
  color: "content.neutral.low",
131
131
  className: F(),
132
132
  children: Q
133
133
  }),
134
- /* @__PURE__ */ u(n, {
134
+ /* @__PURE__ */ d(n, {
135
135
  asElement: "p",
136
136
  variant: "body",
137
137
  color: "content.neutral.low",
@@ -142,13 +142,13 @@ var h = m({ slots: {
142
142
  })
143
143
  ]
144
144
  }),
145
- /* @__PURE__ */ u(t, {
145
+ /* @__PURE__ */ d(t, {
146
146
  variant: W === "component" ? "ghost" : "primary",
147
147
  onPress: y,
148
148
  children: X
149
149
  }),
150
150
  K === "unknown" && _(i, q),
151
- K === "known" && /* @__PURE__ */ u("div", {
151
+ K === "known" && /* @__PURE__ */ d("div", {
152
152
  className: ee(),
153
153
  children: g(i, q)
154
154
  })
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
- import { VariantProps } from 'tailwind-variants';
2
+ import { VariantProps } from '@payfit/unity-themes';
3
3
  declare const collapsible: import('tailwind-variants').TVReturnType<{
4
4
  isExpanded: {
5
5
  true: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "3.16.18",
3
+ "version": "3.16.20",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -103,7 +103,7 @@
103
103
  "@formatjs/intl": "4.1.12",
104
104
  "@internationalized/date": "3.12.4",
105
105
  "minimatch": "10.2.5",
106
- "@payfit/unity-illustrations": "3.16.18",
106
+ "@payfit/unity-illustrations": "3.16.20",
107
107
  "@radix-ui/react-avatar": "1.2.7",
108
108
  "@radix-ui/react-slot": "1.4.0",
109
109
  "@react-aria/interactions": "3.28.1",
@@ -132,8 +132,8 @@
132
132
  "zod": "4.6.5"
133
133
  },
134
134
  "peerDependencies": {
135
- "@payfit/unity-icons": "3.16.18",
136
- "@payfit/unity-themes": "3.16.18",
135
+ "@payfit/unity-icons": "3.16.20",
136
+ "@payfit/unity-themes": "3.16.20",
137
137
  "@storybook/react-vite": "^10",
138
138
  "@tanstack/react-query": "^5",
139
139
  "@tanstack/form-core": "1.33.5",
@@ -157,9 +157,9 @@
157
157
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
158
158
  "@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
159
159
  "@payfit/storybook-config": "0.0.0-use.local",
160
- "@payfit/unity-icons": "3.16.18",
161
- "@payfit/unity-illustrations": "3.16.18",
162
- "@payfit/unity-themes": "3.16.18",
160
+ "@payfit/unity-icons": "3.16.20",
161
+ "@payfit/unity-illustrations": "3.16.20",
162
+ "@payfit/unity-themes": "3.16.20",
163
163
  "@payfit/vite-configs": "0.0.0-use.local",
164
164
  "@storybook/addon-a11y": "10.6.1",
165
165
  "@storybook/addon-designs": "11.1.4",