@ktnpm_devops/react-component 0.12.0 → 0.13.0

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 (510) hide show
  1. package/README.md +39 -0
  2. package/dist/charts/CounterTimeseriesChart/CounterTimeseriesChart.d.ts +1 -1
  3. package/dist/charts/CountersAnalysisCard/CountersAnalysisCard.d.ts +1 -1
  4. package/dist/charts/CountersAnalysisCard/CountersAnalysisCard.d.ts.map +1 -1
  5. package/dist/charts/SankeyChartCard/SankeyChartCard.d.ts +1 -1
  6. package/dist/charts/ScatterChartCard/ScatterChartCard.d.ts +1 -1
  7. package/dist/charts/StackedBarChartCard/StackedBarChartCard.d.ts +1 -1
  8. package/dist/charts/StackedBarChartCard/StackedBarChartCard.d.ts.map +1 -1
  9. package/dist/charts/TemporalTrendChartCard/TemporalTrendChartCard.d.ts +1 -1
  10. package/dist/charts/TemporalTrendChartCard/TemporalTrendChartCard.d.ts.map +1 -1
  11. package/dist/composites/CustomRangePicker/CustomRangePicker.d.ts +1 -1
  12. package/dist/composites/CustomRangePicker/CustomRangePicker.d.ts.map +1 -1
  13. package/dist/composites/DatePickerDropdown/DatePickerDropdown.d.ts +1 -1
  14. package/dist/composites/FilterDropdown/FilterDropdown.d.ts +1 -1
  15. package/dist/composites/Loading/Loading.d.ts +1 -1
  16. package/dist/composites/Loading/Loading.d.ts.map +1 -1
  17. package/dist/composites/MultiSelectDropdown/MultiSelectDropdown.d.ts +1 -1
  18. package/dist/composites/MultiSelectDropdown/MultiSelectDropdown.d.ts.map +1 -1
  19. package/dist/composites/ResizableSplitPanel/ResizableSplitPanel.d.ts +1 -1
  20. package/dist/composites/ResizableSplitPanel/ResizableSplitPanel.d.ts.map +1 -1
  21. package/dist/composites/Sidebar/Sidebar.d.ts +2 -2
  22. package/dist/composites/SingleSelectDropdown/SingleSelectDropdown.d.ts +1 -1
  23. package/dist/composites/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -1
  24. package/dist/constants.d.ts +26 -0
  25. package/dist/constants.d.ts.map +1 -1
  26. package/dist/data/LiveExplorerTable/LiveExplorerTable.d.ts +1 -1
  27. package/dist/geo/GeoMapCard/GeoMapCard.d.ts +7 -0
  28. package/dist/geo/GeoMapCard/GeoMapCard.d.ts.map +1 -0
  29. package/dist/geo/GeoMapCard/GeoMapCard.types.d.ts +91 -0
  30. package/dist/geo/GeoMapCard/GeoMapCard.types.d.ts.map +1 -0
  31. package/dist/geo/GeoMapCard/MapLegend.d.ts +12 -0
  32. package/dist/geo/GeoMapCard/MapLegend.d.ts.map +1 -0
  33. package/dist/geo/GeoMapCard/MapViewport.d.ts +17 -0
  34. package/dist/geo/GeoMapCard/MapViewport.d.ts.map +1 -0
  35. package/dist/geo/GeoMapCard/PointListing.d.ts +14 -0
  36. package/dist/geo/GeoMapCard/PointListing.d.ts.map +1 -0
  37. package/dist/geo/GeoMapCard/buildMarkerStyle.d.ts +47 -0
  38. package/dist/geo/GeoMapCard/buildMarkerStyle.d.ts.map +1 -0
  39. package/dist/geo/GeoMapCard/buildMarkerStyle.test.d.ts +2 -0
  40. package/dist/geo/GeoMapCard/buildMarkerStyle.test.d.ts.map +1 -0
  41. package/dist/geo/GeoMapCard/index.d.ts +3 -0
  42. package/dist/geo/GeoMapCard/index.d.ts.map +1 -0
  43. package/dist/geo/GeoMapCard/normalizePoints.d.ts +26 -0
  44. package/dist/geo/GeoMapCard/normalizePoints.d.ts.map +1 -0
  45. package/dist/geo/GeoMapCard/normalizePoints.test.d.ts +2 -0
  46. package/dist/geo/GeoMapCard/normalizePoints.test.d.ts.map +1 -0
  47. package/dist/geo/GeoMapCard/warnMissingLeafletStylesheet.d.ts +13 -0
  48. package/dist/geo/GeoMapCard/warnMissingLeafletStylesheet.d.ts.map +1 -0
  49. package/dist/geo/GeoMapCard/warnMissingLeafletStylesheet.test.d.ts +2 -0
  50. package/dist/geo/GeoMapCard/warnMissingLeafletStylesheet.test.d.ts.map +1 -0
  51. package/dist/geo/index.d.ts +3 -0
  52. package/dist/geo/index.d.ts.map +1 -0
  53. package/dist/hooks/useThemeMode.d.ts +8 -0
  54. package/dist/hooks/useThemeMode.d.ts.map +1 -0
  55. package/dist/index.cjs +52 -48
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +52 -48
  60. package/dist/index.js.map +1 -1
  61. package/dist/index10.cjs +45 -14
  62. package/dist/index10.cjs.map +1 -1
  63. package/dist/index10.js +46 -15
  64. package/dist/index10.js.map +1 -1
  65. package/dist/index100.cjs +23 -38
  66. package/dist/index100.cjs.map +1 -1
  67. package/dist/index100.js +23 -38
  68. package/dist/index100.js.map +1 -1
  69. package/dist/index101.cjs +19 -92
  70. package/dist/index101.cjs.map +1 -1
  71. package/dist/index101.js +19 -92
  72. package/dist/index101.js.map +1 -1
  73. package/dist/index102.cjs +14 -40
  74. package/dist/index102.cjs.map +1 -1
  75. package/dist/index102.js +13 -39
  76. package/dist/index102.js.map +1 -1
  77. package/dist/index103.cjs +53 -11
  78. package/dist/index103.cjs.map +1 -1
  79. package/dist/index103.js +53 -11
  80. package/dist/index103.js.map +1 -1
  81. package/dist/index104.cjs +20 -2
  82. package/dist/index104.cjs.map +1 -1
  83. package/dist/index104.js +21 -3
  84. package/dist/index104.js.map +1 -1
  85. package/dist/index105.cjs +49 -25
  86. package/dist/index105.cjs.map +1 -1
  87. package/dist/index105.js +49 -25
  88. package/dist/index105.js.map +1 -1
  89. package/dist/index106.cjs +33 -0
  90. package/dist/index106.cjs.map +1 -0
  91. package/dist/index106.js +33 -0
  92. package/dist/index106.js.map +1 -0
  93. package/dist/index107.cjs +18 -0
  94. package/dist/index107.cjs.map +1 -0
  95. package/dist/index107.js +18 -0
  96. package/dist/index107.js.map +1 -0
  97. package/dist/index108.cjs +12 -0
  98. package/dist/index108.cjs.map +1 -0
  99. package/dist/index108.js +12 -0
  100. package/dist/index108.js.map +1 -0
  101. package/dist/index109.cjs +21 -0
  102. package/dist/index109.cjs.map +1 -0
  103. package/dist/index109.js +21 -0
  104. package/dist/index109.js.map +1 -0
  105. package/dist/index11.cjs +14 -15
  106. package/dist/index11.cjs.map +1 -1
  107. package/dist/index11.js +15 -16
  108. package/dist/index11.js.map +1 -1
  109. package/dist/index110.cjs +24 -0
  110. package/dist/index110.cjs.map +1 -0
  111. package/dist/index110.js +24 -0
  112. package/dist/index110.js.map +1 -0
  113. package/dist/index111.cjs +9 -0
  114. package/dist/index111.cjs.map +1 -0
  115. package/dist/index111.js +9 -0
  116. package/dist/index111.js.map +1 -0
  117. package/dist/index112.cjs +9 -0
  118. package/dist/index112.cjs.map +1 -0
  119. package/dist/index112.js +9 -0
  120. package/dist/index112.js.map +1 -0
  121. package/dist/index113.cjs +27 -0
  122. package/dist/index113.cjs.map +1 -0
  123. package/dist/index113.js +27 -0
  124. package/dist/index113.js.map +1 -0
  125. package/dist/index12.cjs +15 -4
  126. package/dist/index12.cjs.map +1 -1
  127. package/dist/index12.js +15 -4
  128. package/dist/index12.js.map +1 -1
  129. package/dist/index13.cjs +4 -16
  130. package/dist/index13.cjs.map +1 -1
  131. package/dist/index13.js +4 -16
  132. package/dist/index13.js.map +1 -1
  133. package/dist/index14.cjs +16 -10
  134. package/dist/index14.cjs.map +1 -1
  135. package/dist/index14.js +16 -10
  136. package/dist/index14.js.map +1 -1
  137. package/dist/index15.cjs +10 -100
  138. package/dist/index15.cjs.map +1 -1
  139. package/dist/index15.js +11 -101
  140. package/dist/index15.js.map +1 -1
  141. package/dist/index16.cjs +100 -20
  142. package/dist/index16.cjs.map +1 -1
  143. package/dist/index16.js +101 -21
  144. package/dist/index16.js.map +1 -1
  145. package/dist/index17.cjs +20 -54
  146. package/dist/index17.cjs.map +1 -1
  147. package/dist/index17.js +20 -54
  148. package/dist/index17.js.map +1 -1
  149. package/dist/index18.cjs +52 -16
  150. package/dist/index18.cjs.map +1 -1
  151. package/dist/index18.js +54 -18
  152. package/dist/index18.js.map +1 -1
  153. package/dist/index19.cjs +16 -24
  154. package/dist/index19.cjs.map +1 -1
  155. package/dist/index19.js +17 -25
  156. package/dist/index19.js.map +1 -1
  157. package/dist/index20.cjs +22 -39
  158. package/dist/index20.cjs.map +1 -1
  159. package/dist/index20.js +23 -40
  160. package/dist/index20.js.map +1 -1
  161. package/dist/index21.cjs +38 -85
  162. package/dist/index21.cjs.map +1 -1
  163. package/dist/index21.js +40 -87
  164. package/dist/index21.js.map +1 -1
  165. package/dist/index22.cjs +85 -153
  166. package/dist/index22.cjs.map +1 -1
  167. package/dist/index22.js +87 -155
  168. package/dist/index22.js.map +1 -1
  169. package/dist/index23.cjs +150 -128
  170. package/dist/index23.cjs.map +1 -1
  171. package/dist/index23.js +150 -128
  172. package/dist/index23.js.map +1 -1
  173. package/dist/index24.cjs +121 -106
  174. package/dist/index24.cjs.map +1 -1
  175. package/dist/index24.js +122 -107
  176. package/dist/index24.js.map +1 -1
  177. package/dist/index25.cjs +121 -17
  178. package/dist/index25.cjs.map +1 -1
  179. package/dist/index25.js +121 -17
  180. package/dist/index25.js.map +1 -1
  181. package/dist/index26.cjs +16 -163
  182. package/dist/index26.cjs.map +1 -1
  183. package/dist/index26.js +16 -163
  184. package/dist/index26.js.map +1 -1
  185. package/dist/index27.cjs +163 -21
  186. package/dist/index27.cjs.map +1 -1
  187. package/dist/index27.js +164 -22
  188. package/dist/index27.js.map +1 -1
  189. package/dist/index28.cjs +20 -129
  190. package/dist/index28.cjs.map +1 -1
  191. package/dist/index28.js +21 -130
  192. package/dist/index28.js.map +1 -1
  193. package/dist/index29.cjs +129 -75
  194. package/dist/index29.cjs.map +1 -1
  195. package/dist/index29.js +131 -77
  196. package/dist/index29.js.map +1 -1
  197. package/dist/index30.cjs +152 -7
  198. package/dist/index30.cjs.map +1 -1
  199. package/dist/index30.js +154 -9
  200. package/dist/index30.js.map +1 -1
  201. package/dist/index31.cjs +74 -128
  202. package/dist/index31.cjs.map +1 -1
  203. package/dist/index31.js +76 -130
  204. package/dist/index31.js.map +1 -1
  205. package/dist/index32.cjs +6 -54
  206. package/dist/index32.cjs.map +1 -1
  207. package/dist/index32.js +8 -56
  208. package/dist/index32.js.map +1 -1
  209. package/dist/index33.cjs +128 -35
  210. package/dist/index33.cjs.map +1 -1
  211. package/dist/index33.js +129 -36
  212. package/dist/index33.js.map +1 -1
  213. package/dist/index34.cjs +51 -221
  214. package/dist/index34.cjs.map +1 -1
  215. package/dist/index34.js +53 -223
  216. package/dist/index34.js.map +1 -1
  217. package/dist/index35.cjs +38 -34
  218. package/dist/index35.cjs.map +1 -1
  219. package/dist/index35.js +39 -35
  220. package/dist/index35.js.map +1 -1
  221. package/dist/index36.cjs +222 -106
  222. package/dist/index36.cjs.map +1 -1
  223. package/dist/index36.js +224 -108
  224. package/dist/index36.js.map +1 -1
  225. package/dist/index37.cjs +30 -64
  226. package/dist/index37.cjs.map +1 -1
  227. package/dist/index37.js +31 -65
  228. package/dist/index37.js.map +1 -1
  229. package/dist/index38.cjs +106 -74
  230. package/dist/index38.cjs.map +1 -1
  231. package/dist/index38.js +108 -76
  232. package/dist/index38.js.map +1 -1
  233. package/dist/index39.cjs +63 -54
  234. package/dist/index39.cjs.map +1 -1
  235. package/dist/index39.js +64 -55
  236. package/dist/index39.js.map +1 -1
  237. package/dist/index40.cjs +69 -144
  238. package/dist/index40.cjs.map +1 -1
  239. package/dist/index40.js +70 -145
  240. package/dist/index40.js.map +1 -1
  241. package/dist/index41.cjs +57 -96
  242. package/dist/index41.cjs.map +1 -1
  243. package/dist/index41.js +59 -98
  244. package/dist/index41.js.map +1 -1
  245. package/dist/index42.cjs +147 -66
  246. package/dist/index42.cjs.map +1 -1
  247. package/dist/index42.js +149 -68
  248. package/dist/index42.js.map +1 -1
  249. package/dist/index43.cjs +97 -7
  250. package/dist/index43.cjs.map +1 -1
  251. package/dist/index43.js +99 -9
  252. package/dist/index43.js.map +1 -1
  253. package/dist/index44.cjs +72 -17
  254. package/dist/index44.cjs.map +1 -1
  255. package/dist/index44.js +73 -18
  256. package/dist/index44.js.map +1 -1
  257. package/dist/index45.cjs +7 -76
  258. package/dist/index45.cjs.map +1 -1
  259. package/dist/index45.js +9 -78
  260. package/dist/index45.js.map +1 -1
  261. package/dist/index46.cjs +17 -143
  262. package/dist/index46.cjs.map +1 -1
  263. package/dist/index46.js +17 -143
  264. package/dist/index46.js.map +1 -1
  265. package/dist/index47.cjs +72 -59
  266. package/dist/index47.cjs.map +1 -1
  267. package/dist/index47.js +74 -61
  268. package/dist/index47.js.map +1 -1
  269. package/dist/index48.cjs +136 -98
  270. package/dist/index48.cjs.map +1 -1
  271. package/dist/index48.js +137 -99
  272. package/dist/index48.js.map +1 -1
  273. package/dist/index49.cjs +49 -32
  274. package/dist/index49.cjs.map +1 -1
  275. package/dist/index49.js +49 -32
  276. package/dist/index49.js.map +1 -1
  277. package/dist/index50.cjs +105 -6
  278. package/dist/index50.cjs.map +1 -1
  279. package/dist/index50.js +106 -7
  280. package/dist/index50.js.map +1 -1
  281. package/dist/index51.cjs +44 -144
  282. package/dist/index51.cjs.map +1 -1
  283. package/dist/index51.js +45 -145
  284. package/dist/index51.js.map +1 -1
  285. package/dist/index52.cjs +6 -8
  286. package/dist/index52.cjs.map +1 -1
  287. package/dist/index52.js +6 -8
  288. package/dist/index52.js.map +1 -1
  289. package/dist/index53.cjs +145 -15
  290. package/dist/index53.cjs.map +1 -1
  291. package/dist/index53.js +147 -17
  292. package/dist/index53.js.map +1 -1
  293. package/dist/index54.cjs +7 -65
  294. package/dist/index54.cjs.map +1 -1
  295. package/dist/index54.js +9 -67
  296. package/dist/index54.js.map +1 -1
  297. package/dist/index55.cjs +19 -16
  298. package/dist/index55.cjs.map +1 -1
  299. package/dist/index55.js +18 -15
  300. package/dist/index55.js.map +1 -1
  301. package/dist/index56.cjs +67 -6
  302. package/dist/index56.cjs.map +1 -1
  303. package/dist/index56.js +66 -5
  304. package/dist/index56.js.map +1 -1
  305. package/dist/index57.cjs +15 -24
  306. package/dist/index57.cjs.map +1 -1
  307. package/dist/index57.js +15 -24
  308. package/dist/index57.js.map +1 -1
  309. package/dist/index58.cjs +2 -20
  310. package/dist/index58.cjs.map +1 -1
  311. package/dist/index58.js +2 -20
  312. package/dist/index58.js.map +1 -1
  313. package/dist/index59.cjs +20 -2
  314. package/dist/index59.cjs.map +1 -1
  315. package/dist/index59.js +20 -2
  316. package/dist/index59.js.map +1 -1
  317. package/dist/index60.cjs +64 -46
  318. package/dist/index60.cjs.map +1 -1
  319. package/dist/index60.js +64 -46
  320. package/dist/index60.js.map +1 -1
  321. package/dist/index61.cjs +22 -64
  322. package/dist/index61.cjs.map +1 -1
  323. package/dist/index61.js +22 -64
  324. package/dist/index61.js.map +1 -1
  325. package/dist/index62.cjs +27 -89
  326. package/dist/index62.cjs.map +1 -1
  327. package/dist/index62.js +26 -88
  328. package/dist/index62.js.map +1 -1
  329. package/dist/index63.cjs +13 -79
  330. package/dist/index63.cjs.map +1 -1
  331. package/dist/index63.js +13 -79
  332. package/dist/index63.js.map +1 -1
  333. package/dist/index64.cjs +13 -28
  334. package/dist/index64.cjs.map +1 -1
  335. package/dist/index64.js +13 -28
  336. package/dist/index64.js.map +1 -1
  337. package/dist/index65.cjs +16 -34
  338. package/dist/index65.cjs.map +1 -1
  339. package/dist/index65.js +16 -34
  340. package/dist/index65.js.map +1 -1
  341. package/dist/index66.cjs +3 -30
  342. package/dist/index66.cjs.map +1 -1
  343. package/dist/index66.js +3 -30
  344. package/dist/index66.js.map +1 -1
  345. package/dist/index67.cjs +116 -40
  346. package/dist/index67.cjs.map +1 -1
  347. package/dist/index67.js +114 -38
  348. package/dist/index67.js.map +1 -1
  349. package/dist/index68.cjs +19 -52
  350. package/dist/index68.cjs.map +1 -1
  351. package/dist/index68.js +19 -52
  352. package/dist/index68.js.map +1 -1
  353. package/dist/index69.cjs +19 -16
  354. package/dist/index69.cjs.map +1 -1
  355. package/dist/index69.js +20 -17
  356. package/dist/index69.js.map +1 -1
  357. package/dist/index7.cjs +32 -64
  358. package/dist/index7.cjs.map +1 -1
  359. package/dist/index7.js +32 -64
  360. package/dist/index7.js.map +1 -1
  361. package/dist/index70.cjs +11 -2
  362. package/dist/index70.cjs.map +1 -1
  363. package/dist/index70.js +12 -3
  364. package/dist/index70.js.map +1 -1
  365. package/dist/index71.cjs +16 -10
  366. package/dist/index71.cjs.map +1 -1
  367. package/dist/index71.js +17 -11
  368. package/dist/index71.js.map +1 -1
  369. package/dist/index72.cjs +80 -2
  370. package/dist/index72.cjs.map +1 -1
  371. package/dist/index72.js +81 -3
  372. package/dist/index72.js.map +1 -1
  373. package/dist/index73.cjs +47 -5
  374. package/dist/index73.cjs.map +1 -1
  375. package/dist/index73.js +48 -6
  376. package/dist/index73.js.map +1 -1
  377. package/dist/index74.cjs +50 -14
  378. package/dist/index74.cjs.map +1 -1
  379. package/dist/index74.js +51 -15
  380. package/dist/index74.js.map +1 -1
  381. package/dist/index75.cjs +13 -19
  382. package/dist/index75.cjs.map +1 -1
  383. package/dist/index75.js +14 -20
  384. package/dist/index75.js.map +1 -1
  385. package/dist/index76.cjs +28 -10
  386. package/dist/index76.cjs.map +1 -1
  387. package/dist/index76.js +28 -10
  388. package/dist/index76.js.map +1 -1
  389. package/dist/index77.cjs +2 -29
  390. package/dist/index77.cjs.map +1 -1
  391. package/dist/index77.js +3 -30
  392. package/dist/index77.js.map +1 -1
  393. package/dist/index78.cjs +34 -16
  394. package/dist/index78.cjs.map +1 -1
  395. package/dist/index78.js +34 -16
  396. package/dist/index78.js.map +1 -1
  397. package/dist/index79.cjs +10 -19
  398. package/dist/index79.cjs.map +1 -1
  399. package/dist/index79.js +11 -20
  400. package/dist/index79.js.map +1 -1
  401. package/dist/index8.cjs +58 -75
  402. package/dist/index8.cjs.map +1 -1
  403. package/dist/index8.js +58 -75
  404. package/dist/index8.js.map +1 -1
  405. package/dist/index80.cjs +16 -22
  406. package/dist/index80.cjs.map +1 -1
  407. package/dist/index80.js +16 -22
  408. package/dist/index80.js.map +1 -1
  409. package/dist/index81.cjs +18 -15
  410. package/dist/index81.cjs.map +1 -1
  411. package/dist/index81.js +18 -15
  412. package/dist/index81.js.map +1 -1
  413. package/dist/index82.cjs +4 -13
  414. package/dist/index82.cjs.map +1 -1
  415. package/dist/index82.js +4 -13
  416. package/dist/index82.js.map +1 -1
  417. package/dist/index83.cjs +30 -15
  418. package/dist/index83.cjs.map +1 -1
  419. package/dist/index83.js +30 -15
  420. package/dist/index83.js.map +1 -1
  421. package/dist/index84.cjs +36 -36
  422. package/dist/index84.js +36 -36
  423. package/dist/index85.cjs +24 -39
  424. package/dist/index85.cjs.map +1 -1
  425. package/dist/index85.js +25 -40
  426. package/dist/index85.js.map +1 -1
  427. package/dist/index86.cjs +52 -13
  428. package/dist/index86.cjs.map +1 -1
  429. package/dist/index86.js +52 -13
  430. package/dist/index86.js.map +1 -1
  431. package/dist/index87.cjs +39 -21
  432. package/dist/index87.cjs.map +1 -1
  433. package/dist/index87.js +38 -20
  434. package/dist/index87.js.map +1 -1
  435. package/dist/index88.cjs +92 -21
  436. package/dist/index88.cjs.map +1 -1
  437. package/dist/index88.js +91 -20
  438. package/dist/index88.js.map +1 -1
  439. package/dist/index89.cjs +32 -47
  440. package/dist/index89.cjs.map +1 -1
  441. package/dist/index89.js +32 -47
  442. package/dist/index89.js.map +1 -1
  443. package/dist/index9.cjs +81 -45
  444. package/dist/index9.cjs.map +1 -1
  445. package/dist/index9.js +81 -45
  446. package/dist/index9.js.map +1 -1
  447. package/dist/index90.cjs +116 -16
  448. package/dist/index90.cjs.map +1 -1
  449. package/dist/index90.js +115 -15
  450. package/dist/index90.js.map +1 -1
  451. package/dist/index91.cjs +37 -4
  452. package/dist/index91.cjs.map +1 -1
  453. package/dist/index91.js +38 -5
  454. package/dist/index91.js.map +1 -1
  455. package/dist/index92.cjs +34 -19
  456. package/dist/index92.cjs.map +1 -1
  457. package/dist/index92.js +34 -19
  458. package/dist/index92.js.map +1 -1
  459. package/dist/index93.cjs +134 -22
  460. package/dist/index93.cjs.map +1 -1
  461. package/dist/index93.js +133 -21
  462. package/dist/index93.js.map +1 -1
  463. package/dist/index94.cjs +46 -134
  464. package/dist/index94.cjs.map +1 -1
  465. package/dist/index94.js +45 -133
  466. package/dist/index94.js.map +1 -1
  467. package/dist/index95.cjs +16 -28
  468. package/dist/index95.cjs.map +1 -1
  469. package/dist/index95.js +17 -29
  470. package/dist/index95.js.map +1 -1
  471. package/dist/index96.cjs +16 -22
  472. package/dist/index96.cjs.map +1 -1
  473. package/dist/index96.js +16 -22
  474. package/dist/index96.js.map +1 -1
  475. package/dist/index97.cjs +19 -116
  476. package/dist/index97.cjs.map +1 -1
  477. package/dist/index97.js +18 -115
  478. package/dist/index97.js.map +1 -1
  479. package/dist/index98.cjs +35 -42
  480. package/dist/index98.cjs.map +1 -1
  481. package/dist/index98.js +34 -41
  482. package/dist/index98.js.map +1 -1
  483. package/dist/index99.cjs +43 -42
  484. package/dist/index99.cjs.map +1 -1
  485. package/dist/index99.js +42 -41
  486. package/dist/index99.js.map +1 -1
  487. package/dist/layouts/AuthLayout/AuthLayout.d.ts +1 -1
  488. package/dist/layouts/AuthLayout/AuthLayout.d.ts.map +1 -1
  489. package/dist/layouts/ChatLayout/ChatLayout.d.ts +1 -1
  490. package/dist/layouts/DashboardLayout/DashboardLayout.d.ts +1 -1
  491. package/dist/layouts/SettingsLayout/SettingsLayout.d.ts +1 -1
  492. package/dist/layouts/SettingsLayout/SettingsLayout.d.ts.map +1 -1
  493. package/dist/primitives/Avatar/Avatar.d.ts +1 -1
  494. package/dist/primitives/Avatar/Avatar.d.ts.map +1 -1
  495. package/dist/primitives/Badge/Badge.d.ts +1 -1
  496. package/dist/primitives/Badge/Badge.d.ts.map +1 -1
  497. package/dist/primitives/Card/Card.d.ts +4 -4
  498. package/dist/primitives/Card/Card.d.ts.map +1 -1
  499. package/dist/primitives/Chip/Chip.types.d.ts +1 -1
  500. package/dist/primitives/Chip/Chip.types.d.ts.map +1 -1
  501. package/dist/primitives/Table/Table.d.ts +2 -2
  502. package/dist/primitives/Table/Table.d.ts.map +1 -1
  503. package/dist/primitives/Toast/ToastProvider.d.ts +1 -1
  504. package/dist/primitives/Toast/ToastProvider.d.ts.map +1 -1
  505. package/dist/style.css +207 -0
  506. package/dist/types/geo.types.d.ts +45 -0
  507. package/dist/types/geo.types.d.ts.map +1 -0
  508. package/dist/types/index.d.ts +1 -0
  509. package/dist/types/index.d.ts.map +1 -1
  510. package/package.json +17 -6
package/dist/index15.js CHANGED
@@ -1,104 +1,14 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect, useCallback } from "react";
3
- import { createPortal } from "react-dom";
4
- import { useEscapeKey } from "./index5.js";
5
- import { SVG_STROKE_WIDTH, SVG_VIEWBOX, ICON_SIZE, CHART_MODAL, VIEWPORT_MARGIN } from "./index62.js";
6
- import { clsx } from "./index55.js";
7
- import styles from "./index66.js";
8
- const getInitialSize = (override) => {
9
- if (typeof window === "undefined") {
10
- return {
11
- width: (override == null ? void 0 : override.width) ?? CHART_MODAL.FALLBACK_WIDTH,
12
- height: (override == null ? void 0 : override.height) ?? CHART_MODAL.FALLBACK_HEIGHT
13
- };
14
- }
15
- const w = Math.min((override == null ? void 0 : override.width) ?? CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - VIEWPORT_MARGIN);
16
- const h = Math.min((override == null ? void 0 : override.height) ?? CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - VIEWPORT_MARGIN);
17
- return { width: Math.max(w, CHART_MODAL.MIN_WIDTH), height: Math.max(h, CHART_MODAL.MIN_HEIGHT) };
18
- };
19
- const ChartExpandModal = ({
20
- title,
21
- children,
22
- onClose,
23
- resizable = false,
24
- defaultSize,
25
- actions
26
- }) => {
27
- const [size, setSize] = useState(() => getInitialSize(defaultSize));
28
- const [isReady, setIsReady] = useState(false);
29
- const bodyRef = useRef(null);
30
- useEscapeKey(onClose);
31
- useEffect(() => {
32
- if (!resizable) return;
33
- const handleResize = () => setSize(getInitialSize(defaultSize));
34
- window.addEventListener("resize", handleResize);
35
- return () => window.removeEventListener("resize", handleResize);
36
- }, [resizable, defaultSize]);
37
- useEffect(() => {
38
- const check = () => {
39
- const body = bodyRef.current;
40
- if (body && body.clientWidth > 0 && body.clientHeight > 0) {
41
- setIsReady(true);
42
- } else {
43
- requestAnimationFrame(check);
44
- }
45
- };
46
- requestAnimationFrame(check);
47
- }, []);
48
- const handleResizeStart = useCallback(
49
- (e) => {
50
- var _a, _b;
51
- if (!resizable || typeof window === "undefined") return;
52
- e.preventDefault();
53
- const startX = "touches" in e ? ((_a = e.touches[0]) == null ? void 0 : _a.clientX) ?? 0 : e.clientX;
54
- const startY = "touches" in e ? ((_b = e.touches[0]) == null ? void 0 : _b.clientY) ?? 0 : e.clientY;
55
- const startW = size.width;
56
- const startH = size.height;
57
- const handleMove = (ev) => {
58
- var _a2, _b2;
59
- const cx = ev instanceof TouchEvent ? ((_a2 = ev.touches[0]) == null ? void 0 : _a2.clientX) ?? 0 : ev.clientX;
60
- const cy = ev instanceof TouchEvent ? ((_b2 = ev.touches[0]) == null ? void 0 : _b2.clientY) ?? 0 : ev.clientY;
61
- const maxW = Math.min(window.innerWidth - VIEWPORT_MARGIN, CHART_MODAL.MAX_WIDTH);
62
- const maxH = Math.min(window.innerHeight - VIEWPORT_MARGIN, CHART_MODAL.MAX_HEIGHT);
63
- setSize({
64
- width: Math.min(Math.max(startW + (cx - startX), CHART_MODAL.MIN_WIDTH), maxW),
65
- height: Math.min(Math.max(startH + (cy - startY), CHART_MODAL.MIN_HEIGHT), maxH)
66
- });
67
- };
68
- const handleUp = () => {
69
- window.removeEventListener("mousemove", handleMove);
70
- window.removeEventListener("mouseup", handleUp);
71
- window.removeEventListener("touchmove", handleMove);
72
- window.removeEventListener("touchend", handleUp);
73
- };
74
- window.addEventListener("mousemove", handleMove);
75
- window.addEventListener("mouseup", handleUp);
76
- window.addEventListener("touchmove", handleMove, { passive: false });
77
- window.addEventListener("touchend", handleUp);
78
- },
79
- [resizable, size]
80
- );
81
- if (typeof document === "undefined") return null;
82
- const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : void 0;
83
- return createPortal(
84
- /* @__PURE__ */ jsx("div", { className: styles.overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxs("div", { className: clsx(styles.modal, { [styles.resizable]: resizable }), style: modalStyle, children: [
85
- /* @__PURE__ */ jsxs("header", { className: styles.header, children: [
86
- /* @__PURE__ */ jsx("h2", { className: styles.title, children: title }),
87
- /* @__PURE__ */ jsxs("div", { className: styles.headerActions, children: [
88
- actions,
89
- /* @__PURE__ */ jsx("button", { type: "button", className: styles.close, onClick: onClose, "aria-label": "Close expanded chart", children: /* @__PURE__ */ jsxs("svg", { width: ICON_SIZE.LG, height: ICON_SIZE.LG, viewBox: SVG_VIEWBOX, fill: "none", stroke: "currentColor", strokeWidth: SVG_STROKE_WIDTH, strokeLinecap: "round", strokeLinejoin: "round", children: [
90
- /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
91
- /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
92
- ] }) })
93
- ] })
94
- ] }),
95
- /* @__PURE__ */ jsx("div", { className: styles.body, ref: bodyRef, children: isReady ? children : /* @__PURE__ */ jsx("div", { className: styles.loading, children: "Loading chart..." }) }),
96
- resizable && /* @__PURE__ */ jsx("div", { className: styles.resizeHandle, onMouseDown: handleResizeStart, onTouchStart: handleResizeStart, children: /* @__PURE__ */ jsx("span", {}) })
97
- ] }) }),
98
- document.body
99
- );
100
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { clsx } from "./index57.js";
3
+ import styles from "./index107.js";
4
+ const Card = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.root, className), ...props });
5
+ const CardHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.header, className), ...props });
6
+ const CardContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.content, className), ...props });
7
+ const CardFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.footer, className), ...props });
101
8
  export {
102
- ChartExpandModal
9
+ Card,
10
+ CardContent,
11
+ CardFooter,
12
+ CardHeader
103
13
  };
104
14
  //# sourceMappingURL=index15.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index15.js","sources":["../src/composites/ChartExpandModal/ChartExpandModal.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useEscapeKey } from '../../hooks/useEscapeKey';\nimport { CHART_MODAL, VIEWPORT_MARGIN, ICON_SIZE, SVG_VIEWBOX, SVG_STROKE_WIDTH } from '../../constants';\nimport clsx from 'clsx';\nimport styles from './ChartExpandModal.module.css';\n\nexport interface ChartExpandModalProps {\n /** Title displayed in the modal header. */\n title: string;\n /** Content to render inside the modal body. */\n children: ReactNode;\n /** Called when the modal should close. */\n onClose: () => void;\n /** Enable resize handles on the modal. */\n resizable?: boolean;\n /** Default modal dimensions in pixels. */\n defaultSize?: { width?: number; height?: number };\n /** Additional actions rendered in the header. */\n actions?: ReactNode;\n}\n\nconst getInitialSize = (override?: { width?: number; height?: number }) => {\n if (typeof window === 'undefined') {\n return {\n width: override?.width ?? CHART_MODAL.FALLBACK_WIDTH,\n height: override?.height ?? CHART_MODAL.FALLBACK_HEIGHT,\n };\n }\n const w = Math.min(override?.width ?? CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - VIEWPORT_MARGIN);\n const h = Math.min(override?.height ?? CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - VIEWPORT_MARGIN);\n return { width: Math.max(w, CHART_MODAL.MIN_WIDTH), height: Math.max(h, CHART_MODAL.MIN_HEIGHT) };\n};\n\nexport const ChartExpandModal = ({\n title,\n children,\n onClose,\n resizable = false,\n defaultSize,\n actions,\n}: ChartExpandModalProps) => {\n const [size, setSize] = useState(() => getInitialSize(defaultSize));\n const [isReady, setIsReady] = useState(false);\n const bodyRef = useRef<HTMLDivElement>(null);\n\n useEscapeKey(onClose);\n\n useEffect(() => {\n if (!resizable) return;\n const handleResize = () => setSize(getInitialSize(defaultSize));\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [resizable, defaultSize]);\n\n useEffect(() => {\n const check = () => {\n const body = bodyRef.current;\n if (body && body.clientWidth > 0 && body.clientHeight > 0) {\n setIsReady(true);\n } else {\n requestAnimationFrame(check);\n }\n };\n requestAnimationFrame(check);\n }, []);\n\n const handleResizeStart = useCallback(\n (e: React.MouseEvent | React.TouchEvent) => {\n if (!resizable || typeof window === 'undefined') return;\n e.preventDefault();\n const startX = 'touches' in e ? e.touches[0]?.clientX ?? 0 : e.clientX;\n const startY = 'touches' in e ? e.touches[0]?.clientY ?? 0 : e.clientY;\n const startW = size.width;\n const startH = size.height;\n\n const handleMove = (ev: MouseEvent | TouchEvent) => {\n const cx = ev instanceof TouchEvent ? ev.touches[0]?.clientX ?? 0 : (ev as MouseEvent).clientX;\n const cy = ev instanceof TouchEvent ? ev.touches[0]?.clientY ?? 0 : (ev as MouseEvent).clientY;\n const maxW = Math.min(window.innerWidth - VIEWPORT_MARGIN, CHART_MODAL.MAX_WIDTH);\n const maxH = Math.min(window.innerHeight - VIEWPORT_MARGIN, CHART_MODAL.MAX_HEIGHT);\n setSize({\n width: Math.min(Math.max(startW + (cx - startX), CHART_MODAL.MIN_WIDTH), maxW),\n height: Math.min(Math.max(startH + (cy - startY), CHART_MODAL.MIN_HEIGHT), maxH),\n });\n };\n\n const handleUp = () => {\n window.removeEventListener('mousemove', handleMove);\n window.removeEventListener('mouseup', handleUp);\n window.removeEventListener('touchmove', handleMove as EventListener);\n window.removeEventListener('touchend', handleUp);\n };\n\n window.addEventListener('mousemove', handleMove);\n window.addEventListener('mouseup', handleUp);\n window.addEventListener('touchmove', handleMove as EventListener, { passive: false });\n window.addEventListener('touchend', handleUp);\n },\n [resizable, size],\n );\n\n if (typeof document === 'undefined') return null;\n\n const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : undefined;\n\n return createPortal(\n <div className={styles.overlay} role=\"dialog\" aria-modal=\"true\">\n <div className={clsx(styles.modal, { [styles.resizable]: resizable })} style={modalStyle}>\n <header className={styles.header}>\n <h2 className={styles.title}>{title}</h2>\n <div className={styles.headerActions}>\n {actions}\n <button type=\"button\" className={styles.close} onClick={onClose} aria-label=\"Close expanded chart\">\n <svg width={ICON_SIZE.LG} height={ICON_SIZE.LG} viewBox={SVG_VIEWBOX} fill=\"none\" stroke=\"currentColor\" strokeWidth={SVG_STROKE_WIDTH} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n </header>\n <div className={styles.body} ref={bodyRef}>\n {isReady ? children : <div className={styles.loading}>Loading chart...</div>}\n </div>\n {resizable && (\n <div className={styles.resizeHandle} onMouseDown={handleResizeStart} onTouchStart={handleResizeStart}>\n <span />\n </div>\n )}\n </div>\n </div>,\n document.body,\n );\n};\n"],"names":["_a","_b"],"mappings":";;;;;;;AAsBA,MAAM,iBAAiB,CAAC,aAAmD;AACzE,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA,MACL,QAAO,qCAAU,UAAS,YAAY;AAAA,MACtC,SAAQ,qCAAU,WAAU,YAAY;AAAA,IAAA;AAAA,EAE5C;AACA,QAAM,IAAI,KAAK,KAAI,qCAAU,UAAS,YAAY,eAAe,OAAO,aAAa,eAAe;AACpG,QAAM,IAAI,KAAK,KAAI,qCAAU,WAAU,YAAY,gBAAgB,OAAO,cAAc,eAAe;AACvG,SAAO,EAAE,OAAO,KAAK,IAAI,GAAG,YAAY,SAAS,GAAG,QAAQ,KAAK,IAAI,GAAG,YAAY,UAAU,EAAA;AAChG;AAEO,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ACpC,qBAAC,OAAA,EAAI,WAAW,OAAO,eACpB,UAAA;AAAA,UAAA;AAAA,UACD,oBAAC,UAAA,EAAO,MAAK,UAAS,WAAW,OAAO,OAAO,SAAS,SAAS,cAAW,wBAC1E,UAAA,qBAAC,SAAI,OAAO,UAAU,IAAI,QAAQ,UAAU,IAAI,SAAS,aAAa,MAAK,QAAO,QAAO,gBAAe,aAAa,kBAAkB,eAAc,SAAQ,gBAAe,SAC1K,UAAA;AAAA,YAAA,oBAAC,QAAA,EAAK,IAAG,MAAK,IAAG,KAAI,IAAG,KAAI,IAAG,KAAA,CAAK;AAAA,YACpC,oBAAC,UAAK,IAAG,KAAI,IAAG,KAAI,IAAG,MAAK,IAAG,KAAA,CAAK;AAAA,UAAA,EAAA,CACtC,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,OAAA,EAAI,WAAW,OAAO,MAAM,KAAK,SAC/B,UAAA,UAAU,+BAAY,OAAA,EAAI,WAAW,OAAO,SAAS,8BAAgB,GACxE;AAAA,MACC,aACC,oBAAC,OAAA,EAAI,WAAW,OAAO,cAAc,aAAa,mBAAmB,cAAc,mBACjF,UAAA,oBAAC,QAAA,CAAA,CAAK,EAAA,CACR;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;"}
1
+ {"version":3,"file":"index15.js","sources":["../src/primitives/Card/Card.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport styles from './Card.module.css';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const Card = ({ className, ...props }: CardProps) => (\n <div className={clsx(styles.root, className)} {...props} />\n);\n\nexport const CardHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.header, className)} {...props} />\n);\n\nexport const CardContent = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.content, className)} {...props} />\n);\n\nexport const CardFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.footer, className)} {...props} />\n);\n"],"names":[],"mappings":";;;AAKO,MAAM,OAAO,CAAC,EAAE,WAAW,GAAG,YACnC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAI,GAAG,MAAA,CAAO;AAGpD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;AAGtD,MAAM,cAAc,CAAC,EAAE,WAAW,GAAG,YAC1C,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,SAAS,SAAS,GAAI,GAAG,MAAA,CAAO;AAGvD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;"}
package/dist/index16.cjs CHANGED
@@ -1,24 +1,104 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const clsx = require("./index55.cjs");
5
- const ChatLayout_module = require("./index88.cjs");
6
- const ChatLayout = ({
7
- sidebar,
8
- conversationList,
9
- messageArea,
10
- inputArea,
11
- sidebarCollapsed = false,
12
- showConversationList = true,
13
- className
14
- }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(ChatLayout_module.default.root, className), children: [
15
- sidebar && !sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx("aside", { className: ChatLayout_module.default.sidebar, children: sidebar }),
16
- conversationList && showConversationList && /* @__PURE__ */ jsxRuntime.jsx("aside", { className: ChatLayout_module.default.conversationList, children: conversationList }),
17
- /* @__PURE__ */ jsxRuntime.jsxs("main", { className: ChatLayout_module.default.mainArea, children: [
18
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChatLayout_module.default.messages, children: messageArea }),
19
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChatLayout_module.default.input, children: inputArea })
20
- ] })
21
- ] });
22
- ChatLayout.displayName = "ChatLayout";
23
- exports.ChatLayout = ChatLayout;
4
+ const react = require("react");
5
+ const reactDom = require("react-dom");
6
+ const useEscapeKey = require("./index5.cjs");
7
+ const constants = require("./index67.cjs");
8
+ const clsx = require("./index57.cjs");
9
+ const ChartExpandModal_module = require("./index83.cjs");
10
+ const getInitialSize = (override) => {
11
+ if (typeof window === "undefined") {
12
+ return {
13
+ width: (override == null ? void 0 : override.width) ?? constants.CHART_MODAL.FALLBACK_WIDTH,
14
+ height: (override == null ? void 0 : override.height) ?? constants.CHART_MODAL.FALLBACK_HEIGHT
15
+ };
16
+ }
17
+ const w = Math.min((override == null ? void 0 : override.width) ?? constants.CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - constants.VIEWPORT_MARGIN);
18
+ const h = Math.min((override == null ? void 0 : override.height) ?? constants.CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - constants.VIEWPORT_MARGIN);
19
+ return { width: Math.max(w, constants.CHART_MODAL.MIN_WIDTH), height: Math.max(h, constants.CHART_MODAL.MIN_HEIGHT) };
20
+ };
21
+ const ChartExpandModal = ({
22
+ title,
23
+ children,
24
+ onClose,
25
+ resizable = false,
26
+ defaultSize,
27
+ actions
28
+ }) => {
29
+ const [size, setSize] = react.useState(() => getInitialSize(defaultSize));
30
+ const [isReady, setIsReady] = react.useState(false);
31
+ const bodyRef = react.useRef(null);
32
+ useEscapeKey.useEscapeKey(onClose);
33
+ react.useEffect(() => {
34
+ if (!resizable) return;
35
+ const handleResize = () => setSize(getInitialSize(defaultSize));
36
+ window.addEventListener("resize", handleResize);
37
+ return () => window.removeEventListener("resize", handleResize);
38
+ }, [resizable, defaultSize]);
39
+ react.useEffect(() => {
40
+ const check = () => {
41
+ const body = bodyRef.current;
42
+ if (body && body.clientWidth > 0 && body.clientHeight > 0) {
43
+ setIsReady(true);
44
+ } else {
45
+ requestAnimationFrame(check);
46
+ }
47
+ };
48
+ requestAnimationFrame(check);
49
+ }, []);
50
+ const handleResizeStart = react.useCallback(
51
+ (e) => {
52
+ var _a, _b;
53
+ if (!resizable || typeof window === "undefined") return;
54
+ e.preventDefault();
55
+ const startX = "touches" in e ? ((_a = e.touches[0]) == null ? void 0 : _a.clientX) ?? 0 : e.clientX;
56
+ const startY = "touches" in e ? ((_b = e.touches[0]) == null ? void 0 : _b.clientY) ?? 0 : e.clientY;
57
+ const startW = size.width;
58
+ const startH = size.height;
59
+ const handleMove = (ev) => {
60
+ var _a2, _b2;
61
+ const cx = ev instanceof TouchEvent ? ((_a2 = ev.touches[0]) == null ? void 0 : _a2.clientX) ?? 0 : ev.clientX;
62
+ const cy = ev instanceof TouchEvent ? ((_b2 = ev.touches[0]) == null ? void 0 : _b2.clientY) ?? 0 : ev.clientY;
63
+ const maxW = Math.min(window.innerWidth - constants.VIEWPORT_MARGIN, constants.CHART_MODAL.MAX_WIDTH);
64
+ const maxH = Math.min(window.innerHeight - constants.VIEWPORT_MARGIN, constants.CHART_MODAL.MAX_HEIGHT);
65
+ setSize({
66
+ width: Math.min(Math.max(startW + (cx - startX), constants.CHART_MODAL.MIN_WIDTH), maxW),
67
+ height: Math.min(Math.max(startH + (cy - startY), constants.CHART_MODAL.MIN_HEIGHT), maxH)
68
+ });
69
+ };
70
+ const handleUp = () => {
71
+ window.removeEventListener("mousemove", handleMove);
72
+ window.removeEventListener("mouseup", handleUp);
73
+ window.removeEventListener("touchmove", handleMove);
74
+ window.removeEventListener("touchend", handleUp);
75
+ };
76
+ window.addEventListener("mousemove", handleMove);
77
+ window.addEventListener("mouseup", handleUp);
78
+ window.addEventListener("touchmove", handleMove, { passive: false });
79
+ window.addEventListener("touchend", handleUp);
80
+ },
81
+ [resizable, size]
82
+ );
83
+ if (typeof document === "undefined") return null;
84
+ const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : void 0;
85
+ return reactDom.createPortal(
86
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChartExpandModal_module.default.overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(ChartExpandModal_module.default.modal, { [ChartExpandModal_module.default.resizable]: resizable }), style: modalStyle, children: [
87
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: ChartExpandModal_module.default.header, children: [
88
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: ChartExpandModal_module.default.title, children: title }),
89
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ChartExpandModal_module.default.headerActions, children: [
90
+ actions,
91
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: ChartExpandModal_module.default.close, onClick: onClose, "aria-label": "Close expanded chart", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: constants.ICON_SIZE.LG, height: constants.ICON_SIZE.LG, viewBox: constants.SVG_VIEWBOX, fill: "none", stroke: "currentColor", strokeWidth: constants.SVG_STROKE_WIDTH, strokeLinecap: "round", strokeLinejoin: "round", children: [
92
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
93
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
94
+ ] }) })
95
+ ] })
96
+ ] }),
97
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChartExpandModal_module.default.body, ref: bodyRef, children: isReady ? children : /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChartExpandModal_module.default.loading, children: "Loading chart..." }) }),
98
+ resizable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChartExpandModal_module.default.resizeHandle, onMouseDown: handleResizeStart, onTouchStart: handleResizeStart, children: /* @__PURE__ */ jsxRuntime.jsx("span", {}) })
99
+ ] }) }),
100
+ document.body
101
+ );
102
+ };
103
+ exports.ChartExpandModal = ChartExpandModal;
24
104
  //# sourceMappingURL=index16.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index16.cjs","sources":["../src/layouts/ChatLayout/ChatLayout.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { ChatLayoutProps } from './ChatLayout.types';\nimport styles from './ChatLayout.module.css';\n\nexport const ChatLayout = ({\n sidebar,\n conversationList,\n messageArea,\n inputArea,\n sidebarCollapsed = false,\n showConversationList = true,\n className,\n}: ChatLayoutProps) => (\n <div className={clsx(styles.root, className)}>\n {sidebar && !sidebarCollapsed && (\n <aside className={styles.sidebar}>{sidebar}</aside>\n )}\n\n {conversationList && showConversationList && (\n <aside className={styles.conversationList}>{conversationList}</aside>\n )}\n\n <main className={styles.mainArea}>\n <div className={styles.messages}>{messageArea}</div>\n <div className={styles.input}>{inputArea}</div>\n </main>\n </div>\n);\n\nChatLayout.displayName = 'ChatLayout';\n"],"names":["clsx","styles","jsx","jsxs"],"mappings":";;;;;AAIO,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB;AACF,sCACG,OAAA,EAAI,WAAWA,KAAAA,KAAKC,kBAAAA,QAAO,MAAM,SAAS,GACxC,UAAA;AAAA,EAAA,WAAW,CAAC,oBACXC,2BAAAA,IAAC,WAAM,WAAWD,kBAAAA,QAAO,SAAU,UAAA,SAAQ;AAAA,EAG5C,oBAAoB,wBACnBC,2BAAAA,IAAC,WAAM,WAAWD,kBAAAA,QAAO,kBAAmB,UAAA,kBAAiB;AAAA,EAG/DE,2BAAAA,KAAC,QAAA,EAAK,WAAWF,kBAAAA,QAAO,UACtB,UAAA;AAAA,IAAAC,2BAAAA,IAAC,OAAA,EAAI,WAAWD,kBAAAA,QAAO,UAAW,UAAA,aAAY;AAAA,IAC9CC,2BAAAA,IAAC,OAAA,EAAI,WAAWD,kBAAAA,QAAO,OAAQ,UAAA,UAAA,CAAU;AAAA,EAAA,EAAA,CAC3C;AAAA,EAAA,CACF;AAGF,WAAW,cAAc;;"}
1
+ {"version":3,"file":"index16.cjs","sources":["../src/composites/ChartExpandModal/ChartExpandModal.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useEscapeKey } from '../../hooks/useEscapeKey';\nimport { CHART_MODAL, VIEWPORT_MARGIN, ICON_SIZE, SVG_VIEWBOX, SVG_STROKE_WIDTH } from '../../constants';\nimport clsx from 'clsx';\nimport styles from './ChartExpandModal.module.css';\n\nexport interface ChartExpandModalProps {\n /** Title displayed in the modal header. */\n title: string;\n /** Content to render inside the modal body. */\n children: ReactNode;\n /** Called when the modal should close. */\n onClose: () => void;\n /** Enable resize handles on the modal. */\n resizable?: boolean;\n /** Default modal dimensions in pixels. */\n defaultSize?: { width?: number; height?: number };\n /** Additional actions rendered in the header. */\n actions?: ReactNode;\n}\n\nconst getInitialSize = (override?: { width?: number; height?: number }) => {\n if (typeof window === 'undefined') {\n return {\n width: override?.width ?? CHART_MODAL.FALLBACK_WIDTH,\n height: override?.height ?? CHART_MODAL.FALLBACK_HEIGHT,\n };\n }\n const w = Math.min(override?.width ?? CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - VIEWPORT_MARGIN);\n const h = Math.min(override?.height ?? CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - VIEWPORT_MARGIN);\n return { width: Math.max(w, CHART_MODAL.MIN_WIDTH), height: Math.max(h, CHART_MODAL.MIN_HEIGHT) };\n};\n\nexport const ChartExpandModal = ({\n title,\n children,\n onClose,\n resizable = false,\n defaultSize,\n actions,\n}: ChartExpandModalProps) => {\n const [size, setSize] = useState(() => getInitialSize(defaultSize));\n const [isReady, setIsReady] = useState(false);\n const bodyRef = useRef<HTMLDivElement>(null);\n\n useEscapeKey(onClose);\n\n useEffect(() => {\n if (!resizable) return;\n const handleResize = () => setSize(getInitialSize(defaultSize));\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [resizable, defaultSize]);\n\n useEffect(() => {\n const check = () => {\n const body = bodyRef.current;\n if (body && body.clientWidth > 0 && body.clientHeight > 0) {\n setIsReady(true);\n } else {\n requestAnimationFrame(check);\n }\n };\n requestAnimationFrame(check);\n }, []);\n\n const handleResizeStart = useCallback(\n (e: React.MouseEvent | React.TouchEvent) => {\n if (!resizable || typeof window === 'undefined') return;\n e.preventDefault();\n const startX = 'touches' in e ? e.touches[0]?.clientX ?? 0 : e.clientX;\n const startY = 'touches' in e ? e.touches[0]?.clientY ?? 0 : e.clientY;\n const startW = size.width;\n const startH = size.height;\n\n const handleMove = (ev: MouseEvent | TouchEvent) => {\n const cx = ev instanceof TouchEvent ? ev.touches[0]?.clientX ?? 0 : (ev as MouseEvent).clientX;\n const cy = ev instanceof TouchEvent ? ev.touches[0]?.clientY ?? 0 : (ev as MouseEvent).clientY;\n const maxW = Math.min(window.innerWidth - VIEWPORT_MARGIN, CHART_MODAL.MAX_WIDTH);\n const maxH = Math.min(window.innerHeight - VIEWPORT_MARGIN, CHART_MODAL.MAX_HEIGHT);\n setSize({\n width: Math.min(Math.max(startW + (cx - startX), CHART_MODAL.MIN_WIDTH), maxW),\n height: Math.min(Math.max(startH + (cy - startY), CHART_MODAL.MIN_HEIGHT), maxH),\n });\n };\n\n const handleUp = () => {\n window.removeEventListener('mousemove', handleMove);\n window.removeEventListener('mouseup', handleUp);\n window.removeEventListener('touchmove', handleMove as EventListener);\n window.removeEventListener('touchend', handleUp);\n };\n\n window.addEventListener('mousemove', handleMove);\n window.addEventListener('mouseup', handleUp);\n window.addEventListener('touchmove', handleMove as EventListener, { passive: false });\n window.addEventListener('touchend', handleUp);\n },\n [resizable, size],\n );\n\n if (typeof document === 'undefined') return null;\n\n const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : undefined;\n\n return createPortal(\n <div className={styles.overlay} role=\"dialog\" aria-modal=\"true\">\n <div className={clsx(styles.modal, { [styles.resizable]: resizable })} style={modalStyle}>\n <header className={styles.header}>\n <h2 className={styles.title}>{title}</h2>\n <div className={styles.headerActions}>\n {actions}\n <button type=\"button\" className={styles.close} onClick={onClose} aria-label=\"Close expanded chart\">\n <svg width={ICON_SIZE.LG} height={ICON_SIZE.LG} viewBox={SVG_VIEWBOX} fill=\"none\" stroke=\"currentColor\" strokeWidth={SVG_STROKE_WIDTH} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n </header>\n <div className={styles.body} ref={bodyRef}>\n {isReady ? children : <div className={styles.loading}>Loading chart...</div>}\n </div>\n {resizable && (\n <div className={styles.resizeHandle} onMouseDown={handleResizeStart} onTouchStart={handleResizeStart}>\n <span />\n </div>\n )}\n </div>\n </div>,\n document.body,\n );\n};\n"],"names":["CHART_MODAL","VIEWPORT_MARGIN","useState","useRef","useEscapeKey","useEffect","useCallback","_a","_b","createPortal","jsx","styles","jsxs","clsx","ICON_SIZE","SVG_VIEWBOX","SVG_STROKE_WIDTH"],"mappings":";;;;;;;;;AAsBA,MAAM,iBAAiB,CAAC,aAAmD;AACzE,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA,MACL,QAAO,qCAAU,UAASA,UAAAA,YAAY;AAAA,MACtC,SAAQ,qCAAU,WAAUA,sBAAY;AAAA,IAAA;AAAA,EAE5C;AACA,QAAM,IAAI,KAAK,KAAI,qCAAU,UAASA,UAAAA,YAAY,eAAe,OAAO,aAAaC,yBAAe;AACpG,QAAM,IAAI,KAAK,KAAI,qCAAU,WAAUD,UAAAA,YAAY,gBAAgB,OAAO,cAAcC,yBAAe;AACvG,SAAO,EAAE,OAAO,KAAK,IAAI,GAAGD,UAAAA,YAAY,SAAS,GAAG,QAAQ,KAAK,IAAI,GAAGA,UAAAA,YAAY,UAAU,EAAA;AAChG;AAEO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA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55.js";
3
- import styles from "./index88.js";
4
- const ChatLayout = ({
5
- sidebar,
6
- conversationList,
7
- messageArea,
8
- inputArea,
9
- sidebarCollapsed = false,
10
- showConversationList = true,
11
- className
12
- }) => /* @__PURE__ */ jsxs("div", { className: clsx(styles.root, className), children: [
13
- sidebar && !sidebarCollapsed && /* @__PURE__ */ jsx("aside", { className: styles.sidebar, children: sidebar }),
14
- conversationList && showConversationList && /* @__PURE__ */ jsx("aside", { className: styles.conversationList, children: conversationList }),
15
- /* @__PURE__ */ jsxs("main", { className: styles.mainArea, children: [
16
- /* @__PURE__ */ jsx("div", { className: styles.messages, children: messageArea }),
17
- /* @__PURE__ */ jsx("div", { className: styles.input, children: inputArea })
18
- ] })
19
- ] });
20
- ChatLayout.displayName = "ChatLayout";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect, useCallback } from "react";
3
+ import { createPortal } from "react-dom";
4
+ import { useEscapeKey } from "./index5.js";
5
+ import { SVG_STROKE_WIDTH, SVG_VIEWBOX, ICON_SIZE, CHART_MODAL, VIEWPORT_MARGIN } from "./index67.js";
6
+ import { clsx } from "./index57.js";
7
+ import styles from "./index83.js";
8
+ const getInitialSize = (override) => {
9
+ if (typeof window === "undefined") {
10
+ return {
11
+ width: (override == null ? void 0 : override.width) ?? CHART_MODAL.FALLBACK_WIDTH,
12
+ height: (override == null ? void 0 : override.height) ?? CHART_MODAL.FALLBACK_HEIGHT
13
+ };
14
+ }
15
+ const w = Math.min((override == null ? void 0 : override.width) ?? CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - VIEWPORT_MARGIN);
16
+ const h = Math.min((override == null ? void 0 : override.height) ?? CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - VIEWPORT_MARGIN);
17
+ return { width: Math.max(w, CHART_MODAL.MIN_WIDTH), height: Math.max(h, CHART_MODAL.MIN_HEIGHT) };
18
+ };
19
+ const ChartExpandModal = ({
20
+ title,
21
+ children,
22
+ onClose,
23
+ resizable = false,
24
+ defaultSize,
25
+ actions
26
+ }) => {
27
+ const [size, setSize] = useState(() => getInitialSize(defaultSize));
28
+ const [isReady, setIsReady] = useState(false);
29
+ const bodyRef = useRef(null);
30
+ useEscapeKey(onClose);
31
+ useEffect(() => {
32
+ if (!resizable) return;
33
+ const handleResize = () => setSize(getInitialSize(defaultSize));
34
+ window.addEventListener("resize", handleResize);
35
+ return () => window.removeEventListener("resize", handleResize);
36
+ }, [resizable, defaultSize]);
37
+ useEffect(() => {
38
+ const check = () => {
39
+ const body = bodyRef.current;
40
+ if (body && body.clientWidth > 0 && body.clientHeight > 0) {
41
+ setIsReady(true);
42
+ } else {
43
+ requestAnimationFrame(check);
44
+ }
45
+ };
46
+ requestAnimationFrame(check);
47
+ }, []);
48
+ const handleResizeStart = useCallback(
49
+ (e) => {
50
+ var _a, _b;
51
+ if (!resizable || typeof window === "undefined") return;
52
+ e.preventDefault();
53
+ const startX = "touches" in e ? ((_a = e.touches[0]) == null ? void 0 : _a.clientX) ?? 0 : e.clientX;
54
+ const startY = "touches" in e ? ((_b = e.touches[0]) == null ? void 0 : _b.clientY) ?? 0 : e.clientY;
55
+ const startW = size.width;
56
+ const startH = size.height;
57
+ const handleMove = (ev) => {
58
+ var _a2, _b2;
59
+ const cx = ev instanceof TouchEvent ? ((_a2 = ev.touches[0]) == null ? void 0 : _a2.clientX) ?? 0 : ev.clientX;
60
+ const cy = ev instanceof TouchEvent ? ((_b2 = ev.touches[0]) == null ? void 0 : _b2.clientY) ?? 0 : ev.clientY;
61
+ const maxW = Math.min(window.innerWidth - VIEWPORT_MARGIN, CHART_MODAL.MAX_WIDTH);
62
+ const maxH = Math.min(window.innerHeight - VIEWPORT_MARGIN, CHART_MODAL.MAX_HEIGHT);
63
+ setSize({
64
+ width: Math.min(Math.max(startW + (cx - startX), CHART_MODAL.MIN_WIDTH), maxW),
65
+ height: Math.min(Math.max(startH + (cy - startY), CHART_MODAL.MIN_HEIGHT), maxH)
66
+ });
67
+ };
68
+ const handleUp = () => {
69
+ window.removeEventListener("mousemove", handleMove);
70
+ window.removeEventListener("mouseup", handleUp);
71
+ window.removeEventListener("touchmove", handleMove);
72
+ window.removeEventListener("touchend", handleUp);
73
+ };
74
+ window.addEventListener("mousemove", handleMove);
75
+ window.addEventListener("mouseup", handleUp);
76
+ window.addEventListener("touchmove", handleMove, { passive: false });
77
+ window.addEventListener("touchend", handleUp);
78
+ },
79
+ [resizable, size]
80
+ );
81
+ if (typeof document === "undefined") return null;
82
+ const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : void 0;
83
+ return createPortal(
84
+ /* @__PURE__ */ jsx("div", { className: styles.overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxs("div", { className: clsx(styles.modal, { [styles.resizable]: resizable }), style: modalStyle, children: [
85
+ /* @__PURE__ */ jsxs("header", { className: styles.header, children: [
86
+ /* @__PURE__ */ jsx("h2", { className: styles.title, children: title }),
87
+ /* @__PURE__ */ jsxs("div", { className: styles.headerActions, children: [
88
+ actions,
89
+ /* @__PURE__ */ jsx("button", { type: "button", className: styles.close, onClick: onClose, "aria-label": "Close expanded chart", children: /* @__PURE__ */ jsxs("svg", { width: ICON_SIZE.LG, height: ICON_SIZE.LG, viewBox: SVG_VIEWBOX, fill: "none", stroke: "currentColor", strokeWidth: SVG_STROKE_WIDTH, strokeLinecap: "round", strokeLinejoin: "round", children: [
90
+ /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
91
+ /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
92
+ ] }) })
93
+ ] })
94
+ ] }),
95
+ /* @__PURE__ */ jsx("div", { className: styles.body, ref: bodyRef, children: isReady ? children : /* @__PURE__ */ jsx("div", { className: styles.loading, children: "Loading chart..." }) }),
96
+ resizable && /* @__PURE__ */ jsx("div", { className: styles.resizeHandle, onMouseDown: handleResizeStart, onTouchStart: handleResizeStart, children: /* @__PURE__ */ jsx("span", {}) })
97
+ ] }) }),
98
+ document.body
99
+ );
100
+ };
21
101
  export {
22
- ChatLayout
102
+ ChartExpandModal
23
103
  };
24
104
  //# sourceMappingURL=index16.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index16.js","sources":["../src/layouts/ChatLayout/ChatLayout.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { ChatLayoutProps } from './ChatLayout.types';\nimport styles from './ChatLayout.module.css';\n\nexport const ChatLayout = ({\n sidebar,\n conversationList,\n messageArea,\n inputArea,\n sidebarCollapsed = false,\n showConversationList = true,\n className,\n}: ChatLayoutProps) => (\n <div className={clsx(styles.root, className)}>\n {sidebar && !sidebarCollapsed && (\n <aside className={styles.sidebar}>{sidebar}</aside>\n )}\n\n {conversationList && showConversationList && (\n <aside className={styles.conversationList}>{conversationList}</aside>\n )}\n\n <main className={styles.mainArea}>\n <div className={styles.messages}>{messageArea}</div>\n <div className={styles.input}>{inputArea}</div>\n </main>\n </div>\n);\n\nChatLayout.displayName = 'ChatLayout';\n"],"names":[],"mappings":";;;AAIO,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB;AACF,2BACG,OAAA,EAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GACxC,UAAA;AAAA,EAAA,WAAW,CAAC,oBACX,oBAAC,WAAM,WAAW,OAAO,SAAU,UAAA,SAAQ;AAAA,EAG5C,oBAAoB,wBACnB,oBAAC,WAAM,WAAW,OAAO,kBAAmB,UAAA,kBAAiB;AAAA,EAG/D,qBAAC,QAAA,EAAK,WAAW,OAAO,UACtB,UAAA;AAAA,IAAA,oBAAC,OAAA,EAAI,WAAW,OAAO,UAAW,UAAA,aAAY;AAAA,IAC9C,oBAAC,OAAA,EAAI,WAAW,OAAO,OAAQ,UAAA,UAAA,CAAU;AAAA,EAAA,EAAA,CAC3C;AAAA,EAAA,CACF;AAGF,WAAW,cAAc;"}
1
+ {"version":3,"file":"index16.js","sources":["../src/composites/ChartExpandModal/ChartExpandModal.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useEscapeKey } from '../../hooks/useEscapeKey';\nimport { CHART_MODAL, VIEWPORT_MARGIN, ICON_SIZE, SVG_VIEWBOX, SVG_STROKE_WIDTH } from '../../constants';\nimport clsx from 'clsx';\nimport styles from './ChartExpandModal.module.css';\n\nexport interface ChartExpandModalProps {\n /** Title displayed in the modal header. */\n title: string;\n /** Content to render inside the modal body. */\n children: ReactNode;\n /** Called when the modal should close. */\n onClose: () => void;\n /** Enable resize handles on the modal. */\n resizable?: boolean;\n /** Default modal dimensions in pixels. */\n defaultSize?: { width?: number; height?: number };\n /** Additional actions rendered in the header. */\n actions?: ReactNode;\n}\n\nconst getInitialSize = (override?: { width?: number; height?: number }) => {\n if (typeof window === 'undefined') {\n return {\n width: override?.width ?? CHART_MODAL.FALLBACK_WIDTH,\n height: override?.height ?? CHART_MODAL.FALLBACK_HEIGHT,\n };\n }\n const w = Math.min(override?.width ?? CHART_MODAL.DEFAULT_WIDTH, window.innerWidth - VIEWPORT_MARGIN);\n const h = Math.min(override?.height ?? CHART_MODAL.DEFAULT_HEIGHT, window.innerHeight - VIEWPORT_MARGIN);\n return { width: Math.max(w, CHART_MODAL.MIN_WIDTH), height: Math.max(h, CHART_MODAL.MIN_HEIGHT) };\n};\n\nexport const ChartExpandModal = ({\n title,\n children,\n onClose,\n resizable = false,\n defaultSize,\n actions,\n}: ChartExpandModalProps) => {\n const [size, setSize] = useState(() => getInitialSize(defaultSize));\n const [isReady, setIsReady] = useState(false);\n const bodyRef = useRef<HTMLDivElement>(null);\n\n useEscapeKey(onClose);\n\n useEffect(() => {\n if (!resizable) return;\n const handleResize = () => setSize(getInitialSize(defaultSize));\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [resizable, defaultSize]);\n\n useEffect(() => {\n const check = () => {\n const body = bodyRef.current;\n if (body && body.clientWidth > 0 && body.clientHeight > 0) {\n setIsReady(true);\n } else {\n requestAnimationFrame(check);\n }\n };\n requestAnimationFrame(check);\n }, []);\n\n const handleResizeStart = useCallback(\n (e: React.MouseEvent | React.TouchEvent) => {\n if (!resizable || typeof window === 'undefined') return;\n e.preventDefault();\n const startX = 'touches' in e ? e.touches[0]?.clientX ?? 0 : e.clientX;\n const startY = 'touches' in e ? e.touches[0]?.clientY ?? 0 : e.clientY;\n const startW = size.width;\n const startH = size.height;\n\n const handleMove = (ev: MouseEvent | TouchEvent) => {\n const cx = ev instanceof TouchEvent ? ev.touches[0]?.clientX ?? 0 : (ev as MouseEvent).clientX;\n const cy = ev instanceof TouchEvent ? ev.touches[0]?.clientY ?? 0 : (ev as MouseEvent).clientY;\n const maxW = Math.min(window.innerWidth - VIEWPORT_MARGIN, CHART_MODAL.MAX_WIDTH);\n const maxH = Math.min(window.innerHeight - VIEWPORT_MARGIN, CHART_MODAL.MAX_HEIGHT);\n setSize({\n width: Math.min(Math.max(startW + (cx - startX), CHART_MODAL.MIN_WIDTH), maxW),\n height: Math.min(Math.max(startH + (cy - startY), CHART_MODAL.MIN_HEIGHT), maxH),\n });\n };\n\n const handleUp = () => {\n window.removeEventListener('mousemove', handleMove);\n window.removeEventListener('mouseup', handleUp);\n window.removeEventListener('touchmove', handleMove as EventListener);\n window.removeEventListener('touchend', handleUp);\n };\n\n window.addEventListener('mousemove', handleMove);\n window.addEventListener('mouseup', handleUp);\n window.addEventListener('touchmove', handleMove as EventListener, { passive: false });\n window.addEventListener('touchend', handleUp);\n },\n [resizable, size],\n );\n\n if (typeof document === 'undefined') return null;\n\n const modalStyle = resizable ? { width: `${size.width}px`, height: `${size.height}px` } : undefined;\n\n return createPortal(\n <div className={styles.overlay} role=\"dialog\" aria-modal=\"true\">\n <div className={clsx(styles.modal, { [styles.resizable]: resizable })} style={modalStyle}>\n <header className={styles.header}>\n <h2 className={styles.title}>{title}</h2>\n <div className={styles.headerActions}>\n {actions}\n <button type=\"button\" className={styles.close} onClick={onClose} aria-label=\"Close expanded chart\">\n <svg width={ICON_SIZE.LG} height={ICON_SIZE.LG} viewBox={SVG_VIEWBOX} fill=\"none\" stroke=\"currentColor\" strokeWidth={SVG_STROKE_WIDTH} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n </header>\n <div className={styles.body} ref={bodyRef}>\n {isReady ? children : <div className={styles.loading}>Loading chart...</div>}\n </div>\n {resizable && (\n <div className={styles.resizeHandle} onMouseDown={handleResizeStart} onTouchStart={handleResizeStart}>\n <span />\n </div>\n )}\n </div>\n </div>,\n document.body,\n );\n};\n"],"names":["_a","_b"],"mappings":";;;;;;;AAsBA,MAAM,iBAAiB,CAAC,aAAmD;AACzE,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA,MACL,QAAO,qCAAU,UAAS,YAAY;AAAA,MACtC,SAAQ,qCAAU,WAAU,YAAY;AAAA,IAAA;AAAA,EAE5C;AACA,QAAM,IAAI,KAAK,KAAI,qCAAU,UAAS,YAAY,eAAe,OAAO,aAAa,eAAe;AACpG,QAAM,IAAI,KAAK,KAAI,qCAAU,WAAU,YAAY,gBAAgB,OAAO,cAAc,eAAe;AACvG,SAAO,EAAE,OAAO,KAAK,IAAI,GAAG,YAAY,SAAS,GAAG,QAAQ,KAAK,IAAI,GAAG,YAAY,UAAU,EAAA;AAChG;AAEO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,MAAM,eAAe,WAAW,CAAC;AAClE,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,UAAU,OA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a,kBAAkB,eAAc,SAAQ,gBAAe,SAC1K,UAAA;AAAA,YAAA,oBAAC,QAAA,EAAK,IAAG,MAAK,IAAG,KAAI,IAAG,KAAI,IAAG,KAAA,CAAK;AAAA,YACpC,oBAAC,UAAK,IAAG,KAAI,IAAG,KAAI,IAAG,MAAK,IAAG,KAAA,CAAK;AAAA,UAAA,EAAA,CACtC,EAAA,CACF;AAAA,QAAA,EAAA,CACF;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,OAAA,EAAI,WAAW,OAAO,MAAM,KAAK,SAC/B,UAAA,UAAU,+BAAY,OAAA,EAAI,WAAW,OAAO,SAAS,8BAAgB,GACxE;AAAA,MACC,aACC,oBAAC,OAAA,EAAI,WAAW,OAAO,cAAc,aAAa,mBAAmB,cAAc,mBACjF,UAAA,oBAAC,QAAA,CAAA,CAAK,EAAA,CACR;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;"}
package/dist/index17.cjs CHANGED
@@ -1,58 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const react = require("react");
5
- const clsx = require("./index55.cjs");
6
- const Checkbox_module = require("./index69.cjs");
7
- const Checkbox = react.forwardRef(
8
- ({
9
- checked,
10
- onCheckedChange,
11
- label,
12
- indeterminate = false,
13
- size = "md",
14
- disabled = false,
15
- className,
16
- ...props
17
- }, ref) => {
18
- const innerRef = react.useRef(null);
19
- react.useEffect(() => {
20
- if (innerRef.current) {
21
- innerRef.current.indeterminate = indeterminate;
22
- }
23
- }, [indeterminate]);
24
- const setRefs = react.useCallback(
25
- (node) => {
26
- innerRef.current = node;
27
- if (typeof ref === "function") ref(node);
28
- else if (ref) ref.current = node;
29
- },
30
- [ref]
31
- );
32
- return /* @__PURE__ */ jsxRuntime.jsxs(
33
- "label",
34
- {
35
- className: clsx.clsx(Checkbox_module.default.root, Checkbox_module.default[size], disabled && Checkbox_module.default.disabled, className),
36
- children: [
37
- /* @__PURE__ */ jsxRuntime.jsx(
38
- "input",
39
- {
40
- ref: setRefs,
41
- type: "checkbox",
42
- className: Checkbox_module.default.input,
43
- checked,
44
- disabled,
45
- "aria-checked": indeterminate ? "mixed" : void 0,
46
- onChange: (event) => onCheckedChange(event.target.checked),
47
- ...props
48
- }
49
- ),
50
- label != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: Checkbox_module.default.label, children: label })
51
- ]
52
- }
53
- );
54
- }
55
- );
56
- Checkbox.displayName = "Checkbox";
57
- exports.Checkbox = Checkbox;
4
+ const clsx = require("./index57.cjs");
5
+ const ChatLayout_module = require("./index81.cjs");
6
+ const ChatLayout = ({
7
+ sidebar,
8
+ conversationList,
9
+ messageArea,
10
+ inputArea,
11
+ sidebarCollapsed = false,
12
+ showConversationList = true,
13
+ className
14
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(ChatLayout_module.default.root, className), children: [
15
+ sidebar && !sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx("aside", { className: ChatLayout_module.default.sidebar, children: sidebar }),
16
+ conversationList && showConversationList && /* @__PURE__ */ jsxRuntime.jsx("aside", { className: ChatLayout_module.default.conversationList, children: conversationList }),
17
+ /* @__PURE__ */ jsxRuntime.jsxs("main", { className: ChatLayout_module.default.mainArea, children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChatLayout_module.default.messages, children: messageArea }),
19
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ChatLayout_module.default.input, children: inputArea })
20
+ ] })
21
+ ] });
22
+ ChatLayout.displayName = "ChatLayout";
23
+ exports.ChatLayout = ChatLayout;
58
24
  //# sourceMappingURL=index17.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index17.cjs","sources":["../src/primitives/Checkbox/Checkbox.tsx"],"sourcesContent":["import { forwardRef, useCallback, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport type { CheckboxProps } from './Checkbox.types';\nimport styles from './Checkbox.module.css';\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n checked,\n onCheckedChange,\n label,\n indeterminate = false,\n size = 'md',\n disabled = false,\n className,\n ...props\n },\n ref,\n ) => {\n const innerRef = useRef<HTMLInputElement | null>(null);\n\n // `indeterminate` is a DOM property, not an attribute — React cannot set it via JSX.\n useEffect(() => {\n if (innerRef.current) {\n innerRef.current.indeterminate = indeterminate;\n }\n }, [indeterminate]);\n\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n },\n [ref],\n );\n\n return (\n <label\n className={clsx(styles.root, styles[size], disabled && styles.disabled, className)}\n >\n <input\n ref={setRefs}\n type=\"checkbox\"\n className={styles.input}\n checked={checked}\n disabled={disabled}\n aria-checked={indeterminate ? 'mixed' : undefined}\n onChange={(event) => onCheckedChange(event.target.checked)}\n {...props}\n />\n {label != null && <span className={styles.label}>{label}</span>}\n </label>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n"],"names":["forwardRef","useRef","useEffect","useCallback","jsxs","clsx","styles","jsx"],"mappings":";;;;;;AAKO,MAAM,WAAWA,MAAAA;AAAAA,EACtB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,WAAWC,MAAAA,OAAgC,IAAI;AAGrDC,UAAAA,UAAU,MAAM;AACd,UAAI,SAAS,SAAS;AACpB,iBAAS,QAAQ,gBAAgB;AAAA,MACnC;AAAA,IACF,GAAG,CAAC,aAAa,CAAC;AAElB,UAAM,UAAUC,MAAAA;AAAAA,MACd,CAAC,SAAkC;AACjC,iBAAS,UAAU;AACnB,YAAI,OAAO,QAAQ,WAAY,KAAI,IAAI;AAAA,iBAC9B,IAAM,KAAwD,UAAU;AAAA,MACnF;AAAA,MACA,CAAC,GAAG;AAAA,IAAA;AAGN,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC,KAAAA,KAAKC,wBAAO,MAAMA,gBAAAA,QAAO,IAAI,GAAG,YAAYA,gBAAAA,QAAO,UAAU,SAAS;AAAA,QAEjF,UAAA;AAAA,UAAAC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,KAAK;AAAA,cACL,MAAK;AAAA,cACL,WAAWD,gBAAAA,QAAO;AAAA,cAClB;AAAA,cACA;AAAA,cACA,gBAAc,gBAAgB,UAAU;AAAA,cACxC,UAAU,CAAC,UAAU,gBAAgB,MAAM,OAAO,OAAO;AAAA,cACxD,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAEL,SAAS,QAAQC,2BAAAA,IAAC,UAAK,WAAWD,wBAAO,OAAQ,UAAA,MAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG9D;AACF;AAEA,SAAS,cAAc;;"}
1
+ {"version":3,"file":"index17.cjs","sources":["../src/layouts/ChatLayout/ChatLayout.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { ChatLayoutProps } from './ChatLayout.types';\nimport styles from './ChatLayout.module.css';\n\nexport const ChatLayout = ({\n sidebar,\n conversationList,\n messageArea,\n inputArea,\n sidebarCollapsed = false,\n showConversationList = true,\n className,\n}: ChatLayoutProps) => (\n <div className={clsx(styles.root, className)}>\n {sidebar && !sidebarCollapsed && (\n <aside className={styles.sidebar}>{sidebar}</aside>\n )}\n\n {conversationList && showConversationList && (\n <aside className={styles.conversationList}>{conversationList}</aside>\n )}\n\n <main className={styles.mainArea}>\n <div className={styles.messages}>{messageArea}</div>\n <div className={styles.input}>{inputArea}</div>\n </main>\n </div>\n);\n\nChatLayout.displayName = 'ChatLayout';\n"],"names":["clsx","styles","jsx","jsxs"],"mappings":";;;;;AAIO,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB;AACF,sCACG,OAAA,EAAI,WAAWA,KAAAA,KAAKC,kBAAAA,QAAO,MAAM,SAAS,GACxC,UAAA;AAAA,EAAA,WAAW,CAAC,oBACXC,2BAAAA,IAAC,WAAM,WAAWD,kBAAAA,QAAO,SAAU,UAAA,SAAQ;AAAA,EAG5C,oBAAoB,wBACnBC,2BAAAA,IAAC,WAAM,WAAWD,kBAAAA,QAAO,kBAAmB,UAAA,kBAAiB;AAAA,EAG/DE,2BAAAA,KAAC,QAAA,EAAK,WAAWF,kBAAAA,QAAO,UACtB,UAAA;AAAA,IAAAC,2BAAAA,IAAC,OAAA,EAAI,WAAWD,kBAAAA,QAAO,UAAW,UAAA,aAAY;AAAA,IAC9CC,2BAAAA,IAAC,OAAA,EAAI,WAAWD,kBAAAA,QAAO,OAAQ,UAAA,UAAA,CAAU;AAAA,EAAA,EAAA,CAC3C;AAAA,EAAA,CACF;AAGF,WAAW,cAAc;;"}