@erxes/ui 4.0.0-v2.3 → 4.0.0-v2.4

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.
@@ -8,7 +8,7 @@ declare const useFormField: () => {
8
8
  isDirty: boolean;
9
9
  isTouched: boolean;
10
10
  isValidating: boolean;
11
- error?: import("react-hook-form").FieldError;
11
+ error?: import("react-hook-form").FieldError | undefined;
12
12
  id: string;
13
13
  name: string | undefined;
14
14
  formItemId: string;
@@ -36,7 +36,7 @@ declare const formMessageVariants: (props?: ({
36
36
  variant?: "default" | "solid" | null | undefined;
37
37
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
38
38
  declare const FormMessage: ({ ref, className, children, variant, ...props }: React.ComponentProps<'p'> & VariantProps<typeof formMessageVariants>) => React.JSX.Element | null;
39
- export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
39
+ export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getErrors, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
40
40
  Control: typeof FormControl;
41
41
  Description: typeof FormDescription;
42
42
  Field: typeof FormField;
@@ -9,5 +9,9 @@
9
9
  * `@tanstack/react-query` because `@orpc/tanstack-query` imports it directly: a
10
10
  * plugin's own copy would hold a different `skipToken`, so `input: skipToken`
11
11
  * (from the host's `@tanstack/react-query`) would run the query, not disable it.
12
+ * `nuqs` is shared so a plugin's URL state reads web's `NuqsAdapter`: a plugin's
13
+ * own copy would find no adapter and throw. `react-hook-form` is shared because
14
+ * erxes-ui's `Form` is its `FormProvider` and `Controller`: a plugin's `useForm`
15
+ * from its own copy would hand them a form another version built.
12
16
  */
13
17
  export declare const SHARED: string[];
@@ -10,6 +10,10 @@
10
10
  * `@tanstack/react-query` because `@orpc/tanstack-query` imports it directly: a
11
11
  * plugin's own copy would hold a different `skipToken`, so `input: skipToken`
12
12
  * (from the host's `@tanstack/react-query`) would run the query, not disable it.
13
+ * `nuqs` is shared so a plugin's URL state reads web's `NuqsAdapter`: a plugin's
14
+ * own copy would find no adapter and throw. `react-hook-form` is shared because
15
+ * erxes-ui's `Form` is its `FormProvider` and `Controller`: a plugin's `useForm`
16
+ * from its own copy would hand them a form another version built.
13
17
  */
14
18
  const SHARED = [
15
19
  "react",
@@ -23,6 +27,8 @@ const SHARED = [
23
27
  "jotai",
24
28
  "react-i18next",
25
29
  "@tanstack/react-query",
26
- "@tanstack/query-core"
30
+ "@tanstack/query-core",
31
+ "nuqs",
32
+ "react-hook-form"
27
33
  ];
28
34
  export { SHARED };
@@ -18,7 +18,7 @@ export declare const useBarcodeSizeForm: ({ size, onResize }: {
18
18
  height: number;
19
19
  }> | undefined;
20
20
  settingsOpen: boolean;
21
- applySize: (e?: React.BaseSyntheticEvent) => Promise<void>;
21
+ applySize: (e?: React.BaseSyntheticEvent) => Promise<void | undefined>;
22
22
  handleSettingsOpenChange: (open: boolean) => void;
23
23
  handlePresetChange: (value: string) => void;
24
24
  handleInputKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erxes/ui",
3
- "version": "4.0.0-v2.3",
3
+ "version": "4.0.0-v2.4",
4
4
  "private": false,
5
5
  "description": "erxes design system: UI primitives, layout, hooks and shared frontend state",
6
6
  "license": "AGPL-3.0-only",
@@ -56,9 +56,7 @@
56
56
  "date-fns": "4.1.0",
57
57
  "jotai-family": "1.1.0",
58
58
  "libphonenumber-js": "1.12.6",
59
- "nuqs": "^2.10.3",
60
59
  "react-day-picker": "10.0.2",
61
- "react-hook-form": "7.55.0",
62
60
  "react-hotkeys-hook": "5.4.0",
63
61
  "react-imask": "7.6.1",
64
62
  "react-intersection-observer": "11.0.1",
@@ -76,15 +74,19 @@
76
74
  "@types/react": "19.3.0",
77
75
  "@types/react-dom": "19.3.0",
78
76
  "jotai": "^3.0.2",
77
+ "nuqs": "^2.10.3",
79
78
  "react": "^19.3.1",
80
79
  "react-dom": "^19.3.1",
80
+ "react-hook-form": "^7.92.0",
81
81
  "react-i18next": "^18.0.1"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@tanstack/react-query": "^5.107.1",
85
85
  "jotai": "^3.0.2",
86
+ "nuqs": "^2.10.3",
86
87
  "react": "^19.3.1",
87
88
  "react-dom": "^19.3.1",
89
+ "react-hook-form": "^7.92.0",
88
90
  "react-i18next": "^18.0.1",
89
91
  "react-router-dom": "^7.1.1"
90
92
  },