@pihanga2/shadcn 0.1.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 (399) hide show
  1. package/README.md +114 -0
  2. package/cards/badge/badge.component.d.ts +14 -0
  3. package/cards/badge/badge.component.js +18 -0
  4. package/cards/badge/badge.component.js.map +1 -0
  5. package/cards/badge/badge.types.d.ts +37 -0
  6. package/cards/badge/badge.types.js +7 -0
  7. package/cards/badge/badge.types.js.map +1 -0
  8. package/cards/badge/index.d.ts +1 -0
  9. package/cards/badge/index.js +12 -0
  10. package/cards/badge/index.js.map +1 -0
  11. package/cards/box/box.component.d.ts +4 -0
  12. package/cards/box/box.component.js +24 -0
  13. package/cards/box/box.component.js.map +1 -0
  14. package/cards/box/box.types.d.ts +71 -0
  15. package/cards/box/box.types.js +7 -0
  16. package/cards/box/box.types.js.map +1 -0
  17. package/cards/box/index.d.ts +1 -0
  18. package/cards/box/index.js +12 -0
  19. package/cards/box/index.js.map +1 -0
  20. package/cards/button/button.component.d.ts +4 -0
  21. package/cards/button/button.component.js +71 -0
  22. package/cards/button/button.component.js.map +1 -0
  23. package/cards/button/button.types.d.ts +106 -0
  24. package/cards/button/button.types.js +7 -0
  25. package/cards/button/button.types.js.map +1 -0
  26. package/cards/button/index.d.ts +1 -0
  27. package/cards/button/index.js +13 -0
  28. package/cards/button/index.js.map +1 -0
  29. package/cards/checkbox/checkbox.component.d.ts +4 -0
  30. package/cards/checkbox/checkbox.component.js +36 -0
  31. package/cards/checkbox/checkbox.component.js.map +1 -0
  32. package/cards/checkbox/checkbox.types.d.ts +37 -0
  33. package/cards/checkbox/checkbox.types.js +7 -0
  34. package/cards/checkbox/checkbox.types.js.map +1 -0
  35. package/cards/checkbox/index.d.ts +1 -0
  36. package/cards/checkbox/index.js +13 -0
  37. package/cards/checkbox/index.js.map +1 -0
  38. package/cards/conditional/conditional.component.d.ts +11 -0
  39. package/cards/conditional/conditional.component.js +15 -0
  40. package/cards/conditional/conditional.component.js.map +1 -0
  41. package/cards/conditional/conditional.types.d.ts +29 -0
  42. package/cards/conditional/conditional.types.js +7 -0
  43. package/cards/conditional/conditional.types.js.map +1 -0
  44. package/cards/conditional/index.d.ts +1 -0
  45. package/cards/conditional/index.js +12 -0
  46. package/cards/conditional/index.js.map +1 -0
  47. package/cards/core-index.d.ts +30 -0
  48. package/cards/core-index.js +61 -0
  49. package/cards/dataTable/dataTable.component.d.ts +4 -0
  50. package/cards/dataTable/dataTable.component.js +209 -0
  51. package/cards/dataTable/dataTable.component.js.map +1 -0
  52. package/cards/dataTable/dataTable.types.d.ts +196 -0
  53. package/cards/dataTable/dataTable.types.js +13 -0
  54. package/cards/dataTable/dataTable.types.js.map +1 -0
  55. package/cards/dataTable/dataTableRowDetail.component.d.ts +26 -0
  56. package/cards/dataTable/dataTableRowDetail.component.js +47 -0
  57. package/cards/dataTable/dataTableRowDetail.component.js.map +1 -0
  58. package/cards/dataTable/index.d.ts +1 -0
  59. package/cards/dataTable/index.js +16 -0
  60. package/cards/dataTable/index.js.map +1 -0
  61. package/cards/dialog/dialog.component.d.ts +4 -0
  62. package/cards/dialog/dialog.component.js +89 -0
  63. package/cards/dialog/dialog.component.js.map +1 -0
  64. package/cards/dialog/dialog.types.d.ts +115 -0
  65. package/cards/dialog/dialog.types.js +11 -0
  66. package/cards/dialog/dialog.types.js.map +1 -0
  67. package/cards/dialog/index.d.ts +1 -0
  68. package/cards/dialog/index.js +13 -0
  69. package/cards/dialog/index.js.map +1 -0
  70. package/cards/dropDownMenu/drop-down.component.d.ts +4 -0
  71. package/cards/dropDownMenu/drop-down.component.js +205 -0
  72. package/cards/dropDownMenu/drop-down.component.js.map +1 -0
  73. package/cards/dropDownMenu/drop-down.types.d.ts +131 -0
  74. package/cards/dropDownMenu/drop-down.types.js +7 -0
  75. package/cards/dropDownMenu/drop-down.types.js.map +1 -0
  76. package/cards/dropDownMenu/dropdown-context.d.ts +7 -0
  77. package/cards/dropDownMenu/dropdown-context.js +7 -0
  78. package/cards/dropDownMenu/dropdown-context.js.map +1 -0
  79. package/cards/dropDownMenu/dropdown-menu.ui.d.ts +42 -0
  80. package/cards/dropDownMenu/dropdown-menu.ui.js +111 -0
  81. package/cards/dropDownMenu/dropdown-menu.ui.js.map +1 -0
  82. package/cards/dropDownMenu/index.d.ts +1 -0
  83. package/cards/dropDownMenu/index.js +13 -0
  84. package/cards/dropDownMenu/index.js.map +1 -0
  85. package/cards/emptyCard.d.ts +7 -0
  86. package/cards/field/field.component.d.ts +4 -0
  87. package/cards/field/field.component.js +38 -0
  88. package/cards/field/field.component.js.map +1 -0
  89. package/cards/field/field.types.d.ts +30 -0
  90. package/cards/field/field.types.js +7 -0
  91. package/cards/field/field.types.js.map +1 -0
  92. package/cards/field/index.d.ts +1 -0
  93. package/cards/field/index.js +12 -0
  94. package/cards/field/index.js.map +1 -0
  95. package/cards/flexGrid/flexGrid.component.d.ts +4 -0
  96. package/cards/flexGrid/flexGrid.component.js +40 -0
  97. package/cards/flexGrid/flexGrid.component.js.map +1 -0
  98. package/cards/flexGrid/flexGrid.types.d.ts +23 -0
  99. package/cards/flexGrid/flexGrid.types.js +7 -0
  100. package/cards/flexGrid/flexGrid.types.js.map +1 -0
  101. package/cards/flexGrid/index.d.ts +1 -0
  102. package/cards/flexGrid/index.js +12 -0
  103. package/cards/flexGrid/index.js.map +1 -0
  104. package/cards/form/form.component.d.ts +4 -0
  105. package/cards/form/form.component.js +64 -0
  106. package/cards/form/form.component.js.map +1 -0
  107. package/cards/form/form.context.d.ts +23 -0
  108. package/cards/form/form.context.js +13 -0
  109. package/cards/form/form.context.js.map +1 -0
  110. package/cards/form/form.types.d.ts +43 -0
  111. package/cards/form/form.types.js +7 -0
  112. package/cards/form/form.types.js.map +1 -0
  113. package/cards/form/index.d.ts +2 -0
  114. package/cards/form/index.js +14 -0
  115. package/cards/form/index.js.map +1 -0
  116. package/cards/framework/framework.component.d.ts +3 -0
  117. package/cards/framework/framework.component.js +21 -0
  118. package/cards/framework/framework.component.js.map +1 -0
  119. package/cards/framework/index.d.ts +2 -0
  120. package/cards/framework/index.js +12 -0
  121. package/cards/framework/index.js.map +1 -0
  122. package/cards/graphin/graphin.component.d.ts +4 -0
  123. package/cards/graphin/graphin.types.d.ts +18 -0
  124. package/cards/graphin/index.d.ts +2 -0
  125. package/cards/graphin/tooltip.component.d.ts +10 -0
  126. package/cards/icons.d.ts +15 -0
  127. package/cards/icons.js +15 -0
  128. package/cards/icons.js.map +1 -0
  129. package/cards/input/index.d.ts +1 -0
  130. package/cards/input/index.js +13 -0
  131. package/cards/input/index.js.map +1 -0
  132. package/cards/input/input.component.d.ts +4 -0
  133. package/cards/input/input.component.js +69 -0
  134. package/cards/input/input.component.js.map +1 -0
  135. package/cards/input/input.types.d.ts +80 -0
  136. package/cards/input/input.types.js +7 -0
  137. package/cards/input/input.types.js.map +1 -0
  138. package/cards/jsonViewer/index.d.ts +1 -0
  139. package/cards/jsonViewer/jsonViewer.component.d.ts +4 -0
  140. package/cards/jsonViewer/jsonViewer.types.d.ts +76 -0
  141. package/cards/list/index.d.ts +1 -0
  142. package/cards/list/index.js +13 -0
  143. package/cards/list/index.js.map +1 -0
  144. package/cards/list/list.component.d.ts +4 -0
  145. package/cards/list/list.component.js +102 -0
  146. package/cards/list/list.component.js.map +1 -0
  147. package/cards/list/list.types.d.ts +65 -0
  148. package/cards/list/list.types.js +7 -0
  149. package/cards/list/list.types.js.map +1 -0
  150. package/cards/loadingOverlay/index.d.ts +1 -0
  151. package/cards/loadingOverlay/index.js +12 -0
  152. package/cards/loadingOverlay/index.js.map +1 -0
  153. package/cards/loadingOverlay/loadingOverlay.component.d.ts +4 -0
  154. package/cards/loadingOverlay/loadingOverlay.component.js +31 -0
  155. package/cards/loadingOverlay/loadingOverlay.component.js.map +1 -0
  156. package/cards/loadingOverlay/loadingOverlay.types.d.ts +13 -0
  157. package/cards/loadingOverlay/loadingOverlay.types.js +7 -0
  158. package/cards/loadingOverlay/loadingOverlay.types.js.map +1 -0
  159. package/cards/loadingSkeleton/index.d.ts +1 -0
  160. package/cards/loadingSkeleton/index.js +12 -0
  161. package/cards/loadingSkeleton/index.js.map +1 -0
  162. package/cards/loadingSkeleton/loading-skeleton.component.d.ts +19 -0
  163. package/cards/loadingSkeleton/loading-skeleton.component.js +33 -0
  164. package/cards/loadingSkeleton/loading-skeleton.component.js.map +1 -0
  165. package/cards/loadingSkeleton/loading-skeleton.types.d.ts +94 -0
  166. package/cards/loadingSkeleton/loading-skeleton.types.js +7 -0
  167. package/cards/loadingSkeleton/loading-skeleton.types.js.map +1 -0
  168. package/cards/markdownViewer/index.d.ts +1 -0
  169. package/cards/markdownViewer/markdownViewer.component.d.ts +4 -0
  170. package/cards/markdownViewer/markdownViewer.types.d.ts +28 -0
  171. package/cards/menu/index.d.ts +1 -0
  172. package/cards/menu/index.js +13 -0
  173. package/cards/menu/index.js.map +1 -0
  174. package/cards/menu/menu.component.d.ts +4 -0
  175. package/cards/menu/menu.component.js +23 -0
  176. package/cards/menu/menu.component.js.map +1 -0
  177. package/cards/menu/menu.types.d.ts +53 -0
  178. package/cards/menu/menu.types.js +7 -0
  179. package/cards/menu/menu.types.js.map +1 -0
  180. package/cards/modeToggle/index.d.ts +1 -0
  181. package/cards/modeToggle/index.js +13 -0
  182. package/cards/modeToggle/index.js.map +1 -0
  183. package/cards/modeToggle/mode-toggle.component.d.ts +4 -0
  184. package/cards/modeToggle/mode-toggle.component.js +32 -0
  185. package/cards/modeToggle/mode-toggle.component.js.map +1 -0
  186. package/cards/modeToggle/mode-toggle.types.d.ts +20 -0
  187. package/cards/modeToggle/mode-toggle.types.js +7 -0
  188. package/cards/modeToggle/mode-toggle.types.js.map +1 -0
  189. package/cards/navbarSearch/index.d.ts +1 -0
  190. package/cards/navbarSearch/index.js +13 -0
  191. package/cards/navbarSearch/index.js.map +1 -0
  192. package/cards/navbarSearch/navbarSearch.component.d.ts +3 -0
  193. package/cards/navbarSearch/navbarSearch.component.js +88 -0
  194. package/cards/navbarSearch/navbarSearch.component.js.map +1 -0
  195. package/cards/navbarSearch/navbarSearch.type.d.ts +32 -0
  196. package/cards/navbarSearch/navbarSearch.type.js +11 -0
  197. package/cards/navbarSearch/navbarSearch.type.js.map +1 -0
  198. package/cards/pageWithNavbar/index.d.ts +2 -0
  199. package/cards/pageWithNavbar/index.js +14 -0
  200. package/cards/pageWithNavbar/index.js.map +1 -0
  201. package/cards/pageWithNavbar/pageWithNavbar.component.d.ts +12 -0
  202. package/cards/pageWithNavbar/pageWithNavbar.component.js +153 -0
  203. package/cards/pageWithNavbar/pageWithNavbar.component.js.map +1 -0
  204. package/cards/pageWithNavbar/pageWithNavbar.type.d.ts +81 -0
  205. package/cards/pageWithNavbar/pageWithNavbar.type.js +7 -0
  206. package/cards/pageWithNavbar/pageWithNavbar.type.js.map +1 -0
  207. package/cards/pasteTarget/index.d.ts +1 -0
  208. package/cards/pasteTarget/index.js +13 -0
  209. package/cards/pasteTarget/index.js.map +1 -0
  210. package/cards/pasteTarget/pasteTarget.component.d.ts +4 -0
  211. package/cards/pasteTarget/pasteTarget.component.js +158 -0
  212. package/cards/pasteTarget/pasteTarget.component.js.map +1 -0
  213. package/cards/pasteTarget/pasteTarget.types.d.ts +46 -0
  214. package/cards/pasteTarget/pasteTarget.types.js +11 -0
  215. package/cards/pasteTarget/pasteTarget.types.js.map +1 -0
  216. package/cards/resizable/index.d.ts +1 -0
  217. package/cards/resizable/resizable.component.d.ts +4 -0
  218. package/cards/resizable/resizable.types.d.ts +49 -0
  219. package/cards/select/index.d.ts +1 -0
  220. package/cards/select/index.js +13 -0
  221. package/cards/select/index.js.map +1 -0
  222. package/cards/select/select.component.d.ts +4 -0
  223. package/cards/select/select.component.js +41 -0
  224. package/cards/select/select.component.js.map +1 -0
  225. package/cards/select/select.types.d.ts +73 -0
  226. package/cards/select/select.types.js +11 -0
  227. package/cards/select/select.types.js.map +1 -0
  228. package/cards/stack/index.d.ts +1 -0
  229. package/cards/stack/index.js +12 -0
  230. package/cards/stack/index.js.map +1 -0
  231. package/cards/stack/stack.component.d.ts +7 -0
  232. package/cards/stack/stack.component.js +83 -0
  233. package/cards/stack/stack.component.js.map +1 -0
  234. package/cards/stack/stack.types.d.ts +47 -0
  235. package/cards/stack/stack.types.js +7 -0
  236. package/cards/stack/stack.types.js.map +1 -0
  237. package/cards/stepper/index.d.ts +1 -0
  238. package/cards/stepper/index.js +13 -0
  239. package/cards/stepper/index.js.map +1 -0
  240. package/cards/stepper/stepper.component.d.ts +4 -0
  241. package/cards/stepper/stepper.component.js +48 -0
  242. package/cards/stepper/stepper.component.js.map +1 -0
  243. package/cards/stepper/stepper.types.d.ts +96 -0
  244. package/cards/stepper/stepper.types.js +7 -0
  245. package/cards/stepper/stepper.types.js.map +1 -0
  246. package/cards/switch/index.d.ts +1 -0
  247. package/cards/switch/index.js +13 -0
  248. package/cards/switch/index.js.map +1 -0
  249. package/cards/switch/switch.component.d.ts +4 -0
  250. package/cards/switch/switch.component.js +34 -0
  251. package/cards/switch/switch.component.js.map +1 -0
  252. package/cards/switch/switch.types.d.ts +39 -0
  253. package/cards/switch/switch.types.js +7 -0
  254. package/cards/switch/switch.types.js.map +1 -0
  255. package/cards/tabs/index.d.ts +1 -0
  256. package/cards/tabs/index.js +13 -0
  257. package/cards/tabs/index.js.map +1 -0
  258. package/cards/tabs/tabs.component.d.ts +4 -0
  259. package/cards/tabs/tabs.component.js +42 -0
  260. package/cards/tabs/tabs.component.js.map +1 -0
  261. package/cards/tabs/tabs.types.d.ts +72 -0
  262. package/cards/tabs/tabs.types.js +7 -0
  263. package/cards/tabs/tabs.types.js.map +1 -0
  264. package/cards/textField/index.d.ts +1 -0
  265. package/cards/textField/index.js +13 -0
  266. package/cards/textField/index.js.map +1 -0
  267. package/cards/textField/textField.component.d.ts +4 -0
  268. package/cards/textField/textField.component.js +29 -0
  269. package/cards/textField/textField.component.js.map +1 -0
  270. package/cards/textField/textField.types.d.ts +36 -0
  271. package/cards/textField/textField.types.js +7 -0
  272. package/cards/textField/textField.types.js.map +1 -0
  273. package/cards/toast/index.d.ts +1 -0
  274. package/cards/toast/index.js +13 -0
  275. package/cards/toast/index.js.map +1 -0
  276. package/cards/toast/toast.component.d.ts +4 -0
  277. package/cards/toast/toast.component.js +76 -0
  278. package/cards/toast/toast.component.js.map +1 -0
  279. package/cards/toast/toast.types.d.ts +100 -0
  280. package/cards/toast/toast.types.js +12 -0
  281. package/cards/toast/toast.types.js.map +1 -0
  282. package/cards/toggleGroup/index.d.ts +1 -0
  283. package/cards/toggleGroup/index.js +13 -0
  284. package/cards/toggleGroup/index.js.map +1 -0
  285. package/cards/toggleGroup/toggleGroup.component.d.ts +4 -0
  286. package/cards/toggleGroup/toggleGroup.component.js +55 -0
  287. package/cards/toggleGroup/toggleGroup.component.js.map +1 -0
  288. package/cards/toggleGroup/toggleGroup.types.d.ts +96 -0
  289. package/cards/toggleGroup/toggleGroup.types.js +7 -0
  290. package/cards/toggleGroup/toggleGroup.types.js.map +1 -0
  291. package/cards/types.d.ts +72 -0
  292. package/cards/types.js +22 -0
  293. package/cards/types.js.map +1 -0
  294. package/cards/typography/index.d.ts +1 -0
  295. package/cards/typography/index.js +12 -0
  296. package/cards/typography/index.js.map +1 -0
  297. package/cards/typography/typography.component.d.ts +4 -0
  298. package/cards/typography/typography.component.js +44 -0
  299. package/cards/typography/typography.component.js.map +1 -0
  300. package/cards/typography/typography.types.d.ts +23 -0
  301. package/cards/typography/typography.types.js +7 -0
  302. package/cards/typography/typography.types.js.map +1 -0
  303. package/components/hooks/use-is-touch-device.d.ts +1 -0
  304. package/components/lib/utils.js +10 -0
  305. package/components/lib/utils.js.map +1 -0
  306. package/components/theme-provider/index.d.ts +4 -0
  307. package/components/theme-provider/index.js +12 -0
  308. package/components/theme-provider/index.js.map +1 -0
  309. package/components/theme-provider/theme-provider.component.d.ts +2 -0
  310. package/components/theme-provider/theme-provider.component.js +31 -0
  311. package/components/theme-provider/theme-provider.component.js.map +1 -0
  312. package/components/theme-provider/theme-provider.types.d.ts +12 -0
  313. package/components/theme-provider/theme-provider.types.js +9 -0
  314. package/components/theme-provider/theme-provider.types.js.map +1 -0
  315. package/components/ui/avatar.js +30 -0
  316. package/components/ui/avatar.js.map +1 -0
  317. package/components/ui/badge.js +26 -0
  318. package/components/ui/badge.js.map +1 -0
  319. package/components/ui/button.js +98 -0
  320. package/components/ui/button.js.map +1 -0
  321. package/components/ui/dialog.js +109 -0
  322. package/components/ui/dialog.js.map +1 -0
  323. package/components/ui/field.js +68 -0
  324. package/components/ui/field.js.map +1 -0
  325. package/components/ui/input.js +16 -0
  326. package/components/ui/input.js.map +1 -0
  327. package/components/ui/label.js +16 -0
  328. package/components/ui/label.js.map +1 -0
  329. package/components/ui/menubar.js +62 -0
  330. package/components/ui/menubar.js.map +1 -0
  331. package/components/ui/select.js +84 -0
  332. package/components/ui/select.js.map +1 -0
  333. package/components/ui/separator.js +5 -0
  334. package/components/ui/sheet.js +49 -0
  335. package/components/ui/sheet.js.map +1 -0
  336. package/components/ui/spinner.js +35 -0
  337. package/components/ui/spinner.js.map +1 -0
  338. package/components/ui/stepper.js +145 -0
  339. package/components/ui/stepper.js.map +1 -0
  340. package/components/ui/switch.js +20 -0
  341. package/components/ui/switch.js.map +1 -0
  342. package/components/ui/table.js +61 -0
  343. package/components/ui/table.js.map +1 -0
  344. package/components/ui/tabs.js +38 -0
  345. package/components/ui/tabs.js.map +1 -0
  346. package/components/ui/toggle-group.js +50 -0
  347. package/components/ui/toggle-group.js.map +1 -0
  348. package/components/ui/toggle.js +27 -0
  349. package/components/ui/toggle.js.map +1 -0
  350. package/components/ui/tooltip.js +38 -0
  351. package/components/ui/tooltip.js.map +1 -0
  352. package/lib/utils.d.ts +2 -0
  353. package/lib/utils.js +10 -0
  354. package/lib/utils.js.map +1 -0
  355. package/mountain-snow.svg +4 -0
  356. package/package.json +203 -0
  357. package/pihanga-shadcn.css +2 -0
  358. package/r/badge.json +35 -0
  359. package/r/box.json +26 -0
  360. package/r/button.json +39 -0
  361. package/r/checkbox.json +31 -0
  362. package/r/conditional.json +30 -0
  363. package/r/dataTable.json +43 -0
  364. package/r/dialog.json +36 -0
  365. package/r/dropDownMenu.json +47 -0
  366. package/r/field.json +35 -0
  367. package/r/flexGrid.json +32 -0
  368. package/r/form.json +37 -0
  369. package/r/framework.json +28 -0
  370. package/r/graphin.json +42 -0
  371. package/r/input.json +35 -0
  372. package/r/jsonViewer.json +40 -0
  373. package/r/list.json +39 -0
  374. package/r/loadingOverlay.json +39 -0
  375. package/r/loadingSkeleton.json +30 -0
  376. package/r/markdownViewer.json +51 -0
  377. package/r/menu.json +34 -0
  378. package/r/modeToggle.json +36 -0
  379. package/r/navbarSearch.json +31 -0
  380. package/r/pageWithNavbar.json +46 -0
  381. package/r/pasteTarget.json +41 -0
  382. package/r/pihanga-base.json +11 -0
  383. package/r/pihanga-cards-icons.json +16 -0
  384. package/r/pihanga-cards-types.json +16 -0
  385. package/r/pihanga-hook-use-is-touch-device.json +15 -0
  386. package/r/pihanga-lib-utils.json +18 -0
  387. package/r/pihanga-theme-provider.json +25 -0
  388. package/r/pihanga-ui-extras.json +68 -0
  389. package/r/registry.json +171 -0
  390. package/r/resizable.json +35 -0
  391. package/r/select.json +35 -0
  392. package/r/stack.json +27 -0
  393. package/r/stepper.json +39 -0
  394. package/r/switch.json +36 -0
  395. package/r/tabs.json +33 -0
  396. package/r/textField.json +32 -0
  397. package/r/toast.json +32 -0
  398. package/r/toggleGroup.json +35 -0
  399. package/r/typography.json +31 -0
@@ -0,0 +1,49 @@
1
+ import { PiCardRef } from '@pihanga2/core';
2
+ export declare const RESIZABLE_CARD = "shad/resizable";
3
+ export declare const SdResizable: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<ResizableProps<unknown>, S, {}>) => import('@pihanga2/core').PiCardDef;
4
+ /** Convenience alias — same as {@link SdResizable}. */
5
+ export declare const Resizable: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<ResizableProps<unknown>, S, {}>) => import('@pihanga2/core').PiCardDef;
6
+ export type ResizableProps<S = unknown> = {
7
+ /** Ordered list of panels to render inside the resizable group. */
8
+ content: PiResizablePanel[];
9
+ /** Layout direction of the panel group. Defaults to `"horizontal"`. */
10
+ direction?: "horizontal" | "vertical";
11
+ /**
12
+ * Handle configuration(s) between panels.
13
+ *
14
+ * - A single `PiResizableHandle` is used for every handle in the group.
15
+ * - An array must have exactly `content.length - 1` entries.
16
+ *
17
+ * Defaults to {@link DefResizableHandle} (visible drag handle).
18
+ */
19
+ handles?: PiResizableHandle | PiResizableHandle[];
20
+ className?: string;
21
+ /**
22
+ * Optional Shadcn-style style overrides.
23
+ *
24
+ * When provided as `{ shad?: { root?: string; panel?: string; handle?: string } }`,
25
+ * the nested class names are applied to the corresponding elements in
26
+ * addition to any `className` already set.
27
+ */
28
+ style?: S;
29
+ };
30
+ export type PiResizablePanel = {
31
+ /** Used for CSS class suffixes and stable ordering. Defaults to `"panel{idx}"`. */
32
+ name?: string;
33
+ /** The card to render inside this panel. */
34
+ content: PiCardRef;
35
+ /** Initial size as a percentage of the group. Defaults to `50`. */
36
+ defaultSize?: number;
37
+ minSize?: number;
38
+ maxSize?: number;
39
+ /** When `true`, the panel can be collapsed to zero size. */
40
+ collapsible?: boolean;
41
+ };
42
+ export type PiResizableHandle = {
43
+ /** When `true`, renders a visible drag-handle grip indicator. */
44
+ withHandle?: boolean;
45
+ /** When `true`, the handle is decorative only (not draggable). */
46
+ disabled?: boolean;
47
+ };
48
+ /** Default handle configuration: visible grip, draggable. */
49
+ export declare const DefResizableHandle: PiResizableHandle;
@@ -0,0 +1 @@
1
+ export * from './select.types';
@@ -0,0 +1,13 @@
1
+ import { SelectComponent as e } from "./select.component.js";
2
+ import { PI_SELECT_ACTION as t, PI_SELECT_CARD as n, Select as r, onPiSelectChanged as i, onPiSelectClosed as a, onPiSelectOpened as o } from "./select.types.js";
3
+ import { actionTypesToEvents as s, registerCardComponent as c } from "@pihanga2/core";
4
+ //#region src/cards/select/index.ts
5
+ c({
6
+ name: n,
7
+ component: e,
8
+ events: s(t)
9
+ });
10
+ //#endregion
11
+ export { t as PI_SELECT_ACTION, n as PI_SELECT_CARD, r as Select, i as onPiSelectChanged, a as onPiSelectClosed, o as onPiSelectOpened };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/select/index.ts"],"sourcesContent":["import {actionTypesToEvents, registerCardComponent} from \"@pihanga2/core\";\n\nimport {SelectComponent} from \"./select.component\";\nimport {PI_SELECT_ACTION, PI_SELECT_CARD} from \"./select.types\";\n\nexport * from \"./select.types\";\n\nregisterCardComponent({\n name: PI_SELECT_CARD,\n component: SelectComponent,\n events: actionTypesToEvents(PI_SELECT_ACTION),\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;CACX,QAAQ,EAAoB,CAAgB;AAC9C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { PiCardProps } from '@pihanga2/core';
3
+ import { PiSelectEvents, PiSelectProps } from './select.types';
4
+ export declare const SelectComponent: (props: PiCardProps<PiSelectProps, PiSelectEvents>) => React.ReactNode;
@@ -0,0 +1,41 @@
1
+ import { useFormContext as e } from "../form/form.context.js";
2
+ import { Select as t, SelectContent as n, SelectGroup as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../../components/ui/select.js";
3
+ import { useState as s } from "react";
4
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ //#region src/cards/select/select.component.tsx
6
+ var u = (u) => {
7
+ let { name: d, value: f = "", defaultValue: p, selfManaged: m = !1, options: h, placeholder: g, required: _, disabled: v, ariaLabel: y, cardName: b, onChanged: x, onOpened: S, onClosed: C } = u, w = u.id, T = !!u.invalid, E = e(), D = E.isInForm && !!d, [O, k] = s(p ?? f), A = D ? E.formData[d] ?? "" : m ? O : f;
8
+ function j(e) {
9
+ D ? E.handleChange(d, e) : (m && k(e), x({
10
+ name: d,
11
+ value: e
12
+ }));
13
+ }
14
+ function M(e) {
15
+ e ? S({}) : C({});
16
+ }
17
+ let N = `${b}-${d ?? "select"}`;
18
+ return /* @__PURE__ */ l(t, {
19
+ value: A,
20
+ defaultValue: p,
21
+ onValueChange: j,
22
+ onOpenChange: M,
23
+ disabled: v,
24
+ required: _,
25
+ "aria-label": y,
26
+ children: [/* @__PURE__ */ c(a, {
27
+ id: w ?? N,
28
+ "aria-invalid": T || void 0,
29
+ "data-pihanga": b,
30
+ children: /* @__PURE__ */ c(o, { placeholder: g ?? "Select…" })
31
+ }), /* @__PURE__ */ c(n, { children: /* @__PURE__ */ c(r, { children: h.map((e) => /* @__PURE__ */ c(i, {
32
+ value: e.value,
33
+ disabled: e.disabled,
34
+ children: e.label
35
+ }, e.value)) }) })]
36
+ });
37
+ };
38
+ //#endregion
39
+ export { u as SelectComponent };
40
+
41
+ //# sourceMappingURL=select.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.component.js","names":[],"sources":["../../../src/cards/select/select.component.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport {type PiCardProps} from \"@pihanga2/core\";\nimport {\n Select as RadixSelect,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select\";\nimport {useFormContext} from \"@/cards/form/form.context\";\nimport type {PiSelectEvents, PiSelectProps} from \"./select.types\";\n\nexport const SelectComponent = (\n props: PiCardProps<PiSelectProps, PiSelectEvents>,\n): React.ReactNode => {\n const {\n name,\n value: propValue = \"\",\n defaultValue,\n selfManaged = false,\n options,\n placeholder,\n required,\n disabled,\n ariaLabel,\n cardName,\n onChanged,\n onOpened,\n onClosed,\n } = props;\n\n // `id` and `invalid` may be injected by a parent pi/field card via\n // Pihanga's extra-prop forwarding. They are not in the official type so\n // we read them through an escape hatch.\n const injectedId = (props as {id?: string}).id;\n const invalid = Boolean((props as {invalid?: boolean}).invalid);\n\n // Detect if we are inside a pi/form card via React context.\n const form = useFormContext();\n const useFormData = form.isInForm && Boolean(name);\n\n // Internal state used only when selfManaged=true and not bound to a form.\n const [managedValue, setManagedValue] = useState<string>(\n defaultValue ?? propValue,\n );\n\n const value = useFormData\n ? ((form.formData[name!] as string | undefined) ?? \"\")\n : selfManaged\n ? managedValue\n : propValue;\n\n function handleChange(newValue: string) {\n if (useFormData) {\n form.handleChange(name!, newValue);\n } else {\n if (selfManaged) {\n setManagedValue(newValue);\n }\n onChanged({name, value: newValue});\n }\n }\n\n function handleOpenChange(open: boolean) {\n if (open) {\n onOpened({});\n } else {\n onClosed({});\n }\n }\n\n // Use the id injected by pi/field; fall back to a local id when standalone.\n const selfId = `${cardName}-${name ?? \"select\"}`;\n const fieldId = injectedId ?? selfId;\n\n return (\n <RadixSelect\n value={value}\n defaultValue={defaultValue}\n onValueChange={handleChange}\n onOpenChange={handleOpenChange}\n disabled={disabled}\n required={required}\n aria-label={ariaLabel}\n >\n <SelectTrigger\n id={fieldId}\n aria-invalid={invalid || undefined}\n data-pihanga={cardName}\n >\n <SelectValue placeholder={placeholder ?? \"Select…\"} />\n </SelectTrigger>\n <SelectContent>\n <SelectGroup>\n {options.map((opt) => (\n <SelectItem\n key={opt.value}\n value={opt.value}\n disabled={opt.disabled}\n >\n {opt.label}\n </SelectItem>\n ))}\n </SelectGroup>\n </SelectContent>\n </RadixSelect>\n );\n};\n"],"mappings":";;;;;AAaA,IAAa,KACX,MACoB;CACpB,IAAM,EACJ,SACA,OAAO,IAAY,IACnB,iBACA,iBAAc,IACd,YACA,gBACA,aACA,aACA,cACA,aACA,cACA,aACA,gBACE,GAKE,IAAc,EAAwB,IACtC,IAAU,EAAS,EAA8B,SAGjD,IAAO,EAAe,GACtB,IAAc,EAAK,YAAY,EAAQ,GAGvC,CAAC,GAAc,KAAmB,EACtC,KAAgB,CAClB,GAEM,IAAQ,IACR,EAAK,SAAS,MAAiC,KACjD,IACE,IACA;CAEN,SAAS,EAAa,GAAkB;EACtC,AAAI,IACF,EAAK,aAAa,GAAO,CAAQ,KAE7B,KACF,EAAgB,CAAQ,GAE1B,EAAU;GAAC;GAAM,OAAO;EAAQ,CAAC;CAErC;CAEA,SAAS,EAAiB,GAAe;EACvC,AAAI,IACF,EAAS,CAAC,CAAC,IAEX,EAAS,CAAC,CAAC;CAEf;CAGA,IAAM,IAAS,GAAG,EAAS,GAAG,KAAQ;CAGtC,OACE,kBAAC,GAAD;EACS;EACO;EACd,eAAe;EACf,cAAc;EACJ;EACA;EACV,cAAY;YAPd,CASE,kBAAC,GAAD;GACE,IAbU,KAAc;GAcxB,gBAAc,KAAW,KAAA;GACzB,gBAAc;aAEd,kBAAC,GAAD,EAAa,aAAa,KAAe,UAAY,CAAA;EACxC,CAAA,GACf,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACG,EAAQ,KAAK,MACZ,kBAAC,GAAD;GAEE,OAAO,EAAI;GACX,UAAU,EAAI;aAEb,EAAI;EACK,GALL,EAAI,KAKC,CACb,EACU,CAAA,EACA,CAAA,CACJ;;AAEjB"}
@@ -0,0 +1,73 @@
1
+ export declare const PI_SELECT_CARD = "pi/select";
2
+ export declare const Select: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<PiSelectProps, S, PiSelectEvents>) => import('@pihanga2/core').PiCardDef;
3
+ export declare const PI_SELECT_ACTION: {
4
+ CHANGED: string;
5
+ CLOSED: string;
6
+ OPENED: string;
7
+ };
8
+ export declare const onPiSelectChanged: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
9
+ cardID: string;
10
+ } & PiSelectChangedEvent>) => void;
11
+ export declare const onPiSelectOpened: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
12
+ cardID: string;
13
+ } & PiSelectOpenedEvent>) => void;
14
+ export declare const onPiSelectClosed: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
15
+ cardID: string;
16
+ } & PiSelectClosedEvent>) => void;
17
+ export type PiSelectOption = {
18
+ /** The value stored in form state / dispatched in events. */
19
+ value: string;
20
+ /** Human-readable label shown in the dropdown. */
21
+ label: string;
22
+ /** When true, the option is shown but cannot be selected. */
23
+ disabled?: boolean;
24
+ };
25
+ export type PiSelectProps = {
26
+ /**
27
+ * Field name used to bind to FormContext when inside a pi/form card.
28
+ * When provided the component reads its selected value from form data and
29
+ * writes back via form.handleChange.
30
+ */
31
+ name?: string;
32
+ /**
33
+ * Controlled value used in standalone mode (outside a Form).
34
+ * Ignored when `name` is set and the component is inside a pi/form.
35
+ */
36
+ value?: string;
37
+ /**
38
+ * When true the component manages its own selected-value state internally.
39
+ * Selecting an item will still dispatch the normal `onChanged` action, but
40
+ * the UI will immediately reflect the new selection without waiting for the
41
+ * host application to update `value` via a reducer.
42
+ *
43
+ * Has no effect when the component is bound to a pi/form via `name`.
44
+ */
45
+ selfManaged?: boolean;
46
+ /**
47
+ * Default (uncontrolled) value. Mirrors Radix `defaultValue`.
48
+ */
49
+ defaultValue?: string;
50
+ /** Available options to display in the dropdown. */
51
+ options: PiSelectOption[];
52
+ /** Placeholder text shown when no option is selected. */
53
+ placeholder?: string;
54
+ /** When true, the select is required (HTML form attribute). */
55
+ required?: boolean;
56
+ /** When true, the select is disabled and non-interactive. */
57
+ disabled?: boolean;
58
+ /** Accessible label for screen readers. */
59
+ ariaLabel?: string;
60
+ };
61
+ export type PiSelectChangedEvent = {
62
+ /** Field name, mirrors the `name` prop if provided. */
63
+ name?: string;
64
+ /** The value of the newly selected option. */
65
+ value: string;
66
+ };
67
+ export type PiSelectOpenedEvent = Record<string, never>;
68
+ export type PiSelectClosedEvent = Record<string, never>;
69
+ export type PiSelectEvents = {
70
+ onChanged: PiSelectChangedEvent;
71
+ onOpened: PiSelectOpenedEvent;
72
+ onClosed: PiSelectClosedEvent;
73
+ };
@@ -0,0 +1,11 @@
1
+ import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
2
+ //#region src/cards/select/select.types.ts
3
+ var r = "pi/select", i = e(r), a = n(r, [
4
+ "changed",
5
+ "opened",
6
+ "closed"
7
+ ]), o = t(a.CHANGED), s = t(a.OPENED), c = t(a.CLOSED);
8
+ //#endregion
9
+ export { a as PI_SELECT_ACTION, r as PI_SELECT_CARD, i as Select, o as onPiSelectChanged, c as onPiSelectClosed, s as onPiSelectOpened };
10
+
11
+ //# sourceMappingURL=select.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.types.js","names":[],"sources":["../../../src/cards/select/select.types.ts"],"sourcesContent":["import {\n createCardDeclaration,\n createOnAction,\n registerActions,\n} from \"@pihanga2/core\";\n\nexport const PI_SELECT_CARD = \"pi/select\";\n\nexport const Select = createCardDeclaration<PiSelectProps, PiSelectEvents>(\n PI_SELECT_CARD,\n);\n\nexport const PI_SELECT_ACTION = registerActions(PI_SELECT_CARD, [\n \"changed\",\n \"opened\",\n \"closed\",\n]);\n\nexport const onPiSelectChanged = createOnAction<PiSelectChangedEvent>(\n PI_SELECT_ACTION.CHANGED,\n);\n\nexport const onPiSelectOpened = createOnAction<PiSelectOpenedEvent>(\n PI_SELECT_ACTION.OPENED,\n);\n\nexport const onPiSelectClosed = createOnAction<PiSelectClosedEvent>(\n PI_SELECT_ACTION.CLOSED,\n);\n\nexport type PiSelectOption = {\n /** The value stored in form state / dispatched in events. */\n value: string;\n /** Human-readable label shown in the dropdown. */\n label: string;\n /** When true, the option is shown but cannot be selected. */\n disabled?: boolean;\n};\n\nexport type PiSelectProps = {\n /**\n * Field name used to bind to FormContext when inside a pi/form card.\n * When provided the component reads its selected value from form data and\n * writes back via form.handleChange.\n */\n name?: string;\n\n /**\n * Controlled value used in standalone mode (outside a Form).\n * Ignored when `name` is set and the component is inside a pi/form.\n */\n value?: string;\n\n /**\n * When true the component manages its own selected-value state internally.\n * Selecting an item will still dispatch the normal `onChanged` action, but\n * the UI will immediately reflect the new selection without waiting for the\n * host application to update `value` via a reducer.\n *\n * Has no effect when the component is bound to a pi/form via `name`.\n */\n selfManaged?: boolean;\n\n /**\n * Default (uncontrolled) value. Mirrors Radix `defaultValue`.\n */\n defaultValue?: string;\n\n /** Available options to display in the dropdown. */\n options: PiSelectOption[];\n\n /** Placeholder text shown when no option is selected. */\n placeholder?: string;\n\n /** When true, the select is required (HTML form attribute). */\n required?: boolean;\n\n /** When true, the select is disabled and non-interactive. */\n disabled?: boolean;\n\n /** Accessible label for screen readers. */\n ariaLabel?: string;\n};\n\nexport type PiSelectChangedEvent = {\n /** Field name, mirrors the `name` prop if provided. */\n name?: string;\n /** The value of the newly selected option. */\n value: string;\n};\n\nexport type PiSelectOpenedEvent = Record<string, never>;\n\nexport type PiSelectClosedEvent = Record<string, never>;\n\nexport type PiSelectEvents = {\n onChanged: PiSelectChangedEvent;\n onOpened: PiSelectOpenedEvent;\n onClosed: PiSelectClosedEvent;\n};\n"],"mappings":";;AAMA,IAAa,IAAiB,aAEjB,IAAS,EACpB,CACF,GAEa,IAAmB,EAAgB,GAAgB;CAC9D;CACA;CACA;AACF,CAAC,GAEY,IAAoB,EAC/B,EAAiB,OACnB,GAEa,IAAmB,EAC9B,EAAiB,MACnB,GAEa,IAAmB,EAC9B,EAAiB,MACnB"}
@@ -0,0 +1 @@
1
+ export * from './stack.types';
@@ -0,0 +1,12 @@
1
+ import { Component as e } from "./stack.component.js";
2
+ import { STACK_CARD as t, Stack as n } from "./stack.types.js";
3
+ import { registerCardComponent as r } from "@pihanga2/core";
4
+ //#region src/cards/stack/index.ts
5
+ r({
6
+ name: t,
7
+ component: e
8
+ });
9
+ //#endregion
10
+ export { t as STACK_CARD, n as Stack };
11
+
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/stack/index.ts"],"sourcesContent":["import {registerCardComponent} from \"@pihanga2/core\";\n\nimport {Component} from \"./stack.component\";\nimport {STACK_CARD} from \"./stack.types\";\n\nexport * from \"./stack.types\";\n\nregisterCardComponent({\n name: STACK_CARD,\n component: Component,\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;AACb,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { StackProps } from './stack.types';
2
+ import { PiCardProps } from '@pihanga2/core';
3
+ import * as React from "react";
4
+ export type SelectSD = {
5
+ root?: string;
6
+ };
7
+ export declare const Component: (props: PiCardProps<StackProps>) => React.ReactNode;
@@ -0,0 +1,83 @@
1
+ import { Card as e } from "@pihanga2/core";
2
+ import { Fragment as t } from "react";
3
+ import n from "clsx";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/cards/stack/stack.component.tsx
6
+ var a = (a) => {
7
+ let { content: o, direction: s, divider: c, spacing: l, justifyContent: u, alignItems: d, className: f, style: p, cardName: m } = a, h = [
8
+ f,
9
+ (p?.shad || {}).root,
10
+ "flex"
11
+ ];
12
+ if (s) switch (s) {
13
+ case "row":
14
+ h.push("flex-row");
15
+ break;
16
+ case "row-reverse":
17
+ h.push("flex-row-reverse");
18
+ break;
19
+ case "column":
20
+ h.push("flex-col");
21
+ break;
22
+ case "column-reverse":
23
+ h.push("flex-col-reverse");
24
+ break;
25
+ }
26
+ if (u) switch (u) {
27
+ case "flex-start":
28
+ h.push("justify-start");
29
+ break;
30
+ case "center":
31
+ h.push("justify-center");
32
+ break;
33
+ case "flex-end":
34
+ h.push("justify-end");
35
+ break;
36
+ case "space-between":
37
+ h.push("justify-between");
38
+ break;
39
+ case "space-around":
40
+ h.push("justify-around");
41
+ break;
42
+ case "space-evenly":
43
+ h.push("justify-evenly");
44
+ break;
45
+ }
46
+ if (d) switch (d) {
47
+ case "flex-start":
48
+ h.push("items-start");
49
+ break;
50
+ case "center":
51
+ h.push("items-center");
52
+ break;
53
+ case "stretch":
54
+ h.push("items-stretch");
55
+ break;
56
+ case "flex-end":
57
+ h.push("items-end");
58
+ break;
59
+ case "baseline":
60
+ h.push("items-baseline");
61
+ break;
62
+ default: console.warn("stack: unsupported 'alignItems' property", d);
63
+ }
64
+ l && l > 0 && h.push(`gap-${l}`);
65
+ function g() {
66
+ return o ? o.map((n, a) => /* @__PURE__ */ i(t, { children: [/* @__PURE__ */ r(e, {
67
+ cardName: n,
68
+ parentCard: m
69
+ }, `item-${a}`), c && a < o.length - 1 && /* @__PURE__ */ r(e, {
70
+ cardName: c,
71
+ parentCard: m
72
+ }, `divider-${a}`)] }, a)) : null;
73
+ }
74
+ return /* @__PURE__ */ i("div", {
75
+ className: n(h),
76
+ "data-pihanga": m,
77
+ children: [g(), a.children]
78
+ });
79
+ };
80
+ //#endregion
81
+ export { a as Component };
82
+
83
+ //# sourceMappingURL=stack.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.component.js","names":[],"sources":["../../../src/cards/stack/stack.component.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type {StackProps} from \"./stack.types\";\n\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport clsx from \"clsx\";\nimport {Fragment} from \"react\";\n\nexport type SelectSD = {\n root?: string;\n};\n\nexport const Component = (props: PiCardProps<StackProps>): React.ReactNode => {\n const {\n content,\n direction,\n divider,\n spacing,\n justifyContent,\n alignItems,\n className,\n style,\n cardName,\n } = props;\n const sd: SelectSD = (style as {shad?: SelectSD} | undefined)?.shad || {};\n\n const cn = [className, sd.root, \"flex\"];\n if (direction) {\n switch (direction) {\n // \"column-reverse\" | \"column\" | \"row-reverse\" | \"row\"\n case \"row\":\n cn.push(\"flex-row\");\n break;\n case \"row-reverse\":\n cn.push(\"flex-row-reverse\");\n break;\n case \"column\":\n cn.push(\"flex-col\");\n break;\n case \"column-reverse\":\n cn.push(\"flex-col-reverse\");\n break;\n }\n }\n if (justifyContent) {\n switch (justifyContent) {\n // \"flex-start\" | \"center\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"space-evenly\"\n case \"flex-start\":\n cn.push(\"justify-start\");\n break;\n case \"center\":\n cn.push(\"justify-center\");\n break;\n case \"flex-end\":\n cn.push(\"justify-end\");\n break;\n case \"space-between\":\n cn.push(\"justify-between\");\n break;\n case \"space-around\":\n cn.push(\"justify-around\");\n break;\n case \"space-evenly\":\n cn.push(\"justify-evenly\");\n break;\n }\n }\n if (alignItems) {\n switch (alignItems) {\n // \"flex-start\" | \"center\" | \"flex-end\" | \"normal\" | \"stretch\" | \"start\" | \"end\" | \"baseline\" | \"initial\" | \"inherit\"\n case \"flex-start\":\n cn.push(\"items-start\");\n break;\n case \"center\":\n cn.push(\"items-center\");\n break;\n case \"stretch\":\n cn.push(\"items-stretch\");\n break;\n case \"flex-end\":\n cn.push(\"items-end\");\n break;\n case \"baseline\":\n cn.push(\"items-baseline\");\n break;\n default:\n console.warn(\"stack: unsupported 'alignItems' property\", alignItems);\n }\n }\n if (spacing && spacing > 0) {\n if (\n direction === undefined ||\n direction === \"row\" ||\n direction === \"row-reverse\"\n ) {\n cn.push(`gap-${spacing}`);\n } else {\n cn.push(`gap-${spacing}`);\n }\n }\n\n function renderContent() {\n if (!content) return null;\n\n return content.map((cn, i) => (\n <Fragment key={i}>\n <Card cardName={cn} parentCard={cardName} key={`item-${i}`} />\n {divider && i < content.length - 1 && (\n <Card cardName={divider} parentCard={cardName} key={`divider-${i}`} />\n )}\n </Fragment>\n ));\n }\n\n return (\n <div className={clsx(cn)} data-pihanga={cardName}>\n {renderContent()}\n {props.children}\n </div>\n );\n};\n"],"mappings":";;;;;AAWA,IAAa,KAAa,MAAoD;CAC5E,IAAM,EACJ,YACA,cACA,YACA,YACA,mBACA,eACA,cACA,UACA,gBACE,GAGE,IAAK;EAAC;GAFU,GAAyC,QAAQ,CAAC,GAE9C;EAAM;CAAM;CACtC,IAAI,GACF,QAAQ,GAAR;EAEE,KAAK;GACH,EAAG,KAAK,UAAU;GAClB;EACF,KAAK;GACH,EAAG,KAAK,kBAAkB;GAC1B;EACF,KAAK;GACH,EAAG,KAAK,UAAU;GAClB;EACF,KAAK;GACH,EAAG,KAAK,kBAAkB;GAC1B;CACJ;CAEF,IAAI,GACF,QAAQ,GAAR;EAEE,KAAK;GACH,EAAG,KAAK,eAAe;GACvB;EACF,KAAK;GACH,EAAG,KAAK,gBAAgB;GACxB;EACF,KAAK;GACH,EAAG,KAAK,aAAa;GACrB;EACF,KAAK;GACH,EAAG,KAAK,iBAAiB;GACzB;EACF,KAAK;GACH,EAAG,KAAK,gBAAgB;GACxB;EACF,KAAK;GACH,EAAG,KAAK,gBAAgB;GACxB;CACJ;CAEF,IAAI,GACF,QAAQ,GAAR;EAEE,KAAK;GACH,EAAG,KAAK,aAAa;GACrB;EACF,KAAK;GACH,EAAG,KAAK,cAAc;GACtB;EACF,KAAK;GACH,EAAG,KAAK,eAAe;GACvB;EACF,KAAK;GACH,EAAG,KAAK,WAAW;GACnB;EACF,KAAK;GACH,EAAG,KAAK,gBAAgB;GACxB;EACF,SACE,QAAQ,KAAK,4CAA4C,CAAU;CACvE;CAEF,AAAI,KAAW,IAAU,KAMrB,EAAG,KAAK,OAAO,GAAS;CAM5B,SAAS,IAAgB;EAGvB,OAFK,IAEE,EAAQ,KAAK,GAAI,MACtB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;GAAM,UAAU;GAAI,YAAY;EAA6B,GAAd,QAAQ,GAAM,GAC5D,KAAW,IAAI,EAAQ,SAAS,KAC/B,kBAAC,GAAD;GAAM,UAAU;GAAS,YAAY;EAAgC,GAAjB,WAAW,GAAM,CAE/D,EAAA,GALK,CAKL,CACX,IAToB;CAUvB;CAEA,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,CAAE;EAAG,gBAAc;YAAxC,CACG,EAAc,GACd,EAAM,QACJ;;AAET"}
@@ -0,0 +1,47 @@
1
+ import { PiCardRef } from '@pihanga2/core';
2
+ export declare const STACK_CARD = "shad/stack";
3
+ /**
4
+ * CSS `flex-direction` values supported by the Stack card.
5
+ */
6
+ export type DirectionT = "column-reverse" | "column" | "row-reverse" | "row";
7
+ /**
8
+ * CSS `justify-content` values supported by the Stack card.
9
+ */
10
+ export type JustifyContentT = "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
11
+ /**
12
+ * CSS `align-items` values supported by the Stack card.
13
+ */
14
+ export type AlignItemsT = "normal" | "stretch" | "center" | "flex-start" | "flex-end" | "start" | "end" | "baseline" | "initial" | "inherit";
15
+ export type StackProps<S = object> = {
16
+ /** Ordered list of child card refs to render */
17
+ content: PiCardRef[];
18
+ /** Flex direction — defaults to `"column"` */
19
+ direction?: DirectionT;
20
+ /** Optional card ref rendered as a separator between children */
21
+ divider?: PiCardRef;
22
+ /** Tailwind gap spacing units between children */
23
+ spacing?: number;
24
+ justifyContent?: JustifyContentT;
25
+ alignItems?: AlignItemsT;
26
+ /** Additional Tailwind utility classes */
27
+ className?: string;
28
+ /** Card style object (use the `shad` key for Tailwind-compatible overrides) */
29
+ style?: S;
30
+ };
31
+ /**
32
+ * Factory function for declaring a `shad/stack` card instance.
33
+ *
34
+ * ```ts
35
+ * import {registerCard} from "@pihanga2/core";
36
+ * import {Stack} from "@/cards/stack";
37
+ *
38
+ * registerCard("myApp/toolbar", Stack({
39
+ * direction: "row",
40
+ * spacing: 2,
41
+ * alignItems: "center",
42
+ * justifyContent: "space-between",
43
+ * content: ["myApp/logo", "myApp/navLinks", "myApp/userMenu"],
44
+ * }));
45
+ * ```
46
+ */
47
+ export declare const Stack: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<StackProps<object>, S, {}>) => import('@pihanga2/core').PiCardDef;
@@ -0,0 +1,7 @@
1
+ import { createCardDeclaration as e } from "@pihanga2/core";
2
+ //#region src/cards/stack/stack.types.ts
3
+ var t = "shad/stack", n = e(t);
4
+ //#endregion
5
+ export { t as STACK_CARD, n as Stack };
6
+
7
+ //# sourceMappingURL=stack.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.types.js","names":[],"sources":["../../../src/cards/stack/stack.types.ts"],"sourcesContent":["import {type PiCardRef, createCardDeclaration} from \"@pihanga2/core\";\n\nexport const STACK_CARD = \"shad/stack\";\n\n/**\n * CSS `flex-direction` values supported by the Stack card.\n */\nexport type DirectionT = \"column-reverse\" | \"column\" | \"row-reverse\" | \"row\";\n\n/**\n * CSS `justify-content` values supported by the Stack card.\n */\nexport type JustifyContentT =\n | \"flex-start\"\n | \"center\"\n | \"flex-end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\n/**\n * CSS `align-items` values supported by the Stack card.\n */\nexport type AlignItemsT =\n | \"normal\"\n | \"stretch\"\n | \"center\"\n | \"flex-start\"\n | \"flex-end\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"initial\"\n | \"inherit\";\n\nexport type StackProps<S = object> = {\n /** Ordered list of child card refs to render */\n content: PiCardRef[];\n\n /** Flex direction — defaults to `\"column\"` */\n direction?: DirectionT;\n /** Optional card ref rendered as a separator between children */\n divider?: PiCardRef;\n /** Tailwind gap spacing units between children */\n spacing?: number;\n\n justifyContent?: JustifyContentT;\n alignItems?: AlignItemsT;\n\n /** Additional Tailwind utility classes */\n className?: string;\n /** Card style object (use the `shad` key for Tailwind-compatible overrides) */\n style?: S;\n};\n\n/**\n * Factory function for declaring a `shad/stack` card instance.\n *\n * ```ts\n * import {registerCard} from \"@pihanga2/core\";\n * import {Stack} from \"@/cards/stack\";\n *\n * registerCard(\"myApp/toolbar\", Stack({\n * direction: \"row\",\n * spacing: 2,\n * alignItems: \"center\",\n * justifyContent: \"space-between\",\n * content: [\"myApp/logo\", \"myApp/navLinks\", \"myApp/userMenu\"],\n * }));\n * ```\n */\nexport const Stack = createCardDeclaration<StackProps>(STACK_CARD);\n"],"mappings":";;AAEA,IAAa,IAAa,cAqEb,IAAQ,EAAkC,CAAU"}
@@ -0,0 +1 @@
1
+ export * from './stepper.types';
@@ -0,0 +1,13 @@
1
+ import { StepperComponent as e } from "./stepper.component.js";
2
+ import { STEPPER_ACTION as t, STEPPER_CARD as n, Stepper as r, onStepperStepClicked as i } from "./stepper.types.js";
3
+ import { registerCardComponent as a } from "@pihanga2/core";
4
+ //#region src/cards/stepper/index.ts
5
+ a({
6
+ name: n,
7
+ component: e,
8
+ events: { onStepClicked: t.STEPCLICKED }
9
+ });
10
+ //#endregion
11
+ export { t as STEPPER_ACTION, n as STEPPER_CARD, r as Stepper, i as onStepperStepClicked };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/stepper/index.ts"],"sourcesContent":["import {registerCardComponent} from \"@pihanga2/core\";\n\nimport {StepperComponent} from \"./stepper.component\";\nimport {STEPPER_ACTION, STEPPER_CARD} from \"./stepper.types\";\n\nexport * from \"./stepper.types\";\n\nregisterCardComponent({\n name: STEPPER_CARD,\n component: StepperComponent,\n // Explicit mapping avoids CamelCase issues: STEPCLICKED → onStepClicked\n // (actionTypesToEvents would produce onStepclicked with lowercase 'c').\n events: {\n onStepClicked: STEPPER_ACTION.STEPCLICKED,\n },\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;CAGX,QAAQ,EACN,eAAe,EAAe,YAChC;AACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { PiCardProps } from '@pihanga2/core';
3
+ import { StepperEvents, StepperProps } from './stepper.types';
4
+ export declare const StepperComponent: (props: PiCardProps<StepperProps, StepperEvents>) => React.ReactNode;
@@ -0,0 +1,48 @@
1
+ import { StepperUI as e } from "../../components/ui/stepper.js";
2
+ /* empty css */
3
+ import { Card as t } from "@pihanga2/core";
4
+ import { useState as n } from "react";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region src/cards/stepper/stepper.component.tsx
7
+ var i = (i) => {
8
+ let { steps: a, activeStep: o, defaultActiveStep: s = 0, selfManaged: c = !1, orientation: l = "horizontal", size: u = "md", showContent: d = !1, className: f, cardName: p, onStepClicked: m } = i, [h, g] = n(o ?? s), _ = c ? h : o ?? 0, v = a.map((e) => ({
9
+ id: e.id,
10
+ title: e.title,
11
+ description: e.description,
12
+ optional: e.optional,
13
+ labelNode: e.labelCard ? /* @__PURE__ */ r(t, {
14
+ cardName: e.labelCard,
15
+ parentCard: p
16
+ }) : void 0
17
+ }));
18
+ function y(e, t) {
19
+ c && g(e), typeof m == "function" && m({
20
+ stepIndex: e,
21
+ stepId: t
22
+ });
23
+ }
24
+ function b(e) {
25
+ if (!d || l !== "vertical") return null;
26
+ let n = a[e];
27
+ return n?.contentCard ? /* @__PURE__ */ r(t, {
28
+ cardName: n.contentCard,
29
+ parentCard: p
30
+ }) : null;
31
+ }
32
+ return /* @__PURE__ */ r("div", {
33
+ "data-pihanga": p,
34
+ children: /* @__PURE__ */ r(e, {
35
+ steps: v,
36
+ activeStep: _,
37
+ orientation: l,
38
+ size: u,
39
+ className: f,
40
+ onStepClick: y,
41
+ renderStepContent: b
42
+ })
43
+ });
44
+ };
45
+ //#endregion
46
+ export { i as StepperComponent };
47
+
48
+ //# sourceMappingURL=stepper.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.component.js","names":[],"sources":["../../../src/cards/stepper/stepper.component.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport {StepperUI, type StepData} from \"@/components/ui/stepper\";\nimport type {StepperEvents, StepperProps} from \"./stepper.types\";\n// Default visual styles — import before component renders so BEM classes are styled.\n// Override by targeting the same class names in a stylesheet loaded after this one.\nimport \"./stepper.css\";\n\nexport const StepperComponent = (\n props: PiCardProps<StepperProps, StepperEvents>,\n): React.ReactNode => {\n const {\n steps,\n activeStep: propActiveStep,\n defaultActiveStep = 0,\n selfManaged = false,\n orientation = \"horizontal\",\n size = \"md\",\n showContent = false,\n className,\n cardName,\n onStepClicked,\n } = props;\n\n // Internal state used only when selfManaged=true.\n // Initialised from propActiveStep (if given) or defaultActiveStep.\n const [managedStep, setManagedStep] = useState<number>(\n propActiveStep ?? defaultActiveStep,\n );\n\n // Resolve the effective active step:\n // - selfManaged → use internal state\n // - controlled → use the prop (fall back to 0 if not set)\n const activeStep = selfManaged ? managedStep : (propActiveStep ?? 0);\n\n // Map StepItem[] → StepData[] (UI primitive only needs serialisable fields\n // plus an optional pre-rendered React node for custom labels).\n const stepData: StepData[] = steps.map((step) => ({\n id: step.id,\n title: step.title,\n description: step.description,\n optional: step.optional,\n // If a labelCard is specified, render it here and pass as `labelNode`.\n // The UI primitive will display it instead of the default title/description.\n labelNode: step.labelCard ? (\n <Card cardName={step.labelCard} parentCard={cardName} />\n ) : undefined,\n }));\n\n function handleStepClick(stepIndex: number, stepId: string) {\n if (selfManaged) {\n setManagedStep(stepIndex);\n }\n // Dispatch Pihanga event when the callback is wired (it may be absent for\n // inline / anonymous card declarations that have no registered reducer).\n if (typeof onStepClicked === \"function\") {\n onStepClicked({stepIndex, stepId});\n }\n }\n\n /**\n * Render a card ref for the active step's content (vertical mode only).\n * We look up the original `steps` array to get the `contentCard` reference.\n */\n function renderStepContent(stepIndex: number): React.ReactNode {\n if (!showContent || orientation !== \"vertical\") return null;\n const step = steps[stepIndex];\n if (!step?.contentCard) return null;\n return <Card cardName={step.contentCard} parentCard={cardName} />;\n }\n\n return (\n <div data-pihanga={cardName}>\n <StepperUI\n steps={stepData}\n activeStep={activeStep}\n orientation={orientation}\n size={size}\n className={className}\n onStepClick={handleStepClick}\n renderStepContent={renderStepContent}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;AAQA,IAAa,KACX,MACoB;CACpB,IAAM,EACJ,UACA,YAAY,GACZ,uBAAoB,GACpB,iBAAc,IACd,iBAAc,cACd,UAAO,MACP,iBAAc,IACd,cACA,aACA,qBACE,GAIE,CAAC,GAAa,KAAkB,EACpC,KAAkB,CACpB,GAKM,IAAa,IAAc,IAAe,KAAkB,GAI5D,IAAuB,EAAM,KAAK,OAAU;EAChD,IAAI,EAAK;EACT,OAAO,EAAK;EACZ,aAAa,EAAK;EAClB,UAAU,EAAK;EAGf,WAAW,EAAK,YACd,kBAAC,GAAD;GAAM,UAAU,EAAK;GAAW,YAAY;EAAW,CAAA,IACrD,KAAA;CACN,EAAE;CAEF,SAAS,EAAgB,GAAmB,GAAgB;EAM1D,AALI,KACF,EAAe,CAAS,GAItB,OAAO,KAAkB,cAC3B,EAAc;GAAC;GAAW;EAAM,CAAC;CAErC;CAMA,SAAS,EAAkB,GAAoC;EAC7D,IAAI,CAAC,KAAe,MAAgB,YAAY,OAAO;EACvD,IAAM,IAAO,EAAM;EAEnB,OADK,GAAM,cACJ,kBAAC,GAAD;GAAM,UAAU,EAAK;GAAa,YAAY;EAAW,CAAA,IADjC;CAEjC;CAEA,OACE,kBAAC,OAAD;EAAK,gBAAc;YACjB,kBAAC,GAAD;GACE,OAAO;GACK;GACC;GACP;GACK;GACX,aAAa;GACM;EACpB,CAAA;CACE,CAAA;AAET"}
@@ -0,0 +1,96 @@
1
+ import { PiCardRef } from '@pihanga2/core';
2
+ export declare const STEPPER_CARD = "shad/stepper";
3
+ export declare const Stepper: <S extends import('@pihanga2/core').ReduxState>(p: import('@pihanga2/core').PiMapProps<StepperProps, S, StepperEvents>) => import('@pihanga2/core').PiCardDef;
4
+ export declare const STEPPER_ACTION: {
5
+ STEPCLICKED: string;
6
+ };
7
+ export declare const onStepperStepClicked: <S extends import('@pihanga2/core').ReduxState>(register: import('@pihanga2/core').PiRegister, f: import('@pihanga2/core').ReduceF<S, import('@pihanga2/core').ReduxAction & {
8
+ cardID: string;
9
+ } & StepperStepClickedEvent>) => void;
10
+ /**
11
+ * A single step in the stepper.
12
+ */
13
+ export type StepItem = {
14
+ /** Unique identifier used in events. */
15
+ id: string;
16
+ /** Short label shown below/beside the step indicator. */
17
+ title: string;
18
+ /** Optional secondary text shown under the title. */
19
+ description?: string;
20
+ /**
21
+ * If true, an "(Optional)" suffix is appended to the title.
22
+ * Mirrors the MUI Joy UI `optional` prop.
23
+ */
24
+ optional?: boolean;
25
+ /**
26
+ * Optional Pihanga card rendered **instead of** the default title/description
27
+ * text label. Useful for rich labels (icons, custom markup, etc.).
28
+ * The card receives no extra props — use `memo` in its own declaration if
29
+ * it needs to read from state.
30
+ */
31
+ labelCard?: PiCardRef;
32
+ /**
33
+ * A card ref rendered as the body of this step when it is active
34
+ * and the stepper is in `"vertical"` orientation with `showContent: true`.
35
+ */
36
+ contentCard?: PiCardRef;
37
+ };
38
+ export type StepperProps = {
39
+ /** Ordered list of step definitions. */
40
+ steps: StepItem[];
41
+ /**
42
+ * 0-based index of the currently active step (controlled mode).
43
+ * Steps before this index are rendered as "completed";
44
+ * steps after are "upcoming".
45
+ *
46
+ * Required in controlled mode (`selfManaged: false`).
47
+ * Used as the initial value in self-managed mode when provided
48
+ * (otherwise defaults to `defaultActiveStep ?? 0`).
49
+ */
50
+ activeStep?: number;
51
+ /**
52
+ * Initial active step used only in self-managed mode (`selfManaged: true`).
53
+ * Ignored in controlled mode.
54
+ * @default 0
55
+ */
56
+ defaultActiveStep?: number;
57
+ /**
58
+ * When `true`, the component manages its own `activeStep` state internally.
59
+ * Clicking a step immediately advances the indicator without waiting for the
60
+ * host application to update the `activeStep` prop via a reducer.
61
+ * The `onStepClicked` event is still dispatched on each click.
62
+ *
63
+ * When `false` (default), `activeStep` fully controls the display.
64
+ * @default false
65
+ */
66
+ selfManaged?: boolean;
67
+ /**
68
+ * Layout orientation.
69
+ * - `"horizontal"` (default): steps flow left-to-right with labels below.
70
+ * - `"vertical"`: steps stack top-to-bottom with labels/content to the right.
71
+ */
72
+ orientation?: "horizontal" | "vertical";
73
+ /**
74
+ * Visual size of the step indicators.
75
+ * @default "md"
76
+ */
77
+ size?: "sm" | "md" | "lg";
78
+ /**
79
+ * When `true` and `orientation === "vertical"`, the active step's
80
+ * `contentCard` is rendered inline beneath its label.
81
+ * @default false
82
+ */
83
+ showContent?: boolean;
84
+ /** Additional Tailwind classes applied to the root element. */
85
+ className?: string;
86
+ };
87
+ export type StepperStepClickedEvent = {
88
+ /** 0-based index of the clicked step. */
89
+ stepIndex: number;
90
+ /** The `id` of the clicked step definition. */
91
+ stepId: string;
92
+ };
93
+ export type StepperEvents = {
94
+ /** Fired when the user clicks on a step indicator. */
95
+ onStepClicked: StepperStepClickedEvent;
96
+ };
@@ -0,0 +1,7 @@
1
+ import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
2
+ //#region src/cards/stepper/stepper.types.ts
3
+ var r = "shad/stepper", i = e(r), a = n(r, ["stepClicked"]), o = t(a.STEPCLICKED);
4
+ //#endregion
5
+ export { a as STEPPER_ACTION, r as STEPPER_CARD, i as Stepper, o as onStepperStepClicked };
6
+
7
+ //# sourceMappingURL=stepper.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.types.js","names":[],"sources":["../../../src/cards/stepper/stepper.types.ts"],"sourcesContent":["import {\n createCardDeclaration,\n createOnAction,\n type PiCardRef,\n registerActions,\n} from \"@pihanga2/core\";\n\nexport const STEPPER_CARD = \"shad/stepper\";\n\nexport const Stepper = createCardDeclaration<StepperProps, StepperEvents>(\n STEPPER_CARD,\n);\n\nexport const STEPPER_ACTION = registerActions(STEPPER_CARD, [\"stepClicked\"]);\n\nexport const onStepperStepClicked = createOnAction<StepperStepClickedEvent>(\n STEPPER_ACTION.STEPCLICKED,\n);\n\n// ─── Step definition ─────────────────────────────────────────────────────────\n\n/**\n * A single step in the stepper.\n */\nexport type StepItem = {\n /** Unique identifier used in events. */\n id: string;\n\n /** Short label shown below/beside the step indicator. */\n title: string;\n\n /** Optional secondary text shown under the title. */\n description?: string;\n\n /**\n * If true, an \"(Optional)\" suffix is appended to the title.\n * Mirrors the MUI Joy UI `optional` prop.\n */\n optional?: boolean;\n\n /**\n * Optional Pihanga card rendered **instead of** the default title/description\n * text label. Useful for rich labels (icons, custom markup, etc.).\n * The card receives no extra props — use `memo` in its own declaration if\n * it needs to read from state.\n */\n labelCard?: PiCardRef;\n\n /**\n * A card ref rendered as the body of this step when it is active\n * and the stepper is in `\"vertical\"` orientation with `showContent: true`.\n */\n contentCard?: PiCardRef;\n};\n\n// ─── Card props ───────────────────────────────────────────────────────────────\n\nexport type StepperProps = {\n /** Ordered list of step definitions. */\n steps: StepItem[];\n\n /**\n * 0-based index of the currently active step (controlled mode).\n * Steps before this index are rendered as \"completed\";\n * steps after are \"upcoming\".\n *\n * Required in controlled mode (`selfManaged: false`).\n * Used as the initial value in self-managed mode when provided\n * (otherwise defaults to `defaultActiveStep ?? 0`).\n */\n activeStep?: number;\n\n /**\n * Initial active step used only in self-managed mode (`selfManaged: true`).\n * Ignored in controlled mode.\n * @default 0\n */\n defaultActiveStep?: number;\n\n /**\n * When `true`, the component manages its own `activeStep` state internally.\n * Clicking a step immediately advances the indicator without waiting for the\n * host application to update the `activeStep` prop via a reducer.\n * The `onStepClicked` event is still dispatched on each click.\n *\n * When `false` (default), `activeStep` fully controls the display.\n * @default false\n */\n selfManaged?: boolean;\n\n /**\n * Layout orientation.\n * - `\"horizontal\"` (default): steps flow left-to-right with labels below.\n * - `\"vertical\"`: steps stack top-to-bottom with labels/content to the right.\n */\n orientation?: \"horizontal\" | \"vertical\";\n\n /**\n * Visual size of the step indicators.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n\n /**\n * When `true` and `orientation === \"vertical\"`, the active step's\n * `contentCard` is rendered inline beneath its label.\n * @default false\n */\n showContent?: boolean;\n\n /** Additional Tailwind classes applied to the root element. */\n className?: string;\n};\n\n// ─── Events ───────────────────────────────────────────────────────────────────\n\nexport type StepperStepClickedEvent = {\n /** 0-based index of the clicked step. */\n stepIndex: number;\n /** The `id` of the clicked step definition. */\n stepId: string;\n};\n\nexport type StepperEvents = {\n /** Fired when the user clicks on a step indicator. */\n onStepClicked: StepperStepClickedEvent;\n};\n"],"mappings":";;AAOA,IAAa,IAAe,gBAEf,IAAU,EACrB,CACF,GAEa,IAAiB,EAAgB,GAAc,CAAC,aAAa,CAAC,GAE9D,IAAuB,EAClC,EAAe,WACjB"}
@@ -0,0 +1 @@
1
+ export * from './switch.types';