@tribepad/themis 1.0.0 → 1.0.1

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 (326) hide show
  1. package/dist/elements/Accordion/index.js +325 -66
  2. package/dist/elements/Accordion/index.js.map +1 -1
  3. package/dist/elements/Accordion/index.mjs +317 -3
  4. package/dist/elements/Accordion/index.mjs.map +1 -1
  5. package/dist/elements/Avatar/index.js +461 -45
  6. package/dist/elements/Avatar/index.js.map +1 -1
  7. package/dist/elements/Avatar/index.mjs +456 -3
  8. package/dist/elements/Avatar/index.mjs.map +1 -1
  9. package/dist/elements/Badge/index.js +238 -36
  10. package/dist/elements/Badge/index.js.map +1 -1
  11. package/dist/elements/Badge/index.mjs +234 -4
  12. package/dist/elements/Badge/index.mjs.map +1 -1
  13. package/dist/elements/Breadcrumbs/index.js +808 -39
  14. package/dist/elements/Breadcrumbs/index.js.map +1 -1
  15. package/dist/elements/Breadcrumbs/index.mjs +810 -7
  16. package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
  17. package/dist/elements/Button/index.js +282 -19
  18. package/dist/elements/Button/index.js.map +1 -1
  19. package/dist/elements/Button/index.mjs +283 -4
  20. package/dist/elements/Button/index.mjs.map +1 -1
  21. package/dist/elements/ButtonGroup/index.js +229 -56
  22. package/dist/elements/ButtonGroup/index.js.map +1 -1
  23. package/dist/elements/ButtonGroup/index.mjs +222 -3
  24. package/dist/elements/ButtonGroup/index.mjs.map +1 -1
  25. package/dist/elements/Card/Card.d.ts.map +1 -1
  26. package/dist/elements/Card/index.js +563 -67
  27. package/dist/elements/Card/index.js.map +1 -1
  28. package/dist/elements/Card/index.mjs +560 -6
  29. package/dist/elements/Card/index.mjs.map +1 -1
  30. package/dist/elements/Carousel/index.js +782 -14
  31. package/dist/elements/Carousel/index.js.map +1 -1
  32. package/dist/elements/Carousel/index.mjs +786 -8
  33. package/dist/elements/Carousel/index.mjs.map +1 -1
  34. package/dist/elements/Chart/index.js +1833 -36
  35. package/dist/elements/Chart/index.js.map +1 -1
  36. package/dist/elements/Chart/index.mjs +1832 -4
  37. package/dist/elements/Chart/index.mjs.map +1 -1
  38. package/dist/elements/Checkbox/index.js +310 -39
  39. package/dist/elements/Checkbox/index.js.map +1 -1
  40. package/dist/elements/Checkbox/index.mjs +306 -4
  41. package/dist/elements/Checkbox/index.mjs.map +1 -1
  42. package/dist/elements/CheckboxGroup/index.js +445 -59
  43. package/dist/elements/CheckboxGroup/index.js.map +1 -1
  44. package/dist/elements/CheckboxGroup/index.mjs +439 -4
  45. package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
  46. package/dist/elements/DatePicker/index.js +871 -89
  47. package/dist/elements/DatePicker/index.js.map +1 -1
  48. package/dist/elements/DatePicker/index.mjs +853 -4
  49. package/dist/elements/DatePicker/index.mjs.map +1 -1
  50. package/dist/elements/Dropdown/index.js +189 -35
  51. package/dist/elements/Dropdown/index.js.map +1 -1
  52. package/dist/elements/Dropdown/index.mjs +184 -2
  53. package/dist/elements/Dropdown/index.mjs.map +1 -1
  54. package/dist/elements/FileField/index.js +1532 -129
  55. package/dist/elements/FileField/index.js.map +1 -1
  56. package/dist/elements/FileField/index.mjs +1507 -7
  57. package/dist/elements/FileField/index.mjs.map +1 -1
  58. package/dist/elements/FormLayout/index.js +166 -11
  59. package/dist/elements/FormLayout/index.js.map +1 -1
  60. package/dist/elements/FormLayout/index.mjs +167 -2
  61. package/dist/elements/FormLayout/index.mjs.map +1 -1
  62. package/dist/elements/Modal/index.js +228 -46
  63. package/dist/elements/Modal/index.js.map +1 -1
  64. package/dist/elements/Modal/index.mjs +220 -1
  65. package/dist/elements/Modal/index.mjs.map +1 -1
  66. package/dist/elements/NumberField/index.js +659 -48
  67. package/dist/elements/NumberField/index.js.map +1 -1
  68. package/dist/elements/NumberField/index.mjs +654 -6
  69. package/dist/elements/NumberField/index.mjs.map +1 -1
  70. package/dist/elements/OTPInput/index.js +729 -6
  71. package/dist/elements/OTPInput/index.js.map +1 -1
  72. package/dist/elements/OTPInput/index.mjs +732 -2
  73. package/dist/elements/OTPInput/index.mjs.map +1 -1
  74. package/dist/elements/Panel/index.js +326 -27
  75. package/dist/elements/Panel/index.js.map +1 -1
  76. package/dist/elements/Panel/index.mjs +323 -2
  77. package/dist/elements/Panel/index.mjs.map +1 -1
  78. package/dist/elements/Progress/index.js +181 -22
  79. package/dist/elements/Progress/index.js.map +1 -1
  80. package/dist/elements/Progress/index.mjs +181 -3
  81. package/dist/elements/Progress/index.mjs.map +1 -1
  82. package/dist/elements/RadioGroup/index.js +358 -34
  83. package/dist/elements/RadioGroup/index.js.map +1 -1
  84. package/dist/elements/RadioGroup/index.mjs +359 -4
  85. package/dist/elements/RadioGroup/index.mjs.map +1 -1
  86. package/dist/elements/Resizable/components/ResizableHandle.d.ts +0 -8
  87. package/dist/elements/Resizable/components/ResizableHandle.d.ts.map +1 -1
  88. package/dist/elements/Resizable/components/ResizablePanel.d.ts +0 -8
  89. package/dist/elements/Resizable/components/ResizablePanel.d.ts.map +1 -1
  90. package/dist/elements/Resizable/components/ResizablePanelGroup.d.ts +0 -8
  91. package/dist/elements/Resizable/components/ResizablePanelGroup.d.ts.map +1 -1
  92. package/dist/elements/Resizable/components/ResizablePopover.d.ts +0 -8
  93. package/dist/elements/Resizable/components/ResizablePopover.d.ts.map +1 -1
  94. package/dist/elements/Resizable/index.js +1568 -51
  95. package/dist/elements/Resizable/index.js.map +1 -1
  96. package/dist/elements/Resizable/index.mjs +1566 -6
  97. package/dist/elements/Resizable/index.mjs.map +1 -1
  98. package/dist/elements/Select/index.js +580 -22
  99. package/dist/elements/Select/index.js.map +1 -1
  100. package/dist/elements/Select/index.mjs +582 -2
  101. package/dist/elements/Select/index.mjs.map +1 -1
  102. package/dist/elements/Skeleton/index.js +77 -15
  103. package/dist/elements/Skeleton/index.js.map +1 -1
  104. package/dist/elements/Skeleton/index.mjs +78 -3
  105. package/dist/elements/Skeleton/index.mjs.map +1 -1
  106. package/dist/elements/Switch/index.js +153 -21
  107. package/dist/elements/Switch/index.js.map +1 -1
  108. package/dist/elements/Switch/index.mjs +149 -5
  109. package/dist/elements/Switch/index.mjs.map +1 -1
  110. package/dist/elements/Table/index.js +589 -68
  111. package/dist/elements/Table/index.js.map +1 -1
  112. package/dist/elements/Table/index.mjs +578 -5
  113. package/dist/elements/Table/index.mjs.map +1 -1
  114. package/dist/elements/Tabs/index.js +328 -63
  115. package/dist/elements/Tabs/index.js.map +1 -1
  116. package/dist/elements/Tabs/index.mjs +320 -3
  117. package/dist/elements/Tabs/index.mjs.map +1 -1
  118. package/dist/elements/TextField/index.js +695 -51
  119. package/dist/elements/TextField/index.js.map +1 -1
  120. package/dist/elements/TextField/index.mjs +684 -7
  121. package/dist/elements/TextField/index.mjs.map +1 -1
  122. package/dist/elements/TimeField/index.js +244 -33
  123. package/dist/elements/TimeField/index.js.map +1 -1
  124. package/dist/elements/TimeField/index.mjs +238 -2
  125. package/dist/elements/TimeField/index.mjs.map +1 -1
  126. package/dist/elements/Toast/index.js +727 -48
  127. package/dist/elements/Toast/index.js.map +1 -1
  128. package/dist/elements/Toast/index.mjs +724 -5
  129. package/dist/elements/Toast/index.mjs.map +1 -1
  130. package/dist/elements/Tooltip/index.js +315 -49
  131. package/dist/elements/Tooltip/index.js.map +1 -1
  132. package/dist/elements/Tooltip/index.mjs +310 -4
  133. package/dist/elements/Tooltip/index.mjs.map +1 -1
  134. package/dist/elements/index.js +12417 -799
  135. package/dist/elements/index.js.map +1 -1
  136. package/dist/elements/index.mjs +12233 -40
  137. package/dist/elements/index.mjs.map +1 -1
  138. package/dist/index.js +12452 -825
  139. package/dist/index.js.map +1 -1
  140. package/dist/index.mjs +12262 -42
  141. package/dist/index.mjs.map +1 -1
  142. package/dist/schemas/index.js +47 -21
  143. package/dist/schemas/index.js.map +1 -1
  144. package/dist/schemas/index.mjs +47 -2
  145. package/dist/schemas/index.mjs.map +1 -1
  146. package/dist/styles/index.js +161 -147
  147. package/dist/styles/index.js.map +1 -1
  148. package/dist/styles/index.mjs +128 -2
  149. package/dist/styles/index.mjs.map +1 -1
  150. package/dist/utils/index.js +7 -7
  151. package/dist/utils/index.js.map +1 -1
  152. package/dist/utils/index.mjs +9 -2
  153. package/dist/utils/index.mjs.map +1 -1
  154. package/package.json +1 -1
  155. package/dist/Carousel-NTZX5TOW.js +0 -16
  156. package/dist/Carousel-NTZX5TOW.js.map +0 -1
  157. package/dist/Carousel-YH3DOQJU.mjs +0 -7
  158. package/dist/Carousel-YH3DOQJU.mjs.map +0 -1
  159. package/dist/chunk-2HIUTHMU.mjs +0 -234
  160. package/dist/chunk-2HIUTHMU.mjs.map +0 -1
  161. package/dist/chunk-34GTFTDO.js +0 -431
  162. package/dist/chunk-34GTFTDO.js.map +0 -1
  163. package/dist/chunk-3H7ASYR7.js +0 -250
  164. package/dist/chunk-3H7ASYR7.js.map +0 -1
  165. package/dist/chunk-3IEN7JOP.js +0 -316
  166. package/dist/chunk-3IEN7JOP.js.map +0 -1
  167. package/dist/chunk-3JHN4GAL.js +0 -326
  168. package/dist/chunk-3JHN4GAL.js.map +0 -1
  169. package/dist/chunk-3MJPASQU.js +0 -232
  170. package/dist/chunk-3MJPASQU.js.map +0 -1
  171. package/dist/chunk-3XD2JUL3.js +0 -572
  172. package/dist/chunk-3XD2JUL3.js.map +0 -1
  173. package/dist/chunk-3YOY2VJ6.js +0 -189
  174. package/dist/chunk-3YOY2VJ6.js.map +0 -1
  175. package/dist/chunk-4DU5JSXB.js +0 -408
  176. package/dist/chunk-4DU5JSXB.js.map +0 -1
  177. package/dist/chunk-4E4E2GSS.js +0 -352
  178. package/dist/chunk-4E4E2GSS.js.map +0 -1
  179. package/dist/chunk-4NHAP4AN.mjs +0 -3
  180. package/dist/chunk-4NHAP4AN.mjs.map +0 -1
  181. package/dist/chunk-4S33J5NY.mjs +0 -415
  182. package/dist/chunk-4S33J5NY.mjs.map +0 -1
  183. package/dist/chunk-5SMGRT3G.mjs +0 -354
  184. package/dist/chunk-5SMGRT3G.mjs.map +0 -1
  185. package/dist/chunk-5SVLJN2C.mjs +0 -22
  186. package/dist/chunk-5SVLJN2C.mjs.map +0 -1
  187. package/dist/chunk-66WTU4EB.mjs +0 -299
  188. package/dist/chunk-66WTU4EB.mjs.map +0 -1
  189. package/dist/chunk-6S25NMOT.mjs +0 -335
  190. package/dist/chunk-6S25NMOT.mjs.map +0 -1
  191. package/dist/chunk-6SP7UB3D.js +0 -4
  192. package/dist/chunk-6SP7UB3D.js.map +0 -1
  193. package/dist/chunk-6TYWWQHM.mjs +0 -565
  194. package/dist/chunk-6TYWWQHM.mjs.map +0 -1
  195. package/dist/chunk-A3YUJA6W.mjs +0 -384
  196. package/dist/chunk-A3YUJA6W.mjs.map +0 -1
  197. package/dist/chunk-A6KEDVUR.js +0 -61
  198. package/dist/chunk-A6KEDVUR.js.map +0 -1
  199. package/dist/chunk-A77RUEWL.js +0 -730
  200. package/dist/chunk-A77RUEWL.js.map +0 -1
  201. package/dist/chunk-AA4IKMPE.mjs +0 -3
  202. package/dist/chunk-AA4IKMPE.mjs.map +0 -1
  203. package/dist/chunk-AKIA6GW6.mjs +0 -163
  204. package/dist/chunk-AKIA6GW6.mjs.map +0 -1
  205. package/dist/chunk-AL6P275L.mjs +0 -435
  206. package/dist/chunk-AL6P275L.mjs.map +0 -1
  207. package/dist/chunk-AZ3RJYTB.js +0 -37
  208. package/dist/chunk-AZ3RJYTB.js.map +0 -1
  209. package/dist/chunk-B5Q4UPL6.js +0 -32
  210. package/dist/chunk-B5Q4UPL6.js.map +0 -1
  211. package/dist/chunk-B6DHPMDP.mjs +0 -335
  212. package/dist/chunk-B6DHPMDP.mjs.map +0 -1
  213. package/dist/chunk-BDXKKMBZ.mjs +0 -184
  214. package/dist/chunk-BDXKKMBZ.mjs.map +0 -1
  215. package/dist/chunk-BL6E2DLZ.mjs +0 -52
  216. package/dist/chunk-BL6E2DLZ.mjs.map +0 -1
  217. package/dist/chunk-CGFDS4XS.mjs +0 -121
  218. package/dist/chunk-CGFDS4XS.mjs.map +0 -1
  219. package/dist/chunk-CJIW5TKI.js +0 -139
  220. package/dist/chunk-CJIW5TKI.js.map +0 -1
  221. package/dist/chunk-CKNISJOQ.js +0 -314
  222. package/dist/chunk-CKNISJOQ.js.map +0 -1
  223. package/dist/chunk-D6CBOECS.mjs +0 -1757
  224. package/dist/chunk-D6CBOECS.mjs.map +0 -1
  225. package/dist/chunk-DDWEVC2S.js +0 -166
  226. package/dist/chunk-DDWEVC2S.js.map +0 -1
  227. package/dist/chunk-DZ556D2F.mjs +0 -176
  228. package/dist/chunk-DZ556D2F.mjs.map +0 -1
  229. package/dist/chunk-E2KQFV3O.mjs +0 -10
  230. package/dist/chunk-E2KQFV3O.mjs.map +0 -1
  231. package/dist/chunk-EMMLADSC.js +0 -126
  232. package/dist/chunk-EMMLADSC.js.map +0 -1
  233. package/dist/chunk-EP4WOI5D.mjs +0 -926
  234. package/dist/chunk-EP4WOI5D.mjs.map +0 -1
  235. package/dist/chunk-FJRXLJC2.mjs +0 -160
  236. package/dist/chunk-FJRXLJC2.mjs.map +0 -1
  237. package/dist/chunk-FKQI434R.js +0 -345
  238. package/dist/chunk-FKQI434R.js.map +0 -1
  239. package/dist/chunk-FPKEAJRZ.mjs +0 -100
  240. package/dist/chunk-FPKEAJRZ.mjs.map +0 -1
  241. package/dist/chunk-FWQYB22U.js +0 -183
  242. package/dist/chunk-FWQYB22U.js.map +0 -1
  243. package/dist/chunk-GD5GHTMA.js +0 -189
  244. package/dist/chunk-GD5GHTMA.js.map +0 -1
  245. package/dist/chunk-GE5XTSDZ.js +0 -447
  246. package/dist/chunk-GE5XTSDZ.js.map +0 -1
  247. package/dist/chunk-GVE47ZAX.mjs +0 -32
  248. package/dist/chunk-GVE47ZAX.mjs.map +0 -1
  249. package/dist/chunk-HK46BT5U.mjs +0 -18
  250. package/dist/chunk-HK46BT5U.mjs.map +0 -1
  251. package/dist/chunk-HQVRMR6N.js +0 -365
  252. package/dist/chunk-HQVRMR6N.js.map +0 -1
  253. package/dist/chunk-HSGBJPJO.mjs +0 -398
  254. package/dist/chunk-HSGBJPJO.mjs.map +0 -1
  255. package/dist/chunk-I3AUTOMZ.mjs +0 -125
  256. package/dist/chunk-I3AUTOMZ.mjs.map +0 -1
  257. package/dist/chunk-IEI5LD5C.mjs +0 -1161
  258. package/dist/chunk-IEI5LD5C.mjs.map +0 -1
  259. package/dist/chunk-IIPTC2X7.mjs +0 -118
  260. package/dist/chunk-IIPTC2X7.mjs.map +0 -1
  261. package/dist/chunk-J7TLHF2Q.js +0 -4
  262. package/dist/chunk-J7TLHF2Q.js.map +0 -1
  263. package/dist/chunk-JJOWXFXQ.mjs +0 -765
  264. package/dist/chunk-JJOWXFXQ.mjs.map +0 -1
  265. package/dist/chunk-JPTSS2OA.mjs +0 -3
  266. package/dist/chunk-JPTSS2OA.mjs.map +0 -1
  267. package/dist/chunk-KFXXRLTP.js +0 -396
  268. package/dist/chunk-KFXXRLTP.js.map +0 -1
  269. package/dist/chunk-KPRRBSG6.mjs +0 -272
  270. package/dist/chunk-KPRRBSG6.mjs.map +0 -1
  271. package/dist/chunk-NFSBGRDB.mjs +0 -57
  272. package/dist/chunk-NFSBGRDB.mjs.map +0 -1
  273. package/dist/chunk-NGJVCFTM.js +0 -219
  274. package/dist/chunk-NGJVCFTM.js.map +0 -1
  275. package/dist/chunk-NSQ6MZJ6.mjs +0 -728
  276. package/dist/chunk-NSQ6MZJ6.mjs.map +0 -1
  277. package/dist/chunk-NYQYHT76.mjs +0 -296
  278. package/dist/chunk-NYQYHT76.mjs.map +0 -1
  279. package/dist/chunk-OLJJGI5B.js +0 -1193
  280. package/dist/chunk-OLJJGI5B.js.map +0 -1
  281. package/dist/chunk-Q3572X2J.js +0 -292
  282. package/dist/chunk-Q3572X2J.js.map +0 -1
  283. package/dist/chunk-QH7N7D4I.mjs +0 -210
  284. package/dist/chunk-QH7N7D4I.mjs.map +0 -1
  285. package/dist/chunk-R7XUIV25.js +0 -466
  286. package/dist/chunk-R7XUIV25.js.map +0 -1
  287. package/dist/chunk-RFFO4KPM.js +0 -135
  288. package/dist/chunk-RFFO4KPM.js.map +0 -1
  289. package/dist/chunk-RFX7QKA7.mjs +0 -180
  290. package/dist/chunk-RFX7QKA7.mjs.map +0 -1
  291. package/dist/chunk-SN5LFAP3.js +0 -940
  292. package/dist/chunk-SN5LFAP3.js.map +0 -1
  293. package/dist/chunk-T4COXKQ3.js +0 -24
  294. package/dist/chunk-T4COXKQ3.js.map +0 -1
  295. package/dist/chunk-TS54QM27.js +0 -125
  296. package/dist/chunk-TS54QM27.js.map +0 -1
  297. package/dist/chunk-UE2S4PCX.mjs +0 -220
  298. package/dist/chunk-UE2S4PCX.mjs.map +0 -1
  299. package/dist/chunk-UTW3QX2A.mjs +0 -282
  300. package/dist/chunk-UTW3QX2A.mjs.map +0 -1
  301. package/dist/chunk-V74LGMAE.js +0 -1767
  302. package/dist/chunk-V74LGMAE.js.map +0 -1
  303. package/dist/chunk-VIREG536.js +0 -12
  304. package/dist/chunk-VIREG536.js.map +0 -1
  305. package/dist/chunk-VY7M7346.js +0 -4
  306. package/dist/chunk-VY7M7346.js.map +0 -1
  307. package/dist/chunk-W3TJOO7H.mjs +0 -319
  308. package/dist/chunk-W3TJOO7H.mjs.map +0 -1
  309. package/dist/chunk-WIUOB36M.js +0 -54
  310. package/dist/chunk-WIUOB36M.js.map +0 -1
  311. package/dist/chunk-WJGLM4CY.js +0 -291
  312. package/dist/chunk-WJGLM4CY.js.map +0 -1
  313. package/dist/chunk-WNURH5OO.mjs +0 -453
  314. package/dist/chunk-WNURH5OO.mjs.map +0 -1
  315. package/dist/chunk-X25TNRSD.mjs +0 -364
  316. package/dist/chunk-X25TNRSD.mjs.map +0 -1
  317. package/dist/chunk-Y3GT7ETK.js +0 -108
  318. package/dist/chunk-Y3GT7ETK.js.map +0 -1
  319. package/dist/chunk-Z4FRNOF6.mjs +0 -115
  320. package/dist/chunk-Z4FRNOF6.mjs.map +0 -1
  321. package/dist/chunk-ZMYLD3BN.js +0 -166
  322. package/dist/chunk-ZMYLD3BN.js.map +0 -1
  323. package/dist/chunk-ZP2KV6EX.js +0 -815
  324. package/dist/chunk-ZP2KV6EX.js.map +0 -1
  325. package/dist/chunk-ZVKXFELU.js +0 -366
  326. package/dist/chunk-ZVKXFELU.js.map +0 -1
@@ -1,54 +1,823 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
- var chunkHQVRMR6N_js = require('../../chunk-HQVRMR6N.js');
4
- require('../../chunk-GD5GHTMA.js');
5
- require('../../chunk-3YOY2VJ6.js');
6
- require('../../chunk-Y3GT7ETK.js');
7
- require('../../chunk-B5Q4UPL6.js');
8
- require('../../chunk-VIREG536.js');
9
- require('../../chunk-T4COXKQ3.js');
4
+ var zod = require('zod');
5
+ var react = require('react');
6
+ var classVarianceAuthority = require('class-variance-authority');
7
+ var lucideReact = require('lucide-react');
8
+ var clsx = require('clsx');
9
+ var tailwindMerge = require('tailwind-merge');
10
+ var reactAriaComponents = require('react-aria-components');
11
+ var jsxRuntime = require('react/jsx-runtime');
10
12
 
11
-
12
-
13
- Object.defineProperty(exports, "BreadcrumbItemDataSchema", {
14
- enumerable: true,
15
- get: function () { return chunkHQVRMR6N_js.BreadcrumbItemDataSchema; }
13
+ // src/elements/Breadcrumbs/Breadcrumbs.types.ts
14
+ var BaseComponentPropsSchema = zod.z.object({
15
+ // Styling
16
+ className: zod.z.string().optional(),
17
+ // React
18
+ children: zod.z.any().optional(),
19
+ // ReactNode not directly supported by Zod
20
+ id: zod.z.string().optional(),
21
+ // Accessibility (WCAG 2.2 AA requirements)
22
+ "aria-label": zod.z.string().optional(),
23
+ "aria-labelledby": zod.z.string().optional(),
24
+ "aria-describedby": zod.z.string().optional(),
25
+ "aria-live": zod.z.enum(["off", "polite", "assertive"]).optional(),
26
+ "aria-hidden": zod.z.boolean().optional(),
27
+ // Testing & Development
28
+ "data-testid": zod.z.string().optional()
16
29
  });
17
- Object.defineProperty(exports, "Breadcrumbs", {
18
- enumerable: true,
19
- get: function () { return chunkHQVRMR6N_js.Breadcrumbs; }
30
+
31
+ // src/elements/Breadcrumbs/Breadcrumbs.types.ts
32
+ var BreadcrumbItemDataSchema = zod.z.object({
33
+ /** Unique identifier for the breadcrumb item */
34
+ id: zod.z.union([zod.z.string(), zod.z.number()]),
35
+ /** Display text for the breadcrumb (required - no icon-only items) */
36
+ label: zod.z.string(),
37
+ /** Link URL - omit for non-navigable items */
38
+ href: zod.z.string().optional(),
39
+ /** Optional leading icon (ReactNode) */
40
+ icon: zod.z.custom().optional(),
41
+ /** Disable this specific breadcrumb link */
42
+ isDisabled: zod.z.boolean().optional().default(false)
20
43
  });
21
- Object.defineProperty(exports, "BreadcrumbsPropsSchema", {
22
- enumerable: true,
23
- get: function () { return chunkHQVRMR6N_js.BreadcrumbsPropsSchema; }
44
+ var SeparatorTypeSchema = zod.z.union([
45
+ zod.z.literal("chevron"),
46
+ zod.z.literal("slash"),
47
+ zod.z.custom()
48
+ ]);
49
+ var BreadcrumbsPropsSchema = BaseComponentPropsSchema.extend({
50
+ /**
51
+ * Array of breadcrumb items to render
52
+ * @see FR-001 (Render Breadcrumbs from Items Array)
53
+ */
54
+ items: zod.z.array(BreadcrumbItemDataSchema),
55
+ /**
56
+ * Separator style between items
57
+ * @default 'chevron'
58
+ * @see FR-003 (Configurable Separators)
59
+ */
60
+ separator: SeparatorTypeSchema.optional().default("chevron"),
61
+ /**
62
+ * Maximum items to show before collapsing
63
+ * @default 4
64
+ * @see FR-004 (Ellipsis Collapse for Overflow)
65
+ */
66
+ maxItems: zod.z.number().int().positive().optional().default(4),
67
+ /**
68
+ * Number of items to show before ellipsis
69
+ * @default 1
70
+ * @see FR-004 (Ellipsis Collapse for Overflow)
71
+ */
72
+ itemsBeforeCollapse: zod.z.number().int().nonnegative().optional().default(1),
73
+ /**
74
+ * Number of items to show after ellipsis
75
+ * @default 2
76
+ * @see FR-004 (Ellipsis Collapse for Overflow)
77
+ */
78
+ itemsAfterCollapse: zod.z.number().int().positive().optional().default(2),
79
+ /**
80
+ * Custom link component for framework integration (Next.js Link, React Router Link, etc.)
81
+ * @default 'a'
82
+ * @see FR-005 (Polymorphic Link Component)
83
+ */
84
+ linkComponent: zod.z.custom().optional(),
85
+ /**
86
+ * Disable all breadcrumb links
87
+ * @default false
88
+ * @see FR-006 (Disabled States)
89
+ */
90
+ isDisabled: zod.z.boolean().optional().default(false)
24
91
  });
25
- Object.defineProperty(exports, "SeparatorTypeSchema", {
26
- enumerable: true,
27
- get: function () { return chunkHQVRMR6N_js.SeparatorTypeSchema; }
92
+ function cn(...inputs) {
93
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
94
+ }
95
+ var menuVariants = classVarianceAuthority.cva(
96
+ // Base styles - semantic tokens with fallbacks
97
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--menu-border)] bg-[var(--menu-background)] text-[var(--menu-foreground)] shadow-md data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[entering]:zoom-in-95 data-[exiting]:zoom-out-95 p-1",
98
+ {
99
+ variants: {
100
+ variant: {
101
+ default: ""
102
+ }
103
+ },
104
+ defaultVariants: {
105
+ variant: "default"
106
+ }
107
+ }
108
+ );
109
+ var menuItemVariants = classVarianceAuthority.cva(
110
+ // Base styles - FR-014: 44x44px minimum touch targets
111
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 min-h-[44px] data-[focused]:bg-[var(--menu-accent)] data-[focused]:text-[var(--menu-accent-foreground)] data-[pressed]:bg-[var(--menu-accent)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
112
+ {
113
+ variants: {
114
+ variant: {
115
+ default: ""
116
+ }
117
+ },
118
+ defaultVariants: {
119
+ variant: "default"
120
+ }
121
+ }
122
+ );
123
+ var DropdownRoot = react.forwardRef(
124
+ ({ defaultOpen = false, isOpen, onOpenChange, children }, _ref) => {
125
+ const childArray = react.Children.toArray(children);
126
+ const hasTrigger = childArray.some(
127
+ (child) => react.isValidElement(child) && (child.type === DropdownTrigger || child.type.displayName === "DropdownTrigger")
128
+ );
129
+ const hasMenu = childArray.some(
130
+ (child) => react.isValidElement(child) && (child.type === DropdownMenu || child.type.displayName === "DropdownMenu")
131
+ );
132
+ if (!hasTrigger || !hasMenu) {
133
+ throw new Error(
134
+ "Dropdown requires exactly one Dropdown.Trigger and one Dropdown.Menu as children"
135
+ );
136
+ }
137
+ return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.MenuTrigger, { defaultOpen, isOpen, onOpenChange, children });
138
+ }
139
+ );
140
+ DropdownRoot.displayName = "Dropdown";
141
+ var DropdownTrigger = react.forwardRef(
142
+ ({ children, ...props }, ref) => {
143
+ if (react.isValidElement(children)) {
144
+ return react.cloneElement(children, {
145
+ ...props,
146
+ slot: "trigger"
147
+ });
148
+ }
149
+ return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Button, { ref, ...props, children });
150
+ }
151
+ );
152
+ DropdownTrigger.displayName = "DropdownTrigger";
153
+ var DropdownMenu = react.forwardRef(
154
+ ({ align = "start", side = "bottom", className, children, ...props }, _ref) => {
155
+ const placement = `${side} ${align}`;
156
+ return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Popover, { placement, className: "entering:animate-in exiting:animate-out", children: /* @__PURE__ */ jsxRuntime.jsx(
157
+ reactAriaComponents.Menu,
158
+ {
159
+ className: cn(menuVariants({ variant: "default" }), className),
160
+ ...props,
161
+ children
162
+ }
163
+ ) });
164
+ }
165
+ );
166
+ DropdownMenu.displayName = "DropdownMenu";
167
+ var DropdownItem = react.forwardRef(
168
+ ({
169
+ children,
170
+ onAction,
171
+ isDisabled = false,
172
+ shortcut,
173
+ icon,
174
+ iconRight,
175
+ className,
176
+ "aria-label": ariaLabel,
177
+ ...props
178
+ }, _ref) => {
179
+ const childArray = react.Children.toArray(children);
180
+ const hasSubmenu = childArray.some(
181
+ (child) => react.isValidElement(child) && (child.type === DropdownMenu || child.type.displayName === "DropdownMenu")
182
+ );
183
+ const contentChildren = childArray.filter(
184
+ (child) => !react.isValidElement(child) || child.type !== DropdownMenu && child.type.displayName !== "DropdownMenu"
185
+ );
186
+ const submenu = childArray.find(
187
+ (child) => react.isValidElement(child) && (child.type === DropdownMenu || child.type.displayName === "DropdownMenu")
188
+ );
189
+ if (hasSubmenu && submenu) {
190
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactAriaComponents.SubmenuTrigger, { children: [
191
+ /* @__PURE__ */ jsxRuntime.jsxs(
192
+ reactAriaComponents.MenuItem,
193
+ {
194
+ "aria-label": ariaLabel,
195
+ className: cn(menuItemVariants({ variant: "default" }), className),
196
+ ...props,
197
+ children: [
198
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2", children: icon }),
199
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children: contentChildren }),
200
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4", "aria-hidden": "true" })
201
+ ]
202
+ }
203
+ ),
204
+ submenu
205
+ ] });
206
+ }
207
+ return /* @__PURE__ */ jsxRuntime.jsxs(
208
+ reactAriaComponents.MenuItem,
209
+ {
210
+ onAction,
211
+ isDisabled,
212
+ "aria-label": ariaLabel,
213
+ className: cn(menuItemVariants({ variant: "default" }), className),
214
+ ...props,
215
+ children: [
216
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2", children: icon }),
217
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children }),
218
+ iconRight && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto", children: iconRight }),
219
+ shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-[var(--border)] bg-[var(--accent-background)] px-1.5 font-mono text-[10px] font-medium text-[var(--menu-muted)] opacity-100", children: shortcut })
220
+ ]
221
+ }
222
+ );
223
+ }
224
+ );
225
+ DropdownItem.displayName = "DropdownItem";
226
+ var DropdownSeparator = react.memo(react.forwardRef(
227
+ ({ className, ...props }, _ref) => {
228
+ return /* @__PURE__ */ jsxRuntime.jsx(
229
+ reactAriaComponents.Separator,
230
+ {
231
+ className: cn(
232
+ "-mx-1 my-1 h-px bg-[var(--accent-background)]",
233
+ className
234
+ ),
235
+ ...props
236
+ }
237
+ );
238
+ }
239
+ ));
240
+ DropdownSeparator.displayName = "DropdownSeparator";
241
+ var DropdownLabel = react.memo(react.forwardRef(
242
+ ({ children, className, ...props }, _ref) => {
243
+ return /* @__PURE__ */ jsxRuntime.jsx(
244
+ reactAriaComponents.Header,
245
+ {
246
+ className: cn(
247
+ "px-2 py-1.5 text-sm font-semibold text-[var(--menu-muted)]",
248
+ className
249
+ ),
250
+ ...props,
251
+ children
252
+ }
253
+ );
254
+ }
255
+ ));
256
+ DropdownLabel.displayName = "DropdownLabel";
257
+ var Dropdown = Object.assign(DropdownRoot, {
258
+ Trigger: DropdownTrigger,
259
+ Menu: DropdownMenu,
260
+ Item: DropdownItem,
261
+ Separator: DropdownSeparator,
262
+ Label: DropdownLabel
28
263
  });
29
- Object.defineProperty(exports, "breadcrumbItemVariants", {
30
- enumerable: true,
31
- get: function () { return chunkHQVRMR6N_js.breadcrumbItemVariants; }
264
+ var PRESSED_STYLES = "data-[pressed]:scale-[0.97]";
265
+ var HOVER_STYLES = "data-[hovered]:shadow-md";
266
+ var HIGH_CONTRAST_HOVER = "hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground";
267
+ var HIGH_CONTRAST_PRESSED = "hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";
268
+ var ButtonGroupContext = react.createContext(null);
269
+ ButtonGroupContext.displayName = "ButtonGroupContext";
270
+ function useButtonGroupContext() {
271
+ return react.useContext(ButtonGroupContext);
272
+ }
273
+ var ButtonGroupItemContext = react.createContext(null);
274
+ ButtonGroupItemContext.displayName = "ButtonGroupItemContext";
275
+ function useButtonGroupItemContext() {
276
+ return react.useContext(ButtonGroupItemContext);
277
+ }
278
+ classVarianceAuthority.cva("inline-flex items-center gap-0", {
279
+ variants: {
280
+ orientation: {
281
+ horizontal: "flex-row",
282
+ vertical: "flex-col w-full"
283
+ }
284
+ },
285
+ defaultVariants: {
286
+ orientation: "horizontal"
287
+ }
32
288
  });
33
- Object.defineProperty(exports, "breadcrumbLinkVariants", {
34
- enumerable: true,
35
- get: function () { return chunkHQVRMR6N_js.breadcrumbLinkVariants; }
289
+ var buttonGroupItemVariants = classVarianceAuthority.cva("", {
290
+ variants: {
291
+ orientation: {
292
+ // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)
293
+ horizontal: "min-w-[44px]",
294
+ // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,
295
+ // eliminating gaps between stacked buttons in vertical orientation
296
+ vertical: "flex min-h-[44px]"
297
+ },
298
+ position: {
299
+ first: "",
300
+ middle: "",
301
+ last: "",
302
+ only: ""
303
+ // Single button - no modifications needed
304
+ }
305
+ },
306
+ compoundVariants: [
307
+ // ==========================================================================
308
+ // Horizontal Orientation
309
+ // ==========================================================================
310
+ {
311
+ orientation: "horizontal",
312
+ position: "first",
313
+ className: "rounded-r-none border-r-0"
314
+ },
315
+ {
316
+ orientation: "horizontal",
317
+ position: "middle",
318
+ className: "rounded-none border-r-0"
319
+ },
320
+ {
321
+ orientation: "horizontal",
322
+ position: "last",
323
+ className: "rounded-l-none"
324
+ },
325
+ // ==========================================================================
326
+ // Vertical Orientation
327
+ // Note: w-full is handled by Button's effectiveFullWidth for both layers
328
+ // ==========================================================================
329
+ {
330
+ orientation: "vertical",
331
+ position: "first",
332
+ className: "rounded-b-none border-b-0"
333
+ },
334
+ {
335
+ orientation: "vertical",
336
+ position: "middle",
337
+ className: "rounded-none border-b-0"
338
+ },
339
+ {
340
+ orientation: "vertical",
341
+ position: "last",
342
+ className: "rounded-t-none"
343
+ }
344
+ ],
345
+ defaultVariants: {
346
+ orientation: "horizontal",
347
+ position: "only"
348
+ }
36
349
  });
37
- Object.defineProperty(exports, "breadcrumbListVariants", {
38
- enumerable: true,
39
- get: function () { return chunkHQVRMR6N_js.breadcrumbListVariants; }
350
+ classVarianceAuthority.cva("bg-[var(--border)]", {
351
+ variants: {
352
+ orientation: {
353
+ horizontal: "w-px h-6 mx-1",
354
+ vertical: "h-px w-full my-1"
355
+ }
356
+ },
357
+ defaultVariants: {
358
+ orientation: "horizontal"
359
+ }
40
360
  });
41
- Object.defineProperty(exports, "breadcrumbsVariants", {
42
- enumerable: true,
43
- get: function () { return chunkHQVRMR6N_js.breadcrumbsVariants; }
361
+ var buttonOuterVariants = classVarianceAuthority.cva(
362
+ "inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
363
+ {
364
+ variants: {
365
+ fullWidth: {
366
+ true: "w-full",
367
+ false: ""
368
+ },
369
+ inVerticalGroup: {
370
+ true: "items-stretch",
371
+ false: "items-center"
372
+ }
373
+ },
374
+ defaultVariants: {
375
+ fullWidth: false,
376
+ inVerticalGroup: false
377
+ }
378
+ }
379
+ );
380
+ var buttonVisualVariants = classVarianceAuthority.cva(
381
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",
382
+ {
383
+ variants: {
384
+ variant: {
385
+ default: "bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",
386
+ destructive: "bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",
387
+ outline: "border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",
388
+ secondary: "bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",
389
+ ghost: "hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",
390
+ link: "text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"
391
+ },
392
+ fullWidth: {
393
+ true: "w-full",
394
+ false: ""
395
+ },
396
+ visualSize: {
397
+ default: "h-10 px-4 py-2",
398
+ sm: "h-9 rounded-md px-3 text-xs",
399
+ lg: "h-11 rounded-md px-8",
400
+ icon: "h-10 w-10",
401
+ dot: "h-5 w-5 rounded-full p-0 min-h-0 min-w-0"
402
+ },
403
+ paywall: {
404
+ true: "!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",
405
+ false: ""
406
+ }
407
+ },
408
+ defaultVariants: {
409
+ variant: "default",
410
+ visualSize: "default",
411
+ paywall: false
412
+ }
413
+ }
414
+ );
415
+ var Button = react.memo(react.forwardRef(
416
+ ({
417
+ className,
418
+ buttonVisualClassName,
419
+ variant,
420
+ size,
421
+ visualSize,
422
+ fullWidth,
423
+ loading = false,
424
+ loadingText = "Loading...",
425
+ shortcut,
426
+ children,
427
+ isDisabled,
428
+ paywall = false,
429
+ paywallRedirect,
430
+ paywallDescription,
431
+ onPress,
432
+ ...props
433
+ }, ref) => {
434
+ const paywallDescriptionId = react.useId();
435
+ const groupContext = useButtonGroupContext();
436
+ const itemContext = useButtonGroupItemContext();
437
+ const effectiveVariant = variant ?? groupContext?.variant ?? "default";
438
+ const effectiveSize = size ?? groupContext?.size;
439
+ const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;
440
+ const isInVerticalGroup = groupContext?.orientation === "vertical";
441
+ const effectiveFullWidth = fullWidth || isInVerticalGroup;
442
+ const positionClassName = itemContext ? buttonGroupItemVariants({
443
+ orientation: groupContext?.orientation ?? "horizontal",
444
+ position: itemContext.position
445
+ }) : "";
446
+ const effectiveVisualSize = visualSize ?? effectiveSize ?? "default";
447
+ if (process.env.NODE_ENV !== "production") {
448
+ if ((effectiveVisualSize === "dot" || effectiveVisualSize === "icon") && !props["aria-label"] && !children) {
449
+ console.warn(
450
+ '[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'
451
+ );
452
+ }
453
+ }
454
+ const handlePress = (e) => {
455
+ if (paywall) {
456
+ if (paywallRedirect) {
457
+ window.open(paywallRedirect, "_blank", "noopener,noreferrer");
458
+ }
459
+ return;
460
+ }
461
+ onPress?.(e);
462
+ };
463
+ const computedIsDisabled = effectiveIsDisabled || loading || void 0;
464
+ return /* @__PURE__ */ jsxRuntime.jsx(
465
+ reactAriaComponents.Button,
466
+ {
467
+ ref,
468
+ isDisabled: computedIsDisabled,
469
+ "aria-disabled": paywall ? true : void 0,
470
+ "aria-describedby": paywall ? paywallDescriptionId : void 0,
471
+ onPress: handlePress,
472
+ className: cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className),
473
+ ...props,
474
+ children: (renderProps) => (
475
+ /* Layer 2: Visual Button */
476
+ /* @__PURE__ */ jsxRuntime.jsxs(
477
+ "span",
478
+ {
479
+ className: cn(
480
+ buttonVisualVariants({
481
+ variant: effectiveVariant,
482
+ visualSize: effectiveVisualSize,
483
+ paywall,
484
+ fullWidth: effectiveFullWidth
485
+ }),
486
+ // Position styling from ButtonGroup context (border-radius adjustments)
487
+ positionClassName,
488
+ buttonVisualClassName,
489
+ // Layer 2 interaction styles (no focus - focus ring is on Layer 1)
490
+ PRESSED_STYLES,
491
+ HOVER_STYLES,
492
+ HIGH_CONTRAST_HOVER,
493
+ HIGH_CONTRAST_PRESSED
494
+ ),
495
+ "data-pressed": renderProps.isPressed || void 0,
496
+ children: [
497
+ loading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
498
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
499
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: loadingText })
500
+ ] }),
501
+ !loading && children,
502
+ paywall && /* @__PURE__ */ jsxRuntime.jsx(
503
+ lucideReact.Zap,
504
+ {
505
+ "data-testid": "zap-icon",
506
+ "aria-hidden": "true",
507
+ className: "ml-1"
508
+ }
509
+ ),
510
+ paywall && /* @__PURE__ */ jsxRuntime.jsxs("span", { id: paywallDescriptionId, className: "sr-only", children: [
511
+ "Premium feature: ",
512
+ paywallDescription || "Upgrade required to access this feature"
513
+ ] }),
514
+ renderProps.isFocusVisible && shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "ml-auto hidden text-xs opacity-60 lg:inline", children: shortcut }),
515
+ renderProps.isPressed && /* @__PURE__ */ jsxRuntime.jsx(
516
+ "span",
517
+ {
518
+ className: "absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95",
519
+ "aria-hidden": "true"
520
+ }
521
+ )
522
+ ]
523
+ }
524
+ )
525
+ )
526
+ }
527
+ );
528
+ }
529
+ ));
530
+ Button.displayName = "Button";
531
+ var breadcrumbsVariants = classVarianceAuthority.cva("flex items-center flex-wrap", {
532
+ variants: {},
533
+ defaultVariants: {}
44
534
  });
45
- Object.defineProperty(exports, "ellipsisButtonVariants", {
46
- enumerable: true,
47
- get: function () { return chunkHQVRMR6N_js.ellipsisButtonVariants; }
535
+ var breadcrumbListVariants = classVarianceAuthority.cva(
536
+ "flex flex-wrap items-center gap-1 break-words text-sm text-[var(--menu-muted)]",
537
+ {
538
+ variants: {},
539
+ defaultVariants: {}
540
+ }
541
+ );
542
+ var breadcrumbItemVariants = classVarianceAuthority.cva("inline-flex items-center gap-1", {
543
+ variants: {},
544
+ defaultVariants: {}
48
545
  });
49
- Object.defineProperty(exports, "separatorVariants", {
50
- enumerable: true,
51
- get: function () { return chunkHQVRMR6N_js.separatorVariants; }
546
+ var breadcrumbLinkVariants = classVarianceAuthority.cva(
547
+ "inline-flex items-center gap-2 min-h-[44px] px-2 rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
548
+ {
549
+ variants: {
550
+ state: {
551
+ default: [
552
+ "text-[var(--menu-muted)]",
553
+ "hover:text-[var(--content-foreground)]",
554
+ "hover:underline underline-offset-4"
555
+ ].join(" "),
556
+ current: "text-[var(--content-foreground)] font-medium pointer-events-none",
557
+ disabled: "text-[var(--menu-muted)] opacity-50 cursor-not-allowed pointer-events-none"
558
+ }
559
+ },
560
+ defaultVariants: {
561
+ state: "default"
562
+ }
563
+ }
564
+ );
565
+ var separatorVariants = classVarianceAuthority.cva("text-[var(--menu-muted)]", {
566
+ variants: {
567
+ type: {
568
+ chevron: "[&>svg]:h-4 [&>svg]:w-4",
569
+ slash: "mx-2",
570
+ custom: ""
571
+ }
572
+ },
573
+ defaultVariants: {
574
+ type: "chevron"
575
+ }
52
576
  });
577
+ var ellipsisButtonVariants = classVarianceAuthority.cva(
578
+ "inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 hover:bg-[var(--accent)]",
579
+ {
580
+ variants: {},
581
+ defaultVariants: {}
582
+ }
583
+ );
584
+ function isCurrentPage(index, total) {
585
+ return index === total - 1;
586
+ }
587
+ function getCollapsedItems(items, maxItems, itemsBeforeCollapse, itemsAfterCollapse) {
588
+ if (items.length <= maxItems) {
589
+ return null;
590
+ }
591
+ if (itemsBeforeCollapse + itemsAfterCollapse >= items.length) {
592
+ return null;
593
+ }
594
+ const before = items.slice(0, itemsBeforeCollapse);
595
+ const after = items.slice(-itemsAfterCollapse);
596
+ const collapsed = items.slice(itemsBeforeCollapse, items.length - itemsAfterCollapse);
597
+ return { before, collapsed, after };
598
+ }
599
+ function BreadcrumbSeparator({ separator }) {
600
+ if (separator === "chevron") {
601
+ return /* @__PURE__ */ jsxRuntime.jsx(
602
+ "li",
603
+ {
604
+ role: "presentation",
605
+ "aria-hidden": "true",
606
+ className: separatorVariants({ type: "chevron" }),
607
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, {})
608
+ }
609
+ );
610
+ }
611
+ if (separator === "slash") {
612
+ return /* @__PURE__ */ jsxRuntime.jsx(
613
+ "li",
614
+ {
615
+ role: "presentation",
616
+ "aria-hidden": "true",
617
+ className: separatorVariants({ type: "slash" }),
618
+ children: "/"
619
+ }
620
+ );
621
+ }
622
+ return /* @__PURE__ */ jsxRuntime.jsx(
623
+ "li",
624
+ {
625
+ role: "presentation",
626
+ "aria-hidden": "true",
627
+ className: separatorVariants({ type: "custom" }),
628
+ children: separator
629
+ }
630
+ );
631
+ }
632
+ function BreadcrumbLink({
633
+ item,
634
+ isCurrent,
635
+ linkComponent: LinkComponent = "a",
636
+ isGroupDisabled
637
+ }) {
638
+ const isDisabled = isGroupDisabled || item.isDisabled;
639
+ const state = isCurrent ? "current" : isDisabled ? "disabled" : "default";
640
+ if (isCurrent) {
641
+ return /* @__PURE__ */ jsxRuntime.jsxs(
642
+ "span",
643
+ {
644
+ className: breadcrumbLinkVariants({ state: "current" }),
645
+ "aria-current": "page",
646
+ children: [
647
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: item.icon }),
648
+ item.label
649
+ ]
650
+ }
651
+ );
652
+ }
653
+ if (!item.href) {
654
+ return /* @__PURE__ */ jsxRuntime.jsxs(
655
+ "span",
656
+ {
657
+ className: breadcrumbLinkVariants({ state: isDisabled ? "disabled" : "default" }),
658
+ "aria-disabled": isDisabled || void 0,
659
+ children: [
660
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: item.icon }),
661
+ item.label
662
+ ]
663
+ }
664
+ );
665
+ }
666
+ return /* @__PURE__ */ jsxRuntime.jsxs(
667
+ LinkComponent,
668
+ {
669
+ href: item.href,
670
+ className: breadcrumbLinkVariants({ state }),
671
+ "aria-disabled": isDisabled || void 0,
672
+ children: [
673
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: item.icon }),
674
+ item.label
675
+ ]
676
+ }
677
+ );
678
+ }
679
+ function BreadcrumbEllipsis({
680
+ items,
681
+ linkComponent: LinkComponent = "a",
682
+ isGroupDisabled
683
+ }) {
684
+ return /* @__PURE__ */ jsxRuntime.jsxs(Dropdown, { defaultOpen: false, children: [
685
+ /* @__PURE__ */ jsxRuntime.jsx(Dropdown.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
686
+ Button,
687
+ {
688
+ variant: "ghost",
689
+ size: "icon",
690
+ className: ellipsisButtonVariants(),
691
+ "aria-label": "More breadcrumbs",
692
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" })
693
+ }
694
+ ) }),
695
+ /* @__PURE__ */ jsxRuntime.jsx(Dropdown.Menu, { align: "start", side: "bottom", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
696
+ Dropdown.Item,
697
+ {
698
+ isDisabled: isGroupDisabled || item.isDisabled,
699
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
700
+ LinkComponent,
701
+ {
702
+ href: item.href,
703
+ className: "flex flex-1 items-center gap-2",
704
+ children: [
705
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: item.icon }),
706
+ item.label
707
+ ]
708
+ }
709
+ )
710
+ },
711
+ item.id
712
+ )) })
713
+ ] });
714
+ }
715
+ var Breadcrumbs = react.forwardRef(
716
+ ({
717
+ items,
718
+ separator = "chevron",
719
+ maxItems = 4,
720
+ itemsBeforeCollapse = 1,
721
+ itemsAfterCollapse = 2,
722
+ linkComponent,
723
+ isDisabled,
724
+ className,
725
+ "aria-label": ariaLabel = "Breadcrumb",
726
+ ...props
727
+ }, ref) => {
728
+ if (!items || items.length === 0) {
729
+ return null;
730
+ }
731
+ const collapsedData = getCollapsedItems(
732
+ items,
733
+ maxItems,
734
+ itemsBeforeCollapse,
735
+ itemsAfterCollapse
736
+ );
737
+ if (!collapsedData) {
738
+ return /* @__PURE__ */ jsxRuntime.jsx(
739
+ "nav",
740
+ {
741
+ ref,
742
+ "aria-label": ariaLabel,
743
+ className: cn(breadcrumbsVariants(), className),
744
+ ...props,
745
+ children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: breadcrumbListVariants(), children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
746
+ /* @__PURE__ */ jsxRuntime.jsx("li", { className: breadcrumbItemVariants(), children: /* @__PURE__ */ jsxRuntime.jsx(
747
+ BreadcrumbLink,
748
+ {
749
+ item,
750
+ isCurrent: isCurrentPage(index, items.length),
751
+ linkComponent,
752
+ isGroupDisabled: isDisabled
753
+ }
754
+ ) }),
755
+ index < items.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, { separator })
756
+ ] }, item.id)) })
757
+ }
758
+ );
759
+ }
760
+ return /* @__PURE__ */ jsxRuntime.jsx(
761
+ "nav",
762
+ {
763
+ ref,
764
+ "aria-label": ariaLabel,
765
+ className: cn(breadcrumbsVariants(), className),
766
+ ...props,
767
+ children: /* @__PURE__ */ jsxRuntime.jsxs("ol", { className: breadcrumbListVariants(), children: [
768
+ collapsedData.before.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
769
+ /* @__PURE__ */ jsxRuntime.jsx("li", { className: breadcrumbItemVariants(), children: /* @__PURE__ */ jsxRuntime.jsx(
770
+ BreadcrumbLink,
771
+ {
772
+ item,
773
+ isCurrent: false,
774
+ linkComponent,
775
+ isGroupDisabled: isDisabled
776
+ }
777
+ ) }),
778
+ /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, { separator })
779
+ ] }, item.id)),
780
+ /* @__PURE__ */ jsxRuntime.jsx("li", { className: breadcrumbItemVariants(), children: /* @__PURE__ */ jsxRuntime.jsx(
781
+ BreadcrumbEllipsis,
782
+ {
783
+ items: collapsedData.collapsed,
784
+ linkComponent,
785
+ isGroupDisabled: isDisabled
786
+ }
787
+ ) }),
788
+ /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, { separator }),
789
+ collapsedData.after.map((item, index) => {
790
+ const isLast = index === collapsedData.after.length - 1;
791
+ const globalIndex = items.length - collapsedData.after.length + index;
792
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
793
+ /* @__PURE__ */ jsxRuntime.jsx("li", { className: breadcrumbItemVariants(), children: /* @__PURE__ */ jsxRuntime.jsx(
794
+ BreadcrumbLink,
795
+ {
796
+ item,
797
+ isCurrent: isCurrentPage(globalIndex, items.length),
798
+ linkComponent,
799
+ isGroupDisabled: isDisabled
800
+ }
801
+ ) }),
802
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, { separator })
803
+ ] }, item.id);
804
+ })
805
+ ] })
806
+ }
807
+ );
808
+ }
809
+ );
810
+ Breadcrumbs.displayName = "Breadcrumbs";
811
+
812
+ exports.BreadcrumbItemDataSchema = BreadcrumbItemDataSchema;
813
+ exports.Breadcrumbs = Breadcrumbs;
814
+ exports.BreadcrumbsPropsSchema = BreadcrumbsPropsSchema;
815
+ exports.SeparatorTypeSchema = SeparatorTypeSchema;
816
+ exports.breadcrumbItemVariants = breadcrumbItemVariants;
817
+ exports.breadcrumbLinkVariants = breadcrumbLinkVariants;
818
+ exports.breadcrumbListVariants = breadcrumbListVariants;
819
+ exports.breadcrumbsVariants = breadcrumbsVariants;
820
+ exports.ellipsisButtonVariants = ellipsisButtonVariants;
821
+ exports.separatorVariants = separatorVariants;
53
822
  //# sourceMappingURL=index.js.map
54
823
  //# sourceMappingURL=index.js.map