@me1a/ui 1.2.4 → 1.2.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.
Files changed (63) hide show
  1. package/dist/components/iconify/iconify.d.ts +7 -0
  2. package/dist/components/iconify/index.d.ts +2 -0
  3. package/dist/components/iconify/types.d.ts +2 -0
  4. package/dist/components/index.cjs.js +12760 -0
  5. package/dist/components/index.cjs.js.map +1 -0
  6. package/dist/components/index.d.ts +2 -0
  7. package/dist/components/index.es.js +12736 -0
  8. package/dist/components/index.es.js.map +1 -0
  9. package/dist/components/snackbar/index.d.ts +2 -0
  10. package/dist/components/snackbar/snackbar-provider.d.ts +5 -0
  11. package/dist/components/snackbar/styles.d.ts +6 -0
  12. package/dist/hook-forms/index.cjs.js.map +1 -1
  13. package/dist/hook-forms/index.d.ts +11 -2
  14. package/dist/hook-forms/index.es.js.map +1 -1
  15. package/dist/hooks/index.cjs.js +27 -0
  16. package/dist/hooks/index.cjs.js.map +1 -0
  17. package/dist/hooks/index.d.ts +1 -0
  18. package/dist/hooks/index.es.js +25 -0
  19. package/dist/hooks/index.es.js.map +1 -0
  20. package/dist/hooks/use-boolean.d.ts +9 -0
  21. package/dist/index.cjs.js +3926 -3923
  22. package/dist/index.cjs.js.map +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.es.js +2546 -2543
  25. package/dist/index.es.js.map +1 -1
  26. package/dist/redux/index.cjs.js +1347 -0
  27. package/dist/redux/index.cjs.js.map +1 -0
  28. package/dist/redux/index.d.ts +1 -0
  29. package/dist/redux/index.es.js +1317 -0
  30. package/dist/redux/index.es.js.map +1 -0
  31. package/dist/redux-toolkit/index.cjs.js +3 -0
  32. package/dist/redux-toolkit/index.cjs.js.map +1 -0
  33. package/dist/redux-toolkit/index.es.js +2 -0
  34. package/dist/redux-toolkit/index.es.js.map +1 -0
  35. package/package.json +29 -9
  36. package/dist/example/example/index.d.ts +0 -1
  37. package/dist/example/example/simple.d.ts +0 -4
  38. package/dist/example/hook-forms/form-provider.d.ts +0 -8
  39. package/dist/example/hook-forms/index.d.ts +0 -11
  40. package/dist/example/hook-forms/rhf-autocomplete.d.ts +0 -11
  41. package/dist/example/hook-forms/rhf-checkbox.d.ts +0 -19
  42. package/dist/example/hook-forms/rhf-radio-group.d.ts +0 -13
  43. package/dist/example/hook-forms/rhf-select.d.ts +0 -11
  44. package/dist/example/hook-forms/rhf-slider.d.ts +0 -7
  45. package/dist/example/hook-forms/rhf-switch.d.ts +0 -7
  46. package/dist/example/hook-forms/rhf-text-field.d.ts +0 -6
  47. package/dist/example/index.cjs.js +0 -1381
  48. package/dist/example/index.cjs.js.map +0 -1
  49. package/dist/example/index.d.ts +0 -2
  50. package/dist/example/index.es.js +0 -1379
  51. package/dist/example/index.es.js.map +0 -1
  52. package/dist/example/simple.d.ts +0 -4
  53. package/dist/hook-forms/example/index.d.ts +0 -1
  54. package/dist/hook-forms/example/simple.d.ts +0 -4
  55. package/dist/hook-forms/hook-forms/form-provider.d.ts +0 -8
  56. package/dist/hook-forms/hook-forms/index.d.ts +0 -11
  57. package/dist/hook-forms/hook-forms/rhf-autocomplete.d.ts +0 -11
  58. package/dist/hook-forms/hook-forms/rhf-checkbox.d.ts +0 -19
  59. package/dist/hook-forms/hook-forms/rhf-radio-group.d.ts +0 -13
  60. package/dist/hook-forms/hook-forms/rhf-select.d.ts +0 -11
  61. package/dist/hook-forms/hook-forms/rhf-slider.d.ts +0 -7
  62. package/dist/hook-forms/hook-forms/rhf-switch.d.ts +0 -7
  63. package/dist/hook-forms/hook-forms/rhf-text-field.d.ts +0 -6
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // ----------------------------------------------------------------------
6
+ function useBoolean(defaultValue) {
7
+ const [value, setValue] = react.useState(!!defaultValue);
8
+ const onTrue = react.useCallback(() => {
9
+ setValue(true);
10
+ }, []);
11
+ const onFalse = react.useCallback(() => {
12
+ setValue(false);
13
+ }, []);
14
+ const onToggle = react.useCallback(() => {
15
+ setValue(prev => !prev);
16
+ }, []);
17
+ return {
18
+ value,
19
+ onTrue,
20
+ onFalse,
21
+ onToggle,
22
+ setValue
23
+ };
24
+ }
25
+
26
+ exports.useBoolean = useBoolean;
27
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/hooks/use-boolean.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useState } from \"react\";\n\n// ----------------------------------------------------------------------\n\ninterface ReturnType {\n value: boolean;\n onTrue: () => void;\n onFalse: () => void;\n onToggle: () => void;\n setValue: React.Dispatch<React.SetStateAction<boolean>>;\n}\n\n// ----------------------------------------------------------------------\n\nexport function useBoolean(defaultValue?: boolean): ReturnType {\n const [value, setValue] = useState(!!defaultValue);\n\n const onTrue = useCallback(() => {\n setValue(true);\n }, []);\n\n const onFalse = useCallback(() => {\n setValue(false);\n }, []);\n\n const onToggle = useCallback(() => {\n setValue((prev) => !prev);\n }, []);\n\n return {\n value,\n onTrue,\n onFalse,\n onToggle,\n setValue,\n };\n}\n"],"names":["useBoolean","defaultValue","value","setValue","useState","onTrue","useCallback","onFalse","onToggle","prev"],"mappings":";;;;AAcA;AAEM,SAAUA,UAAUA,CAACC,YAAsB,EAAA;EAC/C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,cAAQ,CAAC,CAAC,CAACH,YAAY,CAAC;AAElD,EAAA,MAAMI,MAAM,GAAGC,iBAAW,CAAC,MAAK;IAC9BH,QAAQ,CAAC,IAAI,CAAC;GACf,EAAE,EAAE,CAAC;AAEN,EAAA,MAAMI,OAAO,GAAGD,iBAAW,CAAC,MAAK;IAC/BH,QAAQ,CAAC,KAAK,CAAC;GAChB,EAAE,EAAE,CAAC;AAEN,EAAA,MAAMK,QAAQ,GAAGF,iBAAW,CAAC,MAAK;AAChCH,IAAAA,QAAQ,CAAEM,IAAI,IAAK,CAACA,IAAI,CAAC;GAC1B,EAAE,EAAE,CAAC;EAEN,OAAO;IACLP,KAAK;IACLG,MAAM;IACNE,OAAO;IACPC,QAAQ;AACRL,IAAAA;GACD;AACH;;;;"}
@@ -0,0 +1 @@
1
+ export * from "./use-boolean";
@@ -0,0 +1,25 @@
1
+ import { useState, useCallback } from 'react';
2
+
3
+ // ----------------------------------------------------------------------
4
+ function useBoolean(defaultValue) {
5
+ const [value, setValue] = useState(!!defaultValue);
6
+ const onTrue = useCallback(() => {
7
+ setValue(true);
8
+ }, []);
9
+ const onFalse = useCallback(() => {
10
+ setValue(false);
11
+ }, []);
12
+ const onToggle = useCallback(() => {
13
+ setValue(prev => !prev);
14
+ }, []);
15
+ return {
16
+ value,
17
+ onTrue,
18
+ onFalse,
19
+ onToggle,
20
+ setValue
21
+ };
22
+ }
23
+
24
+ export { useBoolean };
25
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../src/hooks/use-boolean.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useState } from \"react\";\n\n// ----------------------------------------------------------------------\n\ninterface ReturnType {\n value: boolean;\n onTrue: () => void;\n onFalse: () => void;\n onToggle: () => void;\n setValue: React.Dispatch<React.SetStateAction<boolean>>;\n}\n\n// ----------------------------------------------------------------------\n\nexport function useBoolean(defaultValue?: boolean): ReturnType {\n const [value, setValue] = useState(!!defaultValue);\n\n const onTrue = useCallback(() => {\n setValue(true);\n }, []);\n\n const onFalse = useCallback(() => {\n setValue(false);\n }, []);\n\n const onToggle = useCallback(() => {\n setValue((prev) => !prev);\n }, []);\n\n return {\n value,\n onTrue,\n onFalse,\n onToggle,\n setValue,\n };\n}\n"],"names":["useBoolean","defaultValue","value","setValue","useState","onTrue","useCallback","onFalse","onToggle","prev"],"mappings":";;AAcA;AAEM,SAAUA,UAAUA,CAACC,YAAsB,EAAA;EAC/C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAC,CAAC,CAACH,YAAY,CAAC;AAElD,EAAA,MAAMI,MAAM,GAAGC,WAAW,CAAC,MAAK;IAC9BH,QAAQ,CAAC,IAAI,CAAC;GACf,EAAE,EAAE,CAAC;AAEN,EAAA,MAAMI,OAAO,GAAGD,WAAW,CAAC,MAAK;IAC/BH,QAAQ,CAAC,KAAK,CAAC;GAChB,EAAE,EAAE,CAAC;AAEN,EAAA,MAAMK,QAAQ,GAAGF,WAAW,CAAC,MAAK;AAChCH,IAAAA,QAAQ,CAAEM,IAAI,IAAK,CAACA,IAAI,CAAC;GAC1B,EAAE,EAAE,CAAC;EAEN,OAAO;IACLP,KAAK;IACLG,MAAM;IACNE,OAAO;IACPC,QAAQ;AACRL,IAAAA;GACD;AACH;;;;"}
@@ -0,0 +1,9 @@
1
+ interface ReturnType {
2
+ value: boolean;
3
+ onTrue: () => void;
4
+ onFalse: () => void;
5
+ onToggle: () => void;
6
+ setValue: React.Dispatch<React.SetStateAction<boolean>>;
7
+ }
8
+ export declare function useBoolean(defaultValue?: boolean): ReturnType;
9
+ export {};