@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
@@ -1,244 +1,7 @@
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
1
  import * as React from "react";
5
- import { useLayoutEffect, useState, useRef, useMemo, useEffect, useCallback, memo } from "react";
6
- import styled, { css, keyframes } from "styled-components";
7
- import { J as JeneseiPalette, K as KEY_SIZE_DATA } from "./theme.global-CFUz5Asg.js";
2
+ import { useLayoutEffect } from "react";
3
+ import "./jsx-runtime-BrDlu8eK.js";
8
4
  import * as ReactDOM from "react-dom";
9
- import ReactDOM__default from "react-dom";
10
- import { AnimatePresence, motion } from "framer-motion";
11
- import { f as addOutline, h as addAlwaysOutline } from "./style-BgcnmVAY.js";
12
- import { a as addSX } from "./style-plT9Ah7t.js";
13
- import { b as Stack } from "./component-jPZYT5iL.js";
14
- const getFontSizeStyles = (size, weight, family, height) => css`
15
- font-family: ${family ? family : "inherit"};
16
- font-style: normal;
17
- line-height: ${(props) => height ? height : props.theme.font.lineHeight};
18
- font-size: ${size}px;
19
- font-weight: ${weight};
20
- `;
21
- const shadowPulse = keyframes`
22
- 0% {
23
- text-shadow: 0 0 0 rgba(0, 0, 0, 0);
24
- }
25
- 50% {
26
- text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
27
- }
28
- 100% {
29
- text-shadow: 0 0 0 rgba(0, 0, 0, 0);
30
- }
31
- `;
32
- function toStyledCSS(value) {
33
- return css`
34
- ${value.shadow && value.shadow === "shadowPulse" && css`
35
- animation: ${shadowPulse} 2s infinite;
36
- `};
37
- ${value.letterSpacing && css`
38
- letter-spacing: ${value.letterSpacing};
39
- `};
40
- ${value.flex && css`
41
- flex: ${value.flex};
42
- `};
43
- ${value.cursor && css`
44
- cursor: ${value.cursor};
45
- `};
46
- ${value.overflow && css`
47
- overflow: ${value.overflow};
48
- `};
49
- ${value.line !== void 0 ? value.line === 1 ? css`
50
- text-overflow: ellipsis;
51
- overflow: hidden;
52
- white-space: nowrap;
53
- width: -webkit-fill-available;
54
- max-width: fit-content;
55
- ` : css`
56
- word-break: break-word;
57
- white-space: normal;
58
- text-overflow: ellipsis;
59
- display: -webkit-box;
60
- overflow: hidden;
61
- -webkit-box-orient: vertical;
62
- -webkit-line-clamp: ${value.line};
63
- width: fit-content;
64
- overflow-wrap: anywhere;
65
- ` : css``};
66
- ${value.family && css`
67
- font-family: ${value.family};
68
- `};
69
- ${value.weight && css`
70
- font-weight: ${value.weight};
71
- `};
72
- ${value.height && css`
73
- line-height: ${value.height}px;
74
- `};
75
- ${value.color && css`
76
- color: ${JeneseiPalette[value.color]};
77
- `};
78
- ${value.align && css`
79
- text-align: ${value.align};
80
- `};
81
- ${value.wrap && css`
82
- text-wrap: ${value.wrap};
83
- `};
84
- ${value.decoration && css`
85
- text-decoration: ${value.decoration};
86
- `};
87
- ${value.transform && css`
88
- text-transform: ${value.transform};
89
- `};
90
- ${value.isHoverUnderlining && css`
91
- &:hover {
92
- text-decoration: underline;
93
- }
94
- `};
95
- ${value.isNoUserSelect && css`
96
- user-select: none;
97
- -webkit-user-select: none;
98
- -moz-user-select: none;
99
- -ms-user-select: none;
100
- `};
101
- ${"size" in value && value.size && css`
102
- font-size: ${value.size}px;
103
- `};
104
- ${"variant" in value && value.variant ? value.variant === "h1" ? css`
105
- font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.default}px;
106
- line-height: ${(props) => props.theme.font.lineHeight};
107
- margin: 0;
108
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
109
- font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.tablet}px;
110
- }
111
-
112
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
113
- font-size: ${(props) => props.theme.font.sizeHeading.h1 * props.theme.font.sizeDefault.mobile}px;
114
- }
115
- ` : value.variant === "h2" ? css`
116
- font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.default}px;
117
- line-height: ${(props) => props.theme.font.lineHeight};
118
- margin: 0;
119
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
120
- font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.tablet}px;
121
- }
122
-
123
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
124
- font-size: ${(props) => props.theme.font.sizeHeading.h2 * props.theme.font.sizeDefault.mobile}px;
125
- }
126
- ` : value.variant === "h3" ? css`
127
- font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.default}px;
128
- line-height: ${(props) => props.theme.font.lineHeight};
129
- margin: 0;
130
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
131
- font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.tablet}px;
132
- }
133
-
134
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
135
- font-size: ${(props) => props.theme.font.sizeHeading.h3 * props.theme.font.sizeDefault.mobile}px;
136
- }
137
- ` : value.variant === "h4" ? css`
138
- font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.default}px;
139
- line-height: ${(props) => props.theme.font.lineHeight};
140
- margin: 0;
141
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
142
- font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.tablet}px;
143
- }
144
-
145
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
146
- font-size: ${(props) => props.theme.font.sizeHeading.h4 * props.theme.font.sizeDefault.mobile}px;
147
- }
148
- ` : value.variant === "h5" ? css`
149
- font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.default}px;
150
- line-height: ${(props) => props.theme.font.lineHeight};
151
- margin: 0;
152
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
153
- font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.tablet}px;
154
- }
155
-
156
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
157
- font-size: ${(props) => props.theme.font.sizeHeading.h5 * props.theme.font.sizeDefault.mobile}px;
158
- }
159
- ` : value.variant === "h6" ? css`
160
- font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.default}px;
161
- line-height: ${(props) => props.theme.font.lineHeight};
162
- margin: 0;
163
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
164
- font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.tablet}px;
165
- }
166
-
167
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
168
- font-size: ${(props) => props.theme.font.sizeHeading.h6 * props.theme.font.sizeDefault.mobile}px;
169
- }
170
- ` : value.variant === "h7" ? css`
171
- font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.default}px;
172
- line-height: ${(props) => props.theme.font.lineHeight};
173
- margin: 0;
174
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
175
- font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.tablet}px;
176
- }
177
-
178
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
179
- font-size: ${(props) => props.theme.font.sizeHeading.h7 * props.theme.font.sizeDefault.mobile}px;
180
- }
181
- ` : value.variant === "h8" ? css`
182
- font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.default}px;
183
- line-height: ${(props) => props.theme.font.lineHeight};
184
- margin: 0;
185
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
186
- font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.tablet}px;
187
- }
188
-
189
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
190
- font-size: ${(props) => props.theme.font.sizeHeading.h8 * props.theme.font.sizeDefault.mobile}px;
191
- }
192
- ` : value.variant === "h9" ? css`
193
- font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.default}px;
194
- line-height: ${(props) => props.theme.font.lineHeight};
195
- margin: 0;
196
- @media (max-width: ${(props) => props.theme.screens.tablet.width}px) {
197
- font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.tablet}px;
198
- }
199
-
200
- @media (max-width: ${(props) => props.theme.screens.mobile.width}px) {
201
- font-size: ${(props) => props.theme.font.sizeHeading.h9 * props.theme.font.sizeDefault.mobile}px;
202
- }
203
- ` : null : null};
204
- `;
205
- }
206
- const addSXTypography = css`
207
- ${(props) => {
208
- const rawSX = props.$sxTypography;
209
- if (!rawSX) return null;
210
- return toStyledCSS(rawSX.default);
211
- }}
212
-
213
- ${(props) => {
214
- const rawSX = props.$sxTypography;
215
- if (!rawSX) return null;
216
- return Object.entries(rawSX).filter(([key]) => key !== "default").map(([deviceKey, value]) => {
217
- var _a;
218
- const screenWidth = (_a = props.theme.screens[deviceKey]) == null ? void 0 : _a.width;
219
- if (!screenWidth) return null;
220
- return css`
221
- @media (max-width: ${screenWidth}px) {
222
- ${toStyledCSS(value)}
223
- }
224
- `;
225
- });
226
- }}
227
- `;
228
- const TypographyCSS = css`
229
- font-style: normal;
230
- position: relative;
231
- overflow: visible;
232
- text-overflow: ellipsis;
233
- overflow-wrap: anywhere;
234
- line-height: ${(props) => props.theme.font.lineHeight};
235
- ${addSXTypography};
236
- ${addSX}
237
- `;
238
- const Title = styled.span`
239
- ${TypographyCSS}
240
- ${addOutline}
241
- `;
242
5
  function hasWindow() {
243
6
  return typeof window !== "undefined";
244
7
  }
@@ -303,8 +66,8 @@ function isTopLayer(element) {
303
66
  }
304
67
  function isContainingBlock(elementOrCss) {
305
68
  const webkit = isWebKit();
306
- const css2 = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
307
- return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css2[value] ? css2[value] !== "none" : false) || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit && (css2.filter ? css2.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value));
69
+ const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
70
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
308
71
  }
309
72
  function getContainingBlock(element) {
310
73
  let currentNode = getParentNode(element);
@@ -979,9 +742,9 @@ const shift$2 = function(options) {
979
742
  };
980
743
  };
981
744
  function getCssDimensions(element) {
982
- const css2 = getComputedStyle(element);
983
- let width = parseFloat(css2.width) || 0;
984
- let height = parseFloat(css2.height) || 0;
745
+ const css = getComputedStyle(element);
746
+ let width = parseFloat(css.width) || 0;
747
+ let height = parseFloat(css.height) || 0;
985
748
  const hasOffset = isHTMLElement(element);
986
749
  const offsetWidth = hasOffset ? element.offsetWidth : width;
987
750
  const offsetHeight = hasOffset ? element.offsetHeight : height;
@@ -1075,9 +838,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1075
838
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1076
839
  const iframeScale = getScale(currentIFrame);
1077
840
  const iframeRect = currentIFrame.getBoundingClientRect();
1078
- const css2 = getComputedStyle(currentIFrame);
1079
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css2.paddingLeft)) * iframeScale.x;
1080
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css2.paddingTop)) * iframeScale.y;
841
+ const css = getComputedStyle(currentIFrame);
842
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
843
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1081
844
  x *= iframeScale.x;
1082
845
  y *= iframeScale.y;
1083
846
  width *= iframeScale.x;
@@ -2044,462 +1807,12 @@ function useFloating(options) {
2044
1807
  elements
2045
1808
  }), [position, refs, elements, context]);
2046
1809
  }
2047
- const Popover = (props) => {
2048
- return ReactDOM__default.createPortal(
2049
- /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatePresence, { children: props.isOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
2050
- "div",
2051
- {
2052
- tabIndex: -1,
2053
- ref: props.ref,
2054
- style: {
2055
- position: "absolute",
2056
- top: 0,
2057
- left: 0,
2058
- ...props.floatingStyles,
2059
- transform: props.floatingStyles.transform,
2060
- zIndex: 9999
2061
- },
2062
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2063
- PopoverWrapper,
2064
- {
2065
- tabIndex: -1,
2066
- $isShowAlwaysOutline: props.isShowAlwaysOutline,
2067
- $genre: props.genre ?? "black",
2068
- className: props.className,
2069
- initial: { opacity: 0, scale: 0.95 },
2070
- animate: { opacity: 1, scale: 1 },
2071
- exit: { opacity: 0, scale: 0.95 },
2072
- transition: { duration: 0.2 },
2073
- $sx: props.sx,
2074
- $size: props.size,
2075
- $sxTypography: props.sxTypography,
2076
- $maxHeight: props.maxHeight,
2077
- $maxWidth: props.maxWidth,
2078
- children: props.children
2079
- }
2080
- )
2081
- }
2082
- ) }),
2083
- document.body
2084
- );
2085
- };
2086
- const usePopover = (props) => {
2087
- const { onFocus, onBlur, onBlurReference } = props;
2088
- const [isOpen, setIsOpen] = useState(false);
2089
- const [minWidth, setMinWidth] = useState(void 0);
2090
- const [wasEverOpen, setWasEverOpen] = useState(false);
2091
- const {
2092
- refs,
2093
- floatingStyles,
2094
- update,
2095
- placement: actualPlacement
2096
- } = useFloating({
2097
- open: isOpen,
2098
- placement: props.placement,
2099
- middleware: [offset(props.offset ?? 8), flip(), shift()],
2100
- whileElementsMounted: autoUpdate
2101
- });
2102
- const clickOutsideHandler = useRef(null);
2103
- const hoverCloseTimeout = useRef(null);
2104
- const hoverOffset = useMemo(
2105
- () => props.hoverOffset ?? props.offset ?? DEFAULT_POPOVER_OFFSET,
2106
- [props.hoverOffset, props.offset]
2107
- );
2108
- const hoverCloseDelay = useMemo(() => props.hoverCloseDelay ?? DEFAULT_POPOVER_CLOSE_DELAY, [props.hoverCloseDelay]);
2109
- useEffect(() => {
2110
- if (props.isDisabled) return;
2111
- const refEl = refs.reference.current;
2112
- if (!refEl) return;
2113
- if ((props.mode === "click" || props.mode === "clickOpen") && refEl instanceof HTMLElement) {
2114
- const handleClick = () => {
2115
- if (props.mode === "click") {
2116
- setIsOpen((prev) => !prev);
2117
- } else if (props.mode === "clickOpen") {
2118
- setIsOpen(true);
2119
- }
2120
- };
2121
- refEl.addEventListener("click", handleClick);
2122
- return () => {
2123
- refEl.removeEventListener("click", handleClick);
2124
- };
2125
- } else if (props.mode === "hover" && refEl instanceof HTMLElement) {
2126
- const handleMouseEnter = () => {
2127
- setIsOpen(true);
2128
- };
2129
- const handleMouseLeave = () => {
2130
- if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
2131
- hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
2132
- };
2133
- refEl.addEventListener("mouseenter", handleMouseEnter);
2134
- refEl.addEventListener("mouseleave", handleMouseLeave);
2135
- return () => {
2136
- refEl.removeEventListener("mouseenter", handleMouseEnter);
2137
- refEl.removeEventListener("mouseleave", handleMouseLeave);
2138
- if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
2139
- };
2140
- }
2141
- }, [props.mode, refs.reference, hoverCloseDelay, props.isDisabled]);
2142
- useEffect(() => {
2143
- if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
2144
- const cleanup = autoUpdate(refs.reference.current, refs.floating.current, update);
2145
- return () => cleanup();
2146
- }, [isOpen, refs.reference, refs.floating, update, props.isDisabled]);
2147
- useEffect(() => {
2148
- if (!isOpen || !refs.reference.current || !refs.floating.current || props.isDisabled) return;
2149
- if (props.isClickOutside) {
2150
- clickOutsideHandler.current = (e) => {
2151
- const refEl = refs.reference.current;
2152
- const floatingEl = refs.floating.current;
2153
- const otherRefs = props.refsExcludeClickOutside || [];
2154
- if (refEl instanceof HTMLElement && floatingEl instanceof HTMLElement && !refEl.contains(e.target) && !floatingEl.contains(e.target) && !otherRefs.some((ref) => {
2155
- var _a;
2156
- if (typeof ref === "object" && ref !== null && "current" in ref) {
2157
- return (_a = ref.current) == null ? void 0 : _a.contains(e.target);
2158
- }
2159
- return false;
2160
- })) {
2161
- setIsOpen(false);
2162
- }
2163
- };
2164
- document.addEventListener("mousedown", clickOutsideHandler.current);
2165
- }
2166
- return () => {
2167
- if (clickOutsideHandler.current) {
2168
- document.removeEventListener("mousedown", clickOutsideHandler.current);
2169
- clickOutsideHandler.current = null;
2170
- }
2171
- if (hoverCloseTimeout.current) {
2172
- clearTimeout(hoverCloseTimeout.current);
2173
- }
2174
- };
2175
- }, [isOpen, refs.reference, refs.floating, props.isClickOutside, props.isDisabled, props.refsExcludeClickOutside]);
2176
- useEffect(() => {
2177
- if (!isOpen || !props.isFloatingHover || !refs.reference.current || !refs.floating.current || props.isDisabled)
2178
- return;
2179
- const refEl = refs.reference.current;
2180
- const floatingEl = refs.floating.current;
2181
- const handleMouseMove = (e) => {
2182
- const mouseX = e.clientX;
2183
- const mouseY = e.clientY;
2184
- const refRect = refEl.getBoundingClientRect();
2185
- const floatingRect = floatingEl.getBoundingClientRect();
2186
- const isInsideRef = mouseX >= refRect.left - hoverOffset && mouseX <= refRect.right + hoverOffset && mouseY >= refRect.top - hoverOffset && mouseY <= refRect.bottom + hoverOffset;
2187
- const isInsideFloating = mouseX >= floatingRect.left - hoverOffset && mouseX <= floatingRect.right + hoverOffset && mouseY >= floatingRect.top - hoverOffset && mouseY <= floatingRect.bottom + hoverOffset;
2188
- if (isInsideRef || isInsideFloating) {
2189
- if (hoverCloseTimeout.current) {
2190
- clearTimeout(hoverCloseTimeout.current);
2191
- hoverCloseTimeout.current = null;
2192
- }
2193
- } else {
2194
- if (hoverCloseTimeout.current) clearTimeout(hoverCloseTimeout.current);
2195
- hoverCloseTimeout.current = setTimeout(() => setIsOpen(false), hoverCloseDelay);
2196
- }
2197
- };
2198
- document.addEventListener("mousemove", handleMouseMove);
2199
- return () => {
2200
- document.removeEventListener("mousemove", handleMouseMove);
2201
- if (hoverCloseTimeout.current) {
2202
- clearTimeout(hoverCloseTimeout.current);
2203
- }
2204
- };
2205
- }, [isOpen, props.isFloatingHover, refs.reference, refs.floating, hoverOffset, hoverCloseDelay, props.isDisabled]);
2206
- useLayoutEffect(() => {
2207
- if (!props.isWidthAsContent || !refs.reference.current) return;
2208
- const rect = refs.reference.current.getBoundingClientRect();
2209
- setMinWidth(rect.width);
2210
- }, [props.isWidthAsContent, refs.reference]);
2211
- const open = useCallback(() => {
2212
- if (props.isDisabled) return;
2213
- setIsOpen(true);
2214
- }, [props.isDisabled]);
2215
- const close = useCallback(() => {
2216
- if (props.isDisabled) return;
2217
- setIsOpen(false);
2218
- }, [props.isDisabled]);
2219
- const toggle = useCallback(() => {
2220
- if (props.isDisabled) return;
2221
- setIsOpen((prev) => !prev);
2222
- }, [props.isDisabled]);
2223
- const combinedStyles = useMemo(() => {
2224
- return {
2225
- ...floatingStyles,
2226
- minWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0,
2227
- maxWidth: props.isWidthAsContent && minWidth ? `${minWidth}px` : void 0
2228
- };
2229
- }, [floatingStyles, props.isWidthAsContent, minWidth]);
2230
- useEffect(() => {
2231
- if (isOpen) {
2232
- onFocus == null ? void 0 : onFocus();
2233
- setWasEverOpen(true);
2234
- }
2235
- }, [isOpen, onFocus]);
2236
- useEffect(() => {
2237
- if (!isOpen && wasEverOpen) {
2238
- onBlur == null ? void 0 : onBlur();
2239
- }
2240
- }, [isOpen, wasEverOpen, onBlur]);
2241
- useEffect(() => {
2242
- if (!isOpen || props.isDisabled) return;
2243
- const handleFocusIn = (e) => {
2244
- const refEl = refs.reference.current;
2245
- const floatingEl = refs.floating.current;
2246
- const otherRefs = props.refsExcludeClickOutside || [];
2247
- const isInside = refEl instanceof HTMLElement && refEl.contains(e.target) || floatingEl instanceof HTMLElement && floatingEl.contains(e.target) || otherRefs.some((ref) => {
2248
- if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
2249
- return ref.current.contains(e.target);
2250
- }
2251
- return false;
2252
- });
2253
- if (!isInside) {
2254
- setIsOpen(false);
2255
- }
2256
- };
2257
- document.addEventListener("focusin", handleFocusIn);
2258
- return () => {
2259
- document.removeEventListener("focusin", handleFocusIn);
2260
- };
2261
- }, [isOpen, refs.reference, refs.floating, props.refsExcludeClickOutside, props.isDisabled]);
2262
- useEffect(() => {
2263
- if (!refs.reference.current || props.isDisabled || !onBlurReference) return;
2264
- const refEl = refs.reference.current;
2265
- const otherRefs = props.refsExcludeBlur || [];
2266
- const handleBlur = (e) => {
2267
- if (refEl instanceof HTMLElement && !refEl.contains(e.relatedTarget) && !otherRefs.some((ref) => {
2268
- if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement)
2269
- return ref.current.contains(e.relatedTarget);
2270
- })) {
2271
- onBlurReference();
2272
- }
2273
- };
2274
- if (refEl instanceof HTMLElement) refEl.addEventListener("blur", handleBlur, true);
2275
- return () => {
2276
- if (refEl instanceof HTMLElement) refEl.removeEventListener("blur", handleBlur, true);
2277
- };
2278
- }, [refs.reference, props.isDisabled, onBlurReference, props.refsExcludeBlur]);
2279
- const getIsInside = useCallback(
2280
- (target) => {
2281
- if (!target) return false;
2282
- const refEl = refs.reference.current;
2283
- const floatingEl = refs.floating.current;
2284
- const otherRefs = props.refsExcludeBlur || [];
2285
- return refEl instanceof HTMLElement && refEl.contains(target) || floatingEl instanceof HTMLElement && floatingEl.contains(target) || otherRefs.some((ref) => {
2286
- if (ref && "current" in ref && ref.current && ref.current instanceof HTMLElement) {
2287
- return ref.current.contains(target);
2288
- }
2289
- return false;
2290
- });
2291
- },
2292
- [refs.reference, refs.floating, props.refsExcludeBlur]
2293
- );
2294
- return {
2295
- getIsInside,
2296
- isOpen,
2297
- setIsOpen,
2298
- open,
2299
- close,
2300
- toggle,
2301
- refReference: refs.setReference,
2302
- refFloating: refs.setFloating,
2303
- floatingStyles: combinedStyles,
2304
- placement: actualPlacement
2305
- };
2306
- };
2307
- const addPopoverGenre = css`
2308
- ${(props) => css`
2309
- background: ${props.theme.colors.button[props.$genre].background.rest};
2310
- border-color: ${props.theme.colors.button[props.$genre].border.rest};
2311
- color: ${props.theme.colors.button[props.$genre].color.rest};
2312
- /* box-shadow: ${props.theme.effects.button}; */
2313
- `};
2314
- `;
2315
- const addPopoverSize = css`
2316
- ${(props) => addPopoverSizeConstructor({
2317
- ...KEY_SIZE_DATA[props.$size ?? "medium"]
2318
- })};
2319
- `;
2320
- const addPopoverSizeConstructor = (props) => css`
2321
- display: flex;
2322
- border-radius: ${props.radius}px;
2323
- padding: ${props.padding}px;
2324
- gap: ${props.padding - 2}px;
2325
- ${(params) => getFontSizeStyles(props.font, 500, params.theme.font.family)};
2326
- `;
2327
- const PopoverWrapper = styled(motion.div)`
2328
- max-width: ${(props) => props.$maxWidth || "100%"};
2329
- max-height: ${(props) => props.$maxHeight || "100%"};
2330
- overflow: auto;
2331
- flex-direction: column;
2332
- ${addPopoverSize};
2333
- ${addAlwaysOutline};
2334
- ${addSXTypography};
2335
- ${addPopoverGenre};
2336
- ${addSX};
2337
- `;
2338
- const DEFAULT_POPOVER_OFFSET = 8;
2339
- const DEFAULT_POPOVER_CLOSE_DELAY = 100;
2340
- const TooltipContainer = styled(Stack)`
2341
- display: flex;
2342
- width: fit-content;
2343
- height: fit-content;
2344
- `;
2345
- const addTooltipBoxSize = css`
2346
- ${(props) => addTooltipBoxSizeConstructor({
2347
- ...KEY_SIZE_DATA[props.size ?? "medium"]
2348
- })};
2349
- `;
2350
- const addTooltipBoxSizeConstructor = (props) => css`
2351
- gap: 0px;
2352
- padding: ${props.padding}px ${props.padding}px 0px ${props.padding}px;
2353
- :after {
2354
- content: '';
2355
- display: block;
2356
- height: ${props.padding}px;
2357
- width: 100%;
2358
- }
2359
- `;
2360
- const TooltipBox = styled(Popover)`
2361
- ${addTooltipBoxSize};
2362
- `;
2363
- const Tooltip = memo((props) => {
2364
- if (props.isDisabled) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
2365
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { ...props });
2366
- });
2367
- const TooltipContent = (props) => {
2368
- const { isOpen, refReference, refFloating, floatingStyles } = usePopover({
2369
- placement: props.placement ?? DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,
2370
- offset: props.offset ?? DEFAULT_TOOLTIP_OFFSET_FALLBACK,
2371
- mode: props.mode ?? "hover",
2372
- isClickOutside: props.isClickOutside ?? true,
2373
- isFloatingHover: props.isFloatingHover ?? true,
2374
- isWidthAsContent: props.isWidthAsContent ?? false,
2375
- hoverCloseDelay: props.hoverCloseDelay ?? void 0,
2376
- hoverOffset: props.hoverOffset ?? void 0
2377
- });
2378
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2379
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContainer, { sx: props.sx, ref: refReference, children: props.children }),
2380
- /* @__PURE__ */ jsxRuntimeExports.jsx(
2381
- TooltipBox,
2382
- {
2383
- size: props.size,
2384
- isOpen,
2385
- genre: props.genre,
2386
- floatingStyles,
2387
- ref: refFloating,
2388
- maxHeight: props.maxHeight,
2389
- maxWidth: props.maxWidth,
2390
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2391
- Typography,
2392
- {
2393
- sx: props.sxTypography ?? {
2394
- default: {
2395
- size: 14
2396
- }
2397
- },
2398
- children: props.content
2399
- }
2400
- )
2401
- }
2402
- )
2403
- ] });
2404
- };
2405
- Tooltip.displayName = "Tooltip";
2406
- const DEFAULT_TOOLTIP_PLACEMENT_FALLBACK = "bottom-start";
2407
- const DEFAULT_TOOLTIP_OFFSET_FALLBACK = 8;
2408
- const TypographyWithRef = (props) => {
2409
- const { screenActual } = useScreenWidth();
2410
- const cssProps = useMemo(
2411
- () => ({
2412
- $sxTypography: props.sx,
2413
- style: props.style,
2414
- className: props.className,
2415
- $sx: props.sxStandard,
2416
- onClick: props.onClick ? props.onClick : () => {
2417
- }
2418
- }),
2419
- [props.sx, props.style, props.className, props.sxStandard, props.onClick]
2420
- );
2421
- const screenSX = useMemo(() => {
2422
- var _a, _b;
2423
- return ((_a = props.sx) == null ? void 0 : _a[screenActual]) ?? ((_b = props.sx) == null ? void 0 : _b.default);
2424
- }, [props.sx, screenActual]);
2425
- if (screenSX && "variant" in screenSX) {
2426
- if (screenSX.variant === "h7" || screenSX.variant === "h8" || screenSX.variant === "h9") {
2427
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
2428
- Title,
2429
- {
2430
- ref: props.ref,
2431
- as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
2432
- href: props.href,
2433
- ...cssProps,
2434
- children: props.children
2435
- }
2436
- );
2437
- } else {
2438
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
2439
- Title,
2440
- {
2441
- ref: props.ref,
2442
- as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : screenSX.variant,
2443
- href: props.href,
2444
- ...cssProps,
2445
- children: props.children
2446
- }
2447
- );
2448
- }
2449
- }
2450
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
2451
- Title,
2452
- {
2453
- ref: props.ref,
2454
- as: props.isAnchor ? "a" : props.isParagraph ? "p" : props.isSpan ? "span" : "span",
2455
- href: props.href,
2456
- ...cssProps,
2457
- children: props.children
2458
- }
2459
- );
2460
- };
2461
- const Typography = (props) => {
2462
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { ...props });
2463
- };
2464
- const TypographySizeIsAnchor = (props) => {
2465
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithRef, { isAnchor: true, ...props, ref: props.ref, href: props.href });
2466
- };
2467
- const TypographyLink = createLink(TypographySizeIsAnchor);
2468
- const TypographyTooltip = memo((props) => {
2469
- const [isOverflowing, setIsOverflowing] = useState(false);
2470
- const contentRef = useRef(null);
2471
- useEffect(() => {
2472
- const checkOverflow = () => {
2473
- if (contentRef.current) {
2474
- setIsOverflowing(contentRef.current.scrollWidth > contentRef.current.clientWidth);
2475
- }
2476
- };
2477
- checkOverflow();
2478
- window.addEventListener("resize", checkOverflow);
2479
- return () => window.removeEventListener("resize", checkOverflow);
2480
- }, [props.children]);
2481
- 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 }) });
2482
- });
2483
- TypographyTooltip.displayName = "TypographyTooltip";
2484
- TypographyWithRef.displayName = "TypographyWithRef";
2485
- TypographySizeIsAnchor.displayName = "TypographySizeIsAnchor";
2486
1810
  export {
2487
- DEFAULT_TOOLTIP_PLACEMENT_FALLBACK as D,
2488
- Popover as P,
2489
- TooltipContainer as T,
2490
- addTooltipBoxSize as a,
2491
- addTooltipBoxSizeConstructor as b,
2492
- TooltipBox as c,
2493
- Tooltip as d,
2494
- TooltipContent as e,
2495
- DEFAULT_TOOLTIP_OFFSET_FALLBACK as f,
2496
- getFontSizeStyles as g,
2497
- addSXTypography as h,
2498
- Title as i,
2499
- Typography as j,
2500
- TypographyLink as k,
2501
- TypographyTooltip as l,
2502
- useMergeRefs as m,
2503
- usePopover as u
1811
+ useFloating as a,
1812
+ autoUpdate as b,
1813
+ flip as f,
1814
+ offset as o,
1815
+ shift as s,
1816
+ useMergeRefs as u
2504
1817
  };
2505
- //# sourceMappingURL=component-BoHvC24Q.js.map
1818
+ //# sourceMappingURL=floating-ui.react-Byi6bLb1.js.map