@ktnpm_devops/react-component 0.19.0 → 0.21.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 (420) hide show
  1. package/dist/composites/CustomRangePicker/CustomRangePicker.d.ts.map +1 -1
  2. package/dist/composites/DatePickerDropdown/DatePickerDropdown.d.ts.map +1 -1
  3. package/dist/composites/FilterDropdown/FilterDropdown.d.ts +1 -1
  4. package/dist/composites/FilterDropdown/FilterDropdown.d.ts.map +1 -1
  5. package/dist/composites/FilterDropdown/FilterDropdown.types.d.ts +7 -1
  6. package/dist/composites/FilterDropdown/FilterDropdown.types.d.ts.map +1 -1
  7. package/dist/composites/MultiSelectDropdown/MultiSelectDropdown.d.ts.map +1 -1
  8. package/dist/composites/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -1
  9. package/dist/hooks/usePanelPlacement.d.ts +12 -20
  10. package/dist/hooks/usePanelPlacement.d.ts.map +1 -1
  11. package/dist/index10.cjs +1 -1
  12. package/dist/index10.js +1 -1
  13. package/dist/index100.cjs +10 -27
  14. package/dist/index100.cjs.map +1 -1
  15. package/dist/index100.js +9 -26
  16. package/dist/index100.js.map +1 -1
  17. package/dist/index101.cjs +70 -48
  18. package/dist/index101.cjs.map +1 -1
  19. package/dist/index101.js +69 -47
  20. package/dist/index101.js.map +1 -1
  21. package/dist/index102.cjs +19 -18
  22. package/dist/index102.cjs.map +1 -1
  23. package/dist/index102.js +18 -17
  24. package/dist/index102.js.map +1 -1
  25. package/dist/index103.cjs +22 -31
  26. package/dist/index103.cjs.map +1 -1
  27. package/dist/index103.js +22 -31
  28. package/dist/index103.js.map +1 -1
  29. package/dist/index104.cjs +15 -3
  30. package/dist/index104.cjs.map +1 -1
  31. package/dist/index104.js +15 -3
  32. package/dist/index104.js.map +1 -1
  33. package/dist/index105.cjs +13 -16
  34. package/dist/index105.cjs.map +1 -1
  35. package/dist/index105.js +13 -16
  36. package/dist/index105.js.map +1 -1
  37. package/dist/index106.cjs +2 -17
  38. package/dist/index106.cjs.map +1 -1
  39. package/dist/index106.js +3 -18
  40. package/dist/index106.js.map +1 -1
  41. package/dist/index107.cjs +20 -2
  42. package/dist/index107.cjs.map +1 -1
  43. package/dist/index107.js +20 -2
  44. package/dist/index107.js.map +1 -1
  45. package/dist/index108.cjs +16 -13
  46. package/dist/index108.cjs.map +1 -1
  47. package/dist/index108.js +16 -13
  48. package/dist/index108.js.map +1 -1
  49. package/dist/index109.cjs +2 -14
  50. package/dist/index109.cjs.map +1 -1
  51. package/dist/index109.js +3 -15
  52. package/dist/index109.js.map +1 -1
  53. package/dist/index11.cjs +1 -1
  54. package/dist/index11.js +1 -1
  55. package/dist/index110.cjs +21 -30
  56. package/dist/index110.cjs.map +1 -1
  57. package/dist/index110.js +21 -30
  58. package/dist/index110.js.map +1 -1
  59. package/dist/index111.cjs +17 -6
  60. package/dist/index111.cjs.map +1 -1
  61. package/dist/index111.js +16 -5
  62. package/dist/index111.js.map +1 -1
  63. package/dist/index112.cjs +2 -53
  64. package/dist/index112.cjs.map +1 -1
  65. package/dist/index112.js +3 -54
  66. package/dist/index112.js.map +1 -1
  67. package/dist/index113.cjs +15 -22
  68. package/dist/index113.cjs.map +1 -1
  69. package/dist/index113.js +14 -21
  70. package/dist/index113.js.map +1 -1
  71. package/dist/index114.cjs +6 -69
  72. package/dist/index114.cjs.map +1 -1
  73. package/dist/index114.js +5 -68
  74. package/dist/index114.js.map +1 -1
  75. package/dist/index115.cjs +39 -7
  76. package/dist/index115.cjs.map +1 -1
  77. package/dist/index115.js +38 -6
  78. package/dist/index115.js.map +1 -1
  79. package/dist/index116.cjs +16 -34
  80. package/dist/index116.cjs.map +1 -1
  81. package/dist/index116.js +16 -34
  82. package/dist/index116.js.map +1 -1
  83. package/dist/index117.cjs +21 -35
  84. package/dist/index117.cjs.map +1 -1
  85. package/dist/index117.js +20 -34
  86. package/dist/index117.js.map +1 -1
  87. package/dist/index118.cjs +21 -43
  88. package/dist/index118.cjs.map +1 -1
  89. package/dist/index118.js +20 -42
  90. package/dist/index118.js.map +1 -1
  91. package/dist/index119.cjs +18 -24
  92. package/dist/index119.cjs.map +1 -1
  93. package/dist/index119.js +17 -23
  94. package/dist/index119.js.map +1 -1
  95. package/dist/index12.cjs +1 -1
  96. package/dist/index12.js +1 -1
  97. package/dist/index120.cjs +39 -39
  98. package/dist/index120.cjs.map +1 -1
  99. package/dist/index120.js +38 -38
  100. package/dist/index120.js.map +1 -1
  101. package/dist/index121.cjs +55 -9
  102. package/dist/index121.cjs.map +1 -1
  103. package/dist/index121.js +54 -8
  104. package/dist/index121.js.map +1 -1
  105. package/dist/index122.cjs +47 -10
  106. package/dist/index122.cjs.map +1 -1
  107. package/dist/index122.js +47 -10
  108. package/dist/index122.js.map +1 -1
  109. package/dist/index123.cjs +17 -19
  110. package/dist/index123.cjs.map +1 -1
  111. package/dist/index123.js +17 -19
  112. package/dist/index123.js.map +1 -1
  113. package/dist/index124.cjs +37 -14
  114. package/dist/index124.cjs.map +1 -1
  115. package/dist/index124.js +36 -13
  116. package/dist/index124.js.map +1 -1
  117. package/dist/index125.cjs +33 -10
  118. package/dist/index125.cjs.map +1 -1
  119. package/dist/index125.js +32 -9
  120. package/dist/index125.js.map +1 -1
  121. package/dist/index126.cjs +2 -65
  122. package/dist/index126.cjs.map +1 -1
  123. package/dist/index126.js +3 -66
  124. package/dist/index126.js.map +1 -1
  125. package/dist/index127.cjs +46 -19
  126. package/dist/index127.cjs.map +1 -1
  127. package/dist/index127.js +46 -19
  128. package/dist/index127.js.map +1 -1
  129. package/dist/index128.cjs +10 -22
  130. package/dist/index128.cjs.map +1 -1
  131. package/dist/index128.js +11 -23
  132. package/dist/index128.js.map +1 -1
  133. package/dist/index129.cjs +43 -9
  134. package/dist/index129.cjs.map +1 -1
  135. package/dist/index129.js +43 -9
  136. package/dist/index129.js.map +1 -1
  137. package/dist/index13.cjs +1 -1
  138. package/dist/index13.js +1 -1
  139. package/dist/index130.cjs +70 -1158
  140. package/dist/index130.cjs.map +1 -1
  141. package/dist/index130.js +70 -1159
  142. package/dist/index130.js.map +1 -1
  143. package/dist/index131.cjs +1063 -1475
  144. package/dist/index131.cjs.map +1 -1
  145. package/dist/index131.js +1063 -1475
  146. package/dist/index131.js.map +1 -1
  147. package/dist/index132.cjs +1572 -31
  148. package/dist/index132.cjs.map +1 -1
  149. package/dist/index132.js +1572 -30
  150. package/dist/index132.js.map +1 -1
  151. package/dist/index133.cjs +37 -0
  152. package/dist/index133.cjs.map +1 -0
  153. package/dist/index133.js +37 -0
  154. package/dist/index133.js.map +1 -0
  155. package/dist/index14.cjs +1 -1
  156. package/dist/index14.js +1 -1
  157. package/dist/index15.cjs +1 -1
  158. package/dist/index15.js +1 -1
  159. package/dist/index16.cjs +1 -1
  160. package/dist/index16.js +1 -1
  161. package/dist/index17.cjs +1 -1
  162. package/dist/index17.js +1 -1
  163. package/dist/index18.cjs +1 -1
  164. package/dist/index18.js +1 -1
  165. package/dist/index19.cjs +1 -1
  166. package/dist/index19.js +1 -1
  167. package/dist/index20.cjs +1 -1
  168. package/dist/index20.js +1 -1
  169. package/dist/index21.cjs +1 -1
  170. package/dist/index21.js +1 -1
  171. package/dist/index22.cjs +1 -1
  172. package/dist/index22.js +1 -1
  173. package/dist/index23.cjs +1 -1
  174. package/dist/index23.js +1 -1
  175. package/dist/index24.cjs +1 -1
  176. package/dist/index24.js +1 -1
  177. package/dist/index25.cjs +4 -3
  178. package/dist/index25.cjs.map +1 -1
  179. package/dist/index25.js +4 -3
  180. package/dist/index25.js.map +1 -1
  181. package/dist/index26.cjs +1 -1
  182. package/dist/index26.js +1 -1
  183. package/dist/index27.cjs +4 -3
  184. package/dist/index27.cjs.map +1 -1
  185. package/dist/index27.js +4 -3
  186. package/dist/index27.js.map +1 -1
  187. package/dist/index28.cjs +1 -1
  188. package/dist/index28.js +1 -1
  189. package/dist/index29.cjs +8 -6
  190. package/dist/index29.cjs.map +1 -1
  191. package/dist/index29.js +8 -6
  192. package/dist/index29.js.map +1 -1
  193. package/dist/index30.cjs +10 -10
  194. package/dist/index30.js +10 -10
  195. package/dist/index31.cjs +4 -4
  196. package/dist/index31.js +4 -4
  197. package/dist/index32.cjs +3 -3
  198. package/dist/index32.js +3 -3
  199. package/dist/index33.cjs +1 -1
  200. package/dist/index33.js +1 -1
  201. package/dist/index34.cjs +1 -1
  202. package/dist/index34.js +1 -1
  203. package/dist/index35.cjs +1 -1
  204. package/dist/index35.js +1 -1
  205. package/dist/index36.cjs +2 -2
  206. package/dist/index36.js +2 -2
  207. package/dist/index37.cjs +1 -1
  208. package/dist/index37.js +1 -1
  209. package/dist/index38.cjs +4 -3
  210. package/dist/index38.cjs.map +1 -1
  211. package/dist/index38.js +4 -3
  212. package/dist/index38.js.map +1 -1
  213. package/dist/index39.cjs +1 -1
  214. package/dist/index39.js +1 -1
  215. package/dist/index40.cjs +1 -1
  216. package/dist/index40.js +1 -1
  217. package/dist/index41.cjs +1 -1
  218. package/dist/index41.js +1 -1
  219. package/dist/index42.cjs +1 -1
  220. package/dist/index42.js +1 -1
  221. package/dist/index43.cjs +1 -1
  222. package/dist/index43.js +1 -1
  223. package/dist/index44.cjs +1 -1
  224. package/dist/index44.js +1 -1
  225. package/dist/index45.cjs +3 -3
  226. package/dist/index45.js +3 -3
  227. package/dist/index46.cjs +1 -1
  228. package/dist/index46.js +1 -1
  229. package/dist/index47.cjs +1 -1
  230. package/dist/index47.js +1 -1
  231. package/dist/index48.cjs +1 -1
  232. package/dist/index48.js +1 -1
  233. package/dist/index49.cjs +1 -1
  234. package/dist/index49.js +1 -1
  235. package/dist/index50.cjs +4 -3
  236. package/dist/index50.cjs.map +1 -1
  237. package/dist/index50.js +4 -3
  238. package/dist/index50.js.map +1 -1
  239. package/dist/index51.cjs +1 -1
  240. package/dist/index51.js +1 -1
  241. package/dist/index52.cjs +2 -2
  242. package/dist/index52.js +2 -2
  243. package/dist/index53.cjs +1 -1
  244. package/dist/index53.js +1 -1
  245. package/dist/index54.cjs +1 -1
  246. package/dist/index54.js +1 -1
  247. package/dist/index55.cjs +2 -2
  248. package/dist/index55.js +2 -2
  249. package/dist/index56.cjs +1 -1
  250. package/dist/index56.js +1 -1
  251. package/dist/index57.cjs +1 -1
  252. package/dist/index57.js +1 -1
  253. package/dist/index58.cjs +1 -1
  254. package/dist/index58.js +1 -1
  255. package/dist/index60.cjs +19 -64
  256. package/dist/index60.cjs.map +1 -1
  257. package/dist/index60.js +19 -64
  258. package/dist/index60.js.map +1 -1
  259. package/dist/index61.cjs +22 -10
  260. package/dist/index61.cjs.map +1 -1
  261. package/dist/index61.js +23 -11
  262. package/dist/index61.js.map +1 -1
  263. package/dist/index63.cjs +16 -34
  264. package/dist/index63.cjs.map +1 -1
  265. package/dist/index63.js +17 -35
  266. package/dist/index63.js.map +1 -1
  267. package/dist/index64.cjs +19 -16
  268. package/dist/index64.cjs.map +1 -1
  269. package/dist/index64.js +19 -16
  270. package/dist/index64.js.map +1 -1
  271. package/dist/index65.cjs +16 -10
  272. package/dist/index65.cjs.map +1 -1
  273. package/dist/index65.js +17 -11
  274. package/dist/index65.js.map +1 -1
  275. package/dist/index66.cjs +19 -16
  276. package/dist/index66.cjs.map +1 -1
  277. package/dist/index66.js +20 -17
  278. package/dist/index66.js.map +1 -1
  279. package/dist/index67.cjs +10 -19
  280. package/dist/index67.cjs.map +1 -1
  281. package/dist/index67.js +11 -20
  282. package/dist/index67.js.map +1 -1
  283. package/dist/index68.cjs +66 -36
  284. package/dist/index68.cjs.map +1 -1
  285. package/dist/index68.js +66 -36
  286. package/dist/index68.js.map +1 -1
  287. package/dist/index69.cjs +2 -38
  288. package/dist/index69.cjs.map +1 -1
  289. package/dist/index69.js +3 -39
  290. package/dist/index69.js.map +1 -1
  291. package/dist/index70.cjs +73 -54
  292. package/dist/index70.cjs.map +1 -1
  293. package/dist/index70.js +72 -53
  294. package/dist/index70.js.map +1 -1
  295. package/dist/index71.cjs +52 -19
  296. package/dist/index71.cjs.map +1 -1
  297. package/dist/index71.js +52 -19
  298. package/dist/index71.js.map +1 -1
  299. package/dist/index72.cjs +80 -2
  300. package/dist/index72.cjs.map +1 -1
  301. package/dist/index72.js +81 -3
  302. package/dist/index72.js.map +1 -1
  303. package/dist/index73.cjs +14 -5
  304. package/dist/index73.cjs.map +1 -1
  305. package/dist/index73.js +14 -5
  306. package/dist/index73.js.map +1 -1
  307. package/dist/index74.cjs +34 -16
  308. package/dist/index74.cjs.map +1 -1
  309. package/dist/index74.js +35 -17
  310. package/dist/index74.js.map +1 -1
  311. package/dist/index75.cjs +30 -12
  312. package/dist/index75.cjs.map +1 -1
  313. package/dist/index75.js +30 -12
  314. package/dist/index75.js.map +1 -1
  315. package/dist/index76.cjs +9 -46
  316. package/dist/index76.cjs.map +1 -1
  317. package/dist/index76.js +8 -45
  318. package/dist/index76.js.map +1 -1
  319. package/dist/index77.cjs +4 -46
  320. package/dist/index77.cjs.map +1 -1
  321. package/dist/index77.js +5 -47
  322. package/dist/index77.js.map +1 -1
  323. package/dist/index78.cjs +29 -2
  324. package/dist/index78.cjs.map +1 -1
  325. package/dist/index78.js +30 -3
  326. package/dist/index78.js.map +1 -1
  327. package/dist/index79.cjs +42 -17
  328. package/dist/index79.cjs.map +1 -1
  329. package/dist/index79.js +41 -16
  330. package/dist/index79.js.map +1 -1
  331. package/dist/index80.cjs +134 -7
  332. package/dist/index80.cjs.map +1 -1
  333. package/dist/index80.js +133 -6
  334. package/dist/index80.js.map +1 -1
  335. package/dist/index81.cjs +40 -19
  336. package/dist/index81.cjs.map +1 -1
  337. package/dist/index81.js +41 -20
  338. package/dist/index81.js.map +1 -1
  339. package/dist/index82.cjs +50 -32
  340. package/dist/index82.cjs.map +1 -1
  341. package/dist/index82.js +50 -32
  342. package/dist/index82.js.map +1 -1
  343. package/dist/index83.cjs +39 -18
  344. package/dist/index83.cjs.map +1 -1
  345. package/dist/index83.js +38 -17
  346. package/dist/index83.js.map +1 -1
  347. package/dist/index84.cjs +92 -57
  348. package/dist/index84.cjs.map +1 -1
  349. package/dist/index84.js +91 -56
  350. package/dist/index84.js.map +1 -1
  351. package/dist/index85.cjs +40 -134
  352. package/dist/index85.cjs.map +1 -1
  353. package/dist/index85.js +39 -133
  354. package/dist/index85.js.map +1 -1
  355. package/dist/index86.cjs +116 -46
  356. package/dist/index86.cjs.map +1 -1
  357. package/dist/index86.js +115 -45
  358. package/dist/index86.js.map +1 -1
  359. package/dist/index87.cjs +35 -77
  360. package/dist/index87.cjs.map +1 -1
  361. package/dist/index87.js +35 -77
  362. package/dist/index87.js.map +1 -1
  363. package/dist/index88.cjs +22 -18
  364. package/dist/index88.cjs.map +1 -1
  365. package/dist/index88.js +21 -17
  366. package/dist/index88.js.map +1 -1
  367. package/dist/index89.cjs +69 -33
  368. package/dist/index89.cjs.map +1 -1
  369. package/dist/index89.js +68 -32
  370. package/dist/index89.js.map +1 -1
  371. package/dist/index90.cjs +7 -24
  372. package/dist/index90.cjs.map +1 -1
  373. package/dist/index90.js +6 -23
  374. package/dist/index90.js.map +1 -1
  375. package/dist/index91.cjs +34 -13
  376. package/dist/index91.cjs.map +1 -1
  377. package/dist/index91.js +35 -14
  378. package/dist/index91.js.map +1 -1
  379. package/dist/index92.cjs +35 -33
  380. package/dist/index92.cjs.map +1 -1
  381. package/dist/index92.js +34 -32
  382. package/dist/index92.js.map +1 -1
  383. package/dist/index93.cjs +43 -21
  384. package/dist/index93.cjs.map +1 -1
  385. package/dist/index93.js +42 -20
  386. package/dist/index93.js.map +1 -1
  387. package/dist/index94.cjs +22 -113
  388. package/dist/index94.cjs.map +1 -1
  389. package/dist/index94.js +23 -114
  390. package/dist/index94.js.map +1 -1
  391. package/dist/index95.cjs +39 -42
  392. package/dist/index95.cjs.map +1 -1
  393. package/dist/index95.js +38 -41
  394. package/dist/index95.js.map +1 -1
  395. package/dist/index96.cjs +8 -39
  396. package/dist/index96.cjs.map +1 -1
  397. package/dist/index96.js +8 -39
  398. package/dist/index96.js.map +1 -1
  399. package/dist/index97.cjs +10 -92
  400. package/dist/index97.cjs.map +1 -1
  401. package/dist/index97.js +10 -92
  402. package/dist/index97.js.map +1 -1
  403. package/dist/index98.cjs +20 -40
  404. package/dist/index98.cjs.map +1 -1
  405. package/dist/index98.js +19 -39
  406. package/dist/index98.js.map +1 -1
  407. package/dist/index99.cjs +14 -10
  408. package/dist/index99.cjs.map +1 -1
  409. package/dist/index99.js +13 -9
  410. package/dist/index99.js.map +1 -1
  411. package/dist/style.css +55 -0
  412. package/dist/utils/clippingRect.d.ts +11 -11
  413. package/dist/utils/clippingRect.d.ts.map +1 -1
  414. package/dist/utils/panelPlacement.d.ts +34 -0
  415. package/dist/utils/panelPlacement.d.ts.map +1 -0
  416. package/dist/utils/panelPlacement.test.d.ts +2 -0
  417. package/dist/utils/panelPlacement.test.d.ts.map +1 -0
  418. package/dist/utils/panelPlacement.types.d.ts +57 -0
  419. package/dist/utils/panelPlacement.types.d.ts.map +1 -0
  420. package/package.json +1 -1
package/dist/index129.cjs CHANGED
@@ -1,17 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const CLIPPING_OVERFLOW = /* @__PURE__ */ new Set(["hidden", "auto", "scroll", "clip"]);
4
+ const CONTAINING_CONTAIN = /paint|layout|strict|content/;
5
+ const CONTAINING_WILL_CHANGE = /transform|perspective|filter/;
6
+ const isSet = (value) => Boolean(value) && value !== "none";
7
+ function trapsFixed(style) {
8
+ return isSet(style.transform) || isSet(style.perspective) || isSet(style.filter) || isSet(style.backdropFilter) || CONTAINING_CONTAIN.test(style.contain ?? "") || CONTAINING_WILL_CHANGE.test(style.willChange ?? "") || isSet(style.containerType) && style.containerType !== "normal";
9
+ }
10
+ function clipsVertically(style) {
11
+ if (CLIPPING_OVERFLOW.has(style.overflowY)) return true;
12
+ return style.overflowX !== "clip" && CLIPPING_OVERFLOW.has(style.overflowX);
13
+ }
14
+ const intersect = (a, b) => ({
15
+ top: Math.max(a.top, b.top),
16
+ bottom: Math.min(a.bottom, b.bottom)
17
+ });
4
18
  function getClippingRect(element) {
5
- const viewport = { left: 0, right: document.documentElement.clientWidth };
6
- for (let el = element.parentElement; el && el !== document.body; el = el.parentElement) {
7
- if (!CLIPPING_OVERFLOW.has(getComputedStyle(el).overflowX)) continue;
8
- const left = el.getBoundingClientRect().left + el.clientLeft;
9
- return {
10
- left: Math.max(left, viewport.left),
11
- right: Math.min(left + el.clientWidth, viewport.right)
12
- };
19
+ const root = document.documentElement;
20
+ const viewport = { top: 0, bottom: root.clientHeight };
21
+ let horizontal = null;
22
+ const clippers = [];
23
+ let trapped = false;
24
+ for (let el = element.parentElement; el; el = el.parentElement) {
25
+ const style = getComputedStyle(el);
26
+ if (!trapped && trapsFixed(style)) trapped = true;
27
+ if (el === document.body || el === root) continue;
28
+ const clipsX = CLIPPING_OVERFLOW.has(style.overflowX);
29
+ const clipsY = clipsVertically(style);
30
+ if (!clipsX && !clipsY) continue;
31
+ const rect = el.getBoundingClientRect();
32
+ if (clipsX && !horizontal) {
33
+ const left = rect.left + el.clientLeft;
34
+ horizontal = { left, right: left + el.clientWidth };
35
+ }
36
+ if (clipsY) {
37
+ const top = rect.top + el.clientTop;
38
+ clippers.push({ top, bottom: top + el.clientHeight });
39
+ }
13
40
  }
14
- return viewport;
41
+ const viewportWidth = root.clientWidth;
42
+ const outermost = clippers[clippers.length - 1];
43
+ return {
44
+ horizontal: horizontal ? { left: Math.max(horizontal.left, 0), right: Math.min(horizontal.right, viewportWidth) } : { left: 0, right: viewportWidth },
45
+ vertical: clippers.reduce(intersect, viewport),
46
+ viewport,
47
+ escape: trapped || clippers.length < 2 ? null : intersect(outermost, viewport)
48
+ };
15
49
  }
16
50
  exports.getClippingRect = getClippingRect;
17
51
  //# sourceMappingURL=index129.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index129.cjs","sources":["../src/utils/clippingRect.ts"],"sourcesContent":["/** Horizontal extent of a box, in viewport px. */\nexport interface HorizontalRect {\n left: number;\n right: number;\n}\n\nconst CLIPPING_OVERFLOW = new Set(['hidden', 'auto', 'scroll', 'clip']);\n\n/**\n * The horizontal box that clips `element`'s overflow: the inner box (no border, no\n * scrollbar) of its nearest ancestor whose `overflow-x` is not `visible`, intersected\n * with the viewport. The viewport alone when no ancestor clips.\n *\n * The walk stops below `<body>`: overflow set on `<body>` or `<html>` applies to the\n * viewport, which is already the outer limit.\n */\nexport function getClippingRect(element: HTMLElement): HorizontalRect {\n const viewport = { left: 0, right: document.documentElement.clientWidth };\n\n for (let el = element.parentElement; el && el !== document.body; el = el.parentElement) {\n if (!CLIPPING_OVERFLOW.has(getComputedStyle(el).overflowX)) continue;\n const left = el.getBoundingClientRect().left + el.clientLeft;\n return {\n left: Math.max(left, viewport.left),\n right: Math.min(left + el.clientWidth, viewport.right),\n };\n }\n\n return viewport;\n}\n"],"names":[],"mappings":";;AAMA,MAAM,wCAAwB,IAAI,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAU/D,SAAS,gBAAgB,SAAsC;AACpE,QAAM,WAAW,EAAE,MAAM,GAAG,OAAO,SAAS,gBAAgB,YAAA;AAE5D,WAAS,KAAK,QAAQ,eAAe,MAAM,OAAO,SAAS,MAAM,KAAK,GAAG,eAAe;AACtF,QAAI,CAAC,kBAAkB,IAAI,iBAAiB,EAAE,EAAE,SAAS,EAAG;AAC5D,UAAM,OAAO,GAAG,sBAAA,EAAwB,OAAO,GAAG;AAClD,WAAO;AAAA,MACL,MAAM,KAAK,IAAI,MAAM,SAAS,IAAI;AAAA,MAClC,OAAO,KAAK,IAAI,OAAO,GAAG,aAAa,SAAS,KAAK;AAAA,IAAA;AAAA,EAEzD;AAEA,SAAO;AACT;;"}
1
+ {"version":3,"file":"index129.cjs","sources":["../src/utils/clippingRect.ts"],"sourcesContent":["import type { ClippingBox, HorizontalRect, VerticalRect } from './panelPlacement.types';\n\nconst CLIPPING_OVERFLOW = new Set(['hidden', 'auto', 'scroll', 'clip']);\nconst CONTAINING_CONTAIN = /paint|layout|strict|content/;\nconst CONTAINING_WILL_CHANGE = /transform|perspective|filter/;\n\nconst isSet = (value: string | undefined) => Boolean(value) && value !== 'none';\n\n/**\n * Whether `style` makes its element the containing block of `position: fixed`\n * descendants, so they are no longer positioned against the viewport.\n */\nfunction trapsFixed(style: CSSStyleDeclaration): boolean {\n return (\n isSet(style.transform) ||\n isSet(style.perspective) ||\n isSet(style.filter) ||\n isSet(style.backdropFilter) ||\n CONTAINING_CONTAIN.test(style.contain ?? '') ||\n CONTAINING_WILL_CHANGE.test(style.willChange ?? '') ||\n (isSet(style.containerType) && style.containerType !== 'normal')\n );\n}\n\n/**\n * `overflow-y` clips when it is not `visible`, and also when only `overflow-x` is set:\n * CSS computes a `visible` axis to `auto` when the other one is not `visible` (except\n * with `clip`). Browsers report the computed value; this also covers test DOMs that\n * reflect inline styles only.\n */\nfunction clipsVertically(style: CSSStyleDeclaration): boolean {\n if (CLIPPING_OVERFLOW.has(style.overflowY)) return true;\n return style.overflowX !== 'clip' && CLIPPING_OVERFLOW.has(style.overflowX);\n}\n\nconst intersect = (a: VerticalRect, b: VerticalRect): VerticalRect => ({\n top: Math.max(a.top, b.top),\n bottom: Math.min(a.bottom, b.bottom),\n});\n\n/**\n * The boxes that clip `element`'s overflow, measured as inner boxes (no border, no\n * scrollbar) and intersected with the viewport:\n * - horizontally, the nearest ancestor whose `overflow-x` is not `visible`;\n * - vertically, every ancestor whose `overflow-y` is not `visible`;\n * - the escape box, the outermost of those, when there are at least two.\n *\n * The overflow walk stops below `<body>`: overflow set on `<body>` or `<html>` applies\n * to the viewport, which is already the outer limit. The fixed-position trap is checked\n * up to `<html>`.\n */\nexport function getClippingRect(element: HTMLElement): ClippingBox {\n const root = document.documentElement;\n const viewport: VerticalRect = { top: 0, bottom: root.clientHeight };\n let horizontal: HorizontalRect | null = null;\n const clippers: VerticalRect[] = [];\n let trapped = false;\n\n for (let el = element.parentElement; el; el = el.parentElement) {\n const style = getComputedStyle(el);\n if (!trapped && trapsFixed(style)) trapped = true;\n if (el === document.body || el === root) continue;\n\n const clipsX = CLIPPING_OVERFLOW.has(style.overflowX);\n const clipsY = clipsVertically(style);\n if (!clipsX && !clipsY) continue;\n\n const rect = el.getBoundingClientRect();\n if (clipsX && !horizontal) {\n const left = rect.left + el.clientLeft;\n horizontal = { left, right: left + el.clientWidth };\n }\n if (clipsY) {\n const top = rect.top + el.clientTop;\n clippers.push({ top, bottom: top + el.clientHeight });\n }\n }\n\n const viewportWidth = root.clientWidth;\n const outermost = clippers[clippers.length - 1];\n return {\n horizontal: horizontal\n ? { left: Math.max(horizontal.left, 0), right: Math.min(horizontal.right, viewportWidth) }\n : { left: 0, right: viewportWidth },\n vertical: clippers.reduce(intersect, viewport),\n viewport,\n escape: trapped || clippers.length < 2 ? null : intersect(outermost, viewport),\n };\n}\n"],"names":[],"mappings":";;AAEA,MAAM,wCAAwB,IAAI,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AACtE,MAAM,qBAAqB;AAC3B,MAAM,yBAAyB;AAE/B,MAAM,QAAQ,CAAC,UAA8B,QAAQ,KAAK,KAAK,UAAU;AAMzE,SAAS,WAAW,OAAqC;AACvD,SACE,MAAM,MAAM,SAAS,KACrB,MAAM,MAAM,WAAW,KACvB,MAAM,MAAM,MAAM,KAClB,MAAM,MAAM,cAAc,KAC1B,mBAAmB,KAAK,MAAM,WAAW,EAAE,KAC3C,uBAAuB,KAAK,MAAM,cAAc,EAAE,KACjD,MAAM,MAAM,aAAa,KAAK,MAAM,kBAAkB;AAE3D;AAQA,SAAS,gBAAgB,OAAqC;AAC5D,MAAI,kBAAkB,IAAI,MAAM,SAAS,EAAG,QAAO;AACnD,SAAO,MAAM,cAAc,UAAU,kBAAkB,IAAI,MAAM,SAAS;AAC5E;AAEA,MAAM,YAAY,CAAC,GAAiB,OAAmC;AAAA,EACrE,KAAK,KAAK,IAAI,EAAE,KAAK,EAAE,GAAG;AAAA,EAC1B,QAAQ,KAAK,IAAI,EAAE,QAA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E__ */ new Set(["hidden", "auto", "scroll", "clip"]);
2
+ const CONTAINING_CONTAIN = /paint|layout|strict|content/;
3
+ const CONTAINING_WILL_CHANGE = /transform|perspective|filter/;
4
+ const isSet = (value) => Boolean(value) && value !== "none";
5
+ function trapsFixed(style) {
6
+ return isSet(style.transform) || isSet(style.perspective) || isSet(style.filter) || isSet(style.backdropFilter) || CONTAINING_CONTAIN.test(style.contain ?? "") || CONTAINING_WILL_CHANGE.test(style.willChange ?? "") || isSet(style.containerType) && style.containerType !== "normal";
7
+ }
8
+ function clipsVertically(style) {
9
+ if (CLIPPING_OVERFLOW.has(style.overflowY)) return true;
10
+ return style.overflowX !== "clip" && CLIPPING_OVERFLOW.has(style.overflowX);
11
+ }
12
+ const intersect = (a, b) => ({
13
+ top: Math.max(a.top, b.top),
14
+ bottom: Math.min(a.bottom, b.bottom)
15
+ });
2
16
  function getClippingRect(element) {
3
- const viewport = { left: 0, right: document.documentElement.clientWidth };
4
- for (let el = element.parentElement; el && el !== document.body; el = el.parentElement) {
5
- if (!CLIPPING_OVERFLOW.has(getComputedStyle(el).overflowX)) continue;
6
- const left = el.getBoundingClientRect().left + el.clientLeft;
7
- return {
8
- left: Math.max(left, viewport.left),
9
- right: Math.min(left + el.clientWidth, viewport.right)
10
- };
17
+ const root = document.documentElement;
18
+ const viewport = { top: 0, bottom: root.clientHeight };
19
+ let horizontal = null;
20
+ const clippers = [];
21
+ let trapped = false;
22
+ for (let el = element.parentElement; el; el = el.parentElement) {
23
+ const style = getComputedStyle(el);
24
+ if (!trapped && trapsFixed(style)) trapped = true;
25
+ if (el === document.body || el === root) continue;
26
+ const clipsX = CLIPPING_OVERFLOW.has(style.overflowX);
27
+ const clipsY = clipsVertically(style);
28
+ if (!clipsX && !clipsY) continue;
29
+ const rect = el.getBoundingClientRect();
30
+ if (clipsX && !horizontal) {
31
+ const left = rect.left + el.clientLeft;
32
+ horizontal = { left, right: left + el.clientWidth };
33
+ }
34
+ if (clipsY) {
35
+ const top = rect.top + el.clientTop;
36
+ clippers.push({ top, bottom: top + el.clientHeight });
37
+ }
11
38
  }
12
- return viewport;
39
+ const viewportWidth = root.clientWidth;
40
+ const outermost = clippers[clippers.length - 1];
41
+ return {
42
+ horizontal: horizontal ? { left: Math.max(horizontal.left, 0), right: Math.min(horizontal.right, viewportWidth) } : { left: 0, right: viewportWidth },
43
+ vertical: clippers.reduce(intersect, viewport),
44
+ viewport,
45
+ escape: trapped || clippers.length < 2 ? null : intersect(outermost, viewport)
46
+ };
13
47
  }
14
48
  export {
15
49
  getClippingRect
@@ -1 +1 @@
1
- {"version":3,"file":"index129.js","sources":["../src/utils/clippingRect.ts"],"sourcesContent":["/** Horizontal extent of a box, in viewport px. */\nexport interface HorizontalRect {\n left: number;\n right: number;\n}\n\nconst CLIPPING_OVERFLOW = new Set(['hidden', 'auto', 'scroll', 'clip']);\n\n/**\n * The horizontal box that clips `element`'s overflow: the inner box (no border, no\n * scrollbar) of its nearest ancestor whose `overflow-x` is not `visible`, intersected\n * with the viewport. The viewport alone when no ancestor clips.\n *\n * The walk stops below `<body>`: overflow set on `<body>` or `<html>` applies to the\n * viewport, which is already the outer limit.\n */\nexport function getClippingRect(element: HTMLElement): HorizontalRect {\n const viewport = { left: 0, right: document.documentElement.clientWidth };\n\n for (let el = element.parentElement; el && el !== document.body; el = el.parentElement) {\n if (!CLIPPING_OVERFLOW.has(getComputedStyle(el).overflowX)) continue;\n const left = el.getBoundingClientRect().left + el.clientLeft;\n return {\n left: Math.max(left, viewport.left),\n right: Math.min(left + el.clientWidth, viewport.right),\n };\n }\n\n return viewport;\n}\n"],"names":[],"mappings":"AAMA,MAAM,wCAAwB,IAAI,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAU/D,SAAS,gBAAgB,SAAsC;AACpE,QAAM,WAAW,EAAE,MAAM,GAAG,OAAO,SAAS,gBAAgB,YAAA;AAE5D,WAAS,KAAK,QAAQ,eAAe,MAAM,OAAO,SAAS,MAAM,KAAK,GAAG,eAAe;AACtF,QAAI,CAAC,kBAAkB,IAAI,iBAAiB,EAAE,EAAE,SAAS,EAAG;AAC5D,UAAM,OAAO,GAAG,sBAAA,EAAwB,OAAO,GAAG;AAClD,WAAO;AAAA,MACL,MAAM,KAAK,IAAI,MAAM,SAAS,IAAI;AAAA,MAClC,OAAO,KAAK,IAAI,OAAO,GAAG,aAAa,SAAS,KAAK;AAAA,IAAA;AAAA,EAEzD;AAEA,SAAO;AACT;"}
1
+ {"version":3,"file":"index129.js","sources":["../src/utils/clippingRect.ts"],"sourcesContent":["import type { ClippingBox, HorizontalRect, VerticalRect } from './panelPlacement.types';\n\nconst CLIPPING_OVERFLOW = new Set(['hidden', 'auto', 'scroll', 'clip']);\nconst CONTAINING_CONTAIN = /paint|layout|strict|content/;\nconst CONTAINING_WILL_CHANGE = /transform|perspective|filter/;\n\nconst isSet = (value: string | undefined) => Boolean(value) && value !== 'none';\n\n/**\n * Whether `style` makes its element the containing block of `position: fixed`\n * descendants, so they are no longer positioned against the viewport.\n */\nfunction trapsFixed(style: CSSStyleDeclaration): boolean {\n return (\n isSet(style.transform) ||\n isSet(style.perspective) ||\n isSet(style.filter) ||\n isSet(style.backdropFilter) ||\n CONTAINING_CONTAIN.test(style.contain ?? '') ||\n CONTAINING_WILL_CHANGE.test(style.willChange ?? '') ||\n (isSet(style.containerType) && style.containerType !== 'normal')\n );\n}\n\n/**\n * `overflow-y` clips when it is not `visible`, and also when only `overflow-x` is set:\n * CSS computes a `visible` axis to `auto` when the other one is not `visible` (except\n * with `clip`). Browsers report the computed value; this also covers test DOMs that\n * reflect inline styles only.\n */\nfunction clipsVertically(style: CSSStyleDeclaration): boolean {\n if (CLIPPING_OVERFLOW.has(style.overflowY)) return true;\n return style.overflowX !== 'clip' && CLIPPING_OVERFLOW.has(style.overflowX);\n}\n\nconst intersect = (a: VerticalRect, b: VerticalRect): VerticalRect => ({\n top: Math.max(a.top, b.top),\n bottom: Math.min(a.bottom, b.bottom),\n});\n\n/**\n * The boxes that clip `element`'s overflow, measured as inner boxes (no border, no\n * scrollbar) and intersected with the viewport:\n * - horizontally, the nearest ancestor whose `overflow-x` is not `visible`;\n * - vertically, every ancestor whose `overflow-y` is not `visible`;\n * - the escape box, the outermost of those, when there are at least two.\n *\n * The overflow walk stops below `<body>`: overflow set on `<body>` or `<html>` applies\n * to the viewport, which is already the outer limit. The fixed-position trap is checked\n * up to `<html>`.\n */\nexport function getClippingRect(element: HTMLElement): ClippingBox {\n const root = document.documentElement;\n const viewport: VerticalRect = { top: 0, bottom: root.clientHeight };\n let horizontal: HorizontalRect | null = null;\n const clippers: VerticalRect[] = [];\n let trapped = false;\n\n for (let el = element.parentElement; el; el = el.parentElement) {\n const style = getComputedStyle(el);\n if (!trapped && trapsFixed(style)) trapped = true;\n if (el === document.body || el === root) continue;\n\n const clipsX = CLIPPING_OVERFLOW.has(style.overflowX);\n const clipsY = clipsVertically(style);\n if (!clipsX && !clipsY) continue;\n\n const rect = el.getBoundingClientRect();\n if (clipsX && !horizontal) {\n const left = rect.left + el.clientLeft;\n horizontal = { left, right: left + el.clientWidth };\n }\n if (clipsY) {\n const top = rect.top + el.clientTop;\n clippers.push({ top, bottom: top + el.clientHeight });\n }\n }\n\n const viewportWidth = root.clientWidth;\n const outermost = clippers[clippers.length - 1];\n return {\n horizontal: horizontal\n ? { left: Math.max(horizontal.left, 0), right: Math.min(horizontal.right, viewportWidth) }\n : { left: 0, right: viewportWidth },\n vertical: clippers.reduce(intersect, viewport),\n viewport,\n escape: trapped || clippers.length < 2 ? null : intersect(outermost, viewport),\n };\n}\n"],"names":[],"mappings":"AAEA,MAAM,wCAAwB,IAAI,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AACtE,MAAM,qBAAqB;AAC3B,MAAM,yBAAyB;AAE/B,MAAM,QAAQ,CAAC,UAA8B,QAAQ,KAAK,KAAK,UAAU;AAMzE,SAAS,WAAW,OAAqC;AACvD,SACE,MAAM,MAAM,SAAS,KACrB,MAAM,MAAM,WAA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AAAA,EACF;AAEA,QAAM,gBAAgB,KAAK;AAC3B,QAAM,YAAY,SAAS,SAAS,SAAS,CAAC;AAC9C,SAAO;AAAA,IACL,YAAY,aACR,EAAE,MAAM,KAAK,IAAI,WAAW,MAAM,CAAC,GAAG,OAAO,KAAK,IAAI,WAAW,OAAO,aAAa,EAAA,IACrF,EAAE,MAAM,GAAG,OAAO,cAAA;AAAA,IACtB,UAAU,SAAS,OAAO,WAAW,QAAQ;AAAA,IAC7C;AAAA,IACA,QAAQ,WAAW,SAAS,SAAS,IAAI,OAAO,UAAU,WAAW,QAAQ;AAAA,EAAA;AAEjF;"}
package/dist/index13.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const clsx = require("./index59.cjs");
5
- const Badge_module = require("./index108.cjs");
5
+ const Badge_module = require("./index105.cjs");
6
6
  const Badge = ({ className, variant = "info", ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx.clsx(Badge_module.default.root, Badge_module.default[variant], className), ...props });
7
7
  exports.Badge = Badge;
8
8
  //# sourceMappingURL=index13.cjs.map
package/dist/index13.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { clsx } from "./index59.js";
3
- import styles from "./index108.js";
3
+ import styles from "./index105.js";
4
4
  const Badge = ({ className, variant = "info", ...props }) => /* @__PURE__ */ jsx("span", { className: clsx(styles.root, styles[variant], className), ...props });
5
5
  export {
6
6
  Badge