@gustavo-valsechi/client 1.3.29 → 1.3.30

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 +14 -3070
  2. package/dist/components/index.mjs +12 -3082
  3. package/dist/components/styles.js +3 -4
  4. package/dist/components/styles.mjs +3 -4
  5. package/dist/components/types/avatar/index.js +4 -62
  6. package/dist/components/types/avatar/index.mjs +3 -61
  7. package/dist/components/types/avatar/styles.js +2 -3
  8. package/dist/components/types/avatar/styles.mjs +2 -3
  9. package/dist/components/types/badge/index.js +5 -304
  10. package/dist/components/types/badge/index.mjs +5 -308
  11. package/dist/components/types/badge/styles.js +2 -3
  12. package/dist/components/types/badge/styles.mjs +2 -3
  13. package/dist/components/types/block/index.js +9 -3046
  14. package/dist/components/types/block/index.mjs +9 -3066
  15. package/dist/components/types/block/styles.js +3 -4
  16. package/dist/components/types/block/styles.mjs +3 -4
  17. package/dist/components/types/chart/index.js +13 -284
  18. package/dist/components/types/chart/index.mjs +13 -288
  19. package/dist/components/types/chart/styles.js +2 -3
  20. package/dist/components/types/chart/styles.mjs +2 -2
  21. package/dist/components/types/credit-card/assets/index.js +2 -3
  22. package/dist/components/types/credit-card/assets/index.mjs +2 -2
  23. package/dist/components/types/credit-card/card/index.js +9 -681
  24. package/dist/components/types/credit-card/card/index.mjs +7 -701
  25. package/dist/components/types/credit-card/card/styles.js +2 -3
  26. package/dist/components/types/credit-card/card/styles.mjs +2 -3
  27. package/dist/components/types/credit-card/functions/index.js +4 -44
  28. package/dist/components/types/credit-card/functions/index.mjs +3 -41
  29. package/dist/components/types/credit-card/functions/styles.js +2 -3
  30. package/dist/components/types/credit-card/functions/styles.mjs +2 -3
  31. package/dist/components/types/credit-card/index.js +7 -803
  32. package/dist/components/types/credit-card/index.mjs +7 -823
  33. package/dist/components/types/credit-card/styles.js +2 -3
  34. package/dist/components/types/credit-card/styles.mjs +2 -3
  35. package/dist/components/types/credit-card/tools/index.js +7 -527
  36. package/dist/components/types/credit-card/tools/index.mjs +8 -550
  37. package/dist/components/types/form/index.js +24 -659
  38. package/dist/components/types/form/index.mjs +20 -655
  39. package/dist/components/types/form/styles.js +2 -3
  40. package/dist/components/types/form/styles.mjs +2 -3
  41. package/dist/components/types/form/types/button/index.js +7 -149
  42. package/dist/components/types/form/types/button/index.mjs +6 -146
  43. package/dist/components/types/form/types/button/loading/index.js +3 -104
  44. package/dist/components/types/form/types/button/loading/index.mjs +2 -91
  45. package/dist/components/types/form/types/button/loading/styles.js +2 -3
  46. package/dist/components/types/form/types/button/loading/styles.mjs +2 -3
  47. package/dist/components/types/form/types/button/styles.js +2 -3
  48. package/dist/components/types/form/types/button/styles.mjs +2 -3
  49. package/dist/components/types/form/types/datetime/index.js +7 -63
  50. package/dist/components/types/form/types/datetime/index.mjs +6 -60
  51. package/dist/components/types/form/types/datetime/styles.js +2 -3
  52. package/dist/components/types/form/types/datetime/styles.mjs +2 -3
  53. package/dist/components/types/form/types/file/index.js +9 -62
  54. package/dist/components/types/form/types/file/index.mjs +7 -50
  55. package/dist/components/types/form/types/file/styles.js +2 -3
  56. package/dist/components/types/form/types/file/styles.mjs +2 -3
  57. package/dist/components/types/form/types/index.js +16 -625
  58. package/dist/components/types/form/types/index.mjs +8 -601
  59. package/dist/components/types/form/types/input/index.js +10 -72
  60. package/dist/components/types/form/types/input/index.mjs +7 -69
  61. package/dist/components/types/form/types/input/styles.js +2 -3
  62. package/dist/components/types/form/types/input/styles.mjs +2 -3
  63. package/dist/components/types/form/types/label/index.js +3 -23
  64. package/dist/components/types/form/types/label/index.mjs +2 -10
  65. package/dist/components/types/form/types/label/styles.js +2 -3
  66. package/dist/components/types/form/types/label/styles.mjs +2 -3
  67. package/dist/components/types/form/types/select/index.js +11 -79
  68. package/dist/components/types/form/types/select/index.mjs +8 -76
  69. package/dist/components/types/form/types/select/styles.js +2 -3
  70. package/dist/components/types/form/types/select/styles.mjs +2 -3
  71. package/dist/components/types/form/types/textarea/index.js +7 -62
  72. package/dist/components/types/form/types/textarea/index.mjs +6 -59
  73. package/dist/components/types/form/types/textarea/styles.js +2 -3
  74. package/dist/components/types/form/types/textarea/styles.mjs +2 -3
  75. package/dist/components/types/index.js +24 -3072
  76. package/dist/components/types/index.mjs +12 -3093
  77. package/dist/components/types/loading/app/index.js +4 -132
  78. package/dist/components/types/loading/app/index.mjs +5 -121
  79. package/dist/components/types/loading/app/styles.js +2 -3
  80. package/dist/components/types/loading/app/styles.mjs +2 -3
  81. package/dist/components/types/loading/bar/index.js +3 -37
  82. package/dist/components/types/loading/bar/index.mjs +2 -24
  83. package/dist/components/types/loading/bar/styles.js +2 -3
  84. package/dist/components/types/loading/bar/styles.mjs +2 -3
  85. package/dist/components/types/loading/index.js +6 -173
  86. package/dist/components/types/loading/index.mjs +3 -154
  87. package/dist/components/types/logo/index.js +3 -35
  88. package/dist/components/types/logo/index.mjs +2 -22
  89. package/dist/components/types/logo/styles.js +2 -3
  90. package/dist/components/types/logo/styles.mjs +2 -3
  91. package/dist/components/types/lottie/animations/index.js +13 -8
  92. package/dist/components/types/lottie/animations/index.mjs +3 -5
  93. package/dist/components/types/lottie/index.js +7 -39
  94. package/dist/components/types/lottie/index.mjs +6 -36
  95. package/dist/components/types/lottie/styles.js +2 -3
  96. package/dist/components/types/lottie/styles.mjs +2 -3
  97. package/dist/components/types/modal/index.js +18 -2283
  98. package/dist/components/types/modal/index.mjs +18 -2309
  99. package/dist/components/types/modal/styles.js +2 -3
  100. package/dist/components/types/modal/styles.mjs +2 -3
  101. package/dist/components/types/table/index.js +45 -2955
  102. package/dist/components/types/table/index.mjs +40 -2983
  103. package/dist/components/types/table/modal/actions.js +4 -82
  104. package/dist/components/types/table/modal/actions.mjs +3 -78
  105. package/dist/components/types/table/modal/index.js +22 -3006
  106. package/dist/components/types/table/modal/index.mjs +19 -3033
  107. package/dist/components/types/table/modal/styles.js +2 -3
  108. package/dist/components/types/table/modal/styles.mjs +2 -3
  109. package/dist/components/types/table/paginate/index.js +4 -43
  110. package/dist/components/types/table/paginate/index.mjs +3 -40
  111. package/dist/components/types/table/paginate/styles.js +2 -3
  112. package/dist/components/types/table/paginate/styles.mjs +2 -3
  113. package/dist/components/types/table/styles.js +2 -3
  114. package/dist/components/types/table/styles.mjs +2 -3
  115. package/dist/contexts/icon/assets/brands/index.js +3 -4
  116. package/dist/contexts/icon/assets/brands/index.mjs +3 -10
  117. package/dist/contexts/icon/assets/index.js +17 -34
  118. package/dist/contexts/icon/assets/index.mjs +7 -38
  119. package/dist/contexts/icon/assets/regular/index.js +3 -4
  120. package/dist/contexts/icon/assets/regular/index.mjs +3 -10
  121. package/dist/contexts/icon/assets/solid/index.js +3 -4
  122. package/dist/contexts/icon/assets/solid/index.mjs +3 -10
  123. package/dist/contexts/icon/index.js +15 -217
  124. package/dist/contexts/icon/index.mjs +15 -223
  125. package/dist/contexts/icon/styles.js +2 -3
  126. package/dist/contexts/icon/styles.mjs +2 -2
  127. package/dist/contexts/index.js +10 -504
  128. package/dist/contexts/index.mjs +5 -486
  129. package/dist/contexts/modal/index.js +8 -16
  130. package/dist/contexts/modal/index.mjs +7 -15
  131. package/dist/contexts/modal/styles.js +2 -3
  132. package/dist/contexts/modal/styles.mjs +2 -2
  133. package/dist/contexts/theme/content.js +3 -4
  134. package/dist/contexts/theme/content.mjs +3 -3
  135. package/dist/contexts/theme/index.js +11 -178
  136. package/dist/contexts/theme/index.mjs +7 -164
  137. package/dist/contexts/theme/styles.js +2 -3
  138. package/dist/contexts/theme/styles.mjs +2 -2
  139. package/dist/contexts/tooltip/index.js +7 -51
  140. package/dist/contexts/tooltip/index.mjs +6 -50
  141. package/dist/contexts/tooltip/styles.js +2 -3
  142. package/dist/contexts/tooltip/styles.mjs +2 -2
  143. package/dist/index.js +9 -3325
  144. package/dist/index.mjs +5 -3312
  145. package/dist/interfaces/components/avatar/index.js +1 -2
  146. package/dist/interfaces/components/avatar/index.mjs +1 -0
  147. package/dist/interfaces/components/badge/index.js +1 -2
  148. package/dist/interfaces/components/badge/index.mjs +1 -0
  149. package/dist/interfaces/components/block/index.js +1 -2
  150. package/dist/interfaces/components/block/index.mjs +1 -0
  151. package/dist/interfaces/components/chart/index.js +1 -2
  152. package/dist/interfaces/components/chart/index.mjs +1 -0
  153. package/dist/interfaces/components/credit-card/index.js +1 -2
  154. package/dist/interfaces/components/credit-card/index.mjs +1 -0
  155. package/dist/interfaces/components/form/button/index.js +1 -2
  156. package/dist/interfaces/components/form/button/index.mjs +1 -0
  157. package/dist/interfaces/components/form/datetime/index.js +1 -2
  158. package/dist/interfaces/components/form/datetime/index.mjs +1 -0
  159. package/dist/interfaces/components/form/file/index.js +1 -2
  160. package/dist/interfaces/components/form/file/index.mjs +1 -0
  161. package/dist/interfaces/components/form/index.js +19 -2
  162. package/dist/interfaces/components/form/index.mjs +8 -0
  163. package/dist/interfaces/components/form/input/index.js +1 -2
  164. package/dist/interfaces/components/form/input/index.mjs +1 -0
  165. package/dist/interfaces/components/form/label/index.js +1 -2
  166. package/dist/interfaces/components/form/label/index.mjs +1 -0
  167. package/dist/interfaces/components/form/select/index.js +1 -2
  168. package/dist/interfaces/components/form/select/index.mjs +1 -0
  169. package/dist/interfaces/components/form/textarea/index.js +1 -2
  170. package/dist/interfaces/components/form/textarea/index.mjs +1 -0
  171. package/dist/interfaces/components/index.js +27 -2
  172. package/dist/interfaces/components/index.mjs +12 -0
  173. package/dist/interfaces/components/loading/app/index.js +1 -2
  174. package/dist/interfaces/components/loading/app/index.mjs +1 -0
  175. package/dist/interfaces/components/loading/bar/index.js +1 -2
  176. package/dist/interfaces/components/loading/bar/index.mjs +1 -0
  177. package/dist/interfaces/components/loading/index.js +9 -2
  178. package/dist/interfaces/components/loading/index.mjs +3 -0
  179. package/dist/interfaces/components/logo/index.js +1 -2
  180. package/dist/interfaces/components/logo/index.mjs +1 -0
  181. package/dist/interfaces/components/lottie/index.js +1 -2
  182. package/dist/interfaces/components/lottie/index.mjs +1 -0
  183. package/dist/interfaces/components/modal/index.js +1 -2
  184. package/dist/interfaces/components/modal/index.mjs +1 -0
  185. package/dist/interfaces/components/table/index.js +7 -2
  186. package/dist/interfaces/components/table/index.mjs +2 -0
  187. package/dist/interfaces/components/table/paginate/index.js +1 -2
  188. package/dist/interfaces/components/table/paginate/index.mjs +1 -0
  189. package/dist/interfaces/contexts/icon/index.js +1 -2
  190. package/dist/interfaces/contexts/icon/index.mjs +1 -0
  191. package/dist/interfaces/contexts/index.js +13 -2
  192. package/dist/interfaces/contexts/index.mjs +5 -0
  193. package/dist/interfaces/contexts/modal/index.js +1 -2
  194. package/dist/interfaces/contexts/modal/index.mjs +1 -0
  195. package/dist/interfaces/contexts/theme/index.js +1 -2
  196. package/dist/interfaces/contexts/theme/index.mjs +1 -0
  197. package/dist/interfaces/contexts/tooltip/index.js +1 -2
  198. package/dist/interfaces/contexts/tooltip/index.mjs +1 -0
  199. package/dist/interfaces/index.js +9 -2
  200. package/dist/interfaces/index.mjs +3 -0
  201. package/package.json +1 -1
@@ -1,15 +1,10 @@
1
+ "use client";
1
2
  "use strict";
2
3
  "use client";
3
- var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
7
  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
8
  var __copyProps = (to, from, except, desc) => {
14
9
  if (from && typeof from === "object" || typeof from === "function") {
15
10
  for (let key of __getOwnPropNames(from))
@@ -18,507 +13,18 @@ var __copyProps = (to, from, except, desc) => {
18
13
  }
19
14
  return to;
20
15
  };
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
- ));
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // contexts/index.tsx
32
18
  var contexts_exports = {};
33
- __export(contexts_exports, {
34
- IconProvider: () => IconProviderContainer,
35
- ModalProvider: () => ModalProviderContainer,
36
- ThemeProvider: () => ThemeProviderContainer,
37
- TooltipProvider: () => TooltipProviderContainer,
38
- useIcon: () => useIcon,
39
- useModal: () => useModal,
40
- useTheme: () => useTheme,
41
- useTooltip: () => useTooltip
42
- });
43
19
  module.exports = __toCommonJS(contexts_exports);
44
-
45
- // contexts/icon/index.tsx
46
- var import_react2 = require("react");
47
-
48
- // contexts/theme/index.tsx
49
- var import_react = require("react");
50
- var import_styled_components2 = require("styled-components");
51
-
52
- // contexts/theme/styles.tsx
53
- var import_styled_components = __toESM(require("styled-components"));
54
- var Switcher = import_styled_components.default.div`
55
- width: 3rem;
56
- height: 1.5rem;
57
- border-radius: 1rem;
58
- border: 2px solid ${({ theme }) => theme.t05};
59
- overflow: hidden;
60
- display: flex;
61
- align-items: center;
62
- cursor: pointer;
63
- position: relative;
64
-
65
- i {
66
- color: ${({ theme }) => theme.t6};
67
- position: absolute;
68
- transform: translateY(-50%);
69
- font-size: .9rem;
70
- z-index: 0;
71
- transition: ease .8s;
72
-
73
- &:first-child {
74
- left: .2rem;
75
- top: 50%;
76
- opacity: ${(props) => props["data-theme"] === "light" ? 0 : 1};
77
- }
78
-
79
- &:last-child {
80
- right: .2rem;
81
- top: 50%;
82
- opacity: ${(props) => props["data-theme"] === "light" ? 1 : 0};
83
- }
84
- }
85
-
86
- .switcher {
87
- width: 1rem;
88
- height: 1rem;
89
- border-radius: 1rem;
90
- position: relative;
91
- transition: ease .3s;
92
- transform: ${(props) => props["data-theme"] === "light" ? "transform: translateX(.2rem)" : "translateX(1.6rem)"};
93
- z-index: 1;
94
-
95
- div {
96
- width: 100%;
97
- height: 100%;
98
- background: ${({ theme }) => theme.primary};
99
- border-radius: 1rem;
100
- position: relative;
101
- z-index: 2;
102
- }
103
-
104
- &:after {
105
- content: "";
106
- position: absolute;
107
- width: 100%;
108
- height: 100%;
109
- border-radius: 1rem;
110
- transform: scale(1.8);
111
- background: ${({ theme }) => theme.t05};
112
- top: 0;
113
- left: 0;
114
- z-index: 1;
115
- }
116
-
117
- &:before {
118
- content: "";
119
- position: absolute;
120
- width: 100%;
121
- height: 100%;
122
- border-radius: 1rem;
123
- transform: scale(3);
124
- background: ${({ theme }) => theme.t05};
125
- top: 0;
126
- left: 0;
127
- z-index: 0;
128
- }
129
- }
130
- `;
131
-
132
- // contexts/theme/content.tsx
133
- var CommonTheme = {
134
- secondary: "#5869da",
135
- tertiary: "#629dfd33",
136
- positive: "#65c965",
137
- negative: "#FF334E",
138
- mobileMaxWidth: "650px",
139
- mobileMinWidth: "315px"
140
- };
141
- var Themes = {
142
- light: {
143
- primary: "#ffffff",
144
- reverse: "#353535",
145
- tooltip: "#f2f2f2",
146
- t8: "#000000cc",
147
- t7: "#000000b3",
148
- t6: "#00000099",
149
- t5: "#00000080",
150
- t4: "#00000066",
151
- t3: "#0000004d",
152
- t2: "#00000033",
153
- t1: "#0000001a",
154
- t08: "#00000014",
155
- t05: "#0000000d",
156
- t03: "#00000007",
157
- t02: "#00000005",
158
- t01: "#00000002",
159
- lgrad: `linear-gradient(
160
- to right,
161
- #dadef7 0%,
162
- #dee2f8 5%,
163
- #e2e5f9 10%,
164
- #e6e9fa 20%,
165
- #eaedfb 30%,
166
- #eff0fb 60%,
167
- #f3f4fc 80%,
168
- #f7f8fd 90%,
169
- #fbfbfe 100%
170
- )`,
171
- maingrad: "linear-gradient(330deg, #b9c0ff7a 0%, #ffffff 100%)",
172
- ...CommonTheme
173
- },
174
- dark: {
175
- primary: "#333333",
176
- reverse: "#b45252",
177
- tooltip: "#3d3d3d",
178
- t8: "#ffffffcc",
179
- t7: "#ffffffb3",
180
- t6: "#ffffff99",
181
- t5: "#ffffff80",
182
- t4: "#ffffff66",
183
- t3: "#ffffff4d",
184
- t2: "#ffffff33",
185
- t1: "#ffffff1a",
186
- t08: "#ffffff14",
187
- t05: "#ffffff0d",
188
- t03: "#ffffff07",
189
- t02: "#ffffff05",
190
- t01: "#ffffff02",
191
- lgrad: `linear-gradient(
192
- to right,
193
- #3d485c 0%,
194
- #3c4657 5%,
195
- #3b4353 10%,
196
- #3a414e 20%,
197
- #393f4a 30%,
198
- #373c45 60%,
199
- #363a41 80%,
200
- #35383c 90%,
201
- #343538 100%
202
- )`,
203
- maingrad: "linear-gradient(330deg, #1d1e27 0%, #333333 100%)",
204
- ...CommonTheme
205
- }
206
- };
207
-
208
- // contexts/theme/index.tsx
209
- var import_jsx_runtime = require("react/jsx-runtime");
210
- var ThemeContext = (0, import_react.createContext)({});
211
- var ThemeProviderContainer = (props) => {
212
- const [theme, setTheme] = (0, import_react.useState)("light");
213
- const [defaultTheme] = (0, import_react.useState)("light");
214
- const SwitcherComponent = () => {
215
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
216
- Switcher,
217
- {
218
- onClick: () => setTheme(theme === "light" ? "dark" : "light"),
219
- "data-theme": theme || defaultTheme,
220
- children: [
221
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-moon" }),
222
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "switcher", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
223
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-sun" })
224
- ]
225
- }
226
- );
227
- };
228
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
229
- ThemeContext.Provider,
230
- {
231
- value: {
232
- theme: props.theme || defaultTheme,
233
- setTheme,
234
- content: Themes[props.theme || defaultTheme],
235
- Switcher: SwitcherComponent
236
- },
237
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components2.ThemeProvider, { theme: Themes[props.theme || defaultTheme], children: props.children })
238
- }
239
- );
240
- };
241
- var useTheme = () => (0, import_react.useContext)(ThemeContext);
242
-
243
- // contexts/icon/index.tsx
244
- var import_lodash = __toESM(require("lodash"));
245
-
246
- // contexts/icon/assets/brands/index.tsx
247
- var req = require.context("./", false, /\.svg$/);
248
- var brands = {};
249
- req.keys().forEach((key) => {
250
- const name = key.replace("./", "").replace(".svg", "");
251
- brands[name] = req(key).default;
252
- });
253
- var brands_default = brands;
254
-
255
- // contexts/icon/assets/regular/index.tsx
256
- var req2 = require.context("./", false, /\.svg$/);
257
- var regular = {};
258
- req2.keys().forEach((key) => {
259
- const name = key.replace("./", "").replace(".svg", "");
260
- regular[name] = req2(key).default;
261
- });
262
- var regular_default = regular;
263
-
264
- // contexts/icon/assets/solid/index.tsx
265
- var req3 = require.context("./", false, /\.svg$/);
266
- var solid = {};
267
- req3.keys().forEach((key) => {
268
- const name = key.replace("./", "").replace(".svg", "");
269
- solid[name] = req3(key).default;
270
- });
271
- var solid_default = solid;
272
-
273
- // contexts/icon/assets/index.tsx
274
- var assets_default = {
275
- brands: brands_default,
276
- regular: regular_default,
277
- solid: solid_default
278
- };
279
-
280
- // contexts/icon/index.tsx
281
- var import_jsx_runtime2 = require("react/jsx-runtime");
282
- var IconContext = (0, import_react2.createContext)({});
283
- var IconProviderContainer = ({ children }) => {
284
- const { content } = useTheme();
285
- const [isClient, setIsClient] = (0, import_react2.useState)(false);
286
- const [matches, setMatches] = (0, import_react2.useState)(0);
287
- (0, import_react2.useEffect)(() => {
288
- setIsClient(true);
289
- }, []);
290
- (0, import_react2.useEffect)(() => {
291
- const firstMediaQuery = window.matchMedia(`(max-width: ${content.mobileMaxWidth})`);
292
- const secoundMediaQuery = window.matchMedia(`(max-width: ${content.mobileMinWidth})`);
293
- const firstHandler = (event) => setMatches(event.matches ? 1 : 0);
294
- const secoundHandler = (event) => setMatches(event.matches ? 2 : 1);
295
- if (firstMediaQuery.matches) setMatches(1);
296
- if (secoundMediaQuery.matches) setMatches(2);
297
- firstMediaQuery.addEventListener("change", firstHandler);
298
- secoundMediaQuery.addEventListener("change", secoundHandler);
299
- return () => {
300
- firstMediaQuery.removeEventListener("change", firstHandler);
301
- secoundMediaQuery.removeEventListener("change", secoundHandler);
302
- };
303
- }, []);
304
- (0, import_react2.useEffect)(() => {
305
- if (!isClient) return;
306
- const processElement = (element) => {
307
- var _a, _b, _c, _d, _e;
308
- const name = element.getAttribute("class");
309
- if (!name) return;
310
- const icon = import_lodash.default.split(import_lodash.default.replace(name, /fa-/g, ""), " ");
311
- if (!icon.length) return;
312
- let svg = (_d = (_c = (_a = assets_default[icon[0]]) == null ? void 0 : _a[icon[1]]) != null ? _c : (_b = assets_default["solid"]) == null ? void 0 : _b[icon[0]]) != null ? _d : "";
313
- if (!svg) return;
314
- svg = svg.replace(/fill=".*?"/g, 'fill="currentColor"');
315
- const styles = window.getComputedStyle(element);
316
- const size = Number((_e = import_lodash.default.split(styles.fontSize, "px")) == null ? void 0 : _e[0]) + 2;
317
- element.style.width = `${size}px`;
318
- element.style.height = `${size}px`;
319
- element.textContent = "";
320
- element.innerHTML = svg;
321
- };
322
- document.querySelectorAll("i").forEach((el) => processElement(el));
323
- const observer = new MutationObserver((mutations) => {
324
- mutations.forEach((mutation) => {
325
- mutation.addedNodes.forEach((node) => {
326
- if (node.nodeType === 1) {
327
- const el = node;
328
- if (el.tagName.toLowerCase() === "i") processElement(el);
329
- el.querySelectorAll("i").forEach((child) => processElement(child));
330
- }
331
- });
332
- });
333
- });
334
- observer.observe(document.body, {
335
- childList: true,
336
- subtree: true
337
- });
338
- return () => observer.disconnect();
339
- }, [isClient, matches]);
340
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconContext.Provider, { value: {}, children });
341
- };
342
- var useIcon = () => (0, import_react2.useContext)(IconContext);
343
-
344
- // contexts/tooltip/index.tsx
345
- var import_react3 = require("react");
346
-
347
- // contexts/tooltip/styles.tsx
348
- var import_styled_components3 = __toESM(require("styled-components"));
349
- var Tooltip = import_styled_components3.default.div`
350
- position: fixed;
351
- background: ${({ theme }) => theme.tooltip};
352
- color: ${({ theme }) => theme.t6};
353
- font-size: .8rem;
354
- font-weight: 500;
355
- text-align: center;
356
- padding: .3rem .8rem;
357
- border-radius: 5px;
358
- transform: translateX(-50%);
359
- z-index: 10;
360
- border: 1px solid ${({ theme }) => theme.t05};
361
-
362
- &::before {
363
- content: "";
364
- position: absolute;
365
- bottom: -9px;
366
- left: 50%;
367
- transform: translateX(-50%);
368
- width: 0;
369
- height: 0;
370
- border-left: 8px solid transparent;
371
- border-right: 8px solid transparent;
372
- border-top: 8px solid ${({ theme }) => theme.t05};
373
- }
374
-
375
- &::after {
376
- content: "";
377
- position: absolute;
378
- bottom: -8px;
379
- left: 50%;
380
- transform: translateX(-50%);
381
- width: 0;
382
- height: 0;
383
- border-left: 8px solid transparent;
384
- border-right: 8px solid transparent;
385
- border-top: 8px solid ${({ theme }) => theme.tooltip};
386
- }
387
- `;
388
-
389
- // contexts/tooltip/index.tsx
390
- var import_lodash2 = __toESM(require("lodash"));
391
- var import_jsx_runtime3 = require("react/jsx-runtime");
392
- var TooltipContext = (0, import_react3.createContext)({});
393
- var TooltipProviderContainer = ({ children }) => {
394
- const [tooltips, setTooltips] = (0, import_react3.useState)([]);
395
- const getContent = (target) => {
396
- var _a;
397
- const rect = target.getBoundingClientRect();
398
- return {
399
- top: rect.top + window.scrollY - (target.offsetHeight + 8),
400
- left: rect.left + window.scrollX + target.offsetWidth / 2,
401
- content: ((_a = target.dataset) == null ? void 0 : _a.tooltip) || ""
402
- };
403
- };
404
- (0, import_react3.useEffect)(() => {
405
- const processElement = (element) => {
406
- element.addEventListener("mouseenter", (event) => {
407
- const target = event == null ? void 0 : event.target;
408
- if (!target) return;
409
- setTooltips(import_lodash2.default.concat(tooltips, [getContent(target)]));
410
- });
411
- element.addEventListener("mouseleave", (event) => {
412
- const target = event == null ? void 0 : event.target;
413
- if (!target) return;
414
- setTooltips(import_lodash2.default.filter(tooltips, (data) => JSON.stringify(data) === JSON.stringify(getContent(target))));
415
- });
416
- };
417
- document.querySelectorAll("[data-tooltip]").forEach((el) => processElement(el));
418
- const observer = new MutationObserver((mutations) => {
419
- mutations.forEach((mutation) => {
420
- mutation.addedNodes.forEach((node) => {
421
- if (node.nodeType === 1) {
422
- const el = node;
423
- if (el.getAttribute("data-tooltip")) processElement(el);
424
- el.querySelectorAll("[data-tooltip]").forEach((child) => processElement(child));
425
- }
426
- });
427
- });
428
- });
429
- observer.observe(document.body, {
430
- childList: true,
431
- subtree: true
432
- });
433
- return () => observer.disconnect();
434
- }, []);
435
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(TooltipContext.Provider, { value: {}, children: [
436
- import_lodash2.default.map(
437
- tooltips,
438
- (data, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
439
- Tooltip,
440
- {
441
- style: {
442
- top: data.top,
443
- left: data.left
444
- },
445
- children: data.content
446
- },
447
- index
448
- )
449
- ),
450
- children
451
- ] });
452
- };
453
- var useTooltip = () => (0, import_react3.useContext)(TooltipContext);
454
-
455
- // contexts/modal/index.tsx
456
- var import_react4 = require("react");
457
- var import_navigation = require("next/navigation");
458
-
459
- // contexts/modal/styles.tsx
460
- var import_styled_components4 = __toESM(require("styled-components"));
461
- var Container = import_styled_components4.default.div`
462
-
463
- `;
464
-
465
- // contexts/modal/index.tsx
466
- var import_lodash3 = __toESM(require("lodash"));
467
- var import_jsx_runtime4 = require("react/jsx-runtime");
468
- var ModalContext = (0, import_react4.createContext)({});
469
- var memory = [];
470
- var ModalProviderContainer = ({ children }) => {
471
- const pathname = (0, import_navigation.usePathname)();
472
- const [modals, setModals] = (0, import_react4.useState)([]);
473
- (0, import_react4.useEffect)(() => {
474
- setModals(import_lodash3.default.filter(memory, (modal) => modal.type === "fixed"));
475
- }, [pathname]);
476
- const add = (modal) => {
477
- if (import_lodash3.default.some(memory, (data) => data.name === modal.name)) return;
478
- memory.push(modal);
479
- setModals(memory);
480
- };
481
- const remove = (modalName) => {
482
- const index = import_lodash3.default.findIndex(memory, (data) => data.name === modalName);
483
- memory.slice(index, 1);
484
- setModals(memory);
485
- };
486
- const setProps = (modalName, props) => {
487
- const index = import_lodash3.default.findIndex(modals, (modal) => modal.name === modalName);
488
- const content = import_lodash3.default.find(modals, (modal) => modal.name === modalName);
489
- if (!content) return;
490
- let settedModals = [...modals];
491
- settedModals.splice(index, 1, { ...content, props: { ...content.props, ...props } });
492
- setModals(settedModals);
493
- };
494
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
495
- ModalContext.Provider,
496
- {
497
- value: {
498
- value: modals,
499
- add,
500
- remove,
501
- setProps
502
- },
503
- children: [
504
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Container, { children: import_lodash3.default.map(modals, (modal, index) => {
505
- const ModalComponent = modal.component;
506
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ModalComponent, { ...modal.props }, index);
507
- }) }),
508
- children
509
- ]
510
- }
511
- );
512
- };
513
- var useModal = () => (0, import_react4.useContext)(ModalContext);
20
+ __reExport(contexts_exports, require("./icon"), module.exports);
21
+ __reExport(contexts_exports, require("./theme"), module.exports);
22
+ __reExport(contexts_exports, require("./tooltip"), module.exports);
23
+ __reExport(contexts_exports, require("./modal"), module.exports);
514
24
  // Annotate the CommonJS export names for ESM import in node:
515
25
  0 && (module.exports = {
516
- IconProvider,
517
- ModalProvider,
518
- ThemeProvider,
519
- TooltipProvider,
520
- useIcon,
521
- useModal,
522
- useTheme,
523
- useTooltip
26
+ ...require("./icon"),
27
+ ...require("./theme"),
28
+ ...require("./tooltip"),
29
+ ...require("./modal")
524
30
  });