@payfit/unity-components 2.46.7 → 2.46.9

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,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import { useStore as l } from "@tanstack/react-form";
3
+ import { useSelector as l } from "@tanstack/react-store";
4
4
  import { useFieldContext as c } from "../../../hooks/tanstack-form-context.js";
5
5
  import { Text as f } from "../../text/Text.js";
6
6
  import { useFieldA11yContext as u } from "../TanstackFormField.context.js";
@@ -1,7 +1,7 @@
1
- import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
- import { useRef as S, useState as N, useEffect as l, useCallback as v } from "react";
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { useRef as S, useState as N, useEffect as m, useCallback as v } from "react";
3
3
  import { uyTv as L } from "@payfit/unity-themes";
4
- import { useStore as P } from "@tanstack/react-form";
4
+ import { useSelector as P } from "@tanstack/react-store";
5
5
  import { Group as T } from "react-aria-components/Group";
6
6
  import { FocusScope as R } from "react-aria/FocusScope";
7
7
  import { useKeyboard as j } from "react-aria/useKeyboard";
@@ -39,11 +39,11 @@ function J({
39
39
  isSubmitSuccessful: e.isSubmitSuccessful,
40
40
  submissionAttempts: e.submissionAttempts
41
41
  })), a = S(t), w = S(u), [k, d] = N(""), c = i?.mode === "edit";
42
- l(() => {
42
+ m(() => {
43
43
  t && !a.current && d("");
44
- }, [t]), l(() => {
44
+ }, [t]), m(() => {
45
45
  a.current && !t && r && i?.exitEditMode();
46
- }, [t, r, i]), l(() => {
46
+ }, [t, r, i]), m(() => {
47
47
  if (a.current && !t && !r && y) {
48
48
  const I = b ?? n.formatMessage({
49
49
  id: "unity:component:inline-field:save-error",
@@ -51,7 +51,7 @@ function J({
51
51
  });
52
52
  d(I);
53
53
  }
54
- }, [t, r, y, b, n]), l(() => {
54
+ }, [t, r, y, b, n]), m(() => {
55
55
  a.current = t, w.current = u;
56
56
  }, [t, u]);
57
57
  const { base: D } = z(), V = v(
@@ -66,7 +66,7 @@ function J({
66
66
  e.key === "Escape" && i?.mode === "edit" && (e.preventDefault(), f?.(), g());
67
67
  }
68
68
  });
69
- return /* @__PURE__ */ m(
69
+ return /* @__PURE__ */ l(
70
70
  "div",
71
71
  {
72
72
  className: D(),
@@ -82,11 +82,11 @@ function J({
82
82
  className: "uy:flex uy:flex-1 uy:min-w-0",
83
83
  onSubmit: V,
84
84
  id: i?.editViewId,
85
- children: /* @__PURE__ */ m(H, { children: [
85
+ children: /* @__PURE__ */ l(H, { children: [
86
86
  p && /* @__PURE__ */ s(G, { children: p }),
87
- /* @__PURE__ */ m("div", { className: "uy:flex", children: [
87
+ /* @__PURE__ */ l("div", { className: "uy:flex", children: [
88
88
  x,
89
- /* @__PURE__ */ m(
89
+ /* @__PURE__ */ l(
90
90
  T,
91
91
  {
92
92
  className: "uy:flex uy:gap-50 uy:items-center uy:ml-100",
@@ -1,21 +1,21 @@
1
- import { jsxs as a, jsx as p } from "react/jsx-runtime";
2
- import { useState as S, useRef as c, useEffect as r } from "react";
3
- import { useStore as b } from "@tanstack/react-form";
1
+ import { jsxs as a, jsx as c } from "react/jsx-runtime";
2
+ import { useState as p, useRef as S, useEffect as r } from "react";
3
+ import { useSelector as b } from "@tanstack/react-store";
4
4
  import { useFormContext as R } from "../../../hooks/tanstack-form-context.js";
5
5
  import { useInlineField as A } from "../InlineField.context.js";
6
6
  const I = 5e3;
7
7
  function x({
8
- children: d,
8
+ children: l,
9
9
  successMessage: i
10
10
  }) {
11
- const n = A(), [l, s] = S(""), f = R(), { isSubmitting: e, submissionAttempts: E, isSubmitSuccessful: m } = b(
11
+ const n = A(), [d, s] = p(""), f = R(), { isSubmitting: e, submissionAttempts: E, isSubmitSuccessful: m } = b(
12
12
  f.store,
13
13
  (t) => ({
14
14
  isSubmitting: t.isSubmitting,
15
15
  isSubmitSuccessful: t.isSubmitSuccessful,
16
16
  submissionAttempts: t.submissionAttempts
17
17
  })
18
- ), u = c(e), o = n?.mode === "read";
18
+ ), u = S(e), o = n?.mode === "read";
19
19
  return r(() => {
20
20
  u.current && !e && m && i && s(i);
21
21
  }, [e, m, i, n]), r(() => {
@@ -37,15 +37,15 @@ function x({
37
37
  "aria-hidden": !o,
38
38
  ...!o && { inert: "" },
39
39
  children: [
40
- d,
41
- /* @__PURE__ */ p(
40
+ l,
41
+ /* @__PURE__ */ c(
42
42
  "div",
43
43
  {
44
44
  role: "status",
45
45
  "aria-live": "polite",
46
46
  "aria-atomic": "true",
47
47
  className: "uy:sr-only",
48
- children: l
48
+ children: d
49
49
  }
50
50
  )
51
51
  ]
@@ -1,7 +1,7 @@
1
1
  import { jsx as u, jsxs as te } from "react/jsx-runtime";
2
2
  import { forwardRef as ie, useRef as m, useState as K, useEffect as o, useCallback as P, useImperativeHandle as oe, useMemo as re } from "react";
3
3
  import { uyTv as ne } from "@payfit/unity-themes";
4
- import { useStore as se } from "@tanstack/react-form";
4
+ import { useSelector as se } from "@tanstack/react-store";
5
5
  import { FocusScope as ue } from "react-aria/FocusScope";
6
6
  import { useId as le } from "react-aria/useId";
7
7
  import { useKeyboard as ce } from "react-aria/useKeyboard";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as c, Fragment as y, jsx as i } from "react/jsx-runtime";
2
2
  import { useContext as E, useMemo as G } from "react";
3
3
  import { uyTv as S } from "@payfit/unity-themes";
4
- import { useStore as A } from "@tanstack/react-form";
4
+ import { useSelector as A } from "@tanstack/react-store";
5
5
  import { useIntl as B } from "react-intl";
6
6
  import { useFormContext as j } from "../../../hooks/tanstack-form-context.js";
7
7
  import { useBreakpointListener as k } from "../../../hooks/use-breakpoint-listener.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.46.7",
3
+ "version": "2.46.9",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -64,8 +64,9 @@
64
64
  "@react-aria/utils": "3.34.0",
65
65
  "@react-types/shared": "3.26.0",
66
66
  "@standard-schema/spec": "1.1.0",
67
- "@tanstack/form-core": "1.32.0",
68
- "@tanstack/react-form": "1.32.0",
67
+ "@tanstack/form-core": "1.33.0",
68
+ "@tanstack/react-form": "1.33.0",
69
+ "@tanstack/react-store": "0.11.0",
69
70
  "@tanstack/react-virtual": "3.13.26",
70
71
  "@use-gesture/react": "10.3.1",
71
72
  "embla-carousel": "9.0.0-rc02",
@@ -86,7 +87,7 @@
86
87
  "tailwind-variants": "3.2.2",
87
88
  "usehooks-ts": "3.1.1",
88
89
  "zod": "4.4.3",
89
- "@payfit/unity-illustrations": "2.46.7"
90
+ "@payfit/unity-illustrations": "2.46.9"
90
91
  },
91
92
  "peerDependencies": {
92
93
  "@hookform/devtools": "^4",
@@ -98,8 +99,8 @@
98
99
  "react-hook-form": "^7",
99
100
  "react-router-dom": "^5",
100
101
  "zod": "^3 || ^4",
101
- "@payfit/unity-icons": "2.46.7",
102
- "@payfit/unity-themes": "2.46.7"
102
+ "@payfit/unity-icons": "2.46.9",
103
+ "@payfit/unity-themes": "2.46.9"
103
104
  },
104
105
  "devDependencies": {
105
106
  "@figma/code-connect": "1.4.3",
@@ -116,7 +117,7 @@
116
117
  "@storybook/react-vite": "10.4.1",
117
118
  "@tanstack/intent": "0.0.40",
118
119
  "@tanstack/react-devtools": "0.10.5",
119
- "@tanstack/react-form-devtools": "0.2.27",
120
+ "@tanstack/react-form-devtools": "0.2.29",
120
121
  "@tanstack/react-query": "5.100.14",
121
122
  "@tanstack/react-router": "1.170.10",
122
123
  "@tanstack/react-router-devtools": "1.167.0",
@@ -144,14 +145,13 @@
144
145
  "vite": "7.1.12",
145
146
  "vite-plugin-node-polyfills": "0.24.0",
146
147
  "vitest": "4.1.0",
147
- "@payfit/code-pushup-tools": "0.0.0-use.local",
148
148
  "@payfit/hr-app-eslint": "0.0.0-use.local",
149
149
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
150
150
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
151
151
  "@payfit/storybook-config": "0.0.0-use.local",
152
- "@payfit/unity-icons": "2.46.7",
153
- "@payfit/unity-illustrations": "2.46.7",
154
- "@payfit/unity-themes": "2.46.7",
152
+ "@payfit/unity-icons": "2.46.9",
153
+ "@payfit/unity-illustrations": "2.46.9",
154
+ "@payfit/unity-themes": "2.46.9",
155
155
  "@payfit/vite-configs": "0.0.0-use.local"
156
156
  },
157
157
  "peerDependenciesMeta": {