@gustavo-valsechi/client 1.3.31 → 1.3.32

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 (201) hide show
  1. package/dist/components/index.js +3070 -13
  2. package/dist/components/index.mjs +3082 -11
  3. package/dist/contexts/index.js +504 -9
  4. package/dist/contexts/index.mjs +486 -4
  5. package/dist/index.js +3325 -8
  6. package/dist/index.mjs +3312 -4
  7. package/dist/interfaces/index.js +2 -8
  8. package/dist/interfaces/index.mjs +0 -2
  9. package/package.json +2 -2
  10. package/dist/components/styles.js +0 -54
  11. package/dist/components/styles.mjs +0 -19
  12. package/dist/components/types/avatar/index.js +0 -63
  13. package/dist/components/types/avatar/index.mjs +0 -29
  14. package/dist/components/types/avatar/styles.js +0 -93
  15. package/dist/components/types/avatar/styles.mjs +0 -59
  16. package/dist/components/types/badge/index.js +0 -54
  17. package/dist/components/types/badge/index.mjs +0 -20
  18. package/dist/components/types/badge/styles.js +0 -71
  19. package/dist/components/types/badge/styles.mjs +0 -37
  20. package/dist/components/types/block/index.js +0 -44
  21. package/dist/components/types/block/index.mjs +0 -20
  22. package/dist/components/types/block/styles.js +0 -65
  23. package/dist/components/types/block/styles.mjs +0 -30
  24. package/dist/components/types/chart/index.js +0 -80
  25. package/dist/components/types/chart/index.mjs +0 -46
  26. package/dist/components/types/chart/styles.js +0 -42
  27. package/dist/components/types/chart/styles.mjs +0 -8
  28. package/dist/components/types/credit-card/assets/index.js +0 -41
  29. package/dist/components/types/credit-card/assets/index.mjs +0 -21
  30. package/dist/components/types/credit-card/card/index.js +0 -67
  31. package/dist/components/types/credit-card/card/index.mjs +0 -37
  32. package/dist/components/types/credit-card/card/styles.js +0 -170
  33. package/dist/components/types/credit-card/card/styles.mjs +0 -136
  34. package/dist/components/types/credit-card/functions/index.js +0 -52
  35. package/dist/components/types/credit-card/functions/index.mjs +0 -22
  36. package/dist/components/types/credit-card/functions/styles.js +0 -75
  37. package/dist/components/types/credit-card/functions/styles.mjs +0 -41
  38. package/dist/components/types/credit-card/index.js +0 -70
  39. package/dist/components/types/credit-card/index.mjs +0 -36
  40. package/dist/components/types/credit-card/styles.js +0 -72
  41. package/dist/components/types/credit-card/styles.mjs +0 -38
  42. package/dist/components/types/credit-card/tools/index.js +0 -58
  43. package/dist/components/types/credit-card/tools/index.mjs +0 -23
  44. package/dist/components/types/form/index.js +0 -111
  45. package/dist/components/types/form/index.mjs +0 -75
  46. package/dist/components/types/form/styles.js +0 -53
  47. package/dist/components/types/form/styles.mjs +0 -19
  48. package/dist/components/types/form/types/button/index.js +0 -58
  49. package/dist/components/types/form/types/button/index.mjs +0 -24
  50. package/dist/components/types/form/types/button/loading/index.js +0 -38
  51. package/dist/components/types/form/types/button/loading/index.mjs +0 -14
  52. package/dist/components/types/form/types/button/loading/styles.js +0 -126
  53. package/dist/components/types/form/types/button/loading/styles.mjs +0 -92
  54. package/dist/components/types/form/types/button/styles.js +0 -79
  55. package/dist/components/types/form/types/button/styles.mjs +0 -45
  56. package/dist/components/types/form/types/datetime/index.js +0 -72
  57. package/dist/components/types/form/types/datetime/index.mjs +0 -38
  58. package/dist/components/types/form/types/datetime/styles.js +0 -78
  59. package/dist/components/types/form/types/datetime/styles.mjs +0 -44
  60. package/dist/components/types/form/types/file/index.js +0 -71
  61. package/dist/components/types/form/types/file/index.mjs +0 -47
  62. package/dist/components/types/form/types/file/styles.js +0 -65
  63. package/dist/components/types/form/types/file/styles.mjs +0 -31
  64. package/dist/components/types/form/types/index.js +0 -35
  65. package/dist/components/types/form/types/index.mjs +0 -8
  66. package/dist/components/types/form/types/input/index.js +0 -84
  67. package/dist/components/types/form/types/input/index.mjs +0 -50
  68. package/dist/components/types/form/types/input/styles.js +0 -84
  69. package/dist/components/types/form/types/input/styles.mjs +0 -50
  70. package/dist/components/types/form/types/label/index.js +0 -34
  71. package/dist/components/types/form/types/label/index.mjs +0 -10
  72. package/dist/components/types/form/types/label/styles.js +0 -45
  73. package/dist/components/types/form/types/label/styles.mjs +0 -11
  74. package/dist/components/types/form/types/select/index.js +0 -90
  75. package/dist/components/types/form/types/select/index.mjs +0 -56
  76. package/dist/components/types/form/types/select/styles.js +0 -90
  77. package/dist/components/types/form/types/select/styles.mjs +0 -56
  78. package/dist/components/types/form/types/textarea/index.js +0 -72
  79. package/dist/components/types/form/types/textarea/index.mjs +0 -38
  80. package/dist/components/types/form/types/textarea/styles.js +0 -77
  81. package/dist/components/types/form/types/textarea/styles.mjs +0 -43
  82. package/dist/components/types/index.js +0 -43
  83. package/dist/components/types/index.mjs +0 -12
  84. package/dist/components/types/loading/app/index.js +0 -35
  85. package/dist/components/types/loading/app/index.mjs +0 -11
  86. package/dist/components/types/loading/app/styles.js +0 -125
  87. package/dist/components/types/loading/app/styles.mjs +0 -91
  88. package/dist/components/types/loading/bar/index.js +0 -34
  89. package/dist/components/types/loading/bar/index.mjs +0 -10
  90. package/dist/components/types/loading/bar/styles.js +0 -59
  91. package/dist/components/types/loading/bar/styles.mjs +0 -25
  92. package/dist/components/types/loading/index.js +0 -25
  93. package/dist/components/types/loading/index.mjs +0 -3
  94. package/dist/components/types/logo/index.js +0 -37
  95. package/dist/components/types/logo/index.mjs +0 -13
  96. package/dist/components/types/logo/styles.js +0 -57
  97. package/dist/components/types/logo/styles.mjs +0 -23
  98. package/dist/components/types/lottie/animations/index.js +0 -36
  99. package/dist/components/types/lottie/animations/index.mjs +0 -6
  100. package/dist/components/types/lottie/index.js +0 -72
  101. package/dist/components/types/lottie/index.mjs +0 -38
  102. package/dist/components/types/lottie/styles.js +0 -60
  103. package/dist/components/types/lottie/styles.mjs +0 -26
  104. package/dist/components/types/modal/index.js +0 -66
  105. package/dist/components/types/modal/index.mjs +0 -32
  106. package/dist/components/types/modal/styles.js +0 -167
  107. package/dist/components/types/modal/styles.mjs +0 -133
  108. package/dist/components/types/table/index.js +0 -171
  109. package/dist/components/types/table/index.mjs +0 -135
  110. package/dist/components/types/table/modal/actions.js +0 -30
  111. package/dist/components/types/table/modal/actions.mjs +0 -10
  112. package/dist/components/types/table/modal/index.js +0 -91
  113. package/dist/components/types/table/modal/index.mjs +0 -61
  114. package/dist/components/types/table/modal/styles.js +0 -90
  115. package/dist/components/types/table/modal/styles.mjs +0 -56
  116. package/dist/components/types/table/paginate/index.js +0 -92
  117. package/dist/components/types/table/paginate/index.mjs +0 -58
  118. package/dist/components/types/table/paginate/styles.js +0 -74
  119. package/dist/components/types/table/paginate/styles.mjs +0 -40
  120. package/dist/components/types/table/styles.js +0 -300
  121. package/dist/components/types/table/styles.mjs +0 -266
  122. package/dist/contexts/icon/assets/brands/index.js +0 -31
  123. package/dist/contexts/icon/assets/brands/index.mjs +0 -11
  124. package/dist/contexts/icon/assets/index.js +0 -42
  125. package/dist/contexts/icon/assets/index.mjs +0 -12
  126. package/dist/contexts/icon/assets/regular/index.js +0 -31
  127. package/dist/contexts/icon/assets/regular/index.mjs +0 -11
  128. package/dist/contexts/icon/assets/solid/index.js +0 -31
  129. package/dist/contexts/icon/assets/solid/index.mjs +0 -11
  130. package/dist/contexts/icon/index.js +0 -107
  131. package/dist/contexts/icon/index.mjs +0 -72
  132. package/dist/contexts/icon/styles.js +0 -42
  133. package/dist/contexts/icon/styles.mjs +0 -8
  134. package/dist/contexts/modal/index.js +0 -92
  135. package/dist/contexts/modal/index.mjs +0 -57
  136. package/dist/contexts/modal/styles.js +0 -42
  137. package/dist/contexts/modal/styles.mjs +0 -8
  138. package/dist/contexts/theme/content.js +0 -104
  139. package/dist/contexts/theme/content.mjs +0 -79
  140. package/dist/contexts/theme/index.js +0 -68
  141. package/dist/contexts/theme/index.mjs +0 -43
  142. package/dist/contexts/theme/styles.js +0 -116
  143. package/dist/contexts/theme/styles.mjs +0 -82
  144. package/dist/contexts/tooltip/index.js +0 -107
  145. package/dist/contexts/tooltip/index.mjs +0 -72
  146. package/dist/contexts/tooltip/styles.js +0 -78
  147. package/dist/contexts/tooltip/styles.mjs +0 -44
  148. package/dist/interfaces/components/avatar/index.js +0 -17
  149. package/dist/interfaces/components/avatar/index.mjs +0 -1
  150. package/dist/interfaces/components/badge/index.js +0 -17
  151. package/dist/interfaces/components/badge/index.mjs +0 -1
  152. package/dist/interfaces/components/block/index.js +0 -17
  153. package/dist/interfaces/components/block/index.mjs +0 -1
  154. package/dist/interfaces/components/chart/index.js +0 -17
  155. package/dist/interfaces/components/chart/index.mjs +0 -1
  156. package/dist/interfaces/components/credit-card/index.js +0 -17
  157. package/dist/interfaces/components/credit-card/index.mjs +0 -1
  158. package/dist/interfaces/components/form/button/index.js +0 -17
  159. package/dist/interfaces/components/form/button/index.mjs +0 -1
  160. package/dist/interfaces/components/form/datetime/index.js +0 -17
  161. package/dist/interfaces/components/form/datetime/index.mjs +0 -1
  162. package/dist/interfaces/components/form/file/index.js +0 -17
  163. package/dist/interfaces/components/form/file/index.mjs +0 -1
  164. package/dist/interfaces/components/form/index.js +0 -35
  165. package/dist/interfaces/components/form/index.mjs +0 -8
  166. package/dist/interfaces/components/form/input/index.js +0 -17
  167. package/dist/interfaces/components/form/input/index.mjs +0 -1
  168. package/dist/interfaces/components/form/label/index.js +0 -17
  169. package/dist/interfaces/components/form/label/index.mjs +0 -1
  170. package/dist/interfaces/components/form/select/index.js +0 -17
  171. package/dist/interfaces/components/form/select/index.mjs +0 -1
  172. package/dist/interfaces/components/form/textarea/index.js +0 -17
  173. package/dist/interfaces/components/form/textarea/index.mjs +0 -1
  174. package/dist/interfaces/components/index.js +0 -43
  175. package/dist/interfaces/components/index.mjs +0 -12
  176. package/dist/interfaces/components/loading/app/index.js +0 -17
  177. package/dist/interfaces/components/loading/app/index.mjs +0 -1
  178. package/dist/interfaces/components/loading/bar/index.js +0 -17
  179. package/dist/interfaces/components/loading/bar/index.mjs +0 -1
  180. package/dist/interfaces/components/loading/index.js +0 -25
  181. package/dist/interfaces/components/loading/index.mjs +0 -3
  182. package/dist/interfaces/components/logo/index.js +0 -17
  183. package/dist/interfaces/components/logo/index.mjs +0 -1
  184. package/dist/interfaces/components/lottie/index.js +0 -17
  185. package/dist/interfaces/components/lottie/index.mjs +0 -1
  186. package/dist/interfaces/components/modal/index.js +0 -17
  187. package/dist/interfaces/components/modal/index.mjs +0 -1
  188. package/dist/interfaces/components/table/index.js +0 -23
  189. package/dist/interfaces/components/table/index.mjs +0 -2
  190. package/dist/interfaces/components/table/paginate/index.js +0 -17
  191. package/dist/interfaces/components/table/paginate/index.mjs +0 -1
  192. package/dist/interfaces/contexts/icon/index.js +0 -17
  193. package/dist/interfaces/contexts/icon/index.mjs +0 -1
  194. package/dist/interfaces/contexts/index.js +0 -29
  195. package/dist/interfaces/contexts/index.mjs +0 -5
  196. package/dist/interfaces/contexts/modal/index.js +0 -18
  197. package/dist/interfaces/contexts/modal/index.mjs +0 -2
  198. package/dist/interfaces/contexts/theme/index.js +0 -17
  199. package/dist/interfaces/contexts/theme/index.mjs +0 -1
  200. package/dist/interfaces/contexts/tooltip/index.js +0 -17
  201. package/dist/interfaces/contexts/tooltip/index.mjs +0 -1
@@ -1,104 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var content_exports = {};
21
- __export(content_exports, {
22
- CommonTheme: () => CommonTheme,
23
- Themes: () => Themes
24
- });
25
- module.exports = __toCommonJS(content_exports);
26
- const CommonTheme = {
27
- secondary: "#5869da",
28
- tertiary: "#629dfd33",
29
- positive: "#65c965",
30
- negative: "#FF334E",
31
- mobileMaxWidth: "650px",
32
- mobileMinWidth: "315px"
33
- };
34
- const Themes = {
35
- light: {
36
- primary: "#ffffff",
37
- reverse: "#353535",
38
- tooltip: "#f2f2f2",
39
- t8: "#000000cc",
40
- t7: "#000000b3",
41
- t6: "#00000099",
42
- t5: "#00000080",
43
- t4: "#00000066",
44
- t3: "#0000004d",
45
- t2: "#00000033",
46
- t1: "#0000001a",
47
- t08: "#00000014",
48
- t05: "#0000000d",
49
- t03: "#00000007",
50
- t02: "#00000005",
51
- t01: "#00000002",
52
- lgrad: `linear-gradient(
53
- to right,
54
- #dadef7 0%,
55
- #dee2f8 5%,
56
- #e2e5f9 10%,
57
- #e6e9fa 20%,
58
- #eaedfb 30%,
59
- #eff0fb 60%,
60
- #f3f4fc 80%,
61
- #f7f8fd 90%,
62
- #fbfbfe 100%
63
- )`,
64
- maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
65
- ...CommonTheme
66
- },
67
- dark: {
68
- primary: "#333333",
69
- reverse: "#b45252",
70
- tooltip: "#3d3d3d",
71
- t8: "#ffffffcc",
72
- t7: "#ffffffb3",
73
- t6: "#ffffff99",
74
- t5: "#ffffff80",
75
- t4: "#ffffff66",
76
- t3: "#ffffff4d",
77
- t2: "#ffffff33",
78
- t1: "#ffffff1a",
79
- t08: "#ffffff14",
80
- t05: "#ffffff0d",
81
- t03: "#ffffff07",
82
- t02: "#ffffff05",
83
- t01: "#ffffff02",
84
- lgrad: `linear-gradient(
85
- to right,
86
- #3d485c 0%,
87
- #3c4657 5%,
88
- #3b4353 10%,
89
- #3a414e 20%,
90
- #393f4a 30%,
91
- #373c45 60%,
92
- #363a41 80%,
93
- #35383c 90%,
94
- #343538 100%
95
- )`,
96
- maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
97
- ...CommonTheme
98
- }
99
- };
100
- // Annotate the CommonJS export names for ESM import in node:
101
- 0 && (module.exports = {
102
- CommonTheme,
103
- Themes
104
- });
@@ -1,79 +0,0 @@
1
- "use client";
2
- const CommonTheme = {
3
- secondary: "#5869da",
4
- tertiary: "#629dfd33",
5
- positive: "#65c965",
6
- negative: "#FF334E",
7
- mobileMaxWidth: "650px",
8
- mobileMinWidth: "315px"
9
- };
10
- const Themes = {
11
- light: {
12
- primary: "#ffffff",
13
- reverse: "#353535",
14
- tooltip: "#f2f2f2",
15
- t8: "#000000cc",
16
- t7: "#000000b3",
17
- t6: "#00000099",
18
- t5: "#00000080",
19
- t4: "#00000066",
20
- t3: "#0000004d",
21
- t2: "#00000033",
22
- t1: "#0000001a",
23
- t08: "#00000014",
24
- t05: "#0000000d",
25
- t03: "#00000007",
26
- t02: "#00000005",
27
- t01: "#00000002",
28
- lgrad: `linear-gradient(
29
- to right,
30
- #dadef7 0%,
31
- #dee2f8 5%,
32
- #e2e5f9 10%,
33
- #e6e9fa 20%,
34
- #eaedfb 30%,
35
- #eff0fb 60%,
36
- #f3f4fc 80%,
37
- #f7f8fd 90%,
38
- #fbfbfe 100%
39
- )`,
40
- maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
41
- ...CommonTheme
42
- },
43
- dark: {
44
- primary: "#333333",
45
- reverse: "#b45252",
46
- tooltip: "#3d3d3d",
47
- t8: "#ffffffcc",
48
- t7: "#ffffffb3",
49
- t6: "#ffffff99",
50
- t5: "#ffffff80",
51
- t4: "#ffffff66",
52
- t3: "#ffffff4d",
53
- t2: "#ffffff33",
54
- t1: "#ffffff1a",
55
- t08: "#ffffff14",
56
- t05: "#ffffff0d",
57
- t03: "#ffffff07",
58
- t02: "#ffffff05",
59
- t01: "#ffffff02",
60
- lgrad: `linear-gradient(
61
- to right,
62
- #3d485c 0%,
63
- #3c4657 5%,
64
- #3b4353 10%,
65
- #3a414e 20%,
66
- #393f4a 30%,
67
- #373c45 60%,
68
- #363a41 80%,
69
- #35383c 90%,
70
- #343538 100%
71
- )`,
72
- maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
73
- ...CommonTheme
74
- }
75
- };
76
- export {
77
- CommonTheme,
78
- Themes
79
- };
@@ -1,68 +0,0 @@
1
- "use client";
2
- "use strict";
3
- "use client";
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var theme_exports = {};
22
- __export(theme_exports, {
23
- ThemeProvider: () => ThemeProviderContainer,
24
- useTheme: () => useTheme
25
- });
26
- module.exports = __toCommonJS(theme_exports);
27
- var import_jsx_runtime = require("react/jsx-runtime");
28
- var import_react = require("react");
29
- var import_styled_components = require("styled-components");
30
- var import_styles = require("./styles");
31
- var import_content = require("./content");
32
- const ThemeContext = (0, import_react.createContext)({});
33
- const ThemeProviderContainer = (props) => {
34
- const [theme, setTheme] = (0, import_react.useState)("light");
35
- const [defaultTheme] = (0, import_react.useState)("light");
36
- const SwitcherComponent = () => {
37
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
38
- import_styles.Switcher,
39
- {
40
- onClick: () => setTheme(theme === "light" ? "dark" : "light"),
41
- "data-theme": theme || defaultTheme,
42
- children: [
43
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-moon" }),
44
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "switcher", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-sun" })
46
- ]
47
- }
48
- );
49
- };
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
- ThemeContext.Provider,
52
- {
53
- value: {
54
- theme: props.theme || defaultTheme,
55
- setTheme,
56
- content: import_content.Themes[props.theme || defaultTheme],
57
- Switcher: SwitcherComponent
58
- },
59
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, { theme: import_content.Themes[props.theme || defaultTheme], children: props.children })
60
- }
61
- );
62
- };
63
- const useTheme = () => (0, import_react.useContext)(ThemeContext);
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- ThemeProvider,
67
- useTheme
68
- });
@@ -1,43 +0,0 @@
1
- "use client";
2
- "use client";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { createContext, useContext, useState } from "react";
5
- import { ThemeProvider } from "styled-components";
6
- import { Switcher } from "./styles";
7
- import { Themes } from "./content";
8
- const ThemeContext = createContext({});
9
- const ThemeProviderContainer = (props) => {
10
- const [theme, setTheme] = useState("light");
11
- const [defaultTheme] = useState("light");
12
- const SwitcherComponent = () => {
13
- return /* @__PURE__ */ jsxs(
14
- Switcher,
15
- {
16
- onClick: () => setTheme(theme === "light" ? "dark" : "light"),
17
- "data-theme": theme || defaultTheme,
18
- children: [
19
- /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-moon" }),
20
- /* @__PURE__ */ jsx("div", { className: "switcher", children: /* @__PURE__ */ jsx("div", {}) }),
21
- /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-sun" })
22
- ]
23
- }
24
- );
25
- };
26
- return /* @__PURE__ */ jsx(
27
- ThemeContext.Provider,
28
- {
29
- value: {
30
- theme: props.theme || defaultTheme,
31
- setTheme,
32
- content: Themes[props.theme || defaultTheme],
33
- Switcher: SwitcherComponent
34
- },
35
- children: /* @__PURE__ */ jsx(ThemeProvider, { theme: Themes[props.theme || defaultTheme], children: props.children })
36
- }
37
- );
38
- };
39
- const useTheme = () => useContext(ThemeContext);
40
- export {
41
- ThemeProviderContainer as ThemeProvider,
42
- useTheme
43
- };
@@ -1,116 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var styles_exports = {};
31
- __export(styles_exports, {
32
- Switcher: () => Switcher
33
- });
34
- module.exports = __toCommonJS(styles_exports);
35
- var import_styled_components = __toESM(require("styled-components"));
36
- const Switcher = import_styled_components.default.div`
37
- width: 3rem;
38
- height: 1.5rem;
39
- border-radius: 1rem;
40
- border: 2px solid ${({ theme }) => theme.t05};
41
- overflow: hidden;
42
- display: flex;
43
- align-items: center;
44
- cursor: pointer;
45
- position: relative;
46
-
47
- i {
48
- color: ${({ theme }) => theme.t6};
49
- position: absolute;
50
- transform: translateY(-50%);
51
- font-size: .9rem;
52
- z-index: 0;
53
- transition: ease .8s;
54
-
55
- &:first-child {
56
- left: .2rem;
57
- top: 50%;
58
- opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
59
- }
60
-
61
- &:last-child {
62
- right: .2rem;
63
- top: 50%;
64
- opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
65
- }
66
- }
67
-
68
- .switcher {
69
- width: 1rem;
70
- height: 1rem;
71
- border-radius: 1rem;
72
- position: relative;
73
- transition: ease .3s;
74
- transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
75
- z-index: 1;
76
-
77
- div {
78
- width: 100%;
79
- height: 100%;
80
- background: ${({ theme }) => theme.primary};
81
- border-radius: 1rem;
82
- position: relative;
83
- z-index: 2;
84
- }
85
-
86
- &:after {
87
- content: "";
88
- position: absolute;
89
- width: 100%;
90
- height: 100%;
91
- border-radius: 1rem;
92
- transform: scale(1.8);
93
- background: ${({ theme }) => theme.t05};
94
- top: 0;
95
- left: 0;
96
- z-index: 1;
97
- }
98
-
99
- &:before {
100
- content: "";
101
- position: absolute;
102
- width: 100%;
103
- height: 100%;
104
- border-radius: 1rem;
105
- transform: scale(3);
106
- background: ${({ theme }) => theme.t05};
107
- top: 0;
108
- left: 0;
109
- z-index: 0;
110
- }
111
- }
112
- `;
113
- // Annotate the CommonJS export names for ESM import in node:
114
- 0 && (module.exports = {
115
- Switcher
116
- });
@@ -1,82 +0,0 @@
1
- "use client";
2
- import styled from "styled-components";
3
- const Switcher = styled.div`
4
- width: 3rem;
5
- height: 1.5rem;
6
- border-radius: 1rem;
7
- border: 2px solid ${({ theme }) => theme.t05};
8
- overflow: hidden;
9
- display: flex;
10
- align-items: center;
11
- cursor: pointer;
12
- position: relative;
13
-
14
- i {
15
- color: ${({ theme }) => theme.t6};
16
- position: absolute;
17
- transform: translateY(-50%);
18
- font-size: .9rem;
19
- z-index: 0;
20
- transition: ease .8s;
21
-
22
- &:first-child {
23
- left: .2rem;
24
- top: 50%;
25
- opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
26
- }
27
-
28
- &:last-child {
29
- right: .2rem;
30
- top: 50%;
31
- opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
32
- }
33
- }
34
-
35
- .switcher {
36
- width: 1rem;
37
- height: 1rem;
38
- border-radius: 1rem;
39
- position: relative;
40
- transition: ease .3s;
41
- transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
42
- z-index: 1;
43
-
44
- div {
45
- width: 100%;
46
- height: 100%;
47
- background: ${({ theme }) => theme.primary};
48
- border-radius: 1rem;
49
- position: relative;
50
- z-index: 2;
51
- }
52
-
53
- &:after {
54
- content: "";
55
- position: absolute;
56
- width: 100%;
57
- height: 100%;
58
- border-radius: 1rem;
59
- transform: scale(1.8);
60
- background: ${({ theme }) => theme.t05};
61
- top: 0;
62
- left: 0;
63
- z-index: 1;
64
- }
65
-
66
- &:before {
67
- content: "";
68
- position: absolute;
69
- width: 100%;
70
- height: 100%;
71
- border-radius: 1rem;
72
- transform: scale(3);
73
- background: ${({ theme }) => theme.t05};
74
- top: 0;
75
- left: 0;
76
- z-index: 0;
77
- }
78
- }
79
- `;
80
- export {
81
- Switcher
82
- };
@@ -1,107 +0,0 @@
1
- "use client";
2
- "use strict";
3
- "use client";
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
- var tooltip_exports = {};
32
- __export(tooltip_exports, {
33
- TooltipProvider: () => TooltipProviderContainer,
34
- useTooltip: () => useTooltip
35
- });
36
- module.exports = __toCommonJS(tooltip_exports);
37
- var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_react = require("react");
39
- var import_styles = require("./styles");
40
- var import_lodash = __toESM(require("lodash"));
41
- const TooltipContext = (0, import_react.createContext)({});
42
- const TooltipProviderContainer = ({ children }) => {
43
- const [tooltips, setTooltips] = (0, import_react.useState)([]);
44
- const getContent = (target) => {
45
- var _a;
46
- const rect = target.getBoundingClientRect();
47
- return {
48
- top: rect.top + window.scrollY - (target.offsetHeight + 8),
49
- left: rect.left + window.scrollX + target.offsetWidth / 2,
50
- content: ((_a = target.dataset) == null ? void 0 : _a.tooltip) || ""
51
- };
52
- };
53
- (0, import_react.useEffect)(() => {
54
- const processElement = (element) => {
55
- element.addEventListener("mouseenter", (event) => {
56
- const target = event == null ? void 0 : event.target;
57
- if (!target) return;
58
- setTooltips(import_lodash.default.concat(tooltips, [getContent(target)]));
59
- });
60
- element.addEventListener("mouseleave", (event) => {
61
- const target = event == null ? void 0 : event.target;
62
- if (!target) return;
63
- setTooltips(import_lodash.default.filter(tooltips, (data) => JSON.stringify(data) === JSON.stringify(getContent(target))));
64
- });
65
- };
66
- document.querySelectorAll("[data-tooltip]").forEach((el) => processElement(el));
67
- const observer = new MutationObserver((mutations) => {
68
- mutations.forEach((mutation) => {
69
- mutation.addedNodes.forEach((node) => {
70
- if (node.nodeType === 1) {
71
- const el = node;
72
- if (el.getAttribute("data-tooltip")) processElement(el);
73
- el.querySelectorAll("[data-tooltip]").forEach((child) => processElement(child));
74
- }
75
- });
76
- });
77
- });
78
- observer.observe(document.body, {
79
- childList: true,
80
- subtree: true
81
- });
82
- return () => observer.disconnect();
83
- }, []);
84
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipContext.Provider, { value: {}, children: [
85
- import_lodash.default.map(
86
- tooltips,
87
- (data, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
- import_styles.Tooltip,
89
- {
90
- style: {
91
- top: data.top,
92
- left: data.left
93
- },
94
- children: data.content
95
- },
96
- index
97
- )
98
- ),
99
- children
100
- ] });
101
- };
102
- const useTooltip = () => (0, import_react.useContext)(TooltipContext);
103
- // Annotate the CommonJS export names for ESM import in node:
104
- 0 && (module.exports = {
105
- TooltipProvider,
106
- useTooltip
107
- });
@@ -1,72 +0,0 @@
1
- "use client";
2
- "use client";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { createContext, useContext, useEffect, useState } from "react";
5
- import { Tooltip } from "./styles";
6
- import _ from "lodash";
7
- const TooltipContext = createContext({});
8
- const TooltipProviderContainer = ({ children }) => {
9
- const [tooltips, setTooltips] = useState([]);
10
- const getContent = (target) => {
11
- var _a;
12
- const rect = target.getBoundingClientRect();
13
- return {
14
- top: rect.top + window.scrollY - (target.offsetHeight + 8),
15
- left: rect.left + window.scrollX + target.offsetWidth / 2,
16
- content: ((_a = target.dataset) == null ? void 0 : _a.tooltip) || ""
17
- };
18
- };
19
- useEffect(() => {
20
- const processElement = (element) => {
21
- element.addEventListener("mouseenter", (event) => {
22
- const target = event == null ? void 0 : event.target;
23
- if (!target) return;
24
- setTooltips(_.concat(tooltips, [getContent(target)]));
25
- });
26
- element.addEventListener("mouseleave", (event) => {
27
- const target = event == null ? void 0 : event.target;
28
- if (!target) return;
29
- setTooltips(_.filter(tooltips, (data) => JSON.stringify(data) === JSON.stringify(getContent(target))));
30
- });
31
- };
32
- document.querySelectorAll("[data-tooltip]").forEach((el) => processElement(el));
33
- const observer = new MutationObserver((mutations) => {
34
- mutations.forEach((mutation) => {
35
- mutation.addedNodes.forEach((node) => {
36
- if (node.nodeType === 1) {
37
- const el = node;
38
- if (el.getAttribute("data-tooltip")) processElement(el);
39
- el.querySelectorAll("[data-tooltip]").forEach((child) => processElement(child));
40
- }
41
- });
42
- });
43
- });
44
- observer.observe(document.body, {
45
- childList: true,
46
- subtree: true
47
- });
48
- return () => observer.disconnect();
49
- }, []);
50
- return /* @__PURE__ */ jsxs(TooltipContext.Provider, { value: {}, children: [
51
- _.map(
52
- tooltips,
53
- (data, index) => /* @__PURE__ */ jsx(
54
- Tooltip,
55
- {
56
- style: {
57
- top: data.top,
58
- left: data.left
59
- },
60
- children: data.content
61
- },
62
- index
63
- )
64
- ),
65
- children
66
- ] });
67
- };
68
- const useTooltip = () => useContext(TooltipContext);
69
- export {
70
- TooltipProviderContainer as TooltipProvider,
71
- useTooltip
72
- };