@psnext/design-system 2.3.0 → 2.5.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 (671) hide show
  1. package/DESIGN.md +493 -8
  2. package/README.md +3 -3
  3. package/SKILL.md +84 -6
  4. package/bin/install-agent-skill.mjs +39 -7
  5. package/dist/Header.cjs +152 -21
  6. package/dist/Header.cjs.map +1 -1
  7. package/dist/Header.js +152 -21
  8. package/dist/Header.js.map +1 -1
  9. package/dist/Icon.cjs +40 -8
  10. package/dist/Icon.cjs.map +1 -1
  11. package/dist/Icon.js +40 -8
  12. package/dist/Icon.js.map +1 -1
  13. package/dist/Mosaic.cjs +472 -0
  14. package/dist/Mosaic.cjs.map +1 -0
  15. package/dist/Mosaic.js +459 -0
  16. package/dist/Mosaic.js.map +1 -0
  17. package/dist/MultiColumn.cjs +354 -0
  18. package/dist/MultiColumn.cjs.map +1 -0
  19. package/dist/MultiColumn.js +335 -0
  20. package/dist/MultiColumn.js.map +1 -0
  21. package/dist/Sidebar.cjs +4 -3
  22. package/dist/Sidebar.cjs.map +1 -1
  23. package/dist/Sidebar.js +4 -3
  24. package/dist/Sidebar.js.map +1 -1
  25. package/dist/index.cjs +18 -3
  26. package/dist/index.d.cts +5 -5
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +9 -4
  31. package/dist/index10.d.cts +6 -6
  32. package/dist/index10.d.cts.map +1 -1
  33. package/dist/index10.d.ts +6 -6
  34. package/dist/index11.d.cts +3 -3
  35. package/dist/index11.d.cts.map +1 -1
  36. package/dist/index11.d.ts +3 -3
  37. package/dist/index11.d.ts.map +1 -1
  38. package/dist/index12.d.cts +12 -12
  39. package/dist/index12.d.ts +12 -12
  40. package/dist/index13.d.cts +6 -6
  41. package/dist/index13.d.cts.map +1 -1
  42. package/dist/index13.d.ts +6 -6
  43. package/dist/index13.d.ts.map +1 -1
  44. package/dist/index14.d.cts +5 -5
  45. package/dist/index14.d.ts +5 -5
  46. package/dist/index15.d.cts +58 -23
  47. package/dist/index15.d.cts.map +1 -1
  48. package/dist/index15.d.ts +58 -23
  49. package/dist/index15.d.ts.map +1 -1
  50. package/dist/index16.d.cts +23 -32
  51. package/dist/index16.d.cts.map +1 -1
  52. package/dist/index16.d.ts +23 -32
  53. package/dist/index16.d.ts.map +1 -1
  54. package/dist/index17.d.cts +34 -15
  55. package/dist/index17.d.cts.map +1 -1
  56. package/dist/index17.d.ts +34 -15
  57. package/dist/index17.d.ts.map +1 -1
  58. package/dist/index18.d.cts +13 -67
  59. package/dist/index18.d.cts.map +1 -1
  60. package/dist/index18.d.ts +13 -67
  61. package/dist/index18.d.ts.map +1 -1
  62. package/dist/index19.d.cts +55 -48
  63. package/dist/index19.d.cts.map +1 -1
  64. package/dist/index19.d.ts +55 -48
  65. package/dist/index19.d.ts.map +1 -1
  66. package/dist/index2.d.cts +8 -8
  67. package/dist/index2.d.ts +9 -9
  68. package/dist/index20.d.cts +45 -75
  69. package/dist/index20.d.cts.map +1 -1
  70. package/dist/index20.d.ts +45 -75
  71. package/dist/index20.d.ts.map +1 -1
  72. package/dist/index21.d.cts +90 -28
  73. package/dist/index21.d.cts.map +1 -1
  74. package/dist/index21.d.ts +90 -28
  75. package/dist/index21.d.ts.map +1 -1
  76. package/dist/index22.d.cts +28 -56
  77. package/dist/index22.d.cts.map +1 -1
  78. package/dist/index22.d.ts +28 -56
  79. package/dist/index22.d.ts.map +1 -1
  80. package/dist/index23.d.cts +53 -78
  81. package/dist/index23.d.cts.map +1 -1
  82. package/dist/index23.d.ts +53 -78
  83. package/dist/index23.d.ts.map +1 -1
  84. package/dist/index24.d.cts +83 -33
  85. package/dist/index24.d.cts.map +1 -1
  86. package/dist/index24.d.ts +83 -33
  87. package/dist/index24.d.ts.map +1 -1
  88. package/dist/index25.d.cts +43 -11
  89. package/dist/index25.d.cts.map +1 -1
  90. package/dist/index25.d.ts +43 -11
  91. package/dist/index25.d.ts.map +1 -1
  92. package/dist/index26.d.cts +11 -74
  93. package/dist/index26.d.cts.map +1 -1
  94. package/dist/index26.d.ts +11 -74
  95. package/dist/index26.d.ts.map +1 -1
  96. package/dist/index27.d.cts +68 -59
  97. package/dist/index27.d.cts.map +1 -1
  98. package/dist/index27.d.ts +68 -59
  99. package/dist/index27.d.ts.map +1 -1
  100. package/dist/index28.d.cts +47 -30
  101. package/dist/index28.d.cts.map +1 -1
  102. package/dist/index28.d.ts +47 -30
  103. package/dist/index28.d.ts.map +1 -1
  104. package/dist/index29.d.cts +63 -17
  105. package/dist/index29.d.cts.map +1 -1
  106. package/dist/index29.d.ts +63 -17
  107. package/dist/index29.d.ts.map +1 -1
  108. package/dist/index3.d.cts +13 -13
  109. package/dist/index3.d.ts +13 -13
  110. package/dist/index30.d.cts +29 -51
  111. package/dist/index30.d.cts.map +1 -1
  112. package/dist/index30.d.ts +30 -52
  113. package/dist/index30.d.ts.map +1 -1
  114. package/dist/index31.d.cts +19 -34
  115. package/dist/index31.d.cts.map +1 -1
  116. package/dist/index31.d.ts +19 -34
  117. package/dist/index31.d.ts.map +1 -1
  118. package/dist/index32.d.cts +80 -18
  119. package/dist/index32.d.cts.map +1 -1
  120. package/dist/index32.d.ts +79 -17
  121. package/dist/index32.d.ts.map +1 -1
  122. package/dist/index33.d.cts +32 -51
  123. package/dist/index33.d.cts.map +1 -1
  124. package/dist/index33.d.ts +33 -52
  125. package/dist/index33.d.ts.map +1 -1
  126. package/dist/index34.d.cts +19 -36
  127. package/dist/index34.d.cts.map +1 -1
  128. package/dist/index34.d.ts +19 -36
  129. package/dist/index34.d.ts.map +1 -1
  130. package/dist/index35.d.cts +43 -61
  131. package/dist/index35.d.cts.map +1 -1
  132. package/dist/index35.d.ts +44 -62
  133. package/dist/index35.d.ts.map +1 -1
  134. package/dist/index36.d.cts +35 -11
  135. package/dist/index36.d.cts.map +1 -1
  136. package/dist/index36.d.ts +35 -11
  137. package/dist/index36.d.ts.map +1 -1
  138. package/dist/index37.d.cts +68 -20
  139. package/dist/index37.d.cts.map +1 -1
  140. package/dist/index37.d.ts +69 -21
  141. package/dist/index37.d.ts.map +1 -1
  142. package/dist/index38.d.cts +14 -15
  143. package/dist/index38.d.cts.map +1 -1
  144. package/dist/index38.d.ts +14 -15
  145. package/dist/index38.d.ts.map +1 -1
  146. package/dist/index39.d.cts +22 -98
  147. package/dist/index39.d.cts.map +1 -1
  148. package/dist/index39.d.ts +22 -98
  149. package/dist/index39.d.ts.map +1 -1
  150. package/dist/index4.d.cts +2 -2
  151. package/dist/index4.d.cts.map +1 -1
  152. package/dist/index4.d.ts +2 -2
  153. package/dist/index40.d.cts +15 -17
  154. package/dist/index40.d.cts.map +1 -1
  155. package/dist/index40.d.ts +15 -17
  156. package/dist/index40.d.ts.map +1 -1
  157. package/dist/index41.d.cts +84 -35
  158. package/dist/index41.d.cts.map +1 -1
  159. package/dist/index41.d.ts +84 -35
  160. package/dist/index41.d.ts.map +1 -1
  161. package/dist/index42.d.cts +118 -38
  162. package/dist/index42.d.cts.map +1 -1
  163. package/dist/index42.d.ts +118 -38
  164. package/dist/index42.d.ts.map +1 -1
  165. package/dist/index43.d.cts +15 -89
  166. package/dist/index43.d.cts.map +1 -1
  167. package/dist/index43.d.ts +15 -89
  168. package/dist/index43.d.ts.map +1 -1
  169. package/dist/index44.d.cts +56 -1
  170. package/dist/index44.d.cts.map +1 -0
  171. package/dist/index44.d.ts +56 -1
  172. package/dist/index44.d.ts.map +1 -0
  173. package/dist/index45.d.cts +31 -34
  174. package/dist/index45.d.cts.map +1 -1
  175. package/dist/index45.d.ts +31 -34
  176. package/dist/index45.d.ts.map +1 -1
  177. package/dist/index46.d.cts +89 -21
  178. package/dist/index46.d.cts.map +1 -1
  179. package/dist/index46.d.ts +89 -21
  180. package/dist/index46.d.ts.map +1 -1
  181. package/dist/index47.d.cts +1 -41
  182. package/dist/index47.d.ts +1 -41
  183. package/dist/index48.d.cts +122 -20
  184. package/dist/index48.d.cts.map +1 -1
  185. package/dist/index48.d.ts +122 -20
  186. package/dist/index48.d.ts.map +1 -1
  187. package/dist/index49.d.cts +40 -13
  188. package/dist/index49.d.cts.map +1 -1
  189. package/dist/index49.d.ts +40 -13
  190. package/dist/index49.d.ts.map +1 -1
  191. package/dist/index5.d.cts +7 -7
  192. package/dist/index5.d.cts.map +1 -1
  193. package/dist/index5.d.ts +7 -7
  194. package/dist/index50.d.cts +22 -63
  195. package/dist/index50.d.cts.map +1 -1
  196. package/dist/index50.d.ts +22 -63
  197. package/dist/index50.d.ts.map +1 -1
  198. package/dist/index51.d.cts +33 -55
  199. package/dist/index51.d.cts.map +1 -1
  200. package/dist/index51.d.ts +33 -55
  201. package/dist/index51.d.ts.map +1 -1
  202. package/dist/index52.d.cts +18 -24
  203. package/dist/index52.d.cts.map +1 -1
  204. package/dist/index52.d.ts +18 -24
  205. package/dist/index52.d.ts.map +1 -1
  206. package/dist/index53.d.cts +12 -200
  207. package/dist/index53.d.cts.map +1 -1
  208. package/dist/index53.d.ts +12 -200
  209. package/dist/index53.d.ts.map +1 -1
  210. package/dist/index54.d.cts +58 -15
  211. package/dist/index54.d.cts.map +1 -1
  212. package/dist/index54.d.ts +58 -15
  213. package/dist/index54.d.ts.map +1 -1
  214. package/dist/index55.d.cts +93 -23
  215. package/dist/index55.d.cts.map +1 -1
  216. package/dist/index55.d.ts +93 -23
  217. package/dist/index55.d.ts.map +1 -1
  218. package/dist/index56.d.cts +27 -21
  219. package/dist/index56.d.cts.map +1 -1
  220. package/dist/index56.d.ts +27 -21
  221. package/dist/index56.d.ts.map +1 -1
  222. package/dist/index57.d.cts +203 -6
  223. package/dist/index57.d.cts.map +1 -1
  224. package/dist/index57.d.ts +203 -6
  225. package/dist/index57.d.ts.map +1 -1
  226. package/dist/index58.d.cts +17 -41
  227. package/dist/index58.d.cts.map +1 -1
  228. package/dist/index58.d.ts +17 -41
  229. package/dist/index58.d.ts.map +1 -1
  230. package/dist/index59.d.cts +24 -47
  231. package/dist/index59.d.cts.map +1 -1
  232. package/dist/index59.d.ts +24 -47
  233. package/dist/index59.d.ts.map +1 -1
  234. package/dist/index6.d.cts +5 -5
  235. package/dist/index6.d.cts.map +1 -1
  236. package/dist/index6.d.ts +6 -6
  237. package/dist/index60.d.cts +19 -57
  238. package/dist/index60.d.cts.map +1 -1
  239. package/dist/index60.d.ts +19 -57
  240. package/dist/index60.d.ts.map +1 -1
  241. package/dist/index61.d.cts +6 -39
  242. package/dist/index61.d.cts.map +1 -1
  243. package/dist/index61.d.ts +6 -39
  244. package/dist/index61.d.ts.map +1 -1
  245. package/dist/index62.d.cts +44 -18
  246. package/dist/index62.d.cts.map +1 -1
  247. package/dist/index62.d.ts +44 -18
  248. package/dist/index62.d.ts.map +1 -1
  249. package/dist/index63.d.cts +47 -41
  250. package/dist/index63.d.cts.map +1 -1
  251. package/dist/index63.d.ts +47 -41
  252. package/dist/index63.d.ts.map +1 -1
  253. package/dist/index64.d.cts +55 -15
  254. package/dist/index64.d.cts.map +1 -1
  255. package/dist/index64.d.ts +54 -14
  256. package/dist/index64.d.ts.map +1 -1
  257. package/dist/index65.d.cts +36 -39
  258. package/dist/index65.d.cts.map +1 -1
  259. package/dist/index65.d.ts +37 -40
  260. package/dist/index65.d.ts.map +1 -1
  261. package/dist/index66.d.cts +16 -17
  262. package/dist/index66.d.cts.map +1 -1
  263. package/dist/index66.d.ts +17 -18
  264. package/dist/index66.d.ts.map +1 -1
  265. package/dist/index67.d.cts +40 -14
  266. package/dist/index67.d.cts.map +1 -1
  267. package/dist/index67.d.ts +40 -14
  268. package/dist/index67.d.ts.map +1 -1
  269. package/dist/index68.d.cts +16 -30
  270. package/dist/index68.d.cts.map +1 -1
  271. package/dist/index68.d.ts +17 -31
  272. package/dist/index68.d.ts.map +1 -1
  273. package/dist/index69.d.cts +39 -27
  274. package/dist/index69.d.cts.map +1 -1
  275. package/dist/index69.d.ts +40 -28
  276. package/dist/index69.d.ts.map +1 -1
  277. package/dist/index7.d.cts +8 -8
  278. package/dist/index7.d.cts.map +1 -1
  279. package/dist/index7.d.ts +8 -8
  280. package/dist/index7.d.ts.map +1 -1
  281. package/dist/index70.d.cts +22 -78
  282. package/dist/index70.d.cts.map +1 -1
  283. package/dist/index70.d.ts +22 -78
  284. package/dist/index70.d.ts.map +1 -1
  285. package/dist/index71.d.cts +77 -251
  286. package/dist/index71.d.cts.map +1 -1
  287. package/dist/index71.d.ts +77 -251
  288. package/dist/index71.d.ts.map +1 -1
  289. package/dist/index72.d.cts +19 -0
  290. package/dist/index72.d.cts.map +1 -0
  291. package/dist/index72.d.ts +19 -0
  292. package/dist/index72.d.ts.map +1 -0
  293. package/dist/index73.d.cts +37 -0
  294. package/dist/index73.d.cts.map +1 -0
  295. package/dist/index73.d.ts +37 -0
  296. package/dist/index73.d.ts.map +1 -0
  297. package/dist/index74.d.cts +36 -0
  298. package/dist/index74.d.cts.map +1 -0
  299. package/dist/index74.d.ts +36 -0
  300. package/dist/index74.d.ts.map +1 -0
  301. package/dist/index75.d.cts +86 -0
  302. package/dist/index75.d.cts.map +1 -0
  303. package/dist/index75.d.ts +86 -0
  304. package/dist/index75.d.ts.map +1 -0
  305. package/dist/index76.d.cts +278 -0
  306. package/dist/index76.d.cts.map +1 -0
  307. package/dist/index76.d.ts +278 -0
  308. package/dist/index76.d.ts.map +1 -0
  309. package/dist/index8.d.cts +4 -4
  310. package/dist/index8.d.ts +5 -5
  311. package/dist/index9.d.cts +2 -2
  312. package/dist/index9.d.ts +2 -2
  313. package/dist/index9.d.ts.map +1 -1
  314. package/dist/layouts/Container/index.cjs +2 -1
  315. package/dist/layouts/Container/index.cjs.map +1 -1
  316. package/dist/layouts/Container/index.d.cts +1 -1
  317. package/dist/layouts/Container/index.d.ts +1 -1
  318. package/dist/layouts/Container/index.js +1 -1
  319. package/dist/layouts/MultiColumn/index.cjs +5 -0
  320. package/dist/layouts/MultiColumn/index.d.cts +2 -0
  321. package/dist/layouts/MultiColumn/index.d.ts +2 -0
  322. package/dist/layouts/MultiColumn/index.js +2 -0
  323. package/dist/layouts/PageBackground/index.d.cts +1 -1
  324. package/dist/layouts/PageBackground/index.d.ts +1 -1
  325. package/dist/layouts/Stack/index.cjs +2 -1
  326. package/dist/layouts/Stack/index.cjs.map +1 -1
  327. package/dist/layouts/Stack/index.d.cts +1 -1
  328. package/dist/layouts/Stack/index.d.ts +1 -1
  329. package/dist/layouts/Stack/index.js +1 -1
  330. package/dist/layouts/TwoColumn/index.cjs +2 -1
  331. package/dist/layouts/TwoColumn/index.cjs.map +1 -1
  332. package/dist/layouts/TwoColumn/index.d.cts +1 -1
  333. package/dist/layouts/TwoColumn/index.d.ts +1 -1
  334. package/dist/layouts/TwoColumn/index.js +1 -1
  335. package/dist/layouts/index.cjs +4 -0
  336. package/dist/layouts/index.d.cts +6 -5
  337. package/dist/layouts/index.d.ts +6 -5
  338. package/dist/layouts/index.js +2 -1
  339. package/dist/patterns/DataTable/index.cjs +6 -2
  340. package/dist/patterns/DataTable/index.cjs.map +1 -1
  341. package/dist/patterns/DataTable/index.d.cts +3 -3
  342. package/dist/patterns/DataTable/index.d.cts.map +1 -1
  343. package/dist/patterns/DataTable/index.d.ts +3 -3
  344. package/dist/patterns/DataTable/index.d.ts.map +1 -1
  345. package/dist/patterns/DataTable/index.js +6 -2
  346. package/dist/patterns/DataTable/index.js.map +1 -1
  347. package/dist/patterns/Footer/index.d.cts +7 -7
  348. package/dist/patterns/Footer/index.d.cts.map +1 -1
  349. package/dist/patterns/Footer/index.d.ts +7 -7
  350. package/dist/patterns/Footer/index.d.ts.map +1 -1
  351. package/dist/patterns/Header/index.d.cts +1 -1
  352. package/dist/patterns/Header/index.d.ts +1 -1
  353. package/dist/patterns/MediaObject/index.cjs +1 -1
  354. package/dist/patterns/MediaObject/index.d.cts +14 -14
  355. package/dist/patterns/MediaObject/index.d.cts.map +1 -1
  356. package/dist/patterns/MediaObject/index.d.ts +12 -12
  357. package/dist/patterns/MediaObject/index.js +1 -1
  358. package/dist/patterns/NavRail/index.cjs +4 -2
  359. package/dist/patterns/NavRail/index.cjs.map +1 -1
  360. package/dist/patterns/NavRail/index.d.cts +1 -1
  361. package/dist/patterns/NavRail/index.d.ts +1 -1
  362. package/dist/patterns/NavRail/index.js +4 -2
  363. package/dist/patterns/NavRail/index.js.map +1 -1
  364. package/dist/patterns/SectionCard/index.d.cts +2 -2
  365. package/dist/patterns/SectionCard/index.d.cts.map +1 -1
  366. package/dist/patterns/SectionCard/index.d.ts +2 -2
  367. package/dist/patterns/SectionCard/index.d.ts.map +1 -1
  368. package/dist/patterns/SectionHeading/index.d.cts +3 -3
  369. package/dist/patterns/SectionHeading/index.d.cts.map +1 -1
  370. package/dist/patterns/SectionHeading/index.d.ts +3 -3
  371. package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
  372. package/dist/patterns/index.d.cts +2 -2
  373. package/dist/patterns/index.d.ts +2 -2
  374. package/dist/primitives/Accordion/index.cjs +6 -2
  375. package/dist/primitives/Accordion/index.cjs.map +1 -1
  376. package/dist/primitives/Accordion/index.js +6 -2
  377. package/dist/primitives/Accordion/index.js.map +1 -1
  378. package/dist/primitives/Alert/index.cjs +2 -1
  379. package/dist/primitives/Alert/index.cjs.map +1 -1
  380. package/dist/primitives/Alert/index.js +1 -1
  381. package/dist/primitives/AlertDialog/index.cjs +1 -1
  382. package/dist/primitives/AlertDialog/index.js +1 -1
  383. package/dist/primitives/AspectRatio/index.cjs +1 -1
  384. package/dist/primitives/AspectRatio/index.js +1 -1
  385. package/dist/primitives/Avatar/index.cjs +1 -1
  386. package/dist/primitives/Avatar/index.js +1 -1
  387. package/dist/primitives/Badge/index.cjs +3 -2
  388. package/dist/primitives/Badge/index.cjs.map +1 -1
  389. package/dist/primitives/Badge/index.js +2 -2
  390. package/dist/primitives/Breadcrumb/index.cjs +7 -3
  391. package/dist/primitives/Breadcrumb/index.cjs.map +1 -1
  392. package/dist/primitives/Breadcrumb/index.js +7 -3
  393. package/dist/primitives/Breadcrumb/index.js.map +1 -1
  394. package/dist/primitives/Button/index.cjs +3 -2
  395. package/dist/primitives/Button/index.cjs.map +1 -1
  396. package/dist/primitives/Button/index.js +2 -2
  397. package/dist/primitives/ButtonGroup/index.cjs +3 -2
  398. package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
  399. package/dist/primitives/ButtonGroup/index.js +2 -2
  400. package/dist/primitives/Calendar/index.cjs +12 -11
  401. package/dist/primitives/Calendar/index.cjs.map +1 -1
  402. package/dist/primitives/Calendar/index.js +12 -11
  403. package/dist/primitives/Calendar/index.js.map +1 -1
  404. package/dist/primitives/Card/index.cjs +2 -1
  405. package/dist/primitives/Card/index.cjs.map +1 -1
  406. package/dist/primitives/Card/index.js +1 -1
  407. package/dist/primitives/Carousel/index.cjs +4 -3
  408. package/dist/primitives/Carousel/index.cjs.map +1 -1
  409. package/dist/primitives/Carousel/index.js +4 -3
  410. package/dist/primitives/Carousel/index.js.map +1 -1
  411. package/dist/primitives/Checkbox/index.cjs +10 -3
  412. package/dist/primitives/Checkbox/index.cjs.map +1 -1
  413. package/dist/primitives/Checkbox/index.d.cts +1 -1
  414. package/dist/primitives/Checkbox/index.d.ts +1 -1
  415. package/dist/primitives/Checkbox/index.js +10 -3
  416. package/dist/primitives/Checkbox/index.js.map +1 -1
  417. package/dist/primitives/CheckboxTree/index.cjs +6 -2
  418. package/dist/primitives/CheckboxTree/index.cjs.map +1 -1
  419. package/dist/primitives/CheckboxTree/index.d.cts +1 -1
  420. package/dist/primitives/CheckboxTree/index.d.ts +1 -1
  421. package/dist/primitives/CheckboxTree/index.js +6 -2
  422. package/dist/primitives/CheckboxTree/index.js.map +1 -1
  423. package/dist/primitives/CircularProgress/index.cjs +106 -0
  424. package/dist/primitives/CircularProgress/index.cjs.map +1 -0
  425. package/dist/primitives/CircularProgress/index.d.cts +2 -0
  426. package/dist/primitives/CircularProgress/index.d.ts +2 -0
  427. package/dist/primitives/CircularProgress/index.js +105 -0
  428. package/dist/primitives/CircularProgress/index.js.map +1 -0
  429. package/dist/primitives/Collapsible/index.cjs +1 -1
  430. package/dist/primitives/Collapsible/index.d.cts +1 -1
  431. package/dist/primitives/Collapsible/index.d.ts +1 -1
  432. package/dist/primitives/Collapsible/index.js +1 -1
  433. package/dist/primitives/Command/index.cjs +6 -2
  434. package/dist/primitives/Command/index.cjs.map +1 -1
  435. package/dist/primitives/Command/index.d.cts +1 -1
  436. package/dist/primitives/Command/index.d.ts +1 -1
  437. package/dist/primitives/Command/index.js +6 -2
  438. package/dist/primitives/Command/index.js.map +1 -1
  439. package/dist/primitives/ContextMenu/index.cjs +14 -4
  440. package/dist/primitives/ContextMenu/index.cjs.map +1 -1
  441. package/dist/primitives/ContextMenu/index.d.cts +1 -1
  442. package/dist/primitives/ContextMenu/index.d.ts +1 -1
  443. package/dist/primitives/ContextMenu/index.js +14 -4
  444. package/dist/primitives/ContextMenu/index.js.map +1 -1
  445. package/dist/primitives/Credits/index.cjs +8 -3
  446. package/dist/primitives/Credits/index.cjs.map +1 -1
  447. package/dist/primitives/Credits/index.d.cts +1 -1
  448. package/dist/primitives/Credits/index.d.ts +1 -1
  449. package/dist/primitives/Credits/index.js +7 -3
  450. package/dist/primitives/Credits/index.js.map +1 -1
  451. package/dist/primitives/Dialog/index.cjs +3 -2
  452. package/dist/primitives/Dialog/index.cjs.map +1 -1
  453. package/dist/primitives/Dialog/index.d.cts +1 -1
  454. package/dist/primitives/Dialog/index.d.ts +1 -1
  455. package/dist/primitives/Dialog/index.js +3 -2
  456. package/dist/primitives/Dialog/index.js.map +1 -1
  457. package/dist/primitives/Drawer/index.cjs +34 -2
  458. package/dist/primitives/Drawer/index.cjs.map +1 -1
  459. package/dist/primitives/Drawer/index.d.cts +1 -1
  460. package/dist/primitives/Drawer/index.d.ts +1 -1
  461. package/dist/primitives/Drawer/index.js +34 -2
  462. package/dist/primitives/Drawer/index.js.map +1 -1
  463. package/dist/primitives/DropdownMenu/index.cjs +14 -4
  464. package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
  465. package/dist/primitives/DropdownMenu/index.d.cts +1 -1
  466. package/dist/primitives/DropdownMenu/index.d.ts +1 -1
  467. package/dist/primitives/DropdownMenu/index.js +14 -4
  468. package/dist/primitives/DropdownMenu/index.js.map +1 -1
  469. package/dist/primitives/Empty/index.cjs +1 -1
  470. package/dist/primitives/Empty/index.d.cts +1 -1
  471. package/dist/primitives/Empty/index.d.ts +1 -1
  472. package/dist/primitives/Empty/index.js +1 -1
  473. package/dist/primitives/Field/index.cjs +1 -1
  474. package/dist/primitives/Field/index.d.cts +1 -1
  475. package/dist/primitives/Field/index.d.ts +1 -1
  476. package/dist/primitives/Field/index.js +1 -1
  477. package/dist/primitives/FileUpload/index.cjs +354 -0
  478. package/dist/primitives/FileUpload/index.cjs.map +1 -0
  479. package/dist/primitives/FileUpload/index.d.cts +2 -0
  480. package/dist/primitives/FileUpload/index.d.ts +2 -0
  481. package/dist/primitives/FileUpload/index.js +351 -0
  482. package/dist/primitives/FileUpload/index.js.map +1 -0
  483. package/dist/primitives/Form/index.cjs +1 -1
  484. package/dist/primitives/Form/index.d.cts +1 -1
  485. package/dist/primitives/Form/index.d.ts +1 -1
  486. package/dist/primitives/Form/index.js +1 -1
  487. package/dist/primitives/Heading/index.cjs +2 -1
  488. package/dist/primitives/Heading/index.cjs.map +1 -1
  489. package/dist/primitives/Heading/index.d.cts +1 -1
  490. package/dist/primitives/Heading/index.d.ts +1 -1
  491. package/dist/primitives/Heading/index.js +1 -1
  492. package/dist/primitives/HoverCard/index.cjs +1 -1
  493. package/dist/primitives/HoverCard/index.d.cts +1 -1
  494. package/dist/primitives/HoverCard/index.d.ts +1 -1
  495. package/dist/primitives/HoverCard/index.js +1 -1
  496. package/dist/primitives/Icon/index.d.cts +1 -1
  497. package/dist/primitives/Icon/index.d.ts +1 -1
  498. package/dist/primitives/InfoBanner/index.cjs +6 -3
  499. package/dist/primitives/InfoBanner/index.cjs.map +1 -1
  500. package/dist/primitives/InfoBanner/index.d.cts +1 -1
  501. package/dist/primitives/InfoBanner/index.d.ts +1 -1
  502. package/dist/primitives/InfoBanner/index.js +5 -3
  503. package/dist/primitives/InfoBanner/index.js.map +1 -1
  504. package/dist/primitives/Input/index.cjs +2 -1
  505. package/dist/primitives/Input/index.cjs.map +1 -1
  506. package/dist/primitives/Input/index.d.cts +1 -1
  507. package/dist/primitives/Input/index.d.ts +1 -1
  508. package/dist/primitives/Input/index.js +1 -1
  509. package/dist/primitives/InputGroup/index.cjs +1 -1
  510. package/dist/primitives/InputGroup/index.d.cts +1 -1
  511. package/dist/primitives/InputGroup/index.d.ts +1 -1
  512. package/dist/primitives/InputGroup/index.js +1 -1
  513. package/dist/primitives/InputOtp/index.cjs +3 -2
  514. package/dist/primitives/InputOtp/index.cjs.map +1 -1
  515. package/dist/primitives/InputOtp/index.d.cts +1 -1
  516. package/dist/primitives/InputOtp/index.d.ts +1 -1
  517. package/dist/primitives/InputOtp/index.js +3 -2
  518. package/dist/primitives/InputOtp/index.js.map +1 -1
  519. package/dist/primitives/Item/index.cjs +2 -2
  520. package/dist/primitives/Item/index.d.cts +1 -1
  521. package/dist/primitives/Item/index.d.ts +1 -1
  522. package/dist/primitives/Item/index.js +2 -2
  523. package/dist/primitives/Kbd/index.d.cts +1 -1
  524. package/dist/primitives/Kbd/index.d.ts +1 -1
  525. package/dist/primitives/Label/index.cjs +1 -1
  526. package/dist/primitives/Label/index.d.cts +1 -1
  527. package/dist/primitives/Label/index.d.ts +1 -1
  528. package/dist/primitives/Label/index.js +1 -1
  529. package/dist/primitives/Link/index.cjs +3 -2
  530. package/dist/primitives/Link/index.cjs.map +1 -1
  531. package/dist/primitives/Link/index.d.cts +1 -1
  532. package/dist/primitives/Link/index.d.ts +1 -1
  533. package/dist/primitives/Link/index.js +2 -2
  534. package/dist/primitives/Logo/index.d.cts +1 -1
  535. package/dist/primitives/Logo/index.d.ts +1 -1
  536. package/dist/primitives/Menubar/index.cjs +14 -4
  537. package/dist/primitives/Menubar/index.cjs.map +1 -1
  538. package/dist/primitives/Menubar/index.d.cts +1 -1
  539. package/dist/primitives/Menubar/index.d.ts +1 -1
  540. package/dist/primitives/Menubar/index.js +14 -4
  541. package/dist/primitives/Menubar/index.js.map +1 -1
  542. package/dist/primitives/Mosaic/index.cjs +4 -0
  543. package/dist/primitives/Mosaic/index.d.cts +2 -0
  544. package/dist/primitives/Mosaic/index.d.ts +2 -0
  545. package/dist/primitives/Mosaic/index.js +2 -0
  546. package/dist/primitives/NativeSelect/index.cjs +6 -3
  547. package/dist/primitives/NativeSelect/index.cjs.map +1 -1
  548. package/dist/primitives/NativeSelect/index.d.cts +1 -1
  549. package/dist/primitives/NativeSelect/index.d.ts +1 -1
  550. package/dist/primitives/NativeSelect/index.js +5 -3
  551. package/dist/primitives/NativeSelect/index.js.map +1 -1
  552. package/dist/primitives/NavRail/index.d.cts +2 -2
  553. package/dist/primitives/NavRail/index.d.ts +2 -2
  554. package/dist/primitives/NavigationMenu/index.cjs +5 -3
  555. package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
  556. package/dist/primitives/NavigationMenu/index.d.cts +1 -1
  557. package/dist/primitives/NavigationMenu/index.d.ts +1 -1
  558. package/dist/primitives/NavigationMenu/index.js +5 -3
  559. package/dist/primitives/NavigationMenu/index.js.map +1 -1
  560. package/dist/primitives/NotchedCard/index.cjs +390 -0
  561. package/dist/primitives/NotchedCard/index.cjs.map +1 -0
  562. package/dist/primitives/NotchedCard/index.d.cts +2 -0
  563. package/dist/primitives/NotchedCard/index.d.ts +2 -0
  564. package/dist/primitives/NotchedCard/index.js +385 -0
  565. package/dist/primitives/NotchedCard/index.js.map +1 -0
  566. package/dist/primitives/Pagination/index.cjs +6 -2
  567. package/dist/primitives/Pagination/index.cjs.map +1 -1
  568. package/dist/primitives/Pagination/index.d.cts +1 -1
  569. package/dist/primitives/Pagination/index.d.ts +1 -1
  570. package/dist/primitives/Pagination/index.js +6 -2
  571. package/dist/primitives/Pagination/index.js.map +1 -1
  572. package/dist/primitives/Popover/index.cjs +1 -1
  573. package/dist/primitives/Popover/index.d.cts +1 -1
  574. package/dist/primitives/Popover/index.d.ts +1 -1
  575. package/dist/primitives/Popover/index.js +1 -1
  576. package/dist/primitives/Progress/index.cjs +1 -1
  577. package/dist/primitives/Progress/index.d.cts +1 -1
  578. package/dist/primitives/Progress/index.d.ts +1 -1
  579. package/dist/primitives/Progress/index.js +1 -1
  580. package/dist/primitives/RadioGroup/index.cjs +7 -3
  581. package/dist/primitives/RadioGroup/index.cjs.map +1 -1
  582. package/dist/primitives/RadioGroup/index.d.cts +1 -1
  583. package/dist/primitives/RadioGroup/index.d.ts +1 -1
  584. package/dist/primitives/RadioGroup/index.js +7 -3
  585. package/dist/primitives/RadioGroup/index.js.map +1 -1
  586. package/dist/primitives/Resizable/index.cjs +6 -2
  587. package/dist/primitives/Resizable/index.cjs.map +1 -1
  588. package/dist/primitives/Resizable/index.d.cts +1 -1
  589. package/dist/primitives/Resizable/index.d.ts +1 -1
  590. package/dist/primitives/Resizable/index.js +6 -2
  591. package/dist/primitives/Resizable/index.js.map +1 -1
  592. package/dist/primitives/ScrollArea/index.cjs +1 -1
  593. package/dist/primitives/ScrollArea/index.d.cts +1 -1
  594. package/dist/primitives/ScrollArea/index.d.ts +1 -1
  595. package/dist/primitives/ScrollArea/index.js +1 -1
  596. package/dist/primitives/Select/index.cjs +18 -5
  597. package/dist/primitives/Select/index.cjs.map +1 -1
  598. package/dist/primitives/Select/index.d.cts +1 -1
  599. package/dist/primitives/Select/index.d.ts +1 -1
  600. package/dist/primitives/Select/index.js +18 -5
  601. package/dist/primitives/Select/index.js.map +1 -1
  602. package/dist/primitives/Separator/index.cjs +1 -1
  603. package/dist/primitives/Separator/index.js +1 -1
  604. package/dist/primitives/Sheet/index.cjs +40 -4
  605. package/dist/primitives/Sheet/index.cjs.map +1 -1
  606. package/dist/primitives/Sheet/index.d.cts +1 -1
  607. package/dist/primitives/Sheet/index.d.ts +1 -1
  608. package/dist/primitives/Sheet/index.js +40 -4
  609. package/dist/primitives/Sheet/index.js.map +1 -1
  610. package/dist/primitives/Sidebar/index.d.cts +1 -1
  611. package/dist/primitives/Sidebar/index.d.ts +1 -1
  612. package/dist/primitives/Skeleton/index.d.cts +1 -1
  613. package/dist/primitives/Skeleton/index.d.ts +1 -1
  614. package/dist/primitives/Slider/index.cjs +1 -1
  615. package/dist/primitives/Slider/index.d.cts +1 -1
  616. package/dist/primitives/Slider/index.d.ts +1 -1
  617. package/dist/primitives/Slider/index.js +1 -1
  618. package/dist/primitives/Sonner/index.cjs +22 -6
  619. package/dist/primitives/Sonner/index.cjs.map +1 -1
  620. package/dist/primitives/Sonner/index.d.cts +1 -1
  621. package/dist/primitives/Sonner/index.d.ts +1 -1
  622. package/dist/primitives/Sonner/index.js +22 -6
  623. package/dist/primitives/Sonner/index.js.map +1 -1
  624. package/dist/primitives/Spinner/index.cjs +4 -2
  625. package/dist/primitives/Spinner/index.cjs.map +1 -1
  626. package/dist/primitives/Spinner/index.d.cts +1 -1
  627. package/dist/primitives/Spinner/index.d.ts +1 -1
  628. package/dist/primitives/Spinner/index.js +4 -2
  629. package/dist/primitives/Spinner/index.js.map +1 -1
  630. package/dist/primitives/Switch/index.cjs +1 -1
  631. package/dist/primitives/Switch/index.d.cts +1 -1
  632. package/dist/primitives/Switch/index.d.ts +1 -1
  633. package/dist/primitives/Switch/index.js +1 -1
  634. package/dist/primitives/Table/index.d.cts +1 -1
  635. package/dist/primitives/Table/index.d.ts +1 -1
  636. package/dist/primitives/Tabs/index.cjs +2 -2
  637. package/dist/primitives/Tabs/index.d.cts +1 -1
  638. package/dist/primitives/Tabs/index.d.ts +1 -1
  639. package/dist/primitives/Tabs/index.js +2 -2
  640. package/dist/primitives/Text/index.cjs +2 -1
  641. package/dist/primitives/Text/index.cjs.map +1 -1
  642. package/dist/primitives/Text/index.d.cts +1 -1
  643. package/dist/primitives/Text/index.d.ts +1 -1
  644. package/dist/primitives/Text/index.js +1 -1
  645. package/dist/primitives/Textarea/index.cjs +2 -1
  646. package/dist/primitives/Textarea/index.cjs.map +1 -1
  647. package/dist/primitives/Textarea/index.d.cts +1 -1
  648. package/dist/primitives/Textarea/index.d.ts +1 -1
  649. package/dist/primitives/Textarea/index.js +1 -1
  650. package/dist/primitives/ThemeProvider/index.d.cts +1 -1
  651. package/dist/primitives/ThemeProvider/index.d.ts +1 -1
  652. package/dist/primitives/Toggle/index.cjs +3 -2
  653. package/dist/primitives/Toggle/index.cjs.map +1 -1
  654. package/dist/primitives/Toggle/index.d.cts +1 -1
  655. package/dist/primitives/Toggle/index.d.ts +1 -1
  656. package/dist/primitives/Toggle/index.js +2 -2
  657. package/dist/primitives/ToggleGroup/index.cjs +1 -1
  658. package/dist/primitives/ToggleGroup/index.d.cts +1 -1
  659. package/dist/primitives/ToggleGroup/index.d.ts +1 -1
  660. package/dist/primitives/ToggleGroup/index.js +1 -1
  661. package/dist/primitives/Tooltip/index.cjs +1 -1
  662. package/dist/primitives/Tooltip/index.d.cts +1 -1
  663. package/dist/primitives/Tooltip/index.d.ts +1 -1
  664. package/dist/primitives/Tooltip/index.js +1 -1
  665. package/dist/primitives/index.cjs +14 -3
  666. package/dist/primitives/index.d.cts +55 -51
  667. package/dist/primitives/index.d.ts +55 -51
  668. package/dist/primitives/index.js +8 -4
  669. package/package.json +2 -1
  670. package/dist/index47.d.cts.map +0 -1
  671. package/dist/index47.d.ts.map +0 -1
@@ -0,0 +1,390 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("../../chunk.cjs");
3
+ const require_cn = require("../../cn.cjs");
4
+ let react = require("react");
5
+ react = require_chunk.__toESM(react);
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ //#region src/primitives/NotchedCard/NotchedCard.tsx
8
+ const CORNER_KEYS = [
9
+ "tl",
10
+ "tr",
11
+ "br",
12
+ "bl"
13
+ ];
14
+ const useIsoLayoutEffect = typeof window !== "undefined" ? react.useLayoutEffect : react.useEffect;
15
+ const round2 = (v) => Math.round(v * 100) / 100;
16
+ /**
17
+ * Builds the notched outline as an SVG path, walking clockwise from the top
18
+ * edge. Convex turns sweep outward (sweep=1); the inner corner of each notch
19
+ * is a concave fillet (sweep=0). Exported for testing — not part of the
20
+ * typical component API.
21
+ */
22
+ function buildNotchedCardPath({ w, h, radius, notchRadius, notches }) {
23
+ if (w <= 0 || h <= 0) return "";
24
+ const R = Math.max(0, Math.min(radius, w / 2, h / 2));
25
+ const arc = (rr, x, y, sweep) => `A ${round2(rr)} ${round2(rr)} 0 0 ${sweep} ${round2(x)} ${round2(y)}`;
26
+ const line = (x, y) => `L ${round2(x)} ${round2(y)}`;
27
+ const pt = ([x, y]) => `${round2(x)} ${round2(y)}`;
28
+ const prep = (c) => {
29
+ if (!c || c.w <= 0 || c.h <= 0) return null;
30
+ const nw = Math.min(c.w, w - 2 * R);
31
+ const nh = Math.min(c.h, h - 2 * R);
32
+ if (nw <= R || nh <= R) return null;
33
+ return {
34
+ nw,
35
+ nh,
36
+ r: Math.max(0, Math.min(notchRadius, nw - R, nh - R))
37
+ };
38
+ };
39
+ const tl = prep(notches.tl);
40
+ const tr = prep(notches.tr);
41
+ const br = prep(notches.br);
42
+ const bl = prep(notches.bl);
43
+ const corner = {
44
+ tl: tl ? {
45
+ entry: [0, tl.nh + R],
46
+ exit: [tl.nw + R, 0],
47
+ cmds: [
48
+ arc(R, R, tl.nh, 1),
49
+ line(tl.nw - tl.r, tl.nh),
50
+ arc(tl.r, tl.nw, tl.nh - tl.r, 0),
51
+ line(tl.nw, R),
52
+ arc(R, tl.nw + R, 0, 1)
53
+ ]
54
+ } : {
55
+ entry: [0, R],
56
+ exit: [R, 0],
57
+ cmds: [arc(R, R, 0, 1)]
58
+ },
59
+ tr: tr ? {
60
+ entry: [w - tr.nw - R, 0],
61
+ exit: [w, tr.nh + R],
62
+ cmds: [
63
+ arc(R, w - tr.nw, R, 1),
64
+ line(w - tr.nw, tr.nh - tr.r),
65
+ arc(tr.r, w - tr.nw + tr.r, tr.nh, 0),
66
+ line(w - R, tr.nh),
67
+ arc(R, w, tr.nh + R, 1)
68
+ ]
69
+ } : {
70
+ entry: [w - R, 0],
71
+ exit: [w, R],
72
+ cmds: [arc(R, w, R, 1)]
73
+ },
74
+ br: br ? {
75
+ entry: [w, h - br.nh - R],
76
+ exit: [w - br.nw - R, h],
77
+ cmds: [
78
+ arc(R, w - R, h - br.nh, 1),
79
+ line(w - br.nw + br.r, h - br.nh),
80
+ arc(br.r, w - br.nw, h - br.nh + br.r, 0),
81
+ line(w - br.nw, h - R),
82
+ arc(R, w - br.nw - R, h, 1)
83
+ ]
84
+ } : {
85
+ entry: [w, h - R],
86
+ exit: [w - R, h],
87
+ cmds: [arc(R, w - R, h, 1)]
88
+ },
89
+ bl: bl ? {
90
+ entry: [bl.nw + R, h],
91
+ exit: [0, h - bl.nh - R],
92
+ cmds: [
93
+ arc(R, bl.nw, h - R, 1),
94
+ line(bl.nw, h - bl.nh + bl.r),
95
+ arc(bl.r, bl.nw - bl.r, h - bl.nh, 0),
96
+ line(R, h - bl.nh),
97
+ arc(R, 0, h - bl.nh - R, 1)
98
+ ]
99
+ } : {
100
+ entry: [R, h],
101
+ exit: [0, h - R],
102
+ cmds: [arc(R, 0, h - R, 1)]
103
+ }
104
+ };
105
+ return [
106
+ `M ${pt(corner.tl.exit)}`,
107
+ line(...corner.tr.entry),
108
+ ...corner.tr.cmds,
109
+ line(...corner.br.entry),
110
+ ...corner.br.cmds,
111
+ line(...corner.bl.entry),
112
+ ...corner.bl.cmds,
113
+ line(...corner.tl.entry),
114
+ ...corner.tl.cmds,
115
+ "Z"
116
+ ].join(" ");
117
+ }
118
+ const sameBox = (a, b) => a === b || !!a && !!b && a.w === b.w && a.h === b.h;
119
+ /**
120
+ * Style for an invisible float that reserves a side's notched corners inside
121
+ * the content flow, so flowing content wraps around the cutouts instead of
122
+ * running under them. `shape-inside` never shipped in any browser; a float
123
+ * with `shape-outside` is the standard equivalent. A top-only corner is just
124
+ * the float's own box; a bottom corner needs the float to span the content
125
+ * height with a polygon covering only the corner bands (joined by a zero-width
126
+ * "keyhole" along the box edge, which keeps the polygon simple and valid).
127
+ */
128
+ function sideSpacerStyle(side, rects, innerH) {
129
+ const top = rects.top && rects.top.w > 0 && rects.top.h > 0 ? rects.top : null;
130
+ const bottom = rects.bottom && rects.bottom.w > 0 && rects.bottom.h > 0 ? rects.bottom : null;
131
+ if (!top && !bottom) return null;
132
+ const base = {
133
+ float: side,
134
+ pointerEvents: "none"
135
+ };
136
+ if (!bottom) return {
137
+ ...base,
138
+ width: top.w,
139
+ height: top.h
140
+ };
141
+ const px = (v) => `${round2(v)}px`;
142
+ const bandTop = `calc(100% - ${px(bottom.h)})`;
143
+ const shape = side === "left" ? top ? `polygon(0 0, ${px(top.w)} 0, ${px(top.w)} ${px(top.h)}, 0 ${px(top.h)}, 0 ${bandTop}, ${px(bottom.w)} ${bandTop}, ${px(bottom.w)} 100%, 0 100%)` : `polygon(0 ${bandTop}, ${px(bottom.w)} ${bandTop}, ${px(bottom.w)} 100%, 0 100%)` : top ? `polygon(100% 0, calc(100% - ${px(top.w)}) 0, calc(100% - ${px(top.w)}) ${px(top.h)}, 100% ${px(top.h)}, 100% ${bandTop}, calc(100% - ${px(bottom.w)}) ${bandTop}, calc(100% - ${px(bottom.w)}) 100%, 100% 100%)` : `polygon(100% ${bandTop}, calc(100% - ${px(bottom.w)}) ${bandTop}, calc(100% - ${px(bottom.w)}) 100%, 100% 100%)`;
144
+ return {
145
+ ...base,
146
+ width: Math.max(top?.w ?? 0, bottom.w),
147
+ height: Math.max(innerH, (top?.h ?? 0) + bottom.h),
148
+ shapeOutside: shape
149
+ };
150
+ }
151
+ const notchedCardVariants = {
152
+ default: {
153
+ background: "bg-glass-none-bg",
154
+ shadow: "drop-shadow-sm",
155
+ text: "text-primary-txt",
156
+ borderedByDefault: true
157
+ },
158
+ muted: {
159
+ background: "bg-muted-bg",
160
+ shadow: "",
161
+ text: "text-primary-txt",
162
+ borderedByDefault: true
163
+ },
164
+ glass: {
165
+ background: "bg-glass-40-bg backdrop-blur-glass",
166
+ shadow: "",
167
+ text: "text-primary-txt",
168
+ borderedByDefault: false
169
+ },
170
+ brand: {
171
+ background: "bg-[image:linear-gradient(to_right,var(--theme-brand-700),var(--theme-brand-500-primary))]",
172
+ shadow: "",
173
+ text: "text-white",
174
+ borderedByDefault: false
175
+ },
176
+ inverted: {
177
+ background: "bg-primary-invert-bg",
178
+ shadow: "",
179
+ text: "text-primary-invert-txt",
180
+ borderedByDefault: false
181
+ }
182
+ };
183
+ /** Card with corner slots that notch the background around their content. */
184
+ function NotchedCard({ children, topLeftComponent, topRightComponent, bottomLeftComponent, bottomRightComponent, variant = "default", backgroundImage, backgroundImageOpacity = .8, radius = 16, notchRadius = 12, notchGap = 12, padding = 24, avoidNotches = true, bordered, className, backgroundClassName, contentClassName, style, ...props }) {
185
+ const rootRef = react.useRef(null);
186
+ const cornerRefs = {
187
+ tl: react.useRef(null),
188
+ tr: react.useRef(null),
189
+ br: react.useRef(null),
190
+ bl: react.useRef(null)
191
+ };
192
+ const contentRef = react.useRef(null);
193
+ const [box, setBox] = react.useState({
194
+ w: 0,
195
+ h: 0
196
+ });
197
+ const [contentH, setContentH] = react.useState(0);
198
+ const [sizes, setSizes] = react.useState({
199
+ tl: null,
200
+ tr: null,
201
+ br: null,
202
+ bl: null
203
+ });
204
+ const cornerSlots = [
205
+ [
206
+ "tl",
207
+ topLeftComponent,
208
+ {
209
+ top: 0,
210
+ left: 0
211
+ }
212
+ ],
213
+ [
214
+ "tr",
215
+ topRightComponent,
216
+ {
217
+ top: 0,
218
+ right: 0
219
+ }
220
+ ],
221
+ [
222
+ "br",
223
+ bottomRightComponent,
224
+ {
225
+ bottom: 0,
226
+ right: 0
227
+ }
228
+ ],
229
+ [
230
+ "bl",
231
+ bottomLeftComponent,
232
+ {
233
+ bottom: 0,
234
+ left: 0
235
+ }
236
+ ]
237
+ ];
238
+ const hasCorners = cornerSlots.some(([, node]) => node != null && node !== false);
239
+ const measure = react.useCallback(() => {
240
+ const root = rootRef.current;
241
+ if (!root) return;
242
+ setBox((prev) => {
243
+ const next = {
244
+ w: root.offsetWidth,
245
+ h: root.offsetHeight
246
+ };
247
+ return sameBox(prev, next) ? prev : next;
248
+ });
249
+ setContentH((prev) => {
250
+ const next = contentRef.current?.offsetHeight ?? 0;
251
+ return prev === next ? prev : next;
252
+ });
253
+ setSizes((prev) => {
254
+ const next = {};
255
+ let changed = false;
256
+ for (const k of CORNER_KEYS) {
257
+ const el = cornerRefs[k].current;
258
+ next[k] = el ? {
259
+ w: el.offsetWidth,
260
+ h: el.offsetHeight
261
+ } : null;
262
+ if (!sameBox(prev[k], next[k])) changed = true;
263
+ }
264
+ return changed ? next : prev;
265
+ });
266
+ }, []);
267
+ useIsoLayoutEffect(() => {
268
+ if (!hasCorners) return;
269
+ measure();
270
+ if (typeof ResizeObserver === "undefined") return;
271
+ const ro = new ResizeObserver(measure);
272
+ if (rootRef.current) ro.observe(rootRef.current);
273
+ if (contentRef.current) ro.observe(contentRef.current);
274
+ for (const k of CORNER_KEYS) {
275
+ const el = cornerRefs[k].current;
276
+ if (el) ro.observe(el);
277
+ }
278
+ return () => ro.disconnect();
279
+ }, [
280
+ measure,
281
+ hasCorners,
282
+ topLeftComponent,
283
+ topRightComponent,
284
+ bottomRightComponent,
285
+ bottomLeftComponent
286
+ ]);
287
+ const notches = Object.fromEntries(CORNER_KEYS.map((k) => [k, sizes[k] ? {
288
+ w: sizes[k].w + notchGap,
289
+ h: sizes[k].h + notchGap
290
+ } : null]));
291
+ const path = hasCorners ? buildNotchedCardPath({
292
+ w: box.w,
293
+ h: box.h,
294
+ radius,
295
+ notchRadius,
296
+ notches
297
+ }) : "";
298
+ const styles = notchedCardVariants[variant];
299
+ const showBorder = bordered ?? styles.borderedByDefault;
300
+ const inset = (v) => Math.max(0, (v ?? 0) - padding + notchGap);
301
+ const toRect = (notch) => notch ? {
302
+ w: inset(notch.w),
303
+ h: inset(notch.h)
304
+ } : null;
305
+ const spacerSides = [["left", {
306
+ top: toRect(notches.tl),
307
+ bottom: toRect(notches.bl)
308
+ }], ["right", {
309
+ top: toRect(notches.tr),
310
+ bottom: toRect(notches.br)
311
+ }]];
312
+ const innerH = Math.max(0, contentH - 2 * padding);
313
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
314
+ ref: rootRef,
315
+ "data-slot": "notched-card",
316
+ "data-variant": variant,
317
+ className: require_cn.cn("group relative isolate", styles.text, className),
318
+ style,
319
+ ...props,
320
+ children: [
321
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
322
+ "aria-hidden": true,
323
+ className: require_cn.cn("absolute inset-0 -z-10", styles.shadow),
324
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
325
+ "data-slot": "notched-card-background",
326
+ className: require_cn.cn("absolute inset-0 overflow-hidden", styles.background, backgroundClassName),
327
+ style: path ? {
328
+ clipPath: `path("${path}")`,
329
+ WebkitClipPath: `path("${path}")`
330
+ } : { borderRadius: radius },
331
+ children: backgroundImage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
332
+ src: backgroundImage,
333
+ alt: "",
334
+ className: "absolute inset-0 size-full object-cover",
335
+ style: { opacity: backgroundImageOpacity }
336
+ })
337
+ })
338
+ }),
339
+ showBorder && (path ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
340
+ "aria-hidden": true,
341
+ "data-slot": "notched-card-border",
342
+ viewBox: `0 0 ${box.w} ${box.h}`,
343
+ width: box.w,
344
+ height: box.h,
345
+ className: "pointer-events-none absolute inset-0",
346
+ focusable: "false",
347
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
348
+ d: path,
349
+ fill: "none",
350
+ strokeWidth: 1,
351
+ className: "stroke-primary-border"
352
+ })
353
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
354
+ "aria-hidden": true,
355
+ "data-slot": "notched-card-border",
356
+ className: "pointer-events-none absolute inset-0 border border-primary-border",
357
+ style: { borderRadius: radius }
358
+ })),
359
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
360
+ ref: contentRef,
361
+ "data-slot": "notched-card-content",
362
+ className: require_cn.cn("relative", contentClassName),
363
+ style: { padding },
364
+ children: [avoidNotches && spacerSides.map(([side, rects]) => {
365
+ const spacerStyle = sideSpacerStyle(side, rects, innerH);
366
+ return spacerStyle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
367
+ "aria-hidden": true,
368
+ "data-slot": "notched-card-spacer",
369
+ "data-side": side,
370
+ style: spacerStyle
371
+ }, side) : null;
372
+ }), children]
373
+ }),
374
+ cornerSlots.map(([key, node, pos]) => node != null && node !== false ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
375
+ ref: cornerRefs[key],
376
+ "data-slot": "notched-card-corner",
377
+ "data-corner": key,
378
+ className: "absolute flex w-max items-center",
379
+ style: pos,
380
+ children: node
381
+ }, key) : null)
382
+ ]
383
+ });
384
+ }
385
+ //#endregion
386
+ exports.NotchedCard = NotchedCard;
387
+ exports.buildNotchedCardPath = buildNotchedCardPath;
388
+ exports.notchedCardVariants = notchedCardVariants;
389
+
390
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["React","cn"],"sources":["../../../src/primitives/NotchedCard/NotchedCard.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/* NotchedCard — a card whose background is a clipped shape. Any corner that\n receives content gets a rectangular bite taken out of the background, sized\n to that content, with a concave fillet at the inner corner. With no corner\n content it renders as a plain rounded rectangle (no measuring, no clip). */\n\nconst CORNER_KEYS = [\"tl\", \"tr\", \"br\", \"bl\"] as const;\ntype CornerKey = (typeof CORNER_KEYS)[number];\n\ntype CornerBox = { w: number; h: number };\ntype CornerSizes = Record<CornerKey, CornerBox | null>;\n\n// useLayoutEffect on the client, useEffect during SSR (avoids the React warning).\nconst useIsoLayoutEffect = typeof window !== \"undefined\" ? React.useLayoutEffect : React.useEffect;\n\nconst round2 = (v: number) => Math.round(v * 100) / 100;\n\n/**\n * Builds the notched outline as an SVG path, walking clockwise from the top\n * edge. Convex turns sweep outward (sweep=1); the inner corner of each notch\n * is a concave fillet (sweep=0). Exported for testing — not part of the\n * typical component API.\n */\nfunction buildNotchedCardPath({\n w,\n h,\n radius,\n notchRadius,\n notches,\n}: {\n w: number;\n h: number;\n radius: number;\n notchRadius: number;\n notches: CornerSizes;\n}): string {\n if (w <= 0 || h <= 0) return \"\";\n\n const R = Math.max(0, Math.min(radius, w / 2, h / 2));\n const arc = (rr: number, x: number, y: number, sweep: 0 | 1) =>\n `A ${round2(rr)} ${round2(rr)} 0 0 ${sweep} ${round2(x)} ${round2(y)}`;\n const line = (x: number, y: number) => `L ${round2(x)} ${round2(y)}`;\n const pt = ([x, y]: readonly [number, number]) => `${round2(x)} ${round2(y)}`;\n\n // A notch only survives if there is room for it between the outer radii.\n const prep = (c: CornerBox | null) => {\n if (!c || c.w <= 0 || c.h <= 0) return null;\n const nw = Math.min(c.w, w - 2 * R);\n const nh = Math.min(c.h, h - 2 * R);\n if (nw <= R || nh <= R) return null;\n const r = Math.max(0, Math.min(notchRadius, nw - R, nh - R));\n return { nw, nh, r };\n };\n\n type Corner = {\n entry: readonly [number, number];\n exit: readonly [number, number];\n cmds: string[];\n };\n\n const tl = prep(notches.tl);\n const tr = prep(notches.tr);\n const br = prep(notches.br);\n const bl = prep(notches.bl);\n\n const corner: Record<CornerKey, Corner> = {\n tl: tl\n ? {\n entry: [0, tl.nh + R],\n exit: [tl.nw + R, 0],\n cmds: [\n arc(R, R, tl.nh, 1),\n line(tl.nw - tl.r, tl.nh),\n arc(tl.r, tl.nw, tl.nh - tl.r, 0),\n line(tl.nw, R),\n arc(R, tl.nw + R, 0, 1),\n ],\n }\n : { entry: [0, R], exit: [R, 0], cmds: [arc(R, R, 0, 1)] },\n tr: tr\n ? {\n entry: [w - tr.nw - R, 0],\n exit: [w, tr.nh + R],\n cmds: [\n arc(R, w - tr.nw, R, 1),\n line(w - tr.nw, tr.nh - tr.r),\n arc(tr.r, w - tr.nw + tr.r, tr.nh, 0),\n line(w - R, tr.nh),\n arc(R, w, tr.nh + R, 1),\n ],\n }\n : { entry: [w - R, 0], exit: [w, R], cmds: [arc(R, w, R, 1)] },\n br: br\n ? {\n entry: [w, h - br.nh - R],\n exit: [w - br.nw - R, h],\n cmds: [\n arc(R, w - R, h - br.nh, 1),\n line(w - br.nw + br.r, h - br.nh),\n arc(br.r, w - br.nw, h - br.nh + br.r, 0),\n line(w - br.nw, h - R),\n arc(R, w - br.nw - R, h, 1),\n ],\n }\n : { entry: [w, h - R], exit: [w - R, h], cmds: [arc(R, w - R, h, 1)] },\n bl: bl\n ? {\n entry: [bl.nw + R, h],\n exit: [0, h - bl.nh - R],\n cmds: [\n arc(R, bl.nw, h - R, 1),\n line(bl.nw, h - bl.nh + bl.r),\n arc(bl.r, bl.nw - bl.r, h - bl.nh, 0),\n line(R, h - bl.nh),\n arc(R, 0, h - bl.nh - R, 1),\n ],\n }\n : { entry: [R, h], exit: [0, h - R], cmds: [arc(R, 0, h - R, 1)] },\n };\n\n return [\n `M ${pt(corner.tl.exit)}`,\n line(...corner.tr.entry),\n ...corner.tr.cmds,\n line(...corner.br.entry),\n ...corner.br.cmds,\n line(...corner.bl.entry),\n ...corner.bl.cmds,\n line(...corner.tl.entry),\n ...corner.tl.cmds,\n \"Z\",\n ].join(\" \");\n}\n\nconst sameBox = (a: CornerBox | null, b: CornerBox | null) =>\n a === b || (!!a && !!b && a.w === b.w && a.h === b.h);\n\ntype SideRects = { top: CornerBox | null; bottom: CornerBox | null };\n\n/**\n * Style for an invisible float that reserves a side's notched corners inside\n * the content flow, so flowing content wraps around the cutouts instead of\n * running under them. `shape-inside` never shipped in any browser; a float\n * with `shape-outside` is the standard equivalent. A top-only corner is just\n * the float's own box; a bottom corner needs the float to span the content\n * height with a polygon covering only the corner bands (joined by a zero-width\n * \"keyhole\" along the box edge, which keeps the polygon simple and valid).\n */\nfunction sideSpacerStyle(\n side: \"left\" | \"right\",\n rects: SideRects,\n innerH: number,\n): React.CSSProperties | null {\n const top = rects.top && rects.top.w > 0 && rects.top.h > 0 ? rects.top : null;\n const bottom = rects.bottom && rects.bottom.w > 0 && rects.bottom.h > 0 ? rects.bottom : null;\n if (!top && !bottom) return null;\n\n const base: React.CSSProperties = { float: side, pointerEvents: \"none\" };\n if (!bottom) {\n // Type-narrowing: !bottom && the guard above means top is set.\n return { ...base, width: (top as CornerBox).w, height: (top as CornerBox).h };\n }\n\n const px = (v: number) => `${round2(v)}px`;\n const bandTop = `calc(100% - ${px(bottom.h)})`;\n const shape =\n side === \"left\"\n ? top\n ? `polygon(0 0, ${px(top.w)} 0, ${px(top.w)} ${px(top.h)}, 0 ${px(top.h)}, 0 ${bandTop}, ${px(bottom.w)} ${bandTop}, ${px(bottom.w)} 100%, 0 100%)`\n : `polygon(0 ${bandTop}, ${px(bottom.w)} ${bandTop}, ${px(bottom.w)} 100%, 0 100%)`\n : top\n ? `polygon(100% 0, calc(100% - ${px(top.w)}) 0, calc(100% - ${px(top.w)}) ${px(top.h)}, 100% ${px(top.h)}, 100% ${bandTop}, calc(100% - ${px(bottom.w)}) ${bandTop}, calc(100% - ${px(bottom.w)}) 100%, 100% 100%)`\n : `polygon(100% ${bandTop}, calc(100% - ${px(bottom.w)}) ${bandTop}, calc(100% - ${px(bottom.w)}) 100%, 100% 100%)`;\n\n return {\n ...base,\n width: Math.max(top?.w ?? 0, bottom.w),\n height: Math.max(innerH, (top?.h ?? 0) + bottom.h),\n shapeOutside: shape,\n };\n}\n\n// Variant fill goes on the clipped background layer; text colour goes on the\n// root so corner slots and content inherit it. Shadows must be drop-shadow\n// (a filter, applied to the layer's parent) — box-shadow gets clipped away.\nconst notchedCardVariants = {\n default: {\n background: \"bg-glass-none-bg\",\n shadow: \"drop-shadow-sm\",\n text: \"text-primary-txt\",\n borderedByDefault: true,\n },\n muted: {\n background: \"bg-muted-bg\",\n shadow: \"\",\n text: \"text-primary-txt\",\n borderedByDefault: true,\n },\n // Translucent glass over textured backgrounds — blur is part of the deal.\n glass: {\n background: \"bg-glass-40-bg backdrop-blur-glass\",\n shadow: \"\",\n text: \"text-primary-txt\",\n borderedByDefault: false,\n },\n // Active product's brand gradient, matching Card's brand variant.\n brand: {\n background:\n \"bg-[image:linear-gradient(to_right,var(--theme-brand-700),var(--theme-brand-500-primary))]\",\n shadow: \"\",\n text: \"text-white\",\n borderedByDefault: false,\n },\n inverted: {\n background: \"bg-primary-invert-bg\",\n shadow: \"\",\n text: \"text-primary-invert-txt\",\n borderedByDefault: false,\n },\n} as const;\n\ntype NotchedCardVariant = keyof typeof notchedCardVariants;\n\ntype NotchedCardProps = React.ComponentProps<\"div\"> & {\n /** Content pinned to the top-left corner; its footprint is notched out of the background. */\n topLeftComponent?: React.ReactNode;\n /** Content pinned to the top-right corner; its footprint is notched out of the background. */\n topRightComponent?: React.ReactNode;\n /** Content pinned to the bottom-left corner; its footprint is notched out of the background. */\n bottomLeftComponent?: React.ReactNode;\n /** Content pinned to the bottom-right corner; its footprint is notched out of the background. */\n bottomRightComponent?: React.ReactNode;\n /** Background fill of the card surface. Default `default` (solid surface). */\n variant?: NotchedCardVariant;\n /** Image URL rendered as the card's background (object-fit: cover), slightly transparent. */\n backgroundImage?: string;\n /** Opacity of the background image. Default `0.8`. */\n backgroundImageOpacity?: number;\n /** Outer corner radius in px. Default `16`. */\n radius?: number;\n /** Concave fillet radius at each notch's inner corner in px. Default `12`. */\n notchRadius?: number;\n /** Gutter in px between corner content and the background edge. Default `12`. */\n notchGap?: number;\n /** Content padding in px. Default `24`. */\n padding?: number;\n /** Keep flowing content out of the notched corners via invisible float\n spacers. Needs flow (block/inline) content — set `false` if\n `contentClassName` turns the wrapper into a flex/grid container.\n Default `true`. */\n avoidNotches?: boolean;\n /** Draw the outline stroke. Defaults per variant (`default`/`muted` on, others off). */\n bordered?: boolean;\n /** Extra classes for the clipped background layer — set the fill here (e.g.\n `bg-…`, gradients). The layer sits behind the content, so plain `hover:`\n variants never fire on it; the root carries the `group` marker — use\n `group-hover:bg-…` for hover fills (plain `hover:` works on `className`,\n which styles the root itself). */\n backgroundClassName?: string;\n /** Extra classes for the content wrapper. */\n contentClassName?: string;\n};\n\n/** Card with corner slots that notch the background around their content. */\nfunction NotchedCard({\n children,\n topLeftComponent,\n topRightComponent,\n bottomLeftComponent,\n bottomRightComponent,\n variant = \"default\",\n backgroundImage,\n backgroundImageOpacity = 0.8,\n radius = 16,\n notchRadius = 12,\n notchGap = 12,\n padding = 24,\n avoidNotches = true,\n bordered,\n className,\n backgroundClassName,\n contentClassName,\n style,\n ...props\n}: NotchedCardProps) {\n const rootRef = React.useRef<HTMLDivElement>(null);\n const tlRef = React.useRef<HTMLDivElement>(null);\n const trRef = React.useRef<HTMLDivElement>(null);\n const brRef = React.useRef<HTMLDivElement>(null);\n const blRef = React.useRef<HTMLDivElement>(null);\n const cornerRefs: Record<CornerKey, React.RefObject<HTMLDivElement>> = {\n tl: tlRef,\n tr: trRef,\n br: brRef,\n bl: blRef,\n };\n\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const [box, setBox] = React.useState<CornerBox>({ w: 0, h: 0 });\n const [contentH, setContentH] = React.useState(0);\n const [sizes, setSizes] = React.useState<CornerSizes>({\n tl: null,\n tr: null,\n br: null,\n bl: null,\n });\n\n const cornerSlots: Array<[CornerKey, React.ReactNode, React.CSSProperties]> = [\n [\"tl\", topLeftComponent, { top: 0, left: 0 }],\n [\"tr\", topRightComponent, { top: 0, right: 0 }],\n [\"br\", bottomRightComponent, { bottom: 0, right: 0 }],\n [\"bl\", bottomLeftComponent, { bottom: 0, left: 0 }],\n ];\n const hasCorners = cornerSlots.some(([, node]) => node != null && node !== false);\n\n const measure = React.useCallback(() => {\n const root = rootRef.current;\n if (!root) return;\n setBox((prev) => {\n const next = { w: root.offsetWidth, h: root.offsetHeight };\n return sameBox(prev, next) ? prev : next;\n });\n setContentH((prev) => {\n const next = contentRef.current?.offsetHeight ?? 0;\n return prev === next ? prev : next;\n });\n setSizes((prev) => {\n const next = {} as CornerSizes;\n let changed = false;\n for (const k of CORNER_KEYS) {\n const el = cornerRefs[k].current;\n next[k] = el ? { w: el.offsetWidth, h: el.offsetHeight } : null;\n if (!sameBox(prev[k], next[k])) changed = true;\n }\n return changed ? next : prev;\n });\n }, []);\n\n useIsoLayoutEffect(() => {\n if (!hasCorners) return;\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const ro = new ResizeObserver(measure);\n if (rootRef.current) ro.observe(rootRef.current);\n if (contentRef.current) ro.observe(contentRef.current);\n for (const k of CORNER_KEYS) {\n const el = cornerRefs[k].current;\n if (el) ro.observe(el);\n }\n return () => ro.disconnect();\n }, [\n measure,\n hasCorners,\n topLeftComponent,\n topRightComponent,\n bottomRightComponent,\n bottomLeftComponent,\n ]);\n\n // Corner content box + gutter = the bite taken out of the background.\n const notches = Object.fromEntries(\n CORNER_KEYS.map((k) => [\n k,\n sizes[k]\n ? { w: (sizes[k] as CornerBox).w + notchGap, h: (sizes[k] as CornerBox).h + notchGap }\n : null,\n ]),\n ) as CornerSizes;\n\n const path = hasCorners\n ? buildNotchedCardPath({ w: box.w, h: box.h, radius, notchRadius, notches })\n : \"\";\n\n const styles = notchedCardVariants[variant];\n const showBorder = bordered ?? styles.borderedByDefault;\n\n // Notch footprints translated into content-box coordinates, extended by\n // `notchGap` so flowing content keeps a gutter from the cut edges.\n const inset = (v?: number) => Math.max(0, (v ?? 0) - padding + notchGap);\n const toRect = (notch: CornerBox | null) =>\n notch ? { w: inset(notch.w), h: inset(notch.h) } : null;\n const spacerSides: Array<[\"left\" | \"right\", SideRects]> = [\n [\"left\", { top: toRect(notches.tl), bottom: toRect(notches.bl) }],\n [\"right\", { top: toRect(notches.tr), bottom: toRect(notches.br) }],\n ];\n const innerH = Math.max(0, contentH - 2 * padding);\n\n return (\n <div\n ref={rootRef}\n data-slot=\"notched-card\"\n data-variant={variant}\n className={cn(\"group relative isolate\", styles.text, className)}\n style={style}\n {...props}\n >\n {/* Background layer — the only thing that gets clipped. The wrapper owns\n the drop-shadow filter: filters apply before clipping, so a shadow on\n the clipped element itself would be cut away with it. */}\n <div aria-hidden className={cn(\"absolute inset-0 -z-10\", styles.shadow)}>\n <div\n data-slot=\"notched-card-background\"\n className={cn(\"absolute inset-0 overflow-hidden\", styles.background, backgroundClassName)}\n style={\n path\n ? { clipPath: `path(\"${path}\")`, WebkitClipPath: `path(\"${path}\")` }\n : { borderRadius: radius }\n }\n >\n {backgroundImage && (\n <img\n src={backgroundImage}\n alt=\"\"\n className=\"absolute inset-0 size-full object-cover\"\n style={{ opacity: backgroundImageOpacity }}\n />\n )}\n </div>\n </div>\n\n {/* Outline — stroked (not clipped) so it follows the notches and stays crisp. */}\n {showBorder &&\n (path ? (\n <svg\n aria-hidden\n data-slot=\"notched-card-border\"\n viewBox={`0 0 ${box.w} ${box.h}`}\n width={box.w}\n height={box.h}\n className=\"pointer-events-none absolute inset-0\"\n focusable=\"false\"\n >\n <path d={path} fill=\"none\" strokeWidth={1} className=\"stroke-primary-border\" />\n </svg>\n ) : (\n <div\n aria-hidden\n data-slot=\"notched-card-border\"\n className=\"pointer-events-none absolute inset-0 border border-primary-border\"\n style={{ borderRadius: radius }}\n />\n ))}\n\n {/* Content — uniform padding; float spacers keep flowing content out of\n the notched corners. */}\n <div\n ref={contentRef}\n data-slot=\"notched-card-content\"\n className={cn(\"relative\", contentClassName)}\n style={{ padding }}\n >\n {avoidNotches &&\n spacerSides.map(([side, rects]) => {\n const spacerStyle = sideSpacerStyle(side, rects, innerH);\n return spacerStyle ? (\n <div\n key={side}\n aria-hidden\n data-slot=\"notched-card-spacer\"\n data-side={side}\n style={spacerStyle}\n />\n ) : null;\n })}\n {children}\n </div>\n\n {/* Corner slots — outside the background, inside the cutouts. */}\n {cornerSlots.map(([key, node, pos]) =>\n node != null && node !== false ? (\n <div\n key={key}\n ref={cornerRefs[key]}\n data-slot=\"notched-card-corner\"\n data-corner={key}\n className=\"absolute flex w-max items-center\"\n style={pos}\n >\n {node}\n </div>\n ) : null,\n )}\n </div>\n );\n}\n\nexport {\n NotchedCard,\n buildNotchedCardPath,\n notchedCardVariants,\n type NotchedCardProps,\n type NotchedCardVariant,\n};\n"],"mappings":";;;;;;;AAWA,MAAM,cAAc;CAAC;CAAM;CAAM;CAAM;AAAI;AAO3C,MAAM,qBAAqB,OAAO,WAAW,cAAcA,MAAM,kBAAkBA,MAAM;AAEzF,MAAM,UAAU,MAAc,KAAK,MAAM,IAAI,GAAG,IAAI;;;;;;;AAQpD,SAAS,qBAAqB,EAC5B,GACA,GACA,QACA,aACA,WAOS;CACT,IAAI,KAAK,KAAK,KAAK,GAAG,OAAO;CAE7B,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,IAAI,GAAG,IAAI,CAAC,CAAC;CACpD,MAAM,OAAO,IAAY,GAAW,GAAW,UAC7C,KAAK,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,OAAO,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC;CACrE,MAAM,QAAQ,GAAW,MAAc,KAAK,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC;CACjE,MAAM,MAAM,CAAC,GAAG,OAAkC,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC;CAG1E,MAAM,QAAQ,MAAwB;EACpC,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,EAAE,KAAK,GAAG,OAAO;EACvC,MAAM,KAAK,KAAK,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC;EAClC,MAAM,KAAK,KAAK,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC;EAClC,IAAI,MAAM,KAAK,MAAM,GAAG,OAAO;EAE/B,OAAO;GAAE;GAAI;GAAI,GADP,KAAK,IAAI,GA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KAAK,CAAC,KAAK,MAAM,SAC5B,QAAQ,QAAQ,SAAS,QACvB,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAEE,KAAK,WAAW;IAChB,aAAU;IACV,eAAa;IACb,WAAU;IACV,OAAO;cAEN;GACE,GARE,GAQF,IACH,IACN;EACG;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { a as notchedCardVariants, i as buildNotchedCardPath, n as NotchedCardProps, r as NotchedCardVariant, t as NotchedCard } from "../../index48.cjs";
2
+ export { NotchedCard, NotchedCardProps, NotchedCardVariant, buildNotchedCardPath, notchedCardVariants };
@@ -0,0 +1,2 @@
1
+ import { a as notchedCardVariants, i as buildNotchedCardPath, n as NotchedCardProps, r as NotchedCardVariant, t as NotchedCard } from "../../index48.js";
2
+ export { NotchedCard, NotchedCardProps, NotchedCardVariant, buildNotchedCardPath, notchedCardVariants };