@payfit/unity-components 2.51.5 → 2.51.6

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.
@@ -47,11 +47,11 @@ type UnionButtonProps = (UnityButtonProps & {
47
47
  } & ButtonGhost) | (UnityButtonProps & {
48
48
  variant: 'outlined';
49
49
  } & ButtonOutlined);
50
- export type ButtonProps = PropsWithChildren<Omit<UnionButtonProps, 'style'>>;
50
+ export type ButtonProps = PropsWithChildren<Omit<UnionButtonProps, 'style' | 'className'>>;
51
51
  /**
52
52
  * Buttons allow users to take actions, and make choices, with a single tap.
53
53
  */
54
- declare const Button: import('react').ForwardRefExoticComponent<Omit<UnionButtonProps, "style"> & {
54
+ declare const Button: import('react').ForwardRefExoticComponent<Omit<UnionButtonProps, "style" | "className"> & {
55
55
  children?: import('react').ReactNode | undefined;
56
56
  } & import('react').RefAttributes<HTMLButtonElement>>;
57
57
  export { Button };
@@ -9,32 +9,26 @@ import { useIntl as u } from "react-intl";
9
9
  import { useSelector as d } from "@tanstack/react-store";
10
10
  //#region src/components/inline-field-group/parts/InlineFieldGroupActions.tsx
11
11
  var f = o({
12
- slots: {
13
- container: "",
14
- button: ""
15
- },
12
+ slots: { container: "" },
16
13
  variants: { orientation: {
17
14
  horizontal: { container: "uy:flex uy:gap-100 uy:items-center" },
18
- vertical: {
19
- container: "uy:flex uy:flex-col uy:gap-100 uy:w-full",
20
- button: "uy:w-full"
21
- }
15
+ vertical: { container: "uy:flex uy:flex-col uy:gap-100 uy:w-full" }
22
16
  } },
23
17
  defaultVariants: { orientation: "horizontal" }
24
18
  });
25
19
  function p({ orientation: o = "horizontal", customActions: p }) {
26
20
  let m = u(), h = i(r), g = e(), _ = g === "xs" || g === "sm";
27
21
  if (!h) throw Error("InlineFieldGroupActions must be used within InlineFieldGroup");
28
- let { mode: v, enterEditMode: y, exitEditMode: b, editViewId: x, isLoading: S, editButtonRef: C, editLabel: w, saveLabel: T, cancelLabel: E, onEditPress: D, onSavePress: O, onCancelPress: k } = h, { isDirty: A } = d(n().store, (e) => ({ isDirty: e.isDirty })), { container: j, button: M } = f({ orientation: o }), N = w || m.formatMessage({
22
+ let { mode: v, enterEditMode: y, exitEditMode: b, editViewId: x, isLoading: S, editButtonRef: C, editLabel: w, saveLabel: T, cancelLabel: E, onEditPress: D, onSavePress: O, onCancelPress: k } = h, { isDirty: A } = d(n().store, (e) => ({ isDirty: e.isDirty })), { container: j } = f({ orientation: o }), M = w || m.formatMessage({
29
23
  id: "unity:component:inline-field-group:edit",
30
24
  defaultMessage: "Edit"
31
- }), P = T || m.formatMessage({
25
+ }), N = T || m.formatMessage({
32
26
  id: "unity:component:inline-field-group:save",
33
27
  defaultMessage: "Save"
34
- }), F = E || m.formatMessage({
28
+ }), P = E || m.formatMessage({
35
29
  id: "unity:component:inline-field-group:cancel",
36
30
  defaultMessage: "Cancel"
37
- }), I = a(() => _ ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
31
+ }), F = a(() => _ ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
38
32
  variant: "primary",
39
33
  size: "default",
40
34
  isDisabled: !A || S,
@@ -43,8 +37,7 @@ function p({ orientation: o = "horizontal", customActions: p }) {
43
37
  onPress: () => {
44
38
  O?.();
45
39
  },
46
- className: M(),
47
- children: P
40
+ children: N
48
41
  }), /* @__PURE__ */ c(t, {
49
42
  variant: "secondary",
50
43
  size: "default",
@@ -53,8 +46,7 @@ function p({ orientation: o = "horizontal", customActions: p }) {
53
46
  },
54
47
  isDisabled: S,
55
48
  type: "button",
56
- className: M(),
57
- children: F
49
+ children: P
58
50
  })] }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
59
51
  variant: "secondary",
60
52
  size: "default",
@@ -63,8 +55,7 @@ function p({ orientation: o = "horizontal", customActions: p }) {
63
55
  },
64
56
  isDisabled: S,
65
57
  type: "button",
66
- className: M(),
67
- children: F
58
+ children: P
68
59
  }), /* @__PURE__ */ c(t, {
69
60
  variant: "primary",
70
61
  size: "default",
@@ -74,12 +65,10 @@ function p({ orientation: o = "horizontal", customActions: p }) {
74
65
  onPress: () => {
75
66
  O?.();
76
67
  },
77
- className: M(),
78
- children: P
68
+ children: N
79
69
  })] }), [
80
- M,
81
- F,
82
70
  P,
71
+ N,
83
72
  b,
84
73
  A,
85
74
  S,
@@ -101,9 +90,8 @@ function p({ orientation: o = "horizontal", customActions: p }) {
101
90
  prefixIcon: "PencilSimpleOutlined",
102
91
  "aria-expanded": !1,
103
92
  "aria-controls": x,
104
- className: M(),
105
- children: N
106
- }) : I]
93
+ children: M
94
+ }) : F]
107
95
  });
108
96
  }
109
97
  p.displayName = "InlineFieldGroupActions";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.51.5",
3
+ "version": "2.51.6",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -91,7 +91,7 @@
91
91
  "tailwind-variants": "3.2.2",
92
92
  "usehooks-ts": "3.1.1",
93
93
  "zod": "4.4.3",
94
- "@payfit/unity-illustrations": "2.51.5"
94
+ "@payfit/unity-illustrations": "2.51.6"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "@hookform/devtools": "^4",
@@ -103,8 +103,8 @@
103
103
  "react-hook-form": "^7",
104
104
  "react-router-dom": "^5",
105
105
  "zod": "^3 || ^4",
106
- "@payfit/unity-icons": "2.51.5",
107
- "@payfit/unity-themes": "2.51.5"
106
+ "@payfit/unity-icons": "2.51.6",
107
+ "@payfit/unity-themes": "2.51.6"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@figma/code-connect": "1.4.8",
@@ -152,12 +152,12 @@
152
152
  "vitest": "4.1.9",
153
153
  "@payfit/hr-app-eslint": "0.0.0-use.local",
154
154
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
155
- "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
156
155
  "@payfit/storybook-config": "0.0.0-use.local",
157
- "@payfit/unity-icons": "2.51.5",
158
- "@payfit/unity-illustrations": "2.51.5",
159
- "@payfit/unity-themes": "2.51.5",
160
- "@payfit/vite-configs": "0.0.0-use.local"
156
+ "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
157
+ "@payfit/unity-illustrations": "2.51.6",
158
+ "@payfit/unity-themes": "2.51.6",
159
+ "@payfit/vite-configs": "0.0.0-use.local",
160
+ "@payfit/unity-icons": "2.51.6"
161
161
  },
162
162
  "peerDependenciesMeta": {
163
163
  "@hookform/devtools": {