@fluid-app/portal-sdk 0.1.45 → 0.1.46

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 (239) hide show
  1. package/dist/{AlertWidget-CRYuxgyZ.cjs → AlertWidget-CSYWU2c3.cjs} +2 -2
  2. package/dist/{AlertWidget-CRYuxgyZ.cjs.map → AlertWidget-CSYWU2c3.cjs.map} +1 -1
  3. package/dist/{AlertWidget-DnygF0ze.mjs → AlertWidget-DTrMt8y7.mjs} +2 -2
  4. package/dist/{AlertWidget-DnygF0ze.mjs.map → AlertWidget-DTrMt8y7.mjs.map} +1 -1
  5. package/dist/{BulletListWidget-DfXMbboF.cjs → BulletListWidget-BUMq15V1.cjs} +18 -4
  6. package/dist/BulletListWidget-BUMq15V1.cjs.map +1 -0
  7. package/dist/{BulletListWidget-bvVUvGOQ.mjs → BulletListWidget-riFNn47D.mjs} +19 -5
  8. package/dist/BulletListWidget-riFNn47D.mjs.map +1 -0
  9. package/dist/{CalendarWidget-YybCIktI.mjs → CalendarWidget-B9I__jsL.mjs} +20 -4
  10. package/dist/CalendarWidget-B9I__jsL.mjs.map +1 -0
  11. package/dist/{CalendarWidget-BAHiko62.cjs → CalendarWidget-DLkcnQVx.cjs} +19 -3
  12. package/dist/CalendarWidget-DLkcnQVx.cjs.map +1 -0
  13. package/dist/{CardWidget-h-FAxb1X.cjs → CardWidget-B4cJHq6g.cjs} +18 -10
  14. package/dist/CardWidget-B4cJHq6g.cjs.map +1 -0
  15. package/dist/{CardWidget-DBv4M9Wx.cjs → CardWidget-BtX2jjQR.cjs} +1 -1
  16. package/dist/{CardWidget-BOk-hod0.mjs → CardWidget-CzRI-odk.mjs} +19 -11
  17. package/dist/CardWidget-CzRI-odk.mjs.map +1 -0
  18. package/dist/{CarouselWidget-tT7qklhM.cjs → CarouselWidget-BcnZwnIh.cjs} +1 -1
  19. package/dist/{CarouselWidget-D-hBiS_H.cjs → CarouselWidget-Bx5jrthO.cjs} +19 -3
  20. package/dist/CarouselWidget-Bx5jrthO.cjs.map +1 -0
  21. package/dist/{CarouselWidget-Cqk2VJzH.mjs → CarouselWidget-C04z7JxO.mjs} +20 -4
  22. package/dist/CarouselWidget-C04z7JxO.mjs.map +1 -0
  23. package/dist/{CatchUpWidget-Bq5Z7dnd.cjs → CatchUpWidget-CFL4REYX.cjs} +19 -3
  24. package/dist/CatchUpWidget-CFL4REYX.cjs.map +1 -0
  25. package/dist/{CatchUpWidget-ZsrbwaTu.mjs → CatchUpWidget-Cb0B0G90.mjs} +20 -4
  26. package/dist/CatchUpWidget-Cb0B0G90.mjs.map +1 -0
  27. package/dist/{ChartWidget-B6_n_Jp8.cjs → ChartWidget-DWWeWN0Q.cjs} +19 -3
  28. package/dist/ChartWidget-DWWeWN0Q.cjs.map +1 -0
  29. package/dist/{ChartWidget-CU3_7LIS.mjs → ChartWidget-WaLM-zc-.mjs} +20 -4
  30. package/dist/ChartWidget-WaLM-zc-.mjs.map +1 -0
  31. package/dist/{ChartWidget-DVZSBgqe.cjs → ChartWidget-_jzD434L.cjs} +1 -1
  32. package/dist/ContactsScreen-B4FZ0Qeu.mjs +37 -0
  33. package/dist/{ContactsScreen-CTCJYpHu.cjs → ContactsScreen-C0I1_D_a.cjs} +2 -2
  34. package/dist/{ContactsScreen-CTCJYpHu.cjs.map → ContactsScreen-C0I1_D_a.cjs.map} +1 -1
  35. package/dist/{ContactsScreen-CoXP9Lt3.mjs → ContactsScreen-CoFB7EM3.mjs} +2 -2
  36. package/dist/{ContactsScreen-CoXP9Lt3.mjs.map → ContactsScreen-CoFB7EM3.mjs.map} +1 -1
  37. package/dist/ContactsScreen-DO7EwobV.cjs +39 -0
  38. package/dist/{ContainerWidget-CCqS2O6i.cjs → ContainerWidget-BFdpfJP9.cjs} +2 -2
  39. package/dist/{ContainerWidget-N8zf088I.cjs → ContainerWidget-DZXzmDZl.cjs} +2 -2
  40. package/dist/{ContainerWidget-N8zf088I.cjs.map → ContainerWidget-DZXzmDZl.cjs.map} +1 -1
  41. package/dist/{ContainerWidget-CFvliHMt.mjs → ContainerWidget-PNfcrIfV.mjs} +3 -3
  42. package/dist/{ContainerWidget-CFvliHMt.mjs.map → ContainerWidget-PNfcrIfV.mjs.map} +1 -1
  43. package/dist/{EmbedWidget-CRCZwIZl.mjs → EmbedWidget-BgDpu44-.mjs} +18 -3
  44. package/dist/EmbedWidget-BgDpu44-.mjs.map +1 -0
  45. package/dist/{EmbedWidget-DQB5SADr.cjs → EmbedWidget-D6eRvOud.cjs} +17 -3
  46. package/dist/EmbedWidget-D6eRvOud.cjs.map +1 -0
  47. package/dist/{FluidProvider-CRceQXyP.cjs → FluidProvider-DzrMOFXn.cjs} +43 -43
  48. package/dist/{FluidProvider-CRceQXyP.cjs.map → FluidProvider-DzrMOFXn.cjs.map} +1 -1
  49. package/dist/{FluidProvider-wbFFOVLt.mjs → FluidProvider-iYl6DSax.mjs} +45 -45
  50. package/dist/{FluidProvider-wbFFOVLt.mjs.map → FluidProvider-iYl6DSax.mjs.map} +1 -1
  51. package/dist/{ImageWidget-m5oDe9uw.mjs → ImageWidget-CvRlDtEa.mjs} +18 -3
  52. package/dist/ImageWidget-CvRlDtEa.mjs.map +1 -0
  53. package/dist/{ImageWidget-2ZYY9Ea9.cjs → ImageWidget-DwM4H6SC.cjs} +17 -3
  54. package/dist/ImageWidget-DwM4H6SC.cjs.map +1 -0
  55. package/dist/{LayoutWidget-Cfyr6h-3.cjs → LayoutWidget-CJ_OSMpt.cjs} +1 -1
  56. package/dist/{LayoutWidget-SPn4xt-J.cjs → LayoutWidget-CsdItxHF.cjs} +17 -3
  57. package/dist/LayoutWidget-CsdItxHF.cjs.map +1 -0
  58. package/dist/{LayoutWidget-B23HX9yD.mjs → LayoutWidget-pS3AMhD7.mjs} +18 -4
  59. package/dist/LayoutWidget-pS3AMhD7.mjs.map +1 -0
  60. package/dist/{LinkWidget-BFBAfz2T.cjs → LinkWidget-CJKveS10.cjs} +18 -4
  61. package/dist/LinkWidget-CJKveS10.cjs.map +1 -0
  62. package/dist/{LinkWidget-DVjXtQgl.cjs → LinkWidget-DFApxWIK.cjs} +1 -1
  63. package/dist/{LinkWidget-DImz_Kgl.mjs → LinkWidget-NR2OqU4Y.mjs} +19 -5
  64. package/dist/LinkWidget-NR2OqU4Y.mjs.map +1 -0
  65. package/dist/{ListWidget-B5PMqdCy.cjs → ListWidget-CulUMQ0M.cjs} +1 -1
  66. package/dist/{ListWidget-4nc_OvSx.cjs → ListWidget-D8yMrpa5.cjs} +19 -3
  67. package/dist/ListWidget-D8yMrpa5.cjs.map +1 -0
  68. package/dist/{ListWidget-BiCdEqrT.mjs → ListWidget-Dl2vSYmI.mjs} +20 -4
  69. package/dist/ListWidget-Dl2vSYmI.mjs.map +1 -0
  70. package/dist/{MessagingScreen-DXLiIKMX.cjs → MessagingScreen-CUBOR0qo.cjs} +3 -3
  71. package/dist/{MessagingScreen-DXLiIKMX.cjs.map → MessagingScreen-CUBOR0qo.cjs.map} +1 -1
  72. package/dist/MessagingScreen-CfbkE7H-.cjs +38 -0
  73. package/dist/{MessagingScreen-BNw31J4s.mjs → MessagingScreen-DgvqyD7k.mjs} +3 -3
  74. package/dist/{MessagingScreen-BNw31J4s.mjs.map → MessagingScreen-DgvqyD7k.mjs.map} +1 -1
  75. package/dist/MessagingScreen-kP-1EJZ5.mjs +36 -0
  76. package/dist/{MySiteScreen-CCjZRdTu.mjs → MySiteScreen-CvyqpzJd.mjs} +2 -2
  77. package/dist/{MySiteScreen-CCjZRdTu.mjs.map → MySiteScreen-CvyqpzJd.mjs.map} +1 -1
  78. package/dist/MySiteScreen-DUMMPU6X.mjs +35 -0
  79. package/dist/{MySiteScreen-DA9vTjW8.cjs → MySiteScreen-NJSRcmI-.cjs} +2 -2
  80. package/dist/{MySiteScreen-DA9vTjW8.cjs.map → MySiteScreen-NJSRcmI-.cjs.map} +1 -1
  81. package/dist/MySiteScreen-jE2m5qP6.cjs +37 -0
  82. package/dist/{MySiteWidget-Cw7623aF.mjs → MySiteWidget-CD1fK3lT.mjs} +20 -4
  83. package/dist/MySiteWidget-CD1fK3lT.mjs.map +1 -0
  84. package/dist/{MySiteWidget-bKaJ4r_k.cjs → MySiteWidget-DeAwyK5y.cjs} +19 -3
  85. package/dist/MySiteWidget-DeAwyK5y.cjs.map +1 -0
  86. package/dist/{NestedWidget-DRhUGS_-.cjs → NestedWidget-C-ZEUe-s.cjs} +1 -1
  87. package/dist/{NestedWidget-Bxf8MJuj.cjs → NestedWidget-CZuN2QY2.cjs} +19 -3
  88. package/dist/NestedWidget-CZuN2QY2.cjs.map +1 -0
  89. package/dist/{NestedWidget-DDAcIeej.mjs → NestedWidget-DjZumiak.mjs} +20 -4
  90. package/dist/NestedWidget-DjZumiak.mjs.map +1 -0
  91. package/dist/{OrdersScreen-CO3-vKPa.mjs → OrdersScreen-B2ErpU4b.mjs} +3 -3
  92. package/dist/{OrdersScreen-CO3-vKPa.mjs.map → OrdersScreen-B2ErpU4b.mjs.map} +1 -1
  93. package/dist/OrdersScreen-BTJAhLgs.mjs +35 -0
  94. package/dist/OrdersScreen-CE0GMwfC.cjs +37 -0
  95. package/dist/{OrdersScreen-q1QeUeHP.cjs → OrdersScreen-DvqljQVk.cjs} +3 -3
  96. package/dist/{OrdersScreen-q1QeUeHP.cjs.map → OrdersScreen-DvqljQVk.cjs.map} +1 -1
  97. package/dist/ProductsScreen-Bb5icf74.mjs +39 -0
  98. package/dist/{ProductsScreen-Btv24fan.mjs → ProductsScreen-CBVy5Zyi.mjs} +4 -4
  99. package/dist/{ProductsScreen-Btv24fan.mjs.map → ProductsScreen-CBVy5Zyi.mjs.map} +1 -1
  100. package/dist/{ProductsScreen-whYhtGj4.cjs → ProductsScreen-DdX6HMHt.cjs} +4 -4
  101. package/dist/{ProductsScreen-whYhtGj4.cjs.map → ProductsScreen-DdX6HMHt.cjs.map} +1 -1
  102. package/dist/ProductsScreen-HIV2lQ9Z.cjs +41 -0
  103. package/dist/ProfileScreen-BpJ41w20.mjs +34 -0
  104. package/dist/ProfileScreen-DAFrOHW1.cjs +36 -0
  105. package/dist/{ProfileScreen-DrmMx9us.cjs → ProfileScreen-LmGvJwTb.cjs} +3 -3
  106. package/dist/{ProfileScreen-DrmMx9us.cjs.map → ProfileScreen-LmGvJwTb.cjs.map} +1 -1
  107. package/dist/{ProfileScreen-Dsrj30ts.mjs → ProfileScreen-r8ceJSGs.mjs} +3 -3
  108. package/dist/{ProfileScreen-Dsrj30ts.mjs.map → ProfileScreen-r8ceJSGs.mjs.map} +1 -1
  109. package/dist/{QuickShareWidget-DJSBoNdI.cjs → QuickShareWidget-CIfXUWCx.cjs} +19 -3
  110. package/dist/QuickShareWidget-CIfXUWCx.cjs.map +1 -0
  111. package/dist/{QuickShareWidget-DzvaOfZL.mjs → QuickShareWidget-CvdvBmEn.mjs} +20 -4
  112. package/dist/QuickShareWidget-CvdvBmEn.mjs.map +1 -0
  113. package/dist/{RecentActivityWidget-DxCHufm5.cjs → RecentActivityWidget-kRfjO1IV.cjs} +19 -3
  114. package/dist/RecentActivityWidget-kRfjO1IV.cjs.map +1 -0
  115. package/dist/{RecentActivityWidget-Dw6yeZKX.mjs → RecentActivityWidget-uegOsG5c.mjs} +20 -4
  116. package/dist/RecentActivityWidget-uegOsG5c.mjs.map +1 -0
  117. package/dist/{SeparatorWidget-DQEGdSLZ.mjs → SeparatorWidget-CkFIxxkI.mjs} +2 -2
  118. package/dist/{SeparatorWidget-DQEGdSLZ.mjs.map → SeparatorWidget-CkFIxxkI.mjs.map} +1 -1
  119. package/dist/{ShareablesScreen-DX_Drc1P.mjs → ShareablesScreen-0JcyLc7i.mjs} +4 -4
  120. package/dist/{ShareablesScreen-DX_Drc1P.mjs.map → ShareablesScreen-0JcyLc7i.mjs.map} +1 -1
  121. package/dist/ShareablesScreen-CBw3gH0u.cjs +41 -0
  122. package/dist/{ShareablesScreen-CLjjDaWJ.cjs → ShareablesScreen-Dfa0LM6R.cjs} +4 -4
  123. package/dist/{ShareablesScreen-CLjjDaWJ.cjs.map → ShareablesScreen-Dfa0LM6R.cjs.map} +1 -1
  124. package/dist/ShareablesScreen-Riod6fjb.mjs +39 -0
  125. package/dist/{ShopScreen-DxU3HMSU.cjs → ShopScreen-C73ARj6e.cjs} +4 -4
  126. package/dist/{ShopScreen-DxU3HMSU.cjs.map → ShopScreen-C73ARj6e.cjs.map} +1 -1
  127. package/dist/ShopScreen-CET9016G.cjs +36 -0
  128. package/dist/{ShopScreen-DH3E7AIz.mjs → ShopScreen-DMDSD4gF.mjs} +4 -4
  129. package/dist/{ShopScreen-DH3E7AIz.mjs.map → ShopScreen-DMDSD4gF.mjs.map} +1 -1
  130. package/dist/ShopScreen-Ddrw43gs.mjs +34 -0
  131. package/dist/{SubscriptionsScreen-JVUC37A9.mjs → SubscriptionsScreen-BLrScFQV.mjs} +3 -3
  132. package/dist/{SubscriptionsScreen-JVUC37A9.mjs.map → SubscriptionsScreen-BLrScFQV.mjs.map} +1 -1
  133. package/dist/SubscriptionsScreen-BMjdIyWT.mjs +35 -0
  134. package/dist/SubscriptionsScreen-CPXCoeeu.cjs +37 -0
  135. package/dist/{SubscriptionsScreen-Bi8ecPZG.cjs → SubscriptionsScreen-CpvMZaU0.cjs} +3 -3
  136. package/dist/{SubscriptionsScreen-Bi8ecPZG.cjs.map → SubscriptionsScreen-CpvMZaU0.cjs.map} +1 -1
  137. package/dist/{TableWidget-D2QlWEXk.cjs → TableWidget-DFWfQIWv.cjs} +19 -3
  138. package/dist/TableWidget-DFWfQIWv.cjs.map +1 -0
  139. package/dist/{TableWidget-C_3ocWPY.cjs → TableWidget-WB7hx4Hb.cjs} +1 -1
  140. package/dist/{TableWidget-kq_rQCoV.mjs → TableWidget-aZUcob2U.mjs} +20 -4
  141. package/dist/TableWidget-aZUcob2U.mjs.map +1 -0
  142. package/dist/{TextWidget-Cmu4a9QG.mjs → TextWidget-D6qCnspg.mjs} +21 -5
  143. package/dist/TextWidget-D6qCnspg.mjs.map +1 -0
  144. package/dist/{TextWidget-Bd8V3uOT.cjs → TextWidget-XBeVX2oM.cjs} +20 -4
  145. package/dist/TextWidget-XBeVX2oM.cjs.map +1 -0
  146. package/dist/{ToDoWidget-BTq8QL4U.cjs → ToDoWidget-GmeRwP_0.cjs} +19 -3
  147. package/dist/ToDoWidget-GmeRwP_0.cjs.map +1 -0
  148. package/dist/{ToDoWidget-CKC5BocI.mjs → ToDoWidget-iiVItJrO.mjs} +20 -4
  149. package/dist/ToDoWidget-iiVItJrO.mjs.map +1 -0
  150. package/dist/{VideoWidget-R5xG2Dt6.mjs → VideoWidget-BAxtPtq5.mjs} +20 -4
  151. package/dist/VideoWidget-BAxtPtq5.mjs.map +1 -0
  152. package/dist/{VideoWidget-BK6_XvD0.cjs → VideoWidget-CN8nMeGP.cjs} +19 -3
  153. package/dist/VideoWidget-CN8nMeGP.cjs.map +1 -0
  154. package/dist/fields-CjDogNNF.mjs +2 -0
  155. package/dist/index.cjs +53 -53
  156. package/dist/index.d.cts +77 -1
  157. package/dist/index.d.cts.map +1 -1
  158. package/dist/index.d.mts +77 -1
  159. package/dist/index.d.mts.map +1 -1
  160. package/dist/index.mjs +55 -55
  161. package/dist/{products-fvXefwYo.mjs → products-DOCuAQDz.mjs} +3 -3
  162. package/dist/{products-fvXefwYo.mjs.map → products-DOCuAQDz.mjs.map} +1 -1
  163. package/dist/{products-CbSNg_2Q.cjs → products-zutaVs48.cjs} +3 -3
  164. package/dist/{products-CbSNg_2Q.cjs.map → products-zutaVs48.cjs.map} +1 -1
  165. package/dist/{src-CzKSt-6K.mjs → src-CIhTbou2.mjs} +2 -2
  166. package/dist/{src-CzKSt-6K.mjs.map → src-CIhTbou2.mjs.map} +1 -1
  167. package/dist/{src-BxmqgcCj.cjs → src-CXGrnE7x.cjs} +2 -2
  168. package/dist/{src-BxmqgcCj.cjs.map → src-CXGrnE7x.cjs.map} +1 -1
  169. package/dist/{use-account-clients-DR-cFoiZ.cjs → use-account-clients-BOwgvZok.cjs} +2 -2
  170. package/dist/{use-account-clients-DR-cFoiZ.cjs.map → use-account-clients-BOwgvZok.cjs.map} +1 -1
  171. package/dist/{use-account-clients-DSdeJkp0.mjs → use-account-clients-EEcG-B1B.mjs} +2 -2
  172. package/dist/{use-account-clients-DSdeJkp0.mjs.map → use-account-clients-EEcG-B1B.mjs.map} +1 -1
  173. package/dist/{use-customer-account-BFxhulZt.cjs → use-customer-account-BxoVi8ak.cjs} +3 -3
  174. package/dist/{use-customer-account-BFxhulZt.cjs.map → use-customer-account-BxoVi8ak.cjs.map} +1 -1
  175. package/dist/{use-customer-account-zbnCNccM.mjs → use-customer-account-TLWo3z05.mjs} +3 -3
  176. package/dist/{use-customer-account-zbnCNccM.mjs.map → use-customer-account-TLWo3z05.mjs.map} +1 -1
  177. package/dist/{use-fluid-api-BUOA1P_y.cjs → use-fluid-api-CU_r0Gu9.cjs} +2 -2
  178. package/dist/{use-fluid-api-BUOA1P_y.cjs.map → use-fluid-api-CU_r0Gu9.cjs.map} +1 -1
  179. package/dist/{use-fluid-api-BUEolyn-.mjs → use-fluid-api-DH8hTTPQ.mjs} +2 -2
  180. package/dist/{use-fluid-api-BUEolyn-.mjs.map → use-fluid-api-DH8hTTPQ.mjs.map} +1 -1
  181. package/package.json +16 -16
  182. package/styles/globals.css +2 -1
  183. package/dist/BulletListWidget-DfXMbboF.cjs.map +0 -1
  184. package/dist/BulletListWidget-bvVUvGOQ.mjs.map +0 -1
  185. package/dist/CalendarWidget-BAHiko62.cjs.map +0 -1
  186. package/dist/CalendarWidget-YybCIktI.mjs.map +0 -1
  187. package/dist/CardWidget-BOk-hod0.mjs.map +0 -1
  188. package/dist/CardWidget-h-FAxb1X.cjs.map +0 -1
  189. package/dist/CarouselWidget-Cqk2VJzH.mjs.map +0 -1
  190. package/dist/CarouselWidget-D-hBiS_H.cjs.map +0 -1
  191. package/dist/CatchUpWidget-Bq5Z7dnd.cjs.map +0 -1
  192. package/dist/CatchUpWidget-ZsrbwaTu.mjs.map +0 -1
  193. package/dist/ChartWidget-B6_n_Jp8.cjs.map +0 -1
  194. package/dist/ChartWidget-CU3_7LIS.mjs.map +0 -1
  195. package/dist/ContactsScreen-BGwMvoc6.cjs +0 -39
  196. package/dist/ContactsScreen-B_W89Txh.mjs +0 -37
  197. package/dist/EmbedWidget-CRCZwIZl.mjs.map +0 -1
  198. package/dist/EmbedWidget-DQB5SADr.cjs.map +0 -1
  199. package/dist/ImageWidget-2ZYY9Ea9.cjs.map +0 -1
  200. package/dist/ImageWidget-m5oDe9uw.mjs.map +0 -1
  201. package/dist/LayoutWidget-B23HX9yD.mjs.map +0 -1
  202. package/dist/LayoutWidget-SPn4xt-J.cjs.map +0 -1
  203. package/dist/LinkWidget-BFBAfz2T.cjs.map +0 -1
  204. package/dist/LinkWidget-DImz_Kgl.mjs.map +0 -1
  205. package/dist/ListWidget-4nc_OvSx.cjs.map +0 -1
  206. package/dist/ListWidget-BiCdEqrT.mjs.map +0 -1
  207. package/dist/MessagingScreen-BgaFc4dw.mjs +0 -36
  208. package/dist/MessagingScreen-r1CuGZTz.cjs +0 -38
  209. package/dist/MySiteScreen-CejFK1ki.cjs +0 -37
  210. package/dist/MySiteScreen-DcFcXY7l.mjs +0 -35
  211. package/dist/MySiteWidget-Cw7623aF.mjs.map +0 -1
  212. package/dist/MySiteWidget-bKaJ4r_k.cjs.map +0 -1
  213. package/dist/NestedWidget-Bxf8MJuj.cjs.map +0 -1
  214. package/dist/NestedWidget-DDAcIeej.mjs.map +0 -1
  215. package/dist/OrdersScreen-BTgeNO4Z.cjs +0 -37
  216. package/dist/OrdersScreen-yDvuEsiZ.mjs +0 -35
  217. package/dist/ProductsScreen-CibQXnfN.mjs +0 -39
  218. package/dist/ProductsScreen-DygMyNll.cjs +0 -41
  219. package/dist/ProfileScreen-CbZevC9b.cjs +0 -36
  220. package/dist/ProfileScreen-H2suBhUK.mjs +0 -34
  221. package/dist/QuickShareWidget-DJSBoNdI.cjs.map +0 -1
  222. package/dist/QuickShareWidget-DzvaOfZL.mjs.map +0 -1
  223. package/dist/RecentActivityWidget-Dw6yeZKX.mjs.map +0 -1
  224. package/dist/RecentActivityWidget-DxCHufm5.cjs.map +0 -1
  225. package/dist/ShareablesScreen-CvdwMRKM.cjs +0 -41
  226. package/dist/ShareablesScreen-VWeb61BX.mjs +0 -39
  227. package/dist/ShopScreen-CFP3QG21.mjs +0 -34
  228. package/dist/ShopScreen-CWFKO9Iz.cjs +0 -36
  229. package/dist/SubscriptionsScreen-CNDRQ4Q5.cjs +0 -37
  230. package/dist/SubscriptionsScreen-oABvUl1M.mjs +0 -35
  231. package/dist/TableWidget-D2QlWEXk.cjs.map +0 -1
  232. package/dist/TableWidget-kq_rQCoV.mjs.map +0 -1
  233. package/dist/TextWidget-Bd8V3uOT.cjs.map +0 -1
  234. package/dist/TextWidget-Cmu4a9QG.mjs.map +0 -1
  235. package/dist/ToDoWidget-BTq8QL4U.cjs.map +0 -1
  236. package/dist/ToDoWidget-CKC5BocI.mjs.map +0 -1
  237. package/dist/VideoWidget-BK6_XvD0.cjs.map +0 -1
  238. package/dist/VideoWidget-R5xG2Dt6.mjs.map +0 -1
  239. package/dist/fields-DW1nDGRz.mjs +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWidget-CzRI-odk.mjs","names":["ScreenRenderer","DefaultScreenRenderer"],"sources":["../../widgets/src/widgets/CardWidget.tsx"],"sourcesContent":["import { ScreenRenderer as DefaultScreenRenderer } from \"../core/ScreenRenderer\";\nimport { useRegistry } from \"../contexts/RegistryContext\";\nimport { useScreenRenderer } from \"../contexts/ScreenRendererContext\";\nimport type {\n WidgetSchema,\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n PaddingOptions,\n GapOptions,\n ColorOptions,\n FontSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type React from \"react\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getGapField,\n getPaddingField,\n gapValues,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_BACKGROUND: BackgroundValue = {\n type: \"solid\",\n color: \"background\",\n};\nconst DEFAULT_CHILDREN: (WidgetSchema | null)[] = [];\n\ntype CardWidgetProps = {\n // Header\n headerEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n headerBackground?: ColorOptions;\n\n // Footer\n footerEnabled?: boolean;\n footerContent?: string;\n footerColor?: ColorOptions;\n footerBackground?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n /** @deprecated Use borderWidth instead */\n borderEnabled?: boolean;\n gapSize?: GapOptions;\n\n // Container props (children = other widgets)\n children?: (WidgetSchema | null)[];\n\n // Styling\n className?: string;\n};\n\nexport function CardWidget({\n // Header\n headerEnabled = true,\n title = \"Card Title\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n headerBackground = \"transparent\",\n\n // Footer\n footerEnabled = false,\n footerContent = \"\",\n footerColor = \"muted\",\n footerBackground = \"transparent\",\n\n // Styling\n background = DEFAULT_BACKGROUND,\n padding = 6,\n borderRadius = \"xl\",\n borderWidth = \"thin\",\n borderColor = \"muted\",\n borderEnabled,\n gapSize = \"md\",\n\n // Container\n children = DEFAULT_CHILDREN,\n\n className = \"\",\n}: CardWidgetProps): React.JSX.Element {\n // Get registry from context if not provided as prop\n const contextRegistry = useRegistry();\n\n // Use ScreenRenderer from context, fall back to local\n const ContextScreenRenderer = useScreenRenderer();\n const ScreenRenderer = ContextScreenRenderer ?? DefaultScreenRenderer;\n\n // Extract background values\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n const gapSizeValue = gapSize ? gapValues[gapSize] : 4;\n\n // Backwards compatibility: if legacy borderEnabled prop exists, map it\n const effectiveBorderWidth = borderEnabled === false ? \"none\" : borderWidth;\n\n const cardClasses = [\n \"flex flex-col gap-6\",\n `bg-${backgroundColor}`,\n `p-${padding}`,\n `rounded-${borderRadius}`,\n borderWidthClasses[effectiveBorderWidth],\n effectiveBorderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const containerStyle: React.CSSProperties = {\n backgroundImage,\n };\n\n // Filter out null children\n const validChildren = children.filter(\n (child): child is WidgetSchema => child !== null,\n );\n\n return (\n <div data-slot=\"card\" className={cardClasses} style={containerStyle}>\n {headerEnabled && (title || headerBackground !== \"transparent\") && (\n <div\n data-slot=\"card-header\"\n className={\n headerBackground !== \"transparent\"\n ? `bg-${headerBackground} -mx-${padding} -mt-${padding} px-${padding} py-${padding} rounded-t-${borderRadius}`\n : undefined\n }\n >\n {title && (\n <div\n data-slot=\"card-title\"\n className={`text-${titleFontSize} text-${titleColor} font-header leading-none font-semibold`}\n >\n {title}\n </div>\n )}\n </div>\n )}\n\n <div data-slot=\"card-content\" className=\"@container flex-1\">\n {contextRegistry ? (\n <ScreenRenderer\n screen={validChildren}\n registry={contextRegistry}\n className={`flex flex-col gap-${gapSizeValue}`}\n />\n ) : (\n <div className={`flex flex-col gap-${gapSizeValue}`} />\n )}\n </div>\n\n {footerEnabled && footerContent && (\n <div\n data-slot=\"card-footer\"\n className={[\n `text-sm text-${footerColor} flex items-center`,\n footerBackground !== \"transparent\"\n ? `bg-${footerBackground} -mx-${padding} -mb-${padding} px-${padding} py-${padding} rounded-b-${borderRadius}`\n : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {footerContent}\n </div>\n )}\n </div>\n );\n}\n\nexport const cardWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CardWidget\",\n displayName: \"Card\",\n fields: [\n // Header\n {\n key: \"headerEnabled\",\n label: \"Show Header\",\n type: \"boolean\",\n description: \"Toggle header visibility\",\n defaultValue: true,\n group: \"Header\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Card title text\",\n defaultValue: \"Card Title\",\n group: \"Header\",\n requiresKeyToBeTrue: \"headerEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"lg\",\n group: \"Header\",\n requiresKeyToBeTrue: \"headerEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the title\",\n defaultValue: \"foreground\",\n group: \"Header\",\n requiresKeyToBeTrue: \"headerEnabled\",\n }),\n getColorField({\n key: \"headerBackground\",\n label: \"Header Background\",\n description: \"Background color for the header\",\n defaultValue: \"transparent\",\n group: \"Header\",\n requiresKeyToBeTrue: \"headerEnabled\",\n }),\n\n // Footer\n {\n key: \"footerEnabled\",\n label: \"Show Footer\",\n type: \"boolean\",\n description: \"Toggle footer visibility\",\n defaultValue: false,\n group: \"Footer\",\n },\n {\n key: \"footerContent\",\n label: \"Footer Text\",\n type: \"text\",\n description: \"Footer content text\",\n defaultValue: \"\",\n group: \"Footer\",\n requiresKeyToBeTrue: \"footerEnabled\",\n },\n getColorField({\n key: \"footerColor\",\n label: \"Footer Color\",\n description: \"Color for the footer text\",\n defaultValue: \"muted\",\n group: \"Footer\",\n requiresKeyToBeTrue: \"footerEnabled\",\n }),\n getColorField({\n key: \"footerBackground\",\n label: \"Footer Background\",\n description: \"Background color for the footer\",\n defaultValue: \"transparent\",\n group: \"Footer\",\n requiresKeyToBeTrue: \"footerEnabled\",\n }),\n\n // Design\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the card\",\n defaultValue: \"background\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Card padding\",\n defaultValue: 6,\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Card border radius\",\n defaultValue: \"xl\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Card border width\",\n defaultValue: \"thin\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Card border color\",\n defaultValue: \"muted\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gapSize\",\n label: \"Gap\",\n description: \"Gap between child widgets\",\n defaultValue: \"md\",\n group: \"Design\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;;AA4BA,MAAM,qBAAsC;CAC1C,MAAM;CACN,OAAO;CACR;AACD,MAAM,mBAA4C,EAAE;AAiCpD,SAAgB,WAAW,EAEzB,gBAAgB,MAChB,QAAQ,cACR,gBAAgB,MAChB,aAAa,cACb,mBAAmB,eAGnB,gBAAgB,OAChB,gBAAgB,IAChB,cAAc,SACd,mBAAmB,eAGnB,aAAa,oBACb,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SACd,eACA,UAAU,MAGV,WAAW,kBAEX,YAAY,MACyB;CAErC,MAAM,kBAAkB,aAAa;CAIrC,MAAMA,mBADwB,mBAAmB,IACDC;CAGhD,MAAM,kBAAkB,WAAW,SAAS;CAC5C,MAAM,mBACH,WAAW,UAAU,aAAa,WAAW,UAAU,aACxD,WAAW,SAAS,UAChB,OAAO,WAAW,SAAS,aAAa,WAAW,SAAS,SAAS,KACrE;CAEN,MAAM,eAAe,UAAU,UAAU,WAAW;CAGpD,MAAM,uBAAuB,kBAAkB,QAAQ,SAAS;CAEhE,MAAM,cAAc;EAClB;EACA,MAAM;EACN,KAAK;EACL,WAAW;EACX,mBAAmB;EACnB,yBAAyB,SAAS,mBAAmB,eAAe;EACpE;EACD,CACE,OAAO,QAAQ,CACf,KAAK,IAAI;CAEZ,MAAM,iBAAsC,EAC1C,iBACD;CAGD,MAAM,gBAAgB,SAAS,QAC5B,UAAiC,UAAU,KAC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a;GACb,cAAc;GACd,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,OAAO;GACP,qBAAqB;GACtB;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,MAAM;GACN,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR;EACD,gBAAgB;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF,YAAY;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACH;CACF"}
@@ -4,5 +4,5 @@ require("./purify.es-CmsCRU2T.cjs");
4
4
  require("./src-CWGmmrLZ.cjs");
5
5
  require("./scroll-arrows-Dw7eLYdG.cjs");
6
6
  require("./MediaRenderer-CEV-eeB-.cjs");
7
- const require_CarouselWidget = require("./CarouselWidget-D-hBiS_H.cjs");
7
+ const require_CarouselWidget = require("./CarouselWidget-Bx5jrthO.cjs");
8
8
  exports.carouselWidgetPropertySchema = require_CarouselWidget.carouselWidgetPropertySchema;
@@ -11,7 +11,7 @@ const DEFAULT_SLIDES = [];
11
11
  function CarouselWidget({ slides = DEFAULT_SLIDES, autoScrollInterval = 3e3, enableAutoScroll = false, carouselHeight = "400px", align = {
12
12
  vertical: "bottom",
13
13
  horizontal: "left"
14
- }, overlayIntensity = 40, borderRadius = "none", padding = 0, textWidth = "100%", headerSize = "lg", headerColor = "background", textSize = "md", textColor = "background", showButton = true, buttonColor = "background", buttonSize = "default", overlayEnabled = true, overlayType = "solid", className, ...props }) {
14
+ }, overlayIntensity = 40, borderRadius = "none", borderWidth = "none", borderColor = "muted", padding = 0, textWidth = "100%", headerSize = "lg", headerColor = "background", textSize = "md", textColor = "background", showButton = true, buttonColor = "background", buttonSize = "default", overlayEnabled = true, overlayType = "solid", className, ...props }) {
15
15
  const [currentIndex, setCurrentIndex] = (0, react.useState)(0);
16
16
  const [isHovered, setIsHovered] = (0, react.useState)(false);
17
17
  const hasSlides = slides.length > 0;
@@ -77,7 +77,7 @@ function CarouselWidget({ slides = DEFAULT_SLIDES, autoScrollInterval = 3e3, ena
77
77
  })
78
78
  });
79
79
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
80
- className: `relative w-full overflow-hidden rounded-${borderRadius} ${className}`,
80
+ className: `relative w-full overflow-hidden rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} ${className}`,
81
81
  style: { minHeight: carouselHeight },
82
82
  onMouseEnter: () => setIsHovered(true),
83
83
  onMouseLeave: () => setIsHovered(false),
@@ -297,6 +297,22 @@ const carouselWidgetPropertySchema = {
297
297
  tab: "styling",
298
298
  group: "Design"
299
299
  }),
300
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
301
+ key: "borderWidth",
302
+ label: "Border Width",
303
+ description: "Border width for the widget",
304
+ defaultValue: "none",
305
+ tab: "styling",
306
+ group: "Design"
307
+ }),
308
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
309
+ key: "borderColor",
310
+ label: "Border Color",
311
+ description: "Border color for the widget",
312
+ defaultValue: "muted",
313
+ tab: "styling",
314
+ group: "Design"
315
+ }),
300
316
  (0, _fluid_app_portal_core_registries.getPaddingField)({
301
317
  defaultValue: 4,
302
318
  key: "padding",
@@ -457,4 +473,4 @@ Object.defineProperty(exports, "carouselWidgetPropertySchema", {
457
473
  }
458
474
  });
459
475
 
460
- //# sourceMappingURL=CarouselWidget-D-hBiS_H.cjs.map
476
+ //# sourceMappingURL=CarouselWidget-Bx5jrthO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselWidget-Bx5jrthO.cjs","names":["borderWidthClasses","borderColorClasses","MediaRenderer","getMediaPropsFromWidgetSchema","DOMPurify","Button","ScrollArrows"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.description, {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n </div>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC,cAAc,oBAAA,GAAA,MAAA,UAA4B,EAAE;CACnD,MAAM,CAAC,WAAW,iBAAA,GAAA,MAAA,UAAyB,MAAM;CAEjD,MAAM,YAAY,OAAO,SAAS;CAClC,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a;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;4DACiB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
2
- import { a as getColorField, i as getButtonSizeField, o as getFontSizeField, r as getBorderRadiusField$1, u as getPaddingField } from "./fields-DW1nDGRz.mjs";
2
+ import { c as getButtonSizeField, i as getBorderColorField$1, l as getColorField, m as getPaddingField, n as borderWidthClasses$1, o as getBorderRadiusField$1, s as getBorderWidthField$1, t as borderColorClasses$1, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
3
3
  import { t as purify } from "./purify.es-CKZbQnR8.mjs";
4
4
  import { on as Button } from "./src-BVkLGnwV.mjs";
5
5
  import { t as ScrollArrows } from "./scroll-arrows-E2JL1tu6.mjs";
@@ -16,7 +16,7 @@ const DEFAULT_SLIDES = [];
16
16
  function CarouselWidget({ slides = DEFAULT_SLIDES, autoScrollInterval = 3e3, enableAutoScroll = false, carouselHeight = "400px", align = {
17
17
  vertical: "bottom",
18
18
  horizontal: "left"
19
- }, overlayIntensity = 40, borderRadius = "none", padding = 0, textWidth = "100%", headerSize = "lg", headerColor = "background", textSize = "md", textColor = "background", showButton = true, buttonColor = "background", buttonSize = "default", overlayEnabled = true, overlayType = "solid", className, ...props }) {
19
+ }, overlayIntensity = 40, borderRadius = "none", borderWidth = "none", borderColor = "muted", padding = 0, textWidth = "100%", headerSize = "lg", headerColor = "background", textSize = "md", textColor = "background", showButton = true, buttonColor = "background", buttonSize = "default", overlayEnabled = true, overlayType = "solid", className, ...props }) {
20
20
  const [currentIndex, setCurrentIndex] = useState(0);
21
21
  const [isHovered, setIsHovered] = useState(false);
22
22
  const hasSlides = slides.length > 0;
@@ -82,7 +82,7 @@ function CarouselWidget({ slides = DEFAULT_SLIDES, autoScrollInterval = 3e3, ena
82
82
  })
83
83
  });
84
84
  return /* @__PURE__ */ jsxs("div", {
85
- className: `relative w-full overflow-hidden rounded-${borderRadius} ${className}`,
85
+ className: `relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses$1[borderWidth]} ${borderWidth !== "none" ? borderColorClasses$1[borderColor] : ""} ${className}`,
86
86
  style: { minHeight: carouselHeight },
87
87
  onMouseEnter: () => setIsHovered(true),
88
88
  onMouseLeave: () => setIsHovered(false),
@@ -302,6 +302,22 @@ const carouselWidgetPropertySchema = {
302
302
  tab: "styling",
303
303
  group: "Design"
304
304
  }),
305
+ getBorderWidthField$1({
306
+ key: "borderWidth",
307
+ label: "Border Width",
308
+ description: "Border width for the widget",
309
+ defaultValue: "none",
310
+ tab: "styling",
311
+ group: "Design"
312
+ }),
313
+ getBorderColorField$1({
314
+ key: "borderColor",
315
+ label: "Border Color",
316
+ description: "Border color for the widget",
317
+ defaultValue: "muted",
318
+ tab: "styling",
319
+ group: "Design"
320
+ }),
305
321
  getPaddingField({
306
322
  defaultValue: 4,
307
323
  key: "padding",
@@ -451,4 +467,4 @@ const carouselWidgetPropertySchema = {
451
467
  //#endregion
452
468
  export { CarouselWidget_exports as n, carouselWidgetPropertySchema as r, CarouselWidget as t };
453
469
 
454
- //# sourceMappingURL=CarouselWidget-Cqk2VJzH.mjs.map
470
+ //# sourceMappingURL=CarouselWidget-C04z7JxO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselWidget-C04z7JxO.mjs","names":["borderWidthClasses","borderColorClasses","DOMPurify","getBorderRadiusField","getBorderWidthField","getBorderColorField"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.description, {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n </div>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC,cAAc,mBAAmB,SAAS,EAAE;CACnD,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CAEjD,MAAM,YAAY,OAAO,SAAS;CAClC,M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,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,gBAAgB;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,mBAAmB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
@@ -71,14 +71,14 @@ const fontSizeClasses = {
71
71
  function CatchUpWidget({ titleEnabled = true, titleText = "Catch Ups", titleFontSize = "xl", titleColor = "foreground", background = {
72
72
  type: "solid",
73
73
  color: "background"
74
- }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", maxItems = 5, className, ...props }) {
74
+ }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", maxItems = 5, className, ...props }) {
75
75
  const backgroundColor = background.color || "background";
76
76
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
77
77
  const { data = [], isLoading, isError } = useCatchUps();
78
78
  const catchUpsToShow = data.slice(0, maxItems);
79
79
  const moreCatchUps = data.length - catchUpsToShow.length;
80
80
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
81
- className: `flex flex-col rounded-${borderRadius} bg-${backgroundColor} p-${padding} text-${textColor} ${className || ""}`,
81
+ className: `flex flex-col rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} bg-${backgroundColor} p-${padding} text-${textColor} ${className || ""}`,
82
82
  style: { backgroundImage },
83
83
  ...props,
84
84
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -228,6 +228,22 @@ const catchUpWidgetPropertySchema = {
228
228
  defaultValue: "md",
229
229
  tab: "styling",
230
230
  group: "Design"
231
+ }),
232
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
233
+ key: "borderWidth",
234
+ label: "Border Width",
235
+ description: "Border width for the widget",
236
+ defaultValue: "none",
237
+ tab: "styling",
238
+ group: "Design"
239
+ }),
240
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
241
+ key: "borderColor",
242
+ label: "Border Color",
243
+ description: "Border color for the widget",
244
+ defaultValue: "muted",
245
+ tab: "styling",
246
+ group: "Design"
231
247
  })
232
248
  ]
233
249
  };
@@ -251,4 +267,4 @@ Object.defineProperty(exports, "catchUpWidgetPropertySchema", {
251
267
  }
252
268
  });
253
269
 
254
- //# sourceMappingURL=CatchUpWidget-Bq5Z7dnd.cjs.map
270
+ //# sourceMappingURL=CatchUpWidget-CFL4REYX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CatchUpWidget-CFL4REYX.cjs","names":["useDataSourceConfig","useWidgetPreviewContext","borderWidthClasses","borderColorClasses","Loader2","ErrorState","Sparkles"],"sources":["../../widgets/src/hooks/use-catchups.preview.ts","../../widgets/src/hooks/use-catchups.ts","../../widgets/src/widgets/CatchUpWidget.tsx"],"sourcesContent":["import type { CatchUp } from \"./use-catchups.types\";\n\nexport const PREVIEW_DATA: CatchUp[] = [\n { id: 1, suggestion_title: \"Check in with Sarah about her recent order\" },\n { id: 2, suggestion_title: \"Follow up with Mike on product samples\" },\n { id: 3, suggestion_title: \"Reconnect with Lisa — last contact 30 days ago\" },\n { id: 4, suggestion_title: \"Thank Alex for their referral last week\" },\n { id: 5, suggestion_title: \"Share new catalog with Jordan\" },\n];\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useDataSourceConfig } from \"@fluid-app/portal-react/data-sources/context\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport { PREVIEW_DATA } from \"./use-catchups.preview\";\n\nimport type { CatchUp } from \"./use-catchups.types\";\n\nexport type { CatchUp } from \"./use-catchups.types\";\n\nexport function useCatchUps(): UseQueryResult<CatchUp[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"catchups\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<CatchUp[]> => {\n const url = baseUrl\n ? `${baseUrl}/affiliate_catch_up_actions.json`\n : \"/affiliate_catch_up_actions.json\";\n const response = await fetch(url, {\n headers: {\n \"content-type\": \"application/json\",\n ...getApiHeaders?.(),\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch catch ups: ${response.status}`);\n }\n\n return response.json();\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport { useCatchUps } from \"../hooks/use-catchups\";\nimport { Loader2, Sparkles } from \"lucide-react\";\nimport { ErrorState } from \"../components/error-state\";\n\n// Font size mapping for title\nconst fontSizeClasses: Record<FontSizeOptions, string> = {\n \"2xl\": \"text-2xl\",\n xl: \"text-xl\",\n lg: \"text-lg\",\n md: \"text-base\",\n sm: \"text-sm\",\n xs: \"text-xs\",\n};\n\ntype CatchUpWidgetProps = ComponentProps<\"div\"> & {\n // Title settings\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n // Design settings\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n // Display settings\n maxItems?: number;\n};\n\nexport function CatchUpWidget({\n // Title settings with defaults\n titleEnabled = true,\n titleText = \"Catch Ups\",\n titleFontSize = \"xl\",\n titleColor = \"foreground\",\n // Design settings with defaults\n background = {\n type: \"solid\",\n color: \"background\",\n },\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n // Display settings with defaults\n maxItems = 5,\n className,\n ...props\n}: CatchUpWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n const { data = [], isLoading, isError } = useCatchUps();\n\n const catchUpsToShow = data.slice(0, maxItems);\n const moreCatchUps = data.length - catchUpsToShow.length;\n\n return (\n <div\n className={`flex flex-col rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-${backgroundColor} p-${padding} text-${textColor} ${className || \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n {titleEnabled && (\n <h3\n className={`${fontSizeClasses[titleFontSize]} font-header font-semibold text-${titleColor}`}\n >\n {titleText}\n </h3>\n )}\n {!isLoading && !isError && data.length > 0 && (\n <span className={`text-3xl font-bold text-${accentColor}`}>\n {data.length}\n </span>\n )}\n </div>\n\n {/* Loading state */}\n {isLoading ? (\n <div className=\"flex min-h-[150px] flex-1 items-center justify-center\">\n <Loader2 className={`h-8 w-8 animate-spin text-${accentColor}`} />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : data.length === 0 ? (\n /* Empty state */\n <div className=\"flex min-h-[150px] flex-1 flex-col items-center justify-center gap-2\">\n <Sparkles className={`h-8 w-8 text-${accentColor}`} />\n <p className=\"text-center font-semibold\">\n You&apos;re all caught up.\n </p>\n <p className=\"text-sm opacity-60\">See you next time!</p>\n </div>\n ) : (\n /* Default state with catch ups */\n <>\n <div className=\"mt-3 flex-1\">\n {catchUpsToShow.map((catchUp, index: number) => (\n <div\n key={catchUp.id || index}\n className={`py-2 ${index !== catchUpsToShow.length - 1 ? \"border-b border-current/10\" : \"\"}`}\n >\n <p className=\"line-clamp-1 text-sm\">\n {catchUp.suggestion_title}\n </p>\n </div>\n ))}\n </div>\n\n {/* More indicator */}\n {moreCatchUps > 0 && (\n <p className=\"mt-2 text-sm opacity-60\">\n {moreCatchUps} more catch up{moreCatchUps > 1 ? \"s\" : \"\"}\n </p>\n )}\n </>\n )}\n </div>\n );\n}\n\n// Property schema for the widget editor\nexport const catchUpWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CatchUpWidget\",\n displayName: \"Catch Up Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the catch ups\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Title text displayed above the catch ups\",\n defaultValue: \"Catch Ups\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the widget title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the widget title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Design Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for catch up items\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for count display and icons\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of catch ups to display\",\n defaultValue: 5,\n min: 1,\n max: 10,\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;AAEA,MAAa,eAA0B;CACrC;EAAE,IAAI;EAAG,kBAAkB;EAA8C;CACzE;EAAE,IAAI;EAAG,kBAAkB;EAA0C;CACrE;EAAE,IAAI;EAAG,kBAAkB;EAAkD;CAC7E;EAAE,IAAI;EAAG,kBAAkB;EAA2C;CACtE;EAAE,IAAI;EAAG,kBAAkB;EAAiC;CAC7D;;;ACCD,SAAgB,cAAgD;CAC9D,MAAM,EAAE,SAAS,kBAAkBA,oBAAAA,qBAAqB;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ACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
2
2
  import { i as useDataSourceConfig, n as useWidgetPreviewContext, t as ErrorState } from "./error-state-BGEvTYIh.mjs";
3
- import { a as getColorField, o as getFontSizeField, r as getBorderRadiusField, u as getPaddingField } from "./fields-DW1nDGRz.mjs";
3
+ import { i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
4
4
  import { useQuery } from "@tanstack/react-query";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Loader2, Sparkles } from "lucide-react";
@@ -71,14 +71,14 @@ const fontSizeClasses = {
71
71
  function CatchUpWidget({ titleEnabled = true, titleText = "Catch Ups", titleFontSize = "xl", titleColor = "foreground", background = {
72
72
  type: "solid",
73
73
  color: "background"
74
- }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", maxItems = 5, className, ...props }) {
74
+ }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", maxItems = 5, className, ...props }) {
75
75
  const backgroundColor = background.color || "background";
76
76
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
77
77
  const { data = [], isLoading, isError } = useCatchUps();
78
78
  const catchUpsToShow = data.slice(0, maxItems);
79
79
  const moreCatchUps = data.length - catchUpsToShow.length;
80
80
  return /* @__PURE__ */ jsxs("div", {
81
- className: `flex flex-col rounded-${borderRadius} bg-${backgroundColor} p-${padding} text-${textColor} ${className || ""}`,
81
+ className: `flex flex-col rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} bg-${backgroundColor} p-${padding} text-${textColor} ${className || ""}`,
82
82
  style: { backgroundImage },
83
83
  ...props,
84
84
  children: [/* @__PURE__ */ jsxs("div", {
@@ -228,10 +228,26 @@ const catchUpWidgetPropertySchema = {
228
228
  defaultValue: "md",
229
229
  tab: "styling",
230
230
  group: "Design"
231
+ }),
232
+ getBorderWidthField({
233
+ key: "borderWidth",
234
+ label: "Border Width",
235
+ description: "Border width for the widget",
236
+ defaultValue: "none",
237
+ tab: "styling",
238
+ group: "Design"
239
+ }),
240
+ getBorderColorField({
241
+ key: "borderColor",
242
+ label: "Border Color",
243
+ description: "Border color for the widget",
244
+ defaultValue: "muted",
245
+ tab: "styling",
246
+ group: "Design"
231
247
  })
232
248
  ]
233
249
  };
234
250
  //#endregion
235
251
  export { CatchUpWidget_exports as n, catchUpWidgetPropertySchema as r, CatchUpWidget as t };
236
252
 
237
- //# sourceMappingURL=CatchUpWidget-ZsrbwaTu.mjs.map
253
+ //# sourceMappingURL=CatchUpWidget-Cb0B0G90.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CatchUpWidget-Cb0B0G90.mjs","names":[],"sources":["../../widgets/src/hooks/use-catchups.preview.ts","../../widgets/src/hooks/use-catchups.ts","../../widgets/src/widgets/CatchUpWidget.tsx"],"sourcesContent":["import type { CatchUp } from \"./use-catchups.types\";\n\nexport const PREVIEW_DATA: CatchUp[] = [\n { id: 1, suggestion_title: \"Check in with Sarah about her recent order\" },\n { id: 2, suggestion_title: \"Follow up with Mike on product samples\" },\n { id: 3, suggestion_title: \"Reconnect with Lisa — last contact 30 days ago\" },\n { id: 4, suggestion_title: \"Thank Alex for their referral last week\" },\n { id: 5, suggestion_title: \"Share new catalog with Jordan\" },\n];\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useDataSourceConfig } from \"@fluid-app/portal-react/data-sources/context\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport { PREVIEW_DATA } from \"./use-catchups.preview\";\n\nimport type { CatchUp } from \"./use-catchups.types\";\n\nexport type { CatchUp } from \"./use-catchups.types\";\n\nexport function useCatchUps(): UseQueryResult<CatchUp[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"catchups\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<CatchUp[]> => {\n const url = baseUrl\n ? `${baseUrl}/affiliate_catch_up_actions.json`\n : \"/affiliate_catch_up_actions.json\";\n const response = await fetch(url, {\n headers: {\n \"content-type\": \"application/json\",\n ...getApiHeaders?.(),\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch catch ups: ${response.status}`);\n }\n\n return response.json();\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport { useCatchUps } from \"../hooks/use-catchups\";\nimport { Loader2, Sparkles } from \"lucide-react\";\nimport { ErrorState } from \"../components/error-state\";\n\n// Font size mapping for title\nconst fontSizeClasses: Record<FontSizeOptions, string> = {\n \"2xl\": \"text-2xl\",\n xl: \"text-xl\",\n lg: \"text-lg\",\n md: \"text-base\",\n sm: \"text-sm\",\n xs: \"text-xs\",\n};\n\ntype CatchUpWidgetProps = ComponentProps<\"div\"> & {\n // Title settings\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n // Design settings\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n // Display settings\n maxItems?: number;\n};\n\nexport function CatchUpWidget({\n // Title settings with defaults\n titleEnabled = true,\n titleText = \"Catch Ups\",\n titleFontSize = \"xl\",\n titleColor = \"foreground\",\n // Design settings with defaults\n background = {\n type: \"solid\",\n color: \"background\",\n },\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n // Display settings with defaults\n maxItems = 5,\n className,\n ...props\n}: CatchUpWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n const { data = [], isLoading, isError } = useCatchUps();\n\n const catchUpsToShow = data.slice(0, maxItems);\n const moreCatchUps = data.length - catchUpsToShow.length;\n\n return (\n <div\n className={`flex flex-col rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-${backgroundColor} p-${padding} text-${textColor} ${className || \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n {titleEnabled && (\n <h3\n className={`${fontSizeClasses[titleFontSize]} font-header font-semibold text-${titleColor}`}\n >\n {titleText}\n </h3>\n )}\n {!isLoading && !isError && data.length > 0 && (\n <span className={`text-3xl font-bold text-${accentColor}`}>\n {data.length}\n </span>\n )}\n </div>\n\n {/* Loading state */}\n {isLoading ? (\n <div className=\"flex min-h-[150px] flex-1 items-center justify-center\">\n <Loader2 className={`h-8 w-8 animate-spin text-${accentColor}`} />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : data.length === 0 ? (\n /* Empty state */\n <div className=\"flex min-h-[150px] flex-1 flex-col items-center justify-center gap-2\">\n <Sparkles className={`h-8 w-8 text-${accentColor}`} />\n <p className=\"text-center font-semibold\">\n You&apos;re all caught up.\n </p>\n <p className=\"text-sm opacity-60\">See you next time!</p>\n </div>\n ) : (\n /* Default state with catch ups */\n <>\n <div className=\"mt-3 flex-1\">\n {catchUpsToShow.map((catchUp, index: number) => (\n <div\n key={catchUp.id || index}\n className={`py-2 ${index !== catchUpsToShow.length - 1 ? \"border-b border-current/10\" : \"\"}`}\n >\n <p className=\"line-clamp-1 text-sm\">\n {catchUp.suggestion_title}\n </p>\n </div>\n ))}\n </div>\n\n {/* More indicator */}\n {moreCatchUps > 0 && (\n <p className=\"mt-2 text-sm opacity-60\">\n {moreCatchUps} more catch up{moreCatchUps > 1 ? \"s\" : \"\"}\n </p>\n )}\n </>\n )}\n </div>\n );\n}\n\n// Property schema for the widget editor\nexport const catchUpWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CatchUpWidget\",\n displayName: \"Catch Up Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the catch ups\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Title text displayed above the catch ups\",\n defaultValue: \"Catch Ups\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the widget title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the widget title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Design Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for catch up items\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for count display and icons\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of catch ups to display\",\n defaultValue: 5,\n min: 1,\n max: 10,\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;AAEA,MAAa,eAA0B;CACrC;EAAE,IAAI;EAAG,kBAAkB;EAA8C;CACzE;EAAE,IAAI;EAAG,kBAAkB;EAA0C;CACrE;EAAE,IAAI;EAAG,kBAAkB;EAAkD;CAC7E;EAAE,IAAI;EAAG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OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,MAAM;GACN,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,KAAK;GACL,KAAK;GACL,OAAO;GACR;EACD,gBAAgB;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
@@ -64,7 +64,7 @@ const defaultChartConfig = { value: {
64
64
  function ChartWidget({ titleEnabled = true, title = "Chart Widget", titleFontSize = "lg", titleColor = "foreground", description = "Displaying sample data", descriptionFontSize = "md", descriptionColor = "foreground", chartType = "bar", showLegend = false, showTooltip = true, showGrid = true, width = "100%", height = "300px", background = {
65
65
  type: "solid",
66
66
  color: "background"
67
- }, padding = 4, borderRadius = "md", dataKey = "value", xAxisKey = "name", data, chartConfig, className, ...props }) {
67
+ }, padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", dataKey = "value", xAxisKey = "name", data, chartConfig, className, ...props }) {
68
68
  const backgroundColor = background.color || "background";
69
69
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
70
70
  const chartData = data ?? defaultData;
@@ -155,7 +155,7 @@ function ChartWidget({ titleEnabled = true, title = "Chart Widget", titleFontSiz
155
155
  }
156
156
  })();
157
157
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Card, {
158
- className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${className}`,
158
+ className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} ${className}`,
159
159
  style: {
160
160
  width,
161
161
  maxWidth: "100%",
@@ -366,6 +366,22 @@ const chartWidgetPropertySchema = {
366
366
  tab: "styling",
367
367
  group: "Design"
368
368
  }),
369
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
370
+ key: "borderWidth",
371
+ label: "Border Width",
372
+ description: "Border width for the widget",
373
+ defaultValue: "none",
374
+ tab: "styling",
375
+ group: "Design"
376
+ }),
377
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
378
+ key: "borderColor",
379
+ label: "Border Color",
380
+ description: "Border color for the widget",
381
+ defaultValue: "muted",
382
+ tab: "styling",
383
+ group: "Design"
384
+ }),
369
385
  {
370
386
  key: "dataSource",
371
387
  label: "Data Source",
@@ -416,4 +432,4 @@ Object.defineProperty(exports, "chartWidgetPropertySchema", {
416
432
  }
417
433
  });
418
434
 
419
- //# sourceMappingURL=ChartWidget-B6_n_Jp8.cjs.map
435
+ //# sourceMappingURL=ChartWidget-DWWeWN0Q.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartWidget-DWWeWN0Q.cjs","names":["RechartsBarChart","CartesianGrid","XAxis","YAxis","ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","Bar","RechartsLineChart","Line","RechartsAreaChart","Area","RechartsPieChart","Pie","Card","borderWidthClasses","borderColorClasses","ChartContainer"],"sources":["../../widgets/src/widgets/ChartWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n Card,\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n} from \"@fluid-app/ui-primitives\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n Bar,\n BarChart as RechartsBarChart,\n Line,\n LineChart as RechartsLineChart,\n Area,\n AreaChart as RechartsAreaChart,\n Pie,\n PieChart as RechartsPieChart,\n XAxis,\n YAxis,\n CartesianGrid,\n} from \"recharts\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getHeightField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype ChartDataPoint = Record<string, unknown>;\n\ntype ChartWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Description\n description?: string;\n descriptionFontSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n\n // Design\n chartType?: \"bar\" | \"line\" | \"area\" | \"pie\";\n showLegend?: boolean;\n showTooltip?: boolean;\n showGrid?: boolean;\n width?: string;\n height?: string;\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n\n // Data\n dataKey?: string;\n xAxisKey?: string;\n /** Chart data - when provided via dataSource, this overrides defaultData */\n data?: ChartDataPoint[];\n /** Chart configuration - can be dynamically provided via dataSource */\n chartConfig?: Record<string, { label: string; color: string }>;\n};\n\n// Default sample data for demonstration\nconst defaultData = [\n { name: \"Jan\", value: 186 },\n { name: \"Feb\", value: 305 },\n { name: \"Mar\", value: 237 },\n { name: \"Apr\", value: 273 },\n { name: \"May\", value: 209 },\n { name: \"Jun\", value: 214 },\n];\n\n// Pie chart data with individual fill properties\nconst defaultPieData = [\n { name: \"Jan\", value: 186, fill: \"var(--chart-1)\" },\n { name: \"Feb\", value: 305, fill: \"var(--chart-2)\" },\n { name: \"Mar\", value: 237, fill: \"var(--chart-3)\" },\n { name: \"Apr\", value: 273, fill: \"var(--chart-4)\" },\n { name: \"May\", value: 209, fill: \"var(--chart-5)\" },\n];\n\nconst defaultChartConfig = {\n value: {\n label: \"Value\",\n color: \"var(--chart-1)\",\n },\n};\n\nexport function ChartWidget({\n titleEnabled = true,\n title = \"Chart Widget\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n\n description = \"Displaying sample data\",\n descriptionFontSize = \"md\",\n descriptionColor = \"foreground\",\n\n chartType = \"bar\",\n showLegend = false,\n showTooltip = true,\n showGrid = true,\n width = \"100%\",\n height = \"300px\",\n background = {\n type: \"solid\",\n color: \"background\",\n },\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n\n dataKey = \"value\",\n xAxisKey = \"name\",\n data,\n chartConfig,\n className,\n ...props\n}: ChartWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n // Use provided data or fall back to default\n const chartData = data ?? defaultData;\n const chartPieData =\n chartType === \"pie\" && data\n ? data.map((item, index) => ({\n ...item,\n fill: `var(--chart-${(index % 5) + 1})`,\n }))\n : defaultPieData;\n const config = chartConfig ?? defaultChartConfig;\n const chartElement = (() => {\n switch (chartType) {\n case \"bar\":\n return (\n <RechartsBarChart data={chartData}>\n {showGrid && <CartesianGrid strokeDasharray=\"3 3\" />}\n <XAxis dataKey={xAxisKey} />\n <YAxis />\n {showTooltip && <ChartTooltip content={<ChartTooltipContent />} />}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n <Bar dataKey={dataKey} fill=\"var(--color-value)\" radius={8} />\n </RechartsBarChart>\n );\n\n case \"line\":\n return (\n <RechartsLineChart data={chartData}>\n {showGrid && <CartesianGrid strokeDasharray=\"3 3\" />}\n <XAxis dataKey={xAxisKey} />\n <YAxis />\n {showTooltip && <ChartTooltip content={<ChartTooltipContent />} />}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n <Line\n type=\"monotone\"\n dataKey={dataKey}\n stroke=\"var(--color-value)\"\n strokeWidth={2}\n dot={{ r: 4 }}\n />\n </RechartsLineChart>\n );\n\n case \"area\":\n return (\n <RechartsAreaChart data={chartData}>\n {showGrid && <CartesianGrid strokeDasharray=\"3 3\" />}\n <XAxis dataKey={xAxisKey} />\n <YAxis />\n {showTooltip && <ChartTooltip content={<ChartTooltipContent />} />}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n <Area\n type=\"monotone\"\n dataKey={dataKey}\n stroke=\"var(--color-value)\"\n fill=\"var(--color-value)\"\n fillOpacity={0.6}\n />\n </RechartsAreaChart>\n );\n\n case \"pie\":\n return (\n <RechartsPieChart>\n {showTooltip && (\n <ChartTooltip content={<ChartTooltipContent hideLabel />} />\n )}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n <Pie\n data={chartPieData}\n dataKey={dataKey}\n nameKey={xAxisKey}\n cx=\"50%\"\n cy=\"50%\"\n outerRadius={80}\n label\n />\n </RechartsPieChart>\n );\n\n default:\n // Fallback to bar chart for unknown chart types\n return (\n <RechartsBarChart data={chartData}>\n {showGrid && <CartesianGrid strokeDasharray=\"3 3\" />}\n <XAxis dataKey={xAxisKey} />\n <YAxis />\n {showTooltip && <ChartTooltip content={<ChartTooltipContent />} />}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n <Bar dataKey={dataKey} fill=\"var(--color-value)\" radius={8} />\n </RechartsBarChart>\n );\n }\n })();\n\n return (\n <Card\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{\n width,\n maxWidth: \"100%\",\n backgroundImage,\n }}\n {...props}\n >\n <div className=\"p-6\">\n <div className=\"mb-4\">\n {titleEnabled && (\n <h3\n className={`text-${titleFontSize} text-${titleColor} font-header font-bold`}\n >\n {title}\n </h3>\n )}\n {description && (\n <p\n className={`text-${descriptionFontSize} text-${descriptionColor}`}\n >\n {description}\n </p>\n )}\n </div>\n <ChartContainer config={config} style={{ height }}>\n {chartElement}\n </ChartContainer>\n </div>\n </Card>\n );\n}\n\nexport const chartWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ChartWidget\",\n displayName: \"Chart\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"data\", \"chartConfig\"],\n fields: [\n // Content Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the chart\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The chart title\",\n defaultValue: \"Chart Widget\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the chart title\",\n defaultValue: \"lg\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the chart title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Content Tab - Description Group\n {\n key: \"description\",\n label: \"Description\",\n type: \"textarea\",\n description: \"The chart description\",\n rows: 2,\n defaultValue: \"Displaying sample data\",\n tab: \"styling\",\n group: \"Description\",\n },\n getFontSizeField({\n key: \"descriptionFontSize\",\n label: \"Description Font Size\",\n description: \"Font size for the chart description\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Description\",\n }),\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"Color for the chart description\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Description\",\n }),\n\n // Styling Tab - Design Group\n {\n key: \"chartType\",\n label: \"Chart Type\",\n type: \"select\",\n description: \"Type of chart to display\",\n options: [\n { label: \"Bar Chart\", value: \"bar\" },\n { label: \"Line Chart\", value: \"line\" },\n { label: \"Area Chart\", value: \"area\" },\n { label: \"Pie Chart\", value: \"pie\" },\n ],\n defaultValue: \"bar\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"showLegend\",\n label: \"Show Legend\",\n type: \"boolean\",\n description: \"Display chart legend\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"showTooltip\",\n label: \"Show Tooltip\",\n type: \"boolean\",\n description: \"Display tooltip on hover\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"showGrid\",\n label: \"Show Grid\",\n type: \"boolean\",\n description: \"Display background grid lines\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"text\",\n description:\n \"Width of the chart container (CSS value, e.g., 100%, 600px)\",\n defaultValue: \"100%\",\n tab: \"styling\",\n group: \"Design\",\n },\n getHeightField({\n key: \"height\",\n label: \"Height\",\n description: \"Height of the chart\",\n defaultValue: \"300px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the chart container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the chart container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the chart container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n\n // Data Tab - Data Group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"Configure dynamic data fetching from an API\",\n tab: \"data\",\n group: \"Data\",\n },\n {\n key: \"dataKey\",\n label: \"Data Key\",\n type: \"select\",\n description: \"Key in the data to use for chart values\",\n options: [{ label: \"value\", value: \"value\" }],\n defaultValue: \"value\",\n tab: \"data\",\n group: \"Data\",\n },\n {\n key: \"xAxisKey\",\n label: \"X-Axis Key\",\n type: \"select\",\n description: \"Key in the data to use for X-axis labels\",\n options: [{ label: \"name\", value: \"name\" }],\n defaultValue: \"name\",\n tab: \"data\",\n group: \"Data\",\n },\n ],\n} satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;AAiFA,MAAM,cAAc;CAClB;EAAE,MAAM;EAAO,OAAO;EAAK;CAC3B;EAAE,MAAM;EAAO,OAAO;EAAK;CAC3B;EAAE,MAAM;EAAO,OAAO;EAAK;CAC3B;EAAE,MAAM;EAAO,OAAO;EAAK;CAC3B;EAAE,MAAM;EAAO,OAAO;EAAK;CAC3B;EAAE,MAAM;EAAO,OAAO;EAAK;CAC5B;AAGD,MAAM,iBAAiB;CACrB;EAAE,MAAM;EAAO,OAAO;EAAK,MAAM;EAAkB;CACnD;EAAE,MAAM;EAAO,OAAO;EAAK,MAAM;EAAkB;CACnD;EAAE,MAAM;EAAO,OAAO;EAAK,MAAM;EAAkB;CACnD;EAAE,MAAM;EAAO,OAAO;EAAK,MAAM;EAAkB;CACnD;EAAE,MAAM;EAAO,OAAO;EAAK,MAAM;EAAkB;CACpD;AAED,MAAM,qBAAqB,EACzB,OAAO;CACL,OAAO;CACP,OAAO;CACR,EACF;AAED,SAAgB,YAAY,EAC1B,eAAe,MACf,QAAQ,gBACR,gBAAgB,MAChB,aAAa,cAEb,cAAc,0BACd,sBAAsB,MACtB,mBAAmB,cAEnB,YAAY,OACZ,aAAa,OACb,cAAc,MACd,WAAW,MACX,QAAQ,QACR,SAAS,SACT,aAAa;CACX,MAAM;CACN,OAAO;CACR,EACD,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SAEd,UAAU,SACV,WAAW,QACX,MACA,aACA,WACA,GAAG,SACmC;CACtC,MAAM,kBAAkB,WAAW,SAAS;CAC5C,MAAM,mBACH,WAAW,UAAU,aAAa,WAAW,UAAU,aACxD,WAAW,SAAS,UAChB,OAAO,WAAW,SAAS,aAAa,WAAW,SAAS,SAAS,KACrE;CAEN,MAAM,YAAY,QAAQ;CAC1B,MAAM,eACJ,cAAc,SAAS,OACnB,KAAK,KAAK,M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KAAQ;IACtC;KAAE,OAAO;KAAa,OAAO;KAAO;IACrC;GACD,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,cAAc;GACd,KAAK;GACL,OAAO;GACR;wDACc;GACb,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD;GACE,MAAM;GACN,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,SAAS,CAAC;IAAE,OAAO;IAAS,OAAO;IAAS,CAAC;GAC7C,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,SAAS,CAAC;IAAE,OAAO;IAAQ,OAAO;IAAQ,CAAC;GAC3C,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}