@arkyn/components 2.2.14 → 3.0.1-beta.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.
Files changed (48) hide show
  1. package/dist/bundle.js +6890 -6252
  2. package/dist/bundle.umd.cjs +90 -61
  3. package/dist/components/Breadcrumb/BreadcrumbLink/index.js +1 -1
  4. package/dist/components/Form/FormController/index.d.ts.map +1 -1
  5. package/dist/components/Form/FormController/index.js +2 -2
  6. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +2 -0
  7. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts.map +1 -1
  8. package/dist/components/Input/CurrencyInput/getConfig.d.ts +2 -0
  9. package/dist/components/Input/CurrencyInput/getConfig.d.ts.map +1 -1
  10. package/dist/components/Input/MaskInput/getConfig.d.ts +2 -0
  11. package/dist/components/Input/MaskInput/getConfig.d.ts.map +1 -1
  12. package/dist/components/Input/SimpleInput/getConfig.d.ts +2 -0
  13. package/dist/components/Input/SimpleInput/getConfig.d.ts.map +1 -1
  14. package/dist/components/Pagination/index.js +1 -1
  15. package/dist/components/Select/getConfig.d.ts +3 -0
  16. package/dist/components/Select/getConfig.d.ts.map +1 -1
  17. package/dist/components/Select/index.d.ts.map +1 -1
  18. package/dist/components/Select/index.js +2 -2
  19. package/dist/context/ToastContext.d.ts +1 -2
  20. package/dist/context/ToastContext.d.ts.map +1 -1
  21. package/dist/context/ToastContext.js +2 -2
  22. package/dist/hooks/useAutomation.js +1 -1
  23. package/dist/hooks/useFieldErrors.d.ts.map +1 -1
  24. package/dist/hooks/useFieldErrors.js +28 -5
  25. package/dist/hooks/useScopedParams.js +1 -1
  26. package/dist/index.d.ts +0 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +0 -2
  29. package/dist/style.css +1 -1
  30. package/package.json +4 -3
  31. package/src/components/Select/index.tsx +2 -0
  32. package/src/context/FormKeyContext.ts +5 -0
  33. package/src/hooks/useFieldErrors.ts +3 -3
  34. package/src/hooks/useFormKey.ts +9 -0
  35. package/src/index.ts +2 -2
  36. package/src/provider/FormKeyProvider.tsx +11 -0
  37. package/dist/context/FetcherKeyContext.d.ts +0 -3
  38. package/dist/context/FetcherKeyContext.d.ts.map +0 -1
  39. package/dist/context/FetcherKeyContext.js +0 -3
  40. package/dist/hooks/useFetcherKey.d.ts +0 -3
  41. package/dist/hooks/useFetcherKey.d.ts.map +0 -1
  42. package/dist/hooks/useFetcherKey.js +0 -7
  43. package/dist/provider/FetcherKeyProvider.d.ts +0 -6
  44. package/dist/provider/FetcherKeyProvider.d.ts.map +0 -1
  45. package/dist/provider/FetcherKeyProvider.js +0 -13
  46. package/src/context/FetcherKeyContext.ts +0 -5
  47. package/src/hooks/useFetcherKey.ts +0 -9
  48. package/src/provider/FetcherKeyProvider.tsx +0 -22
@@ -0,0 +1,9 @@
1
+ import { useContext } from "react";
2
+ import { FormKeyContext } from "../context/FormKeyContext";
3
+
4
+ function useFormKey() {
5
+ const contextData = useContext(FormKeyContext);
6
+ return contextData;
7
+ }
8
+
9
+ export { useFormKey };
package/src/index.ts CHANGED
@@ -52,8 +52,8 @@ export { Tooltip } from "./components/Tooltip";
52
52
  export { useFormController } from "./components/Form/FormController";
53
53
  export { useAutomation } from "./hooks/useAutomation";
54
54
  export { useDrawer } from "./hooks/useDrawer";
55
- export { useFetcherKey } from "./hooks/useFetcherKey";
56
55
  export { useFieldErrors } from "./hooks/useFieldErrors";
56
+ export { useFormKey } from "./hooks/useFormKey";
57
57
  export { useHydrated } from "./hooks/useHydrated";
58
58
  export { useModal } from "./hooks/useModal";
59
59
  export { useScopedParams } from "./hooks/useScopedParams";
@@ -61,7 +61,7 @@ export { useToast } from "./hooks/useToast";
61
61
 
62
62
  // Providers
63
63
  export { DrawerProvider } from "./provider/DrawerProvider";
64
- export { FetcherKeyProvider } from "./provider/FetcherKeyProvider";
64
+ export { FormKeyProvider } from "./provider/FormKeyProvider";
65
65
  export { GoogleProvider } from "./provider/GoogleProvider";
66
66
  export { ModalProvider } from "./provider/ModalProvider";
67
67
  export { ToastProvider } from "./provider/ToastProvider";
@@ -0,0 +1,11 @@
1
+ import { FormKeyContext } from "../context/FormKeyContext";
2
+
3
+ function FormKeyProvider(args: { children: React.ReactNode; rawKey: string }) {
4
+ const { children, rawKey } = args;
5
+
6
+ return (
7
+ <FormKeyContext.Provider value={rawKey}>{children}</FormKeyContext.Provider>
8
+ );
9
+ }
10
+
11
+ export { FormKeyProvider };
@@ -1,3 +0,0 @@
1
- declare const FetcherKeyContext: import("react").Context<string>;
2
- export { FetcherKeyContext };
3
- //# sourceMappingURL=FetcherKeyContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FetcherKeyContext.d.ts","sourceRoot":"","sources":["../../src/context/FetcherKeyContext.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,iBAAiB,iCAA0C,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { createContext } from "react";
2
- const FetcherKeyContext = createContext("");
3
- export { FetcherKeyContext };
@@ -1,3 +0,0 @@
1
- declare function useFetcherKey(): string;
2
- export { useFetcherKey };
3
- //# sourceMappingURL=useFetcherKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetcherKey.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetcherKey.ts"],"names":[],"mappings":"AAGA,iBAAS,aAAa,WAGrB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,7 +0,0 @@
1
- import { useContext } from "react";
2
- import { FetcherKeyContext } from "../context/FetcherKeyContext";
3
- function useFetcherKey() {
4
- const contextData = useContext(FetcherKeyContext);
5
- return contextData;
6
- }
7
- export { useFetcherKey };
@@ -1,6 +0,0 @@
1
- declare function FetcherKeyProvider(args: {
2
- children: React.ReactNode;
3
- rawKey?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- export { FetcherKeyProvider };
6
- //# sourceMappingURL=FetcherKeyProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FetcherKeyProvider.d.ts","sourceRoot":"","sources":["../../src/provider/FetcherKeyProvider.tsx"],"names":[],"mappings":"AAGA,iBAAS,kBAAkB,CAAC,IAAI,EAAE;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,2CAaA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useId } from "react";
3
- import { FetcherKeyContext } from "../context/FetcherKeyContext";
4
- function FetcherKeyProvider(args) {
5
- const { children, rawKey } = args;
6
- let fetcherKey = "";
7
- if (!rawKey)
8
- fetcherKey = useId();
9
- else
10
- fetcherKey = rawKey;
11
- return (_jsx(FetcherKeyContext.Provider, { value: fetcherKey, children: children }));
12
- }
13
- export { FetcherKeyProvider };
@@ -1,5 +0,0 @@
1
- import { createContext } from "react";
2
-
3
- const FetcherKeyContext = createContext("" as string | undefined);
4
-
5
- export { FetcherKeyContext };
@@ -1,9 +0,0 @@
1
- import { useContext } from "react";
2
- import { FetcherKeyContext } from "../context/FetcherKeyContext";
3
-
4
- function useFetcherKey() {
5
- const contextData = useContext(FetcherKeyContext);
6
- return contextData;
7
- }
8
-
9
- export { useFetcherKey };
@@ -1,22 +0,0 @@
1
- import { useId } from "react";
2
- import { FetcherKeyContext } from "../context/FetcherKeyContext";
3
-
4
- function FetcherKeyProvider(args: {
5
- children: React.ReactNode;
6
- rawKey?: string;
7
- }) {
8
- const { children, rawKey } = args;
9
-
10
- let fetcherKey = "";
11
-
12
- if (!rawKey) fetcherKey = useId();
13
- else fetcherKey = rawKey;
14
-
15
- return (
16
- <FetcherKeyContext.Provider value={fetcherKey}>
17
- {children}
18
- </FetcherKeyContext.Provider>
19
- );
20
- }
21
-
22
- export { FetcherKeyProvider };