@jenesei-software/jenesei-kit-react 1.3.9 → 1.3.10

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 (260) hide show
  1. package/build/{area-Dnq78ow6.js → area-BYuHpaUX.js} +2 -2
  2. package/build/{area-Dnq78ow6.js.map → area-BYuHpaUX.js.map} +1 -1
  3. package/build/{area-DnAf310m.cjs → area-C6XuN6wk.cjs} +2 -2
  4. package/build/{area-DnAf310m.cjs.map → area-C6XuN6wk.cjs.map} +1 -1
  5. package/build/{area-CFZW3T1g.js → area-CkM4ZN2F.js} +2 -2
  6. package/build/{area-CFZW3T1g.js.map → area-CkM4ZN2F.js.map} +1 -1
  7. package/build/{area-C3wR_pPr.cjs → area-oZm7ewxw.cjs} +2 -2
  8. package/build/{area-C3wR_pPr.cjs.map → area-oZm7ewxw.cjs.map} +1 -1
  9. package/build/area-preview.cjs.js +1 -1
  10. package/build/area-preview.es.js +1 -1
  11. package/build/area-skeleton.cjs.js +1 -1
  12. package/build/area-skeleton.es.js +1 -1
  13. package/build/build-info.txt +3 -3
  14. package/build/component--jGdo2yq.cjs +2 -0
  15. package/build/component--jGdo2yq.cjs.map +1 -0
  16. package/build/component-B1bvPlyB.cjs +90 -0
  17. package/build/component-B1bvPlyB.cjs.map +1 -0
  18. package/build/{component-DHq4T6Ku.cjs → component-BYox4gmt.cjs} +2 -2
  19. package/build/{component-DHq4T6Ku.cjs.map → component-BYox4gmt.cjs.map} +1 -1
  20. package/build/component-C67KboOB.cjs +245 -0
  21. package/build/component-C67KboOB.cjs.map +1 -0
  22. package/build/{component-BiNPQpCQ.cjs → component-CY7lfJVv.cjs} +2 -2
  23. package/build/{component-BiNPQpCQ.cjs.map → component-CY7lfJVv.cjs.map} +1 -1
  24. package/build/{component-DfxlJBGv.js → component-CvW0MIM8.js} +3 -3
  25. package/build/{component-DfxlJBGv.js.map → component-CvW0MIM8.js.map} +1 -1
  26. package/build/{component-C4ULY0c6.js → component-DJYgewYg.js} +20 -9
  27. package/build/component-DJYgewYg.js.map +1 -0
  28. package/build/component-DKMsOpqH.js +710 -0
  29. package/build/component-DKMsOpqH.js.map +1 -0
  30. package/build/{component-Bzw_uobM.js → component-DaXKDHnc.js} +48 -7
  31. package/build/component-DaXKDHnc.js.map +1 -0
  32. package/build/{component-CQ8fy2gK.js → component-WUYE2soZ.js} +2 -2
  33. package/build/{component-CQ8fy2gK.js.map → component-WUYE2soZ.js.map} +1 -1
  34. package/build/component-accordion.cjs.js +1 -1
  35. package/build/component-accordion.es.js +1 -1
  36. package/build/component-button-group.cjs.js +1 -1
  37. package/build/component-button-group.d.ts +18 -1
  38. package/build/component-button-group.es.js +1 -1
  39. package/build/component-button.cjs.js +1 -1
  40. package/build/component-button.d.ts +21 -2
  41. package/build/component-button.es.js +1 -1
  42. package/build/component-checkbox-group.cjs.js +1 -1
  43. package/build/component-checkbox-group.d.ts +20 -3
  44. package/build/component-checkbox-group.es.js +1 -1
  45. package/build/component-checkbox.cjs.js +1 -1
  46. package/build/component-checkbox.d.ts +21 -2
  47. package/build/component-checkbox.es.js +1 -1
  48. package/build/component-date-picker.cjs.js +1 -1
  49. package/build/component-date-picker.d.ts +35 -37
  50. package/build/component-date-picker.es.js +1 -1
  51. package/build/component-icon.cjs.js +1 -1
  52. package/build/component-icon.es.js +1 -1
  53. package/build/component-image-button.cjs.js +1 -1
  54. package/build/component-image-button.d.ts +18 -1
  55. package/build/component-image-button.es.js +1 -1
  56. package/build/component-image-select.cjs.js +1 -1
  57. package/build/component-image-select.d.ts +18 -1
  58. package/build/component-image-select.es.js +1 -1
  59. package/build/component-image-slider.cjs.js +1 -1
  60. package/build/component-image-slider.es.js +1 -1
  61. package/build/component-image.cjs.js +1 -1
  62. package/build/component-image.es.js +1 -1
  63. package/build/component-input-otp.cjs.js +1 -1
  64. package/build/component-input-otp.d.ts +51 -5
  65. package/build/component-input-otp.es.js +1 -1
  66. package/build/component-input.cjs.js +1 -1
  67. package/build/component-input.d.ts +62 -14
  68. package/build/component-input.es.js +2 -2
  69. package/build/component-map.cjs.js +1 -1
  70. package/build/component-map.es.js +1 -1
  71. package/build/component-pagination.cjs.js +1 -1
  72. package/build/component-pagination.d.ts +18 -1
  73. package/build/component-pagination.es.js +1 -1
  74. package/build/component-range.cjs.js +1 -1
  75. package/build/component-range.d.ts +50 -4
  76. package/build/component-range.es.js +1 -1
  77. package/build/component-select.cjs.js +1 -1
  78. package/build/component-select.d.ts +48 -7
  79. package/build/component-select.es.js +1 -1
  80. package/build/component-textarea.cjs.js +1 -1
  81. package/build/component-textarea.d.ts +50 -7
  82. package/build/component-textarea.es.js +1 -1
  83. package/build/component-toggle.cjs.js +1 -1
  84. package/build/component-toggle.d.ts +51 -2
  85. package/build/component-toggle.es.js +1 -1
  86. package/build/component-tooltip.cjs.js +1 -1
  87. package/build/component-tooltip.d.ts +14 -2
  88. package/build/component-tooltip.es.js +1 -1
  89. package/build/component-typography.cjs.js +1 -1
  90. package/build/component-typography.d.ts +27 -13
  91. package/build/component-typography.es.js +7 -6
  92. package/build/component-typography.es.js.map +1 -1
  93. package/build/{component.components-H_qAeBHw.cjs → component.components-CeKyOsDE.cjs} +2 -2
  94. package/build/{component.components-H_qAeBHw.cjs.map → component.components-CeKyOsDE.cjs.map} +1 -1
  95. package/build/{component.components-DX0DVix5.js → component.components-f-tFdB6f.js} +4 -4
  96. package/build/{component.components-DX0DVix5.js.map → component.components-f-tFdB6f.js.map} +1 -1
  97. package/build/{component.constants-veAUxKBd.cjs → component.constants-B9xzGc3A.cjs} +2 -2
  98. package/build/{component.constants-veAUxKBd.cjs.map → component.constants-B9xzGc3A.cjs.map} +1 -1
  99. package/build/{component.constants-DjYLZpyY.js → component.constants-BrJrCmlA.js} +2 -2
  100. package/build/{component.constants-DjYLZpyY.js.map → component.constants-BrJrCmlA.js.map} +1 -1
  101. package/build/{component.constants-DwRduxMm.cjs → component.constants-DRPyaSU8.cjs} +3 -3
  102. package/build/{component.constants-DwRduxMm.cjs.map → component.constants-DRPyaSU8.cjs.map} +1 -1
  103. package/build/{component.constants-C7DGbAC8.js → component.constants-amkB3VHg.js} +7 -7
  104. package/build/{component.constants-C7DGbAC8.js.map → component.constants-amkB3VHg.js.map} +1 -1
  105. package/build/component.functions-D9ffjEok.cjs +8 -0
  106. package/build/component.functions-D9ffjEok.cjs.map +1 -0
  107. package/build/component.functions-DNW6h8kk.js +12 -0
  108. package/build/component.functions-DNW6h8kk.js.map +1 -0
  109. package/build/{component.styles-5CVyEjEh.js → component.styles--PEjCgcA.js} +51 -23
  110. package/build/component.styles--PEjCgcA.js.map +1 -0
  111. package/build/{component.styles-C3hYZJGh.js → component.styles-B0FFHGeN.js} +26 -20
  112. package/build/component.styles-B0FFHGeN.js.map +1 -0
  113. package/build/{component.styles-C1p3V7H6.js → component.styles-BDKsgd6y.js} +32 -19
  114. package/build/component.styles-BDKsgd6y.js.map +1 -0
  115. package/build/{component.styles-Cje8zTpf.cjs → component.styles-BELwxHxh.cjs} +7 -7
  116. package/build/component.styles-BELwxHxh.cjs.map +1 -0
  117. package/build/{component.styles-DpgkACgI.js → component.styles-BGYbrzvh.js} +2 -2
  118. package/build/{component.styles-DpgkACgI.js.map → component.styles-BGYbrzvh.js.map} +1 -1
  119. package/build/{component.styles-DSle6iuF.cjs → component.styles-BKnUDWqO.cjs} +2 -2
  120. package/build/{component.styles-DSle6iuF.cjs.map → component.styles-BKnUDWqO.cjs.map} +1 -1
  121. package/build/{component.styles-DLU0S0KI.cjs → component.styles-BTsmbWT6.cjs} +2 -2
  122. package/build/{component.styles-DLU0S0KI.cjs.map → component.styles-BTsmbWT6.cjs.map} +1 -1
  123. package/build/{component.styles-DYS_AJ9F.js → component.styles-BbwS_Ekx.js} +9 -10
  124. package/build/{component.styles-DYS_AJ9F.js.map → component.styles-BbwS_Ekx.js.map} +1 -1
  125. package/build/component.styles-BeRVOt5T.cjs +137 -0
  126. package/build/{component.styles-Crx4pACx.cjs.map → component.styles-BeRVOt5T.cjs.map} +1 -1
  127. package/build/component.styles-BpvpyZax.cjs +73 -0
  128. package/build/component.styles-BpvpyZax.cjs.map +1 -0
  129. package/build/{component.styles-BirbSbuD.js → component.styles-CPWNnqqm.js} +3 -3
  130. package/build/{component.styles-BirbSbuD.js.map → component.styles-CPWNnqqm.js.map} +1 -1
  131. package/build/component.styles-CsB9986a.cjs +99 -0
  132. package/build/component.styles-CsB9986a.cjs.map +1 -0
  133. package/build/{component.styles-5Xz_H-fR.js → component.styles-DARNjy9P.js} +32 -11
  134. package/build/component.styles-DARNjy9P.js.map +1 -0
  135. package/build/{component.styles-CggIUAVx.js → component.styles-DOnQEUrI.js} +20 -9
  136. package/build/{component.styles-CggIUAVx.js.map → component.styles-DOnQEUrI.js.map} +1 -1
  137. package/build/{component.styles-Bm3Ec-Kd.js → component.styles-DS0ofW1Y.js} +3 -3
  138. package/build/{component.styles-Bm3Ec-Kd.js.map → component.styles-DS0ofW1Y.js.map} +1 -1
  139. package/build/component.styles-DWGUgUoF.cjs +21 -0
  140. package/build/component.styles-DWGUgUoF.cjs.map +1 -0
  141. package/build/{component.styles-DX_3POUD.js → component.styles-DjoG6jr2.js} +3 -3
  142. package/build/{component.styles-DX_3POUD.js.map → component.styles-DjoG6jr2.js.map} +1 -1
  143. package/build/{component.styles-Bfhg18CX.cjs → component.styles-Dpo373cZ.cjs} +2 -2
  144. package/build/{component.styles-Bfhg18CX.cjs.map → component.styles-Dpo373cZ.cjs.map} +1 -1
  145. package/build/{component.styles-v0YYECwW.js → component.styles-VrNFgg1_.js} +32 -12
  146. package/build/component.styles-VrNFgg1_.js.map +1 -0
  147. package/build/{component.styles-DhAMCZ71.cjs → component.styles-ZU_GyVub.cjs} +2 -2
  148. package/build/{component.styles-DhAMCZ71.cjs.map → component.styles-ZU_GyVub.cjs.map} +1 -1
  149. package/build/component.styles-gZHy-64x.cjs +13 -0
  150. package/build/component.styles-gZHy-64x.cjs.map +1 -0
  151. package/build/{component.styles--Ug3PJQ6.cjs → component.styles-iHE8mmya.cjs} +7 -7
  152. package/build/{component.styles--Ug3PJQ6.cjs.map → component.styles-iHE8mmya.cjs.map} +1 -1
  153. package/build/component.styles-mhkAuWyU.cjs +225 -0
  154. package/build/component.styles-mhkAuWyU.cjs.map +1 -0
  155. package/build/component.styles-nl99kkS3.js +94 -0
  156. package/build/component.styles-nl99kkS3.js.map +1 -0
  157. package/build/{component.types-BzBjcohg.js → component.types-CSnoBg2y.js} +94 -67
  158. package/build/component.types-CSnoBg2y.js.map +1 -0
  159. package/build/component.types-CWp0NPUN.cjs +171 -0
  160. package/build/component.types-CWp0NPUN.cjs.map +1 -0
  161. package/build/context-app.cjs.js +1 -1
  162. package/build/context-app.es.js +1 -1
  163. package/build/context-dialog.cjs.js +1 -1
  164. package/build/context-dialog.d.ts +11 -4
  165. package/build/context-dialog.es.js +1 -1
  166. package/build/context-sonner.cjs.js +1 -1
  167. package/build/context-sonner.d.ts +42 -7
  168. package/build/context-sonner.es.js +1 -1
  169. package/build/context.constants-ByXsACU7.cjs +32 -0
  170. package/build/context.constants-ByXsACU7.cjs.map +1 -0
  171. package/build/context.constants-CTr1U0kI.cjs +98 -0
  172. package/build/context.constants-CTr1U0kI.cjs.map +1 -0
  173. package/build/{context.constants-B9Yk6CGe.js → context.constants-CvkvB0XC.js} +8 -5
  174. package/build/context.constants-CvkvB0XC.js.map +1 -0
  175. package/build/{context.constants-Bz_5itIx.js → context.constants-DRimaVcG.js} +26 -9
  176. package/build/context.constants-DRimaVcG.js.map +1 -0
  177. package/build/{context.hooks-BDEwJHqB.cjs → context.hooks-DOygH-Yj.cjs} +3 -3
  178. package/build/{context.hooks-BDEwJHqB.cjs.map → context.hooks-DOygH-Yj.cjs.map} +1 -1
  179. package/build/{context.hooks-DTdppyho.js → context.hooks-kga1DMrX.js} +4 -4
  180. package/build/{context.hooks-DTdppyho.js.map → context.hooks-kga1DMrX.js.map} +1 -1
  181. package/build/floating-ui.react--v70Xky9.cjs +2 -0
  182. package/build/floating-ui.react--v70Xky9.cjs.map +1 -0
  183. package/build/{component-BoHvC24Q.js → floating-ui.react-Byi6bLb1.js} +17 -704
  184. package/build/floating-ui.react-Byi6bLb1.js.map +1 -0
  185. package/build/index.cjs.js +1 -1
  186. package/build/index.d.ts +83 -89
  187. package/build/index.es.js +55 -53
  188. package/build/index.es.js.map +1 -1
  189. package/build/style-D3Lbn1EL.cjs +32 -0
  190. package/build/style-D3Lbn1EL.cjs.map +1 -0
  191. package/build/{style-mc2ST5fY.cjs → style-Df37KnoJ.cjs} +47 -18
  192. package/build/style-Df37KnoJ.cjs.map +1 -0
  193. package/build/{style-BgcnmVAY.js → style-RL73t3JD.js} +63 -20
  194. package/build/style-RL73t3JD.js.map +1 -0
  195. package/build/style-add.cjs.js +1 -1
  196. package/build/style-add.d.ts +57 -5
  197. package/build/style-add.es.js +11 -10
  198. package/build/style-error.cjs.js +1 -1
  199. package/build/style-error.d.ts +42 -1
  200. package/build/style-error.es.js +1 -1
  201. package/build/style-fRZ6xrVp.cjs.map +1 -1
  202. package/build/style-plT9Ah7t.js.map +1 -1
  203. package/build/style-theme.cjs.js +1 -1
  204. package/build/style-theme.d.ts +2 -2
  205. package/build/style-theme.es.js +1 -1
  206. package/build/{style-BQ653xOS.js → style-uVTmdhsH.js} +14 -5
  207. package/build/style-uVTmdhsH.js.map +1 -0
  208. package/build/{theme.global-CFUz5Asg.js → theme.global-BgERDJ4e.js} +36 -1
  209. package/build/theme.global-BgERDJ4e.js.map +1 -0
  210. package/build/{theme.global-B9t2Fi10.cjs → theme.global-CcoD5bPP.cjs} +2 -2
  211. package/build/theme.global-CcoD5bPP.cjs.map +1 -0
  212. package/build/{use-DTZ8c8_g.js → use-DLVWi2kS.js} +6 -6
  213. package/build/{use-DTZ8c8_g.js.map → use-DLVWi2kS.js.map} +1 -1
  214. package/build/{use-D7IsSb34.cjs → use-Dg449cuf.cjs} +2 -2
  215. package/build/{use-D7IsSb34.cjs.map → use-Dg449cuf.cjs.map} +1 -1
  216. package/package.json +1 -1
  217. package/build/component-BoHvC24Q.js.map +0 -1
  218. package/build/component-Bzw_uobM.js.map +0 -1
  219. package/build/component-C4ULY0c6.js.map +0 -1
  220. package/build/component-CACoGUK9.cjs +0 -251
  221. package/build/component-CACoGUK9.cjs.map +0 -1
  222. package/build/component-Dn-VRY7-.cjs +0 -2
  223. package/build/component-Dn-VRY7-.cjs.map +0 -1
  224. package/build/component-u_42PteJ.cjs +0 -90
  225. package/build/component-u_42PteJ.cjs.map +0 -1
  226. package/build/component.styles-5CVyEjEh.js.map +0 -1
  227. package/build/component.styles-5Xz_H-fR.js.map +0 -1
  228. package/build/component.styles-8tkaznu_.cjs +0 -21
  229. package/build/component.styles-8tkaznu_.cjs.map +0 -1
  230. package/build/component.styles-BuzZQhqS.cjs +0 -73
  231. package/build/component.styles-BuzZQhqS.cjs.map +0 -1
  232. package/build/component.styles-C1p3V7H6.js.map +0 -1
  233. package/build/component.styles-C3hYZJGh.js.map +0 -1
  234. package/build/component.styles-CISd4naT.cjs +0 -13
  235. package/build/component.styles-CISd4naT.cjs.map +0 -1
  236. package/build/component.styles-Cje8zTpf.cjs.map +0 -1
  237. package/build/component.styles-CpFA5YrM.js +0 -71
  238. package/build/component.styles-CpFA5YrM.js.map +0 -1
  239. package/build/component.styles-Crx4pACx.cjs +0 -137
  240. package/build/component.styles-Db3HLiuV.cjs +0 -99
  241. package/build/component.styles-Db3HLiuV.cjs.map +0 -1
  242. package/build/component.styles-o7GmI4Ap.cjs +0 -225
  243. package/build/component.styles-o7GmI4Ap.cjs.map +0 -1
  244. package/build/component.styles-v0YYECwW.js.map +0 -1
  245. package/build/component.types-BzBjcohg.js.map +0 -1
  246. package/build/component.types-ydMLhabS.cjs +0 -174
  247. package/build/component.types-ydMLhabS.cjs.map +0 -1
  248. package/build/context.constants-B9Yk6CGe.js.map +0 -1
  249. package/build/context.constants-Bz_5itIx.js.map +0 -1
  250. package/build/context.constants-CTfUKury.cjs +0 -32
  251. package/build/context.constants-CTfUKury.cjs.map +0 -1
  252. package/build/context.constants-CV8ycctl.cjs +0 -100
  253. package/build/context.constants-CV8ycctl.cjs.map +0 -1
  254. package/build/style-B5u4pW5G.cjs +0 -32
  255. package/build/style-B5u4pW5G.cjs.map +0 -1
  256. package/build/style-BQ653xOS.js.map +0 -1
  257. package/build/style-BgcnmVAY.js.map +0 -1
  258. package/build/style-mc2ST5fY.cjs.map +0 -1
  259. package/build/theme.global-B9t2Fi10.cjs.map +0 -1
  260. package/build/theme.global-CFUz5Asg.js.map +0 -1
@@ -0,0 +1,710 @@
1
+ import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
2
+ import { u as useScreenWidth } from "./context.hooks-BmwyZ1p3.js";
3
+ import { createLink } from "@tanstack/react-router";
4
+ import { useState, useRef, useMemo, useEffect, useLayoutEffect, useCallback, memo } from "react";
5
+ import styled, { keyframes, css, useTheme } from "styled-components";
6
+ import { J as JeneseiPalette, K as KEY_SIZE_DATA } from "./theme.global-BgERDJ4e.js";
7
+ import { a as useFloating, b as autoUpdate, o as offset, f as flip, s as shift } from "./floating-ui.react-Byi6bLb1.js";
8
+ import { AnimatePresence, motion } from "framer-motion";
9
+ import ReactDOM__default from "react-dom";
10
+ import { g as addOutline, c as addFont, i as addAlwaysOutline } from "./style-RL73t3JD.js";
11
+ import { a as addSX } from "./style-plT9Ah7t.js";
12
+ import { b as Stack } from "./component-jPZYT5iL.js";
13
+ const shadowPulse = keyframes`
14
+ 0% {
15
+ text-shadow: 0 0 0 rgba(0, 0, 0, 0);
16
+ }
17
+ 50% {
18
+ text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
19
+ }
20
+ 100% {
21
+ text-shadow: 0 0 0 rgba(0, 0, 0, 0);
22
+ }
23
+ `;
24
+ function toStyledCSS(value) {
25
+ return css`
26
+ ${value.shadow && value.shadow === "shadowPulse" && css`
27
+ animation: ${shadowPulse} 2s infinite;
28
+ `};
29
+ ${value.letterSpacing && css`
30
+ letter-spacing: ${value.letterSpacing};
31
+ `};
32
+ ${value.flex && css`
33
+ flex: ${value.flex};
34
+ `};
35
+ ${value.cursor && css`
36
+ cursor: ${value.cursor};
37
+ `};
38
+ ${value.overflow && css`
39
+ overflow: ${value.overflow};
40
+ `};
41
+ ${value.line !== void 0 ? value.line === 1 ? css`
42
+ text-overflow: ellipsis;
43
+ overflow: hidden;
44
+ white-space: nowrap;
45
+ width: -webkit-fill-available;
46
+ max-width: fit-content;
47
+ ` : css`
48
+ word-break: break-word;
49
+ white-space: normal;
50
+ text-overflow: ellipsis;
51
+ display: -webkit-box;
52
+ overflow: hidden;
53
+ -webkit-box-orient: vertical;
54
+ -webkit-line-clamp: ${value.line};
55
+ width: fit-content;
56
+ overflow-wrap: anywhere;
57
+ ` : css``};
58
+ ${value.family && css`
59
+ font-family: ${value.family};
60
+ `};
61
+ ${value.weight && css`
62
+ font-weight: ${value.weight};
63
+ `};
64
+ ${value.height && css`
65
+ line-height: ${value.height}px;
66
+ `};
67
+ ${value.color && css`
68
+ color: ${JeneseiPalette[value.color]};
69
+ `};
70
+ ${value.align && css`
71
+ text-align: ${value.align};
72
+ `};
73
+ ${value.wrap && css`
74
+ text-wrap: ${value.wrap};
75
+ `};
76
+ ${value.decoration && css`
77
+ text-decoration: ${value.decoration};
78
+ `};
79
+ ${value.transform && css`
80
+ text-transform: ${value.transform};
81
+ `};
82
+ ${value.isHoverUnderlining && css`
83
+ &:hover {
84
+ text-decoration: underline;
85
+ }
86
+ `};
87
+ ${value.isNoUserSelect && css`
88
+ user-select: none;
89
+ -webkit-user-select: none;
90
+ -moz-user-select: none;
91
+ -ms-user-select: none;
92
+ `};
93
+ ${"size" in value && value.size && css`
94
+ font-size: ${value.size}px;
95
+ `};
96
+ ${"variant" in value && value.variant ? value.variant === "h1" ? css`
97
+ font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.default}px;
98
+ line-height: ${(props) => props.theme.font.lineHeight};
99
+ margin: 0;
100
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
101
+ font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.tablet}px;
102
+ }
103
+
104
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
105
+ font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.mobile}px;
106
+ }
107
+ ` : value.variant === "h2" ? css`
108
+ font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.default}px;
109
+ line-height: ${(props) => props.theme.font.lineHeight};
110
+ margin: 0;
111
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
112
+ font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.tablet}px;
113
+ }
114
+
115
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
116
+ font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.mobile}px;
117
+ }
118
+ ` : value.variant === "h3" ? css`
119
+ font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.default}px;
120
+ line-height: ${(props) => props.theme.font.lineHeight};
121
+ margin: 0;
122
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
123
+ font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.tablet}px;
124
+ }
125
+
126
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
127
+ font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.mobile}px;
128
+ }
129
+ ` : value.variant === "h4" ? css`
130
+ font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.default}px;
131
+ line-height: ${(props) => props.theme.font.lineHeight};
132
+ margin: 0;
133
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
134
+ font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.tablet}px;
135
+ }
136
+
137
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
138
+ font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.mobile}px;
139
+ }
140
+ ` : value.variant === "h5" ? css`
141
+ font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.default}px;
142
+ line-height: ${(props) => props.theme.font.lineHeight};
143
+ margin: 0;
144
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
145
+ font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.tablet}px;
146
+ }
147
+
148
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
149
+ font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.mobile}px;
150
+ }
151
+ ` : value.variant === "h6" ? css`
152
+ font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.default}px;
153
+ line-height: ${(props) => props.theme.font.lineHeight};
154
+ margin: 0;
155
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
156
+ font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.tablet}px;
157
+ }
158
+
159
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
160
+ font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.mobile}px;
161
+ }
162
+ ` : value.variant === "h7" ? css`
163
+ font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.default}px;
164
+ line-height: ${(props) => props.theme.font.lineHeight};
165
+ margin: 0;
166
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
167
+ font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.tablet}px;
168
+ }
169
+
170
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
171
+ font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.mobile}px;
172
+ }
173
+ ` : value.variant === "h8" ? css`
174
+ font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.default}px;
175
+ line-height: ${(props) => props.theme.font.lineHeight};
176
+ margin: 0;
177
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
178
+ font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.tablet}px;
179
+ }
180
+
181
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
182
+ font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.mobile}px;
183
+ }
184
+ ` : value.variant === "h9" ? css`
185
+ font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.default}px;
186
+ line-height: ${(props) => props.theme.font.lineHeight};
187
+ margin: 0;
188
+ @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
189
+ font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.tablet}px;
190
+ }
191
+
192
+ @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
193
+ font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.mobile}px;
194
+ }
195
+ ` : null : null};
196
+ `;
197
+ }
198
+ const addSXTypography = css`
199
+ ${(props) => {
200
+ const rawSX = props.$sxTypography;
201
+ if (!rawSX) return null;
202
+ return toStyledCSS(rawSX.default);
203
+ }}
204
+
205
+ ${(props) => {
206
+ const rawSX = props.$sxTypography;
207
+ if (!rawSX) return null;
208
+ return Object.entries(rawSX).filter(([key]) => key !== "default").map(([deviceKey, value]) => {
209
+ var _a;
210
+ const screenWidth = (_a = props.theme.screens[deviceKey]) == null ? void 0 : _a.width;
211
+ if (!screenWidth) return null;
212
+ return css`
213
+ @media (max-width: ${screenWidth}px) {
214
+ ${toStyledCSS(value)}
215
+ }
216
+ `;
217
+ });
218
+ }}
219
+ `;
220
+ const TypographyCSS = css`
221
+ font-style: normal;
222
+ position: relative;
223
+ overflow: visible;
224
+ text-overflow: ellipsis;
225
+ overflow-wrap: anywhere;
226
+ line-height: ${(props) => props.theme.font.lineHeight};
227
+ ${addSXTypography};
228
+ ${addSX}
229
+ `;
230
+ const Title = styled.span`
231
+ ${TypographyCSS}
232
+ ${addOutline}
233
+ `;
234
+ const Popover = (props) => {
235
+ var _a, _b, _c, _d;
236
+ const theme = useTheme();
237
+ return ReactDOM__default.createPortal(
238
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatePresence, { children: props.isOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
239
+ "div",
240
+ {
241
+ tabIndex: -1,
242
+ ref: props.ref,
243
+ style: {
244
+ position: "absolute",
245
+ top: 0,
246
+ left: 0,
247
+ ...props.floatingStyles,
248
+ transform: props.floatingStyles.transform,
249
+ zIndex: 9999
250
+ },
251
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
252
+ PopoverWrapper,
253
+ {
254
+ tabIndex: -1,
255
+ $isShowAlwaysOutline: props.isShowAlwaysOutline,
256
+ $genre: props.genre ?? "black",
257
+ $font: {
258
+ size: ((_a = props.font) == null ? void 0 : _a.size) ?? KEY_SIZE_DATA[props.size ?? "medium"].font,
259
+ weight: ((_b = props.font) == null ? void 0 : _b.weight) ?? 700,
260
+ family: ((_c = props.font) == null ? void 0 : _c.family) ?? theme.font.family,
261
+ height: (_d = props.font) == null ? void 0 : _d.height
262
+ },
263
+ className: props.className,
264
+ initial: { opacity: 0, scale: 0.95 },
265
+ animate: { opacity: 1, scale: 1 },
266
+ exit: { opacity: 0, scale: 0.95 },
267
+ transition: { duration: 0.2 },
268
+ $sx: props.sx,
269
+ $size: props.size,
270
+ $sxTypography: props.sxTypography,
271
+ $maxHeight: props.maxHeight,
272
+ $maxWidth: props.maxWidth,
273
+ children: props.children
274
+ }
275
+ )
276
+ }
277
+ ) }),
278
+ document.body
279
+ );
280
+ };
281
+ const usePopover = (props) => {
282
+ const { onFocus, onBlur, onBlurReference } = props;
283
+ const [isOpen, setIsOpen] = useState(false);
284
+ const [minWidth, setMinWidth] = useState(void 0);
285
+ const [wasEverOpen, setWasEverOpen] = useState(false);
286
+ const {
287
+ refs,
288
+ floatingStyles,
289
+ update,
290
+ placement: actualPlacement
291
+ } = useFloating({
292
+ open: isOpen,
293
+ placement: props.placement,
294
+ middleware: [offset(props.offset ?? 8), flip(), shift()],
295
+ whileElementsMounted: autoUpdate
296
+ });
297
+ const clickOutsideHandler = useRef(null);
298
+ const hoverCloseTimeout = useRef(null);
299
+ const hoverOffset = useMemo(
300
+ () => props.hoverOffset ?? props.offset ?? DEFAULT_POPOVER_OFFSET,
301
+ [props.hoverOffset, props.offset]
302
+ );
303
+ const hoverCloseDelay = useMemo(() => props.hoverCloseDelay ?? DEFAULT_POPOVER_CLOSE_DELAY, [props.hoverCloseDelay]);
304
+ useEffect(() => {
305
+ if (props.isDisabled) return;
306
+ const refEl = refs.reference.current;
307
+ if (!refEl) return;
308
+ if ((props.mode === "click" || props.mode === "clickOpen") && refEl instanceof HTMLElement) {
309
+ const handleClick = () => {
310
+ if (props.mode === "click") {
311
+ setIsOpen((prev) => !prev);
312
+ } else if (props.mode === "clickOpen") {
313
+ setIsOpen(true);
314
+ }
315
+ };
316
+ refEl.addEventListener("click", handleClick);
317
+ return () => {
318
+ refEl.removeEventListener("click", handleClick);
319
+ };
320
+ } else if (props.mode === "hover" && refEl instanceof HTMLElement) {
321
+ const handleMouseEnter = () => {
322
+ setIsOpen(true);
323
+ };
324
+ const handleMouseLeave = () => {
325
+ if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
326
+ hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
327
+ };
328
+ refEl.addEventListener("mouseenter", handleMouseEnter);
329
+ refEl.addEventListener("mouseleave", handleMouseLeave);
330
+ return () => {
331
+ refEl.removeEventListener("mouseenter", handleMouseEnter);
332
+ refEl.removeEventListener("mouseleave", handleMouseLeave);
333
+ if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
334
+ };
335
+ }
336
+ }, [props.mode, refs.reference, hoverCloseDelay, props.isDisabled]);
337
+ useEffect(() => {
338
+ if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
339
+ const cleanup = autoUpdate(refs.reference.current, refs.floating.current, update);
340
+ return () => cleanup();
341
+ }, [isOpen, refs.reference, refs.floating, update, props.isDisabled]);
342
+ useEffect(() => {
343
+ if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
344
+ if (props.isClickOutside) {
345
+ clickOutsideHandler.current = (e) => {
346
+ const refEl = refs.reference.current;
347
+ const floatingEl = refs.floating.current;
348
+ const otherRefs = props.refsExcludeClickOutside || [];
349
+ if (refEl instanceof HTMLElement && floatingEl instanceof HTMLElement && !refEl.contains(e.target) && !floatingEl.contains(e.target) && !otherRefs.some((ref) => {
350
+ var _a;
351
+ if (typeof ref === "object" && ref !== null && "current" in ref) {
352
+ return (_a = ref.current) == null ? void 0 : _a.contains(e.target);
353
+ }
354
+ return false;
355
+ })) {
356
+ setIsOpen(false);
357
+ }
358
+ };
359
+ document.addEventListener("mousedown", clickOutsideHandler.current);
360
+ }
361
+ return () => {
362
+ if (clickOutsideHandler.current) {
363
+ document.removeEventListener("mousedown", clickOutsideHandler.current);
364
+ clickOutsideHandler.current = null;
365
+ }
366
+ if (hoverCloseTimeout.current) {
367
+ clearTimeout(hoverCloseTimeout.current);
368
+ }
369
+ };
370
+ }, [isOpen, refs.reference, refs.floating, props.isClickOutside, props.isDisabled, props.refsExcludeClickOutside]);
371
+ useEffect(() => {
372
+ if (!isOpen || !props.isFloatingHover || !refs.reference.current || !refs.floating.current || props.isDisabled)
373
+ return;
374
+ const refEl = refs.reference.current;
375
+ const floatingEl = refs.floating.current;
376
+ const handleMouseMove = (e) => {
377
+ const mouseX = e.clientX;
378
+ const mouseY = e.clientY;
379
+ const refRect = refEl.getBoundingClientRect();
380
+ const floatingRect = floatingEl.getBoundingClientRect();
381
+ const isInsideRef = mouseX >= refRect.left - hoverOffset && mouseX <= refRect.right + hoverOffset && mouseY >= refRect.top - hoverOffset && mouseY <= refRect.bottom + hoverOffset;
382
+ const isInsideFloating = mouseX >= floatingRect.left - hoverOffset && mouseX <= floatingRect.right + hoverOffset && mouseY >= floatingRect.top - hoverOffset && mouseY <= floatingRect.bottom + hoverOffset;
383
+ if (isInsideRef || isInsideFloating) {
384
+ if (hoverCloseTimeout.current) {
385
+ clearTimeout(hoverCloseTimeout.current);
386
+ hoverCloseTimeout.current = null;
387
+ }
388
+ } else {
389
+ if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
390
+ hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
391
+ }
392
+ };
393
+ document.addEventListener("mousemove", handleMouseMove);
394
+ return () => {
395
+ document.removeEventListener("mousemove", handleMouseMove);
396
+ if (hoverCloseTimeout.current) {
397
+ clearTimeout(hoverCloseTimeout.current);
398
+ }
399
+ };
400
+ }, [isOpen, props.isFloatingHover, refs.reference, refs.floating, hoverOffset, hoverCloseDelay, props.isDisabled]);
401
+ useLayoutEffect(() => {
402
+ if (!props.isWidthAsContent || !refs.reference.current) return;
403
+ const rect = refs.reference.current.getBoundingClientRect();
404
+ setMinWidth(rect.width);
405
+ }, [props.isWidthAsContent, refs.reference]);
406
+ const open = useCallback(() => {
407
+ if (props.isDisabled) return;
408
+ setIsOpen(true);
409
+ }, [props.isDisabled]);
410
+ const close = useCallback(() => {
411
+ if (props.isDisabled) return;
412
+ setIsOpen(false);
413
+ }, [props.isDisabled]);
414
+ const toggle = useCallback(() => {
415
+ if (props.isDisabled) return;
416
+ setIsOpen((prev) => !prev);
417
+ }, [props.isDisabled]);
418
+ const combinedStyles = useMemo(() => {
419
+ return {
420
+ ...floatingStyles,
421
+ minWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0,
422
+ maxWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0
423
+ };
424
+ }, [floatingStyles, props.isWidthAsContent, minWidth]);
425
+ useEffect(() => {
426
+ if (isOpen) {
427
+ onFocus == null ? void 0 : onFocus();
428
+ setWasEverOpen(true);
429
+ }
430
+ }, [isOpen, onFocus]);
431
+ useEffect(() => {
432
+ if (!isOpen && wasEverOpen) {
433
+ onBlur == null ? void 0 : onBlur();
434
+ }
435
+ }, [isOpen, wasEverOpen, onBlur]);
436
+ useEffect(() => {
437
+ if (!isOpen || props.isDisabled) return;
438
+ const handleFocusIn = (e) => {
439
+ const refEl = refs.reference.current;
440
+ const floatingEl = refs.floating.current;
441
+ const otherRefs = props.refsExcludeClickOutside || [];
442
+ const isInside = refEl instanceof HTMLElement && refEl.contains(e.target) || floatingEl instanceof HTMLElement && floatingEl.contains(e.target) || otherRefs.some((ref) => {
443
+ if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
444
+ return ref.current.contains(e.target);
445
+ }
446
+ return false;
447
+ });
448
+ if (!isInside) {
449
+ setIsOpen(false);
450
+ }
451
+ };
452
+ document.addEventListener("focusin", handleFocusIn);
453
+ return () => {
454
+ document.removeEventListener("focusin", handleFocusIn);
455
+ };
456
+ }, [isOpen, refs.reference, refs.floating, props.refsExcludeClickOutside, props.isDisabled]);
457
+ useEffect(() => {
458
+ if (!refs.reference.current || props.isDisabled || !onBlurReference) return;
459
+ const refEl = refs.reference.current;
460
+ const otherRefs = props.refsExcludeBlur || [];
461
+ const handleBlur = (e) => {
462
+ if (refEl instanceof HTMLElement && !refEl.contains(e.relatedTarget) && !otherRefs.some((ref) => {
463
+ if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement)
464
+ return ref.current.contains(e.relatedTarget);
465
+ })) {
466
+ onBlurReference();
467
+ }
468
+ };
469
+ if (refEl instanceof HTMLElement) refEl.addEventListener("blur", handleBlur, true);
470
+ return () => {
471
+ if (refEl instanceof HTMLElement) refEl.removeEventListener("blur", handleBlur, true);
472
+ };
473
+ }, [refs.reference, props.isDisabled, onBlurReference, props.refsExcludeBlur]);
474
+ const getIsInside = useCallback(
475
+ (target) => {
476
+ if (!target) return false;
477
+ const refEl = refs.reference.current;
478
+ const floatingEl = refs.floating.current;
479
+ const otherRefs = props.refsExcludeBlur || [];
480
+ return refEl instanceof HTMLElement && refEl.contains(target) || floatingEl instanceof HTMLElement && floatingEl.contains(target) || otherRefs.some((ref) => {
481
+ if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
482
+ return ref.current.contains(target);
483
+ }
484
+ return false;
485
+ });
486
+ },
487
+ [refs.reference, refs.floating, props.refsExcludeBlur]
488
+ );
489
+ return {
490
+ getIsInside,
491
+ isOpen,
492
+ setIsOpen,
493
+ open,
494
+ close,
495
+ toggle,
496
+ refReference: refs.setReference,
497
+ refFloating: refs.setFloating,
498
+ floatingStyles: combinedStyles,
499
+ placement: actualPlacement
500
+ };
501
+ };
502
+ const addPopoverGenre = css`
503
+ ${(props) => css`
504
+ background: ${props.theme.colors.button[props.$genre].background.rest};
505
+ border-color: ${props.theme.colors.button[props.$genre].border.rest};
506
+ color: ${props.theme.colors.button[props.$genre].color.rest};
507
+ /* box-shadow: ${props.theme.effects.button}; */
508
+ `};
509
+ `;
510
+ const addPopoverSize = css`
511
+ ${(props) => addPopoverSizeConstructor({
512
+ ...KEY_SIZE_DATA[props.$size ?? "medium"]
513
+ })};
514
+ `;
515
+ const addPopoverSizeConstructor = (props) => css`
516
+ display: flex;
517
+ border-radius: ${props.radius}px;
518
+ padding: ${props.padding}px;
519
+ gap: ${props.padding - 2}px;
520
+ `;
521
+ const PopoverWrapper = styled(motion.div)`
522
+ max-width: ${(props) => props.$maxWidth || "100%"};
523
+ max-height: ${(props) => props.$maxHeight || "100%"};
524
+ overflow: auto;
525
+ flex-direction: column;
526
+ ${addFont};
527
+ ${addPopoverSize};
528
+ ${addAlwaysOutline};
529
+ ${addSXTypography};
530
+ ${addPopoverGenre};
531
+ ${addSX};
532
+ `;
533
+ const DEFAULT_POPOVER_OFFSET = 8;
534
+ const DEFAULT_POPOVER_CLOSE_DELAY = 100;
535
+ const TooltipContainer = styled(Stack)`
536
+ display: flex;
537
+ width: fit-content;
538
+ height: fit-content;
539
+ `;
540
+ const addTooltipBoxSize = css`
541
+ ${(props) => addTooltipBoxSizeConstructor({
542
+ ...KEY_SIZE_DATA[props.size ?? "medium"]
543
+ })};
544
+ `;
545
+ const addTooltipBoxSizeConstructor = (props) => css`
546
+ gap: 0px;
547
+ padding: ${props.padding}px ${props.padding}px 0px ${props.padding}px;
548
+ :after {
549
+ content: '';
550
+ display: block;
551
+ height: ${props.padding}px;
552
+ width: 100%;
553
+ }
554
+ `;
555
+ const TooltipBox = styled(Popover)`
556
+ ${addTooltipBoxSize};
557
+ `;
558
+ const Tooltip = memo((props) => {
559
+ if (props.isDisabled) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
560
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { ...props });
561
+ });
562
+ const TooltipContent = (props) => {
563
+ const { isOpen, refReference, refFloating, floatingStyles } = usePopover({
564
+ placement: props.placement ?? DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,
565
+ offset: props.offset ?? DEFAULT_TOOLTIP_OFFSET_FALLBACK,
566
+ mode: props.mode ?? "hover",
567
+ isClickOutside: props.isClickOutside ?? true,
568
+ isFloatingHover: props.isFloatingHover ?? true,
569
+ isWidthAsContent: props.isWidthAsContent ?? false,
570
+ hoverCloseDelay: props.hoverCloseDelay ?? void 0,
571
+ hoverOffset: props.hoverOffset ?? void 0
572
+ });
573
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
574
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContainer, { sx: props.sx, ref: refReference, children: props.children }),
575
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
576
+ TooltipBox,
577
+ {
578
+ size: props.size,
579
+ isOpen,
580
+ genre: props.genre,
581
+ floatingStyles,
582
+ ref: refFloating,
583
+ maxHeight: props.maxHeight,
584
+ maxWidth: props.maxWidth,
585
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
586
+ Typography,
587
+ {
588
+ sx: props.sxTypography ?? {
589
+ default: {
590
+ size: 14
591
+ }
592
+ },
593
+ children: props.content
594
+ }
595
+ )
596
+ }
597
+ )
598
+ ] });
599
+ };
600
+ Tooltip.displayName = "Tooltip";
601
+ const DEFAULT_TOOLTIP_PLACEMENT_FALLBACK = "bottom-start";
602
+ const DEFAULT_TOOLTIP_OFFSET_FALLBACK = 8;
603
+ const TypographyWithRef = (props) => {
604
+ const { screenActual } = useScreenWidth();
605
+ const cssProps = useMemo(
606
+ () => ({
607
+ $sxTypography: props.sx,
608
+ style: props.style,
609
+ className: props.className,
610
+ $sx: props.sxStandard,
611
+ $isDisabledOutline: props.isDisabledOutline,
612
+ $isOutlineBoxShadow: props.isOutlineBoxShadow,
613
+ $isReadOnly: props.isReadOnly,
614
+ onClick: props.onClick ? props.onClick : () => {
615
+ }
616
+ }),
617
+ [
618
+ props.sx,
619
+ props.style,
620
+ props.className,
621
+ props.sxStandard,
622
+ props.onClick,
623
+ props.isDisabledOutline,
624
+ props.isOutlineBoxShadow,
625
+ props.isReadOnly
626
+ ]
627
+ );
628
+ const screenSX = useMemo(() => {
629
+ var _a, _b;
630
+ return ((_a = props.sx) == null ? void 0 : _a[screenActual]) ?? ((_b = props.sx) == null ? void 0 : _b.default);
631
+ }, [props.sx, screenActual]);
632
+ if (screenSX && "variant" in screenSX) {
633
+ if (screenSX.variant === "h7" || screenSX.variant === "h8" || screenSX.variant === "h9") {
634
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
635
+ Title,
636
+ {
637
+ ref: props.ref,
638
+ as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
639
+ href: props.href,
640
+ ...cssProps,
641
+ children: props.children
642
+ }
643
+ );
644
+ } else {
645
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
646
+ Title,
647
+ {
648
+ ref: props.ref,
649
+ as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : screenSX.variant,
650
+ href: props.href,
651
+ ...cssProps,
652
+ children: props.children
653
+ }
654
+ );
655
+ }
656
+ }
657
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
658
+ Title,
659
+ {
660
+ ref: props.ref,
661
+ as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
662
+ href: props.href,
663
+ ...cssProps,
664
+ children: props.children
665
+ }
666
+ );
667
+ };
668
+ const Typography = (props) => {
669
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ...props });
670
+ };
671
+ const TypographySizeIsAnchor = (props) => {
672
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { isAnchor: true, ...props, ref: props.ref, href: props.href });
673
+ };
674
+ const TypographyLink = createLink(TypographySizeIsAnchor);
675
+ const TypographyTooltip = memo((props) => {
676
+ const [isOverflowing, setIsOverflowing] = useState(false);
677
+ const contentRef = useRef(null);
678
+ useEffect(() => {
679
+ const checkOverflow = () => {
680
+ if (contentRef.current) {
681
+ setIsOverflowing(contentRef.current.scrollWidth > contentRef.current.clientWidth);
682
+ }
683
+ };
684
+ checkOverflow();
685
+ window.addEventListener("resize", checkOverflow);
686
+ return () => window.removeEventListener("resize", checkOverflow);
687
+ }, [props.children]);
688
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { isDisabled: !isOverflowing, content: props.children, ...props.tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ref: contentRef, ...props.typography, style: { position: "relative" }, children: props.children }) });
689
+ });
690
+ TypographyTooltip.displayName = "TypographyTooltip";
691
+ TypographyWithRef.displayName = "TypographyWithRef";
692
+ TypographySizeIsAnchor.displayName = "TypographySizeIsAnchor";
693
+ export {
694
+ DEFAULT_TOOLTIP_PLACEMENT_FALLBACK as D,
695
+ Popover as P,
696
+ TooltipContainer as T,
697
+ addTooltipBoxSize as a,
698
+ addTooltipBoxSizeConstructor as b,
699
+ TooltipBox as c,
700
+ Tooltip as d,
701
+ TooltipContent as e,
702
+ DEFAULT_TOOLTIP_OFFSET_FALLBACK as f,
703
+ addSXTypography as g,
704
+ Title as h,
705
+ Typography as i,
706
+ TypographyLink as j,
707
+ TypographyTooltip as k,
708
+ usePopover as u
709
+ };
710
+ //# sourceMappingURL=component-DKMsOpqH.js.map