@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
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-DAgNkxik.cjs");
2
- const require_TextWidget = require("./TextWidget-Bd8V3uOT.cjs");
2
+ const require_TextWidget = require("./TextWidget-XBeVX2oM.cjs");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
  //#region ../widgets/src/widgets/AlertWidget.tsx
5
5
  var AlertWidget_exports = /* @__PURE__ */ require_chunk.__exportAll({
@@ -36,4 +36,4 @@ Object.defineProperty(exports, "alertWidgetPropertySchema", {
36
36
  }
37
37
  });
38
38
 
39
- //# sourceMappingURL=AlertWidget-CRYuxgyZ.cjs.map
39
+ //# sourceMappingURL=AlertWidget-CSYWU2c3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlertWidget-CRYuxgyZ.cjs","names":["TextWidget","textWidgetPropertySchema"],"sources":["../../widgets/src/widgets/AlertWidget.tsx"],"sourcesContent":["import { TextWidget, textWidgetPropertySchema } from \"./TextWidget\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\n/**\n * AlertWidget - Wrapper for TextWidget (for backwards compatibility)\n */\nexport function AlertWidget(\n props: ComponentProps<typeof TextWidget>,\n): React.JSX.Element {\n return <TextWidget {...props} />;\n}\n\nexport const alertWidgetPropertySchema: WidgetPropertySchema = {\n ...textWidgetPropertySchema,\n widgetType: \"AlertWidget\",\n};\n"],"mappings":";;;;;;;;;;;AAQA,SAAgB,YACd,OACmB;AACnB,QAAO,iBAAA,GAAA,kBAAA,KAACA,mBAAAA,YAAD,EAAY,GAAI,OAAS,CAAA;;AAGlC,MAAa,4BAAkD;CAC7D,GAAGC,mBAAAA;CACH,YAAY;CACb"}
1
+ {"version":3,"file":"AlertWidget-CSYWU2c3.cjs","names":["TextWidget","textWidgetPropertySchema"],"sources":["../../widgets/src/widgets/AlertWidget.tsx"],"sourcesContent":["import { TextWidget, textWidgetPropertySchema } from \"./TextWidget\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\n/**\n * AlertWidget - Wrapper for TextWidget (for backwards compatibility)\n */\nexport function AlertWidget(\n props: ComponentProps<typeof TextWidget>,\n): React.JSX.Element {\n return <TextWidget {...props} />;\n}\n\nexport const alertWidgetPropertySchema: WidgetPropertySchema = {\n ...textWidgetPropertySchema,\n widgetType: \"AlertWidget\",\n};\n"],"mappings":";;;;;;;;;;;AAQA,SAAgB,YACd,OACmB;AACnB,QAAO,iBAAA,GAAA,kBAAA,KAACA,mBAAAA,YAAD,EAAY,GAAI,OAAS,CAAA;;AAGlC,MAAa,4BAAkD;CAC7D,GAAGC,mBAAAA;CACH,YAAY;CACb"}
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
2
- import { r as textWidgetPropertySchema, t as TextWidget } from "./TextWidget-Cmu4a9QG.mjs";
2
+ import { r as textWidgetPropertySchema, t as TextWidget } from "./TextWidget-D6qCnspg.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region ../widgets/src/widgets/AlertWidget.tsx
5
5
  var AlertWidget_exports = /* @__PURE__ */ __exportAll({
@@ -19,4 +19,4 @@ const alertWidgetPropertySchema = {
19
19
  //#endregion
20
20
  export { AlertWidget_exports as n, alertWidgetPropertySchema as r, AlertWidget as t };
21
21
 
22
- //# sourceMappingURL=AlertWidget-DnygF0ze.mjs.map
22
+ //# sourceMappingURL=AlertWidget-DTrMt8y7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlertWidget-DnygF0ze.mjs","names":[],"sources":["../../widgets/src/widgets/AlertWidget.tsx"],"sourcesContent":["import { TextWidget, textWidgetPropertySchema } from \"./TextWidget\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\n/**\n * AlertWidget - Wrapper for TextWidget (for backwards compatibility)\n */\nexport function AlertWidget(\n props: ComponentProps<typeof TextWidget>,\n): React.JSX.Element {\n return <TextWidget {...props} />;\n}\n\nexport const alertWidgetPropertySchema: WidgetPropertySchema = {\n ...textWidgetPropertySchema,\n widgetType: \"AlertWidget\",\n};\n"],"mappings":";;;;;;;;;;;AAQA,SAAgB,YACd,OACmB;AACnB,QAAO,oBAAC,YAAD,EAAY,GAAI,OAAS,CAAA;;AAGlC,MAAa,4BAAkD;CAC7D,GAAG;CACH,YAAY;CACb"}
1
+ {"version":3,"file":"AlertWidget-DTrMt8y7.mjs","names":[],"sources":["../../widgets/src/widgets/AlertWidget.tsx"],"sourcesContent":["import { TextWidget, textWidgetPropertySchema } from \"./TextWidget\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\n/**\n * AlertWidget - Wrapper for TextWidget (for backwards compatibility)\n */\nexport function AlertWidget(\n props: ComponentProps<typeof TextWidget>,\n): React.JSX.Element {\n return <TextWidget {...props} />;\n}\n\nexport const alertWidgetPropertySchema: WidgetPropertySchema = {\n ...textWidgetPropertySchema,\n widgetType: \"AlertWidget\",\n};\n"],"mappings":";;;;;;;;;;;AAQA,SAAgB,YACd,OACmB;AACnB,QAAO,oBAAC,YAAD,EAAY,GAAI,OAAS,CAAA;;AAGlC,MAAa,4BAAkD;CAC7D,GAAG;CACH,YAAY;CACb"}
@@ -13,7 +13,7 @@ function BulletListWidget({ titleEnabled = true, title = "List", titleFontSize =
13
13
  ], itemFontSize = "md", itemColor = "foreground", background = {
14
14
  type: "solid",
15
15
  color: "background"
16
- }, padding = 4, borderRadius = "md", gapSize = "sm", className, ...props }) {
16
+ }, padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", gapSize = "sm", className, ...props }) {
17
17
  const backgroundColor = background.color ?? "background";
18
18
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
19
19
  const listItems = typeof items === "string" ? items.split("\n").filter(Boolean) : items ?? [];
@@ -21,7 +21,7 @@ function BulletListWidget({ titleEnabled = true, title = "List", titleFontSize =
21
21
  const listStyleClass = listType === "ordered" ? "list-decimal" : "list-disc";
22
22
  const gap = _fluid_app_portal_core_registries.gapValues[gapSize] ?? _fluid_app_portal_core_registries.gapValues.sm;
23
23
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
24
- className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${className ?? ""}`,
24
+ className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} ${className ?? ""}`,
25
25
  style: { backgroundImage },
26
26
  ...props,
27
27
  children: [titleEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
@@ -135,7 +135,21 @@ const bulletListWidgetPropertySchema = {
135
135
  key: "borderRadius",
136
136
  label: "Border Radius",
137
137
  description: "The border radius of the list container",
138
- group: "Style"
138
+ group: "Design"
139
+ }),
140
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
141
+ key: "borderWidth",
142
+ label: "Border Width",
143
+ description: "Border width for the widget",
144
+ defaultValue: "none",
145
+ group: "Design"
146
+ }),
147
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
148
+ key: "borderColor",
149
+ label: "Border Color",
150
+ description: "Border color for the widget",
151
+ defaultValue: "muted",
152
+ group: "Design"
139
153
  }),
140
154
  (0, _fluid_app_portal_core_registries.getGapField)({
141
155
  key: "gapSize",
@@ -166,4 +180,4 @@ Object.defineProperty(exports, "bulletListWidgetPropertySchema", {
166
180
  }
167
181
  });
168
182
 
169
- //# sourceMappingURL=BulletListWidget-DfXMbboF.cjs.map
183
+ //# sourceMappingURL=BulletListWidget-BUMq15V1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BulletListWidget-BUMq15V1.cjs","names":["gapValues","borderWidthClasses","borderColorClasses"],"sources":["../../widgets/src/widgets/BulletListWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getGapField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n gapValues,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n GapOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype BulletListWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // List\n listType?: \"ordered\" | \"unordered\";\n items?: string[] | string;\n itemFontSize?: FontSizeOptions;\n itemColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n gapSize?: GapOptions;\n};\n\nexport function BulletListWidget({\n titleEnabled = true,\n title = \"List\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n listType = \"unordered\",\n items = [\"Item 1\", \"Item 2\", \"Item 3\"],\n itemFontSize = \"md\",\n itemColor = \"foreground\",\n background = { type: \"solid\", color: \"background\" },\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n gapSize = \"sm\",\n className,\n ...props\n}: BulletListWidgetProps): 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\n const listItems =\n typeof items === \"string\"\n ? items.split(\"\\n\").filter(Boolean)\n : (items ?? []);\n\n const ListTag = listType === \"ordered\" ? \"ol\" : \"ul\";\n const listStyleClass = listType === \"ordered\" ? \"list-decimal\" : \"list-disc\";\n const gap = gapValues[gapSize] ?? gapValues.sm;\n\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && (\n <h2\n className={`text-${titleFontSize} text-${titleColor} font-header mb-2 font-bold`}\n >\n {title}\n </h2>\n )}\n <ListTag\n className={`${listStyleClass} pl-5 text-${itemFontSize} text-${itemColor}`}\n style={{ display: \"flex\", flexDirection: \"column\", gap }}\n >\n {listItems.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ListTag>\n </div>\n );\n}\n\nexport const bulletListWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"BulletListWidget\",\n displayName: \"Bullet List\",\n fields: [\n // Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The title\",\n defaultValue: \"List\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"lg\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"The color of the title\",\n defaultValue: \"foreground\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n // List Group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Ordered (numbered) or unordered (bullets)\",\n options: [\n { label: \"Bullets\", value: \"unordered\" },\n { label: \"Numbered\", value: \"ordered\" },\n ],\n defaultValue: \"unordered\",\n group: \"List\",\n },\n {\n key: \"items\",\n label: \"List Items\",\n type: \"stringArray\",\n description: \"Add or remove list items\",\n defaultValue: [\"Item 1\", \"Item 2\", \"Item 3\"],\n group: \"List\",\n },\n getFontSizeField({\n key: \"itemFontSize\",\n label: \"Item Font Size\",\n description: \"Font size for list items\",\n defaultValue: \"md\",\n group: \"List\",\n }),\n getColorField({\n key: \"itemColor\",\n label: \"Item Color\",\n description: \"The color of list items\",\n defaultValue: \"foreground\",\n group: \"List\",\n }),\n // Style Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the list container\",\n defaultValue: \"background\",\n group: \"Style\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"The padding of the list container\",\n defaultValue: 4,\n group: \"Style\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"The border radius of the list container\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gapSize\",\n label: \"Item Gap\",\n description: \"Gap between list items\",\n defaultValue: \"sm\",\n group: \"Style\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;AA+CA,SAAgB,iBAAiB,EAC/B,eAAe,MACf,QAAQ,QACR,gBAAgB,MAChB,aAAa,cACb,WAAW,aACX,QAAQ;CAAC;CAAU;CAAU;CAAS,EACtC,eAAe,MACf,YAAY,cACZ,aAAa;CAAE,MAAM;CAAS,OAAO;CAAc,EACnD,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SACd,UAAU,MACV,WACA,GAAG,SACwC;CAC3C,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,YACJ,OAAO,UAAU,WACb,MAAM,MAAM,KAAK,CAAC,OAAO,QAAQ,GAChC,SAAS,EAAE;CAElB,MAAM,UAAU,aAAa,YAAY,OAAO;CAChD,MAAM,iBAAiB,aAAa,YAAY,iBAAiB;CACjE,MAAM,MAAMA,kCAAAA,UAAU,YAAYA,kCAAAA,UAAU;AAE5C,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,WAAW,MAAM,gBAAgB,KAAK,QAAQ,WAAW,aAAa,GAAGC,kCAAAA,mBAAmB,aAAa,GAAG,gBAAgB,SAASC,kCAAAA,mBAAmB,eAAe,GAAG,GAAG,aAAa;EAC1L,OAAO,EAAE,iBA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ACb,cAAc;GACd,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;qDACU;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACH;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
2
- import { a as getColorField, c as getGapField, o as getFontSizeField, r as getBorderRadiusField, t as gapValues, u as getPaddingField } from "./fields-DW1nDGRz.mjs";
2
+ import { f as getGapField, i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, r as gapValues, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region ../widgets/src/widgets/BulletListWidget.tsx
5
5
  var BulletListWidget_exports = /* @__PURE__ */ __exportAll({
@@ -13,7 +13,7 @@ function BulletListWidget({ titleEnabled = true, title = "List", titleFontSize =
13
13
  ], itemFontSize = "md", itemColor = "foreground", background = {
14
14
  type: "solid",
15
15
  color: "background"
16
- }, padding = 4, borderRadius = "md", gapSize = "sm", className, ...props }) {
16
+ }, padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", gapSize = "sm", className, ...props }) {
17
17
  const backgroundColor = background.color ?? "background";
18
18
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
19
19
  const listItems = typeof items === "string" ? items.split("\n").filter(Boolean) : items ?? [];
@@ -21,7 +21,7 @@ function BulletListWidget({ titleEnabled = true, title = "List", titleFontSize =
21
21
  const listStyleClass = listType === "ordered" ? "list-decimal" : "list-disc";
22
22
  const gap = gapValues[gapSize] ?? gapValues.sm;
23
23
  return /* @__PURE__ */ jsxs("div", {
24
- className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${className ?? ""}`,
24
+ className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} ${className ?? ""}`,
25
25
  style: { backgroundImage },
26
26
  ...props,
27
27
  children: [titleEnabled && /* @__PURE__ */ jsx("h2", {
@@ -135,7 +135,21 @@ const bulletListWidgetPropertySchema = {
135
135
  key: "borderRadius",
136
136
  label: "Border Radius",
137
137
  description: "The border radius of the list container",
138
- group: "Style"
138
+ group: "Design"
139
+ }),
140
+ getBorderWidthField({
141
+ key: "borderWidth",
142
+ label: "Border Width",
143
+ description: "Border width for the widget",
144
+ defaultValue: "none",
145
+ group: "Design"
146
+ }),
147
+ getBorderColorField({
148
+ key: "borderColor",
149
+ label: "Border Color",
150
+ description: "Border color for the widget",
151
+ defaultValue: "muted",
152
+ group: "Design"
139
153
  }),
140
154
  getGapField({
141
155
  key: "gapSize",
@@ -149,4 +163,4 @@ const bulletListWidgetPropertySchema = {
149
163
  //#endregion
150
164
  export { BulletListWidget_exports as n, bulletListWidgetPropertySchema as r, BulletListWidget as t };
151
165
 
152
- //# sourceMappingURL=BulletListWidget-bvVUvGOQ.mjs.map
166
+ //# sourceMappingURL=BulletListWidget-riFNn47D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BulletListWidget-riFNn47D.mjs","names":[],"sources":["../../widgets/src/widgets/BulletListWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getGapField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n gapValues,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n GapOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype BulletListWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // List\n listType?: \"ordered\" | \"unordered\";\n items?: string[] | string;\n itemFontSize?: FontSizeOptions;\n itemColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n gapSize?: GapOptions;\n};\n\nexport function BulletListWidget({\n titleEnabled = true,\n title = \"List\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n listType = \"unordered\",\n items = [\"Item 1\", \"Item 2\", \"Item 3\"],\n itemFontSize = \"md\",\n itemColor = \"foreground\",\n background = { type: \"solid\", color: \"background\" },\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n gapSize = \"sm\",\n className,\n ...props\n}: BulletListWidgetProps): 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\n const listItems =\n typeof items === \"string\"\n ? items.split(\"\\n\").filter(Boolean)\n : (items ?? []);\n\n const ListTag = listType === \"ordered\" ? \"ol\" : \"ul\";\n const listStyleClass = listType === \"ordered\" ? \"list-decimal\" : \"list-disc\";\n const gap = gapValues[gapSize] ?? gapValues.sm;\n\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && (\n <h2\n className={`text-${titleFontSize} text-${titleColor} font-header mb-2 font-bold`}\n >\n {title}\n </h2>\n )}\n <ListTag\n className={`${listStyleClass} pl-5 text-${itemFontSize} text-${itemColor}`}\n style={{ display: \"flex\", flexDirection: \"column\", gap }}\n >\n {listItems.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ListTag>\n </div>\n );\n}\n\nexport const bulletListWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"BulletListWidget\",\n displayName: \"Bullet List\",\n fields: [\n // Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The title\",\n defaultValue: \"List\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"lg\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"The color of the title\",\n defaultValue: \"foreground\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n // List Group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Ordered (numbered) or unordered (bullets)\",\n options: [\n { label: \"Bullets\", value: \"unordered\" },\n { label: \"Numbered\", value: \"ordered\" },\n ],\n defaultValue: \"unordered\",\n group: \"List\",\n },\n {\n key: \"items\",\n label: \"List Items\",\n type: \"stringArray\",\n description: \"Add or remove list items\",\n defaultValue: [\"Item 1\", \"Item 2\", \"Item 3\"],\n group: \"List\",\n },\n getFontSizeField({\n key: \"itemFontSize\",\n label: \"Item Font Size\",\n description: \"Font size for list items\",\n defaultValue: \"md\",\n group: \"List\",\n }),\n getColorField({\n key: \"itemColor\",\n label: \"Item Color\",\n description: \"The color of list items\",\n defaultValue: \"foreground\",\n group: \"List\",\n }),\n // Style Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the list container\",\n defaultValue: \"background\",\n group: \"Style\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"The padding of the list container\",\n defaultValue: 4,\n group: \"Style\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"The border radius of the list container\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gapSize\",\n label: \"Item Gap\",\n description: \"Gap between list items\",\n defaultValue: \"sm\",\n group: \"Style\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;AA+CA,SAAgB,iBAAiB,EAC/B,eAAe,MACf,QAAQ,QACR,gBAAgB,MAChB,aAAa,cACb,WAAW,aACX,QAAQ;CAAC;CAAU;CAAU;CAAS,EACtC,eAAe,MACf,YAAY,cACZ,aAAa;CAAE,MAAM;CAAS,OAAO;CAAc,EACnD,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SACd,UAAU,MACV,WACA,GAAG,SACwC;CAC3C,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,YACJ,OAAO,UAAU,WACb,MAAM,MAAM,KAAK,CAAC,OAAO,QAAQ,GAChC,SAAS,EAAE;CAElB,MAAM,UAAU,aAAa,YAAY,OAAO;CAChD,MAAM,iBAAiB,aAAa,YAAY,iBA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OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EAEF;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,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"}
@@ -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 { useMemo, useState } from "react";
5
5
  import { useQuery } from "@tanstack/react-query";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -180,7 +180,7 @@ function DayButton({ date, isToday, isSelected, hasEvents, accentColor, onClick,
180
180
  function CalendarWidget({ titleEnabled = true, titleText = "Calendar", titleFontSize = "xl", titleColor = "foreground", background = {
181
181
  type: "solid",
182
182
  color: "background"
183
- }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", className, ...props }) {
183
+ }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", className, ...props }) {
184
184
  const backgroundColor = background.color || "background";
185
185
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
186
186
  const today = /* @__PURE__ */ new Date();
@@ -212,7 +212,7 @@ function CalendarWidget({ titleEnabled = true, titleText = "Calendar", titleFont
212
212
  year: "numeric"
213
213
  });
214
214
  return /* @__PURE__ */ jsxs("div", {
215
- className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${className}`,
215
+ className: `@container overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} bg-${backgroundColor} text-${textColor} ${className}`,
216
216
  style: { backgroundImage },
217
217
  ...props,
218
218
  children: [titleEnabled && titleText && /* @__PURE__ */ jsx("div", {
@@ -412,10 +412,26 @@ const calendarWidgetPropertySchema = {
412
412
  defaultValue: "md",
413
413
  tab: "styling",
414
414
  group: "Design"
415
+ }),
416
+ getBorderWidthField({
417
+ key: "borderWidth",
418
+ label: "Border Width",
419
+ description: "Border width for the widget",
420
+ defaultValue: "none",
421
+ tab: "styling",
422
+ group: "Design"
423
+ }),
424
+ getBorderColorField({
425
+ key: "borderColor",
426
+ label: "Border Color",
427
+ description: "Border color for the widget",
428
+ defaultValue: "muted",
429
+ tab: "styling",
430
+ group: "Design"
415
431
  })
416
432
  ]
417
433
  };
418
434
  //#endregion
419
435
  export { CalendarWidget_exports as n, calendarWidgetPropertySchema as r, CalendarWidget as t };
420
436
 
421
- //# sourceMappingURL=CalendarWidget-YybCIktI.mjs.map
437
+ //# sourceMappingURL=CalendarWidget-B9I__jsL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarWidget-B9I__jsL.mjs","names":[],"sources":["../../widgets/src/hooks/use-calendar-events.preview.ts","../../widgets/src/hooks/use-calendar-events.ts","../../widgets/src/widgets/CalendarWidget.tsx"],"sourcesContent":["import type { CalendarEvent } from \"./use-calendar-events.types\";\n\nconst today = new Date();\nconst inTwoDays = new Date(today);\ninTwoDays.setDate(inTwoDays.getDate() + 2);\n\nfunction toISO(date: Date, hours: number, minutes = 0): string {\n const d = new Date(date);\n d.setHours(hours, minutes, 0, 0);\n return d.toISOString();\n}\n\nfunction toDateString(date: Date): string {\n return date.toISOString().split(\"T\")[0]!;\n}\n\nexport const PREVIEW_DATA: CalendarEvent[] = [\n {\n id: 1,\n title: \"Team Strategy Call\",\n start: toISO(today, 9, 0),\n end: toISO(today, 10, 0),\n status: \"active\",\n color: \"#4f46e5\",\n },\n {\n id: 2,\n title: \"Product Launch Webinar\",\n start: toISO(today, 14, 0),\n end: toISO(today, 15, 30),\n status: \"active\",\n color: \"#0891b2\",\n venue: \"Zoom\",\n },\n {\n id: 3,\n title: \"Annual Leadership Summit\",\n start: `${toDateString(inTwoDays)}T00:00:00.000Z`,\n end: `${toDateString(inTwoDays)}T23:59:59.000Z`,\n status: \"active\",\n color: \"#059669\",\n isAllDay: true,\n venue: \"Convention Center\",\n },\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-calendar-events.preview\";\n\nimport type { CalendarEvent } from \"./use-calendar-events.types\";\n\nexport type { CalendarEvent } from \"./use-calendar-events.types\";\n\nexport function useCalendarEvents(): UseQueryResult<CalendarEvent[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"calendar-events\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<CalendarEvent[]> => {\n const url = baseUrl\n ? `${baseUrl}/events.json?event_timeline=upcoming`\n : \"/events.json?event_timeline=upcoming\";\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 calendar events: ${response.status}`);\n }\n\n return response.json();\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n","import { useState, useMemo, 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 {\n useCalendarEvents,\n type CalendarEvent,\n} from \"../hooks/use-calendar-events\";\nimport { ErrorState } from \"../components/error-state\";\nimport {\n ChevronLeft,\n ChevronRight,\n ChevronsDown,\n ChevronsUp,\n} from \"lucide-react\";\n\n// Utility to get days in a month\nconst getDaysInMonth = (year: number, month: number) => {\n return new Date(year, month + 1, 0).getDate();\n};\n\n// Utility to get the first day of month (0 = Sunday, 1 = Monday, etc.)\nconst getFirstDayOfMonth = (year: number, month: number) => {\n return new Date(year, month, 1).getDay();\n};\n\n// Generate calendar grid for a month\nconst generateMonthGrid = (year: number, month: number) => {\n const daysInMonth = getDaysInMonth(year, month);\n const firstDay = getFirstDayOfMonth(year, month);\n const today = new Date();\n\n const days: Array<{\n date: Date | null;\n isToday: boolean;\n isCurrentMonth: boolean;\n }> = [];\n\n // Add empty slots for days before the 1st\n for (let i = 0; i < firstDay; i++) {\n days.push({ date: null, isToday: false, isCurrentMonth: false });\n }\n\n // Add days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(year, month, day);\n const isToday =\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear();\n days.push({ date, isToday, isCurrentMonth: true });\n }\n\n return days;\n};\n\n// Generate week grid for current week\nconst generateWeekGrid = () => {\n const today = new Date();\n const currentDay = today.getDay();\n const days: Array<{\n date: Date;\n isToday: boolean;\n }> = [];\n\n for (let i = 0; i < 7; i++) {\n const date = new Date(today);\n date.setDate(today.getDate() - currentDay + i);\n days.push({\n date,\n isToday: date.toDateString() === today.toDateString(),\n });\n }\n\n return days;\n};\n\n// Get events for a specific date\nconst getEventsForDate = (date: Date, events: CalendarEvent[]) => {\n const dayStart = new Date(date);\n dayStart.setHours(0, 0, 0, 0);\n const dayEnd = new Date(date);\n dayEnd.setHours(23, 59, 59, 999);\n\n return events.filter((event) => {\n const eventStart = new Date(event.start);\n const eventEnd = new Date(event.end);\n return eventStart <= dayEnd && eventEnd >= dayStart;\n });\n};\n\n// Check if a date has events\nconst hasEventsOnDate = (date: Date | null, events: CalendarEvent[]) => {\n if (!date) return false;\n return getEventsForDate(date, events).length > 0;\n};\n\n// Event item component\nconst EventItem = ({\n title,\n start,\n end,\n color,\n isAllDay,\n accentColor,\n}: CalendarEvent & { accentColor?: string }) => {\n const startTime = new Date(start).toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n const endTime = new Date(end).toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n\n return (\n <div className=\"flex gap-x-2\">\n <div\n className=\"w-0.5 shrink-0 rounded-full\"\n style={{ backgroundColor: color || accentColor }}\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-medium\">{title}</div>\n <div className=\"text-xs opacity-60\">\n {isAllDay ? \"All day\" : `${startTime} - ${endTime}`}\n </div>\n </div>\n </div>\n );\n};\n\nconst dayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\ntype DayButtonProps = {\n date: Date;\n isToday: boolean;\n isSelected: boolean;\n hasEvents: boolean;\n accentColor: string;\n onClick: () => void;\n extraClassName?: string;\n};\n\nfunction DayButton({\n date,\n isToday,\n isSelected,\n hasEvents,\n accentColor,\n onClick,\n extraClassName = \"\",\n}: DayButtonProps) {\n return (\n <button\n onClick={onClick}\n className={`relative flex aspect-square items-center justify-center rounded-full text-sm transition-colors ${\n isSelected\n ? `bg-${accentColor} text-${accentColor}-foreground`\n : isToday\n ? `bg-${accentColor}/30 text-${accentColor}-foreground hover:bg-${accentColor}/50`\n : `hover:bg-${accentColor}/50 hover:text-${accentColor}-foreground`\n } ${extraClassName}`}\n >\n {date.getDate()}\n {hasEvents && (\n <div\n className={`absolute bottom-1 h-1 w-1 rounded-full bg-${accentColor}`}\n />\n )}\n </button>\n );\n}\n\ntype CalendarWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n};\n\nexport function CalendarWidget({\n // Title defaults\n titleEnabled = true,\n titleText = \"Calendar\",\n titleFontSize = \"xl\",\n titleColor = \"foreground\",\n\n // Styling 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\n className,\n ...props\n}: CalendarWidgetProps): 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 today = new Date();\n const [currentMonth, setCurrentMonth] = useState(today.getMonth());\n const [currentYear, setCurrentYear] = useState(today.getFullYear());\n const [isCollapsed, setIsCollapsed] = useState(false);\n const [selectedDate, setSelectedDate] = useState<Date | null>(today);\n\n const { data: events = [], isLoading, isError } = useCalendarEvents();\n\n // Generate calendar grids\n const monthGrid = useMemo(\n () => generateMonthGrid(currentYear, currentMonth),\n [currentYear, currentMonth],\n );\n const weekGrid = useMemo(() => generateWeekGrid(), []);\n\n // Get events for selected date\n const selectedDateEvents = useMemo(() => {\n if (!selectedDate) return [];\n return getEventsForDate(selectedDate, events);\n }, [selectedDate, events]);\n\n // Navigation handlers\n const goToPrevMonth = () => {\n if (currentMonth === 0) {\n setCurrentMonth(11);\n setCurrentYear(currentYear - 1);\n } else {\n setCurrentMonth(currentMonth - 1);\n }\n };\n\n const goToNextMonth = () => {\n if (currentMonth === 11) {\n setCurrentMonth(0);\n setCurrentYear(currentYear + 1);\n } else {\n setCurrentMonth(currentMonth + 1);\n }\n };\n\n const monthYearLabel = new Date(currentYear, currentMonth).toLocaleString(\n \"en-US\",\n {\n month: \"long\",\n year: \"numeric\",\n },\n );\n\n return (\n <div\n className={`@container overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-${backgroundColor} text-${textColor} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {/* Title */}\n {titleEnabled && titleText && (\n <div className={`p-${padding} pb-0`}>\n <h2\n className={`text-${titleFontSize} font-header font-bold text-${titleColor}`}\n >\n {titleText}\n </h2>\n </div>\n )}\n\n {/* Loading state */}\n {isLoading ? (\n <div\n className={`flex min-h-[300px] items-center justify-center p-${padding}`}\n >\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : (\n <div className={`p-${padding}`}>\n {/* Desktop: Side by side layout */}\n <div className=\"@md:flex @md:gap-6\">\n {/* Calendar Section */}\n <div className=\"@md:flex-none\">\n {/* Month/Year Header with Navigation */}\n <div className=\"mb-4 flex items-center justify-between\">\n <button\n onClick={goToPrevMonth}\n className=\"hover:bg-foreground/10 rounded-full p-1\"\n aria-label=\"Previous month\"\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <span className=\"text-base font-semibold\">\n {monthYearLabel}\n </span>\n\n <button\n onClick={goToNextMonth}\n className=\"hover:bg-foreground/10 rounded-full p-1\"\n aria-label=\"Next month\"\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n {/* Day Headers */}\n <div className=\"mb-2 grid grid-cols-7 gap-1 text-center\">\n {dayNames.map((day, idx) => (\n <div\n key={idx}\n className=\"text-xs font-medium uppercase opacity-60\"\n >\n {day}\n </div>\n ))}\n </div>\n\n {/* Calendar Grid - Week view on mobile when collapsed */}\n {isCollapsed && (\n <div className=\"grid grid-cols-7 gap-1 @md:hidden\">\n {weekGrid.map(({ date, isToday }, idx) => (\n <DayButton\n key={idx}\n date={date}\n isToday={isToday}\n isSelected={\n selectedDate?.toDateString() === date.toDateString()\n }\n hasEvents={hasEventsOnDate(date, events)}\n accentColor={accentColor}\n onClick={() => setSelectedDate(date)}\n />\n ))}\n </div>\n )}\n\n {/* Month view (always on desktop, when not collapsed on mobile) */}\n <div\n className={`grid grid-cols-7 gap-1 ${isCollapsed ? \"hidden @md:grid\" : \"grid\"}`}\n >\n {monthGrid.map((day, idx) => {\n if (!day.date) {\n return <div key={idx} className=\"aspect-square\" />;\n }\n\n return (\n <DayButton\n key={idx}\n date={day.date}\n isToday={day.isToday}\n isSelected={\n selectedDate?.toDateString() === day.date.toDateString()\n }\n hasEvents={hasEventsOnDate(day.date, events)}\n accentColor={accentColor}\n onClick={() => setSelectedDate(day.date)}\n extraClassName=\"p-2 @md:m-3\"\n />\n );\n })}\n </div>\n\n {/* Mobile collapse toggle */}\n <button\n onClick={() => setIsCollapsed(!isCollapsed)}\n className={`ml-2 flex w-full items-center justify-center gap-3 rounded-full p-1 text-${textColor}/50 @md:hidden`}\n aria-label={\n isCollapsed ? \"Expand calendar\" : \"Collapse calendar\"\n }\n >\n <div className={`h-1 w-1/2 bg-${textColor}/50`} />\n {isCollapsed ? (\n <ChevronsDown className=\"size-4\" />\n ) : (\n <ChevronsUp className=\"size-4\" />\n )}\n <div className={`h-1 w-1/2 bg-${textColor}/50`} />\n </button>\n </div>\n\n {/* Events Panel */}\n <div className=\"border-muted mt-4 pt-4 @md:mt-0 @md:w-56 @md:border-l @md:pt-0 @md:pl-6\">\n <div className=\"mb-2 text-sm font-medium opacity-60\">\n {selectedDate\n ? selectedDate.toLocaleDateString(\"en-US\", {\n weekday: \"long\",\n month: \"short\",\n day: \"numeric\",\n })\n : \"Select a date\"}\n </div>\n\n {selectedDateEvents.length > 0 ? (\n <div className=\"flex flex-col gap-3\">\n {selectedDateEvents.map((event, idx) => (\n <EventItem\n key={`${event.id}-${idx}`}\n {...event}\n accentColor={`var(--${accentColor})`}\n />\n ))}\n </div>\n ) : (\n <div className=\"text-sm opacity-50\">No events</div>\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const calendarWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CalendarWidget\",\n displayName: \"Calendar 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 calendar\",\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 calendar\",\n defaultValue: \"Calendar\",\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 calendar 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 calendar content\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for today highlight and event indicators\",\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 getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the calendar 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 calendar 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,MAAM,wBAAQ,IAAI,MAAM;AACxB,MAAM,YAAY,IAAI,KAAK,MAAM;AACjC,UAAU,QAAQ,UAAU,SAAS,GAAG,EAAE;AAE1C,SAAS,MAAM,MAAY,OAAe,UAAU,GAAW;CAC7D,MAAM,IAAI,IAAI,KAAK,KAAK;AACxB,GAAE,SAAS,OAAO,SAAS,GAAG,EAAE;AAChC,QAAO,EAAE,aAAa;;AAGxB,SAA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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,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"}
@@ -180,7 +180,7 @@ function DayButton({ date, isToday, isSelected, hasEvents, accentColor, onClick,
180
180
  function CalendarWidget({ titleEnabled = true, titleText = "Calendar", titleFontSize = "xl", titleColor = "foreground", background = {
181
181
  type: "solid",
182
182
  color: "background"
183
- }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", className, ...props }) {
183
+ }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", className, ...props }) {
184
184
  const backgroundColor = background.color || "background";
185
185
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
186
186
  const today = /* @__PURE__ */ new Date();
@@ -212,7 +212,7 @@ function CalendarWidget({ titleEnabled = true, titleText = "Calendar", titleFont
212
212
  year: "numeric"
213
213
  });
214
214
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
215
- className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${className}`,
215
+ className: `@container overflow-hidden rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} bg-${backgroundColor} text-${textColor} ${className}`,
216
216
  style: { backgroundImage },
217
217
  ...props,
218
218
  children: [titleEnabled && titleText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -412,6 +412,22 @@ const calendarWidgetPropertySchema = {
412
412
  defaultValue: "md",
413
413
  tab: "styling",
414
414
  group: "Design"
415
+ }),
416
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
417
+ key: "borderWidth",
418
+ label: "Border Width",
419
+ description: "Border width for the widget",
420
+ defaultValue: "none",
421
+ tab: "styling",
422
+ group: "Design"
423
+ }),
424
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
425
+ key: "borderColor",
426
+ label: "Border Color",
427
+ description: "Border color for the widget",
428
+ defaultValue: "muted",
429
+ tab: "styling",
430
+ group: "Design"
415
431
  })
416
432
  ]
417
433
  };
@@ -435,4 +451,4 @@ Object.defineProperty(exports, "calendarWidgetPropertySchema", {
435
451
  }
436
452
  });
437
453
 
438
- //# sourceMappingURL=CalendarWidget-BAHiko62.cjs.map
454
+ //# sourceMappingURL=CalendarWidget-DLkcnQVx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarWidget-DLkcnQVx.cjs","names":["useDataSourceConfig","useWidgetPreviewContext","borderWidthClasses","borderColorClasses","ErrorState","ChevronLeft","ChevronRight","ChevronsDown","ChevronsUp"],"sources":["../../widgets/src/hooks/use-calendar-events.preview.ts","../../widgets/src/hooks/use-calendar-events.ts","../../widgets/src/widgets/CalendarWidget.tsx"],"sourcesContent":["import type { CalendarEvent } from \"./use-calendar-events.types\";\n\nconst today = new Date();\nconst inTwoDays = new Date(today);\ninTwoDays.setDate(inTwoDays.getDate() + 2);\n\nfunction toISO(date: Date, hours: number, minutes = 0): string {\n const d = new Date(date);\n d.setHours(hours, minutes, 0, 0);\n return d.toISOString();\n}\n\nfunction toDateString(date: Date): string {\n return date.toISOString().split(\"T\")[0]!;\n}\n\nexport const PREVIEW_DATA: CalendarEvent[] = [\n {\n id: 1,\n title: \"Team Strategy Call\",\n start: toISO(today, 9, 0),\n end: toISO(today, 10, 0),\n status: \"active\",\n color: \"#4f46e5\",\n },\n {\n id: 2,\n title: \"Product Launch Webinar\",\n start: toISO(today, 14, 0),\n end: toISO(today, 15, 30),\n status: \"active\",\n color: \"#0891b2\",\n venue: \"Zoom\",\n },\n {\n id: 3,\n title: \"Annual Leadership Summit\",\n start: `${toDateString(inTwoDays)}T00:00:00.000Z`,\n end: `${toDateString(inTwoDays)}T23:59:59.000Z`,\n status: \"active\",\n color: \"#059669\",\n isAllDay: true,\n venue: \"Convention Center\",\n },\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-calendar-events.preview\";\n\nimport type { CalendarEvent } from \"./use-calendar-events.types\";\n\nexport type { CalendarEvent } from \"./use-calendar-events.types\";\n\nexport function useCalendarEvents(): UseQueryResult<CalendarEvent[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"calendar-events\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<CalendarEvent[]> => {\n const url = baseUrl\n ? `${baseUrl}/events.json?event_timeline=upcoming`\n : \"/events.json?event_timeline=upcoming\";\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 calendar events: ${response.status}`);\n }\n\n return response.json();\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n","import { useState, useMemo, 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 {\n useCalendarEvents,\n type CalendarEvent,\n} from \"../hooks/use-calendar-events\";\nimport { ErrorState } from \"../components/error-state\";\nimport {\n ChevronLeft,\n ChevronRight,\n ChevronsDown,\n ChevronsUp,\n} from \"lucide-react\";\n\n// Utility to get days in a month\nconst getDaysInMonth = (year: number, month: number) => {\n return new Date(year, month + 1, 0).getDate();\n};\n\n// Utility to get the first day of month (0 = Sunday, 1 = Monday, etc.)\nconst getFirstDayOfMonth = (year: number, month: number) => {\n return new Date(year, month, 1).getDay();\n};\n\n// Generate calendar grid for a month\nconst generateMonthGrid = (year: number, month: number) => {\n const daysInMonth = getDaysInMonth(year, month);\n const firstDay = getFirstDayOfMonth(year, month);\n const today = new Date();\n\n const days: Array<{\n date: Date | null;\n isToday: boolean;\n isCurrentMonth: boolean;\n }> = [];\n\n // Add empty slots for days before the 1st\n for (let i = 0; i < firstDay; i++) {\n days.push({ date: null, isToday: false, isCurrentMonth: false });\n }\n\n // Add days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(year, month, day);\n const isToday =\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear();\n days.push({ date, isToday, isCurrentMonth: true });\n }\n\n return days;\n};\n\n// Generate week grid for current week\nconst generateWeekGrid = () => {\n const today = new Date();\n const currentDay = today.getDay();\n const days: Array<{\n date: Date;\n isToday: boolean;\n }> = [];\n\n for (let i = 0; i < 7; i++) {\n const date = new Date(today);\n date.setDate(today.getDate() - currentDay + i);\n days.push({\n date,\n isToday: date.toDateString() === today.toDateString(),\n });\n }\n\n return days;\n};\n\n// Get events for a specific date\nconst getEventsForDate = (date: Date, events: CalendarEvent[]) => {\n const dayStart = new Date(date);\n dayStart.setHours(0, 0, 0, 0);\n const dayEnd = new Date(date);\n dayEnd.setHours(23, 59, 59, 999);\n\n return events.filter((event) => {\n const eventStart = new Date(event.start);\n const eventEnd = new Date(event.end);\n return eventStart <= dayEnd && eventEnd >= dayStart;\n });\n};\n\n// Check if a date has events\nconst hasEventsOnDate = (date: Date | null, events: CalendarEvent[]) => {\n if (!date) return false;\n return getEventsForDate(date, events).length > 0;\n};\n\n// Event item component\nconst EventItem = ({\n title,\n start,\n end,\n color,\n isAllDay,\n accentColor,\n}: CalendarEvent & { accentColor?: string }) => {\n const startTime = new Date(start).toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n const endTime = new Date(end).toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n\n return (\n <div className=\"flex gap-x-2\">\n <div\n className=\"w-0.5 shrink-0 rounded-full\"\n style={{ backgroundColor: color || accentColor }}\n />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-medium\">{title}</div>\n <div className=\"text-xs opacity-60\">\n {isAllDay ? \"All day\" : `${startTime} - ${endTime}`}\n </div>\n </div>\n </div>\n );\n};\n\nconst dayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\ntype DayButtonProps = {\n date: Date;\n isToday: boolean;\n isSelected: boolean;\n hasEvents: boolean;\n accentColor: string;\n onClick: () => void;\n extraClassName?: string;\n};\n\nfunction DayButton({\n date,\n isToday,\n isSelected,\n hasEvents,\n accentColor,\n onClick,\n extraClassName = \"\",\n}: DayButtonProps) {\n return (\n <button\n onClick={onClick}\n className={`relative flex aspect-square items-center justify-center rounded-full text-sm transition-colors ${\n isSelected\n ? `bg-${accentColor} text-${accentColor}-foreground`\n : isToday\n ? `bg-${accentColor}/30 text-${accentColor}-foreground hover:bg-${accentColor}/50`\n : `hover:bg-${accentColor}/50 hover:text-${accentColor}-foreground`\n } ${extraClassName}`}\n >\n {date.getDate()}\n {hasEvents && (\n <div\n className={`absolute bottom-1 h-1 w-1 rounded-full bg-${accentColor}`}\n />\n )}\n </button>\n );\n}\n\ntype CalendarWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n};\n\nexport function CalendarWidget({\n // Title defaults\n titleEnabled = true,\n titleText = \"Calendar\",\n titleFontSize = \"xl\",\n titleColor = \"foreground\",\n\n // Styling 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\n className,\n ...props\n}: CalendarWidgetProps): 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 today = new Date();\n const [currentMonth, setCurrentMonth] = useState(today.getMonth());\n const [currentYear, setCurrentYear] = useState(today.getFullYear());\n const [isCollapsed, setIsCollapsed] = useState(false);\n const [selectedDate, setSelectedDate] = useState<Date | null>(today);\n\n const { data: events = [], isLoading, isError } = useCalendarEvents();\n\n // Generate calendar grids\n const monthGrid = useMemo(\n () => generateMonthGrid(currentYear, currentMonth),\n [currentYear, currentMonth],\n );\n const weekGrid = useMemo(() => generateWeekGrid(), []);\n\n // Get events for selected date\n const selectedDateEvents = useMemo(() => {\n if (!selectedDate) return [];\n return getEventsForDate(selectedDate, events);\n }, [selectedDate, events]);\n\n // Navigation handlers\n const goToPrevMonth = () => {\n if (currentMonth === 0) {\n setCurrentMonth(11);\n setCurrentYear(currentYear - 1);\n } else {\n setCurrentMonth(currentMonth - 1);\n }\n };\n\n const goToNextMonth = () => {\n if (currentMonth === 11) {\n setCurrentMonth(0);\n setCurrentYear(currentYear + 1);\n } else {\n setCurrentMonth(currentMonth + 1);\n }\n };\n\n const monthYearLabel = new Date(currentYear, currentMonth).toLocaleString(\n \"en-US\",\n {\n month: \"long\",\n year: \"numeric\",\n },\n );\n\n return (\n <div\n className={`@container overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-${backgroundColor} text-${textColor} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {/* Title */}\n {titleEnabled && titleText && (\n <div className={`p-${padding} pb-0`}>\n <h2\n className={`text-${titleFontSize} font-header font-bold text-${titleColor}`}\n >\n {titleText}\n </h2>\n </div>\n )}\n\n {/* Loading state */}\n {isLoading ? (\n <div\n className={`flex min-h-[300px] items-center justify-center p-${padding}`}\n >\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : (\n <div className={`p-${padding}`}>\n {/* Desktop: Side by side layout */}\n <div className=\"@md:flex @md:gap-6\">\n {/* Calendar Section */}\n <div className=\"@md:flex-none\">\n {/* Month/Year Header with Navigation */}\n <div className=\"mb-4 flex items-center justify-between\">\n <button\n onClick={goToPrevMonth}\n className=\"hover:bg-foreground/10 rounded-full p-1\"\n aria-label=\"Previous month\"\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <span className=\"text-base font-semibold\">\n {monthYearLabel}\n </span>\n\n <button\n onClick={goToNextMonth}\n className=\"hover:bg-foreground/10 rounded-full p-1\"\n aria-label=\"Next month\"\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n {/* Day Headers */}\n <div className=\"mb-2 grid grid-cols-7 gap-1 text-center\">\n {dayNames.map((day, idx) => (\n <div\n key={idx}\n className=\"text-xs font-medium uppercase opacity-60\"\n >\n {day}\n </div>\n ))}\n </div>\n\n {/* Calendar Grid - Week view on mobile when collapsed */}\n {isCollapsed && (\n <div className=\"grid grid-cols-7 gap-1 @md:hidden\">\n {weekGrid.map(({ date, isToday }, idx) => (\n <DayButton\n key={idx}\n date={date}\n isToday={isToday}\n isSelected={\n selectedDate?.toDateString() === date.toDateString()\n }\n hasEvents={hasEventsOnDate(date, events)}\n accentColor={accentColor}\n onClick={() => setSelectedDate(date)}\n />\n ))}\n </div>\n )}\n\n {/* Month view (always on desktop, when not collapsed on mobile) */}\n <div\n className={`grid grid-cols-7 gap-1 ${isCollapsed ? \"hidden @md:grid\" : \"grid\"}`}\n >\n {monthGrid.map((day, idx) => {\n if (!day.date) {\n return <div key={idx} className=\"aspect-square\" />;\n }\n\n return (\n <DayButton\n key={idx}\n date={day.date}\n isToday={day.isToday}\n isSelected={\n selectedDate?.toDateString() === day.date.toDateString()\n }\n hasEvents={hasEventsOnDate(day.date, events)}\n accentColor={accentColor}\n onClick={() => setSelectedDate(day.date)}\n extraClassName=\"p-2 @md:m-3\"\n />\n );\n })}\n </div>\n\n {/* Mobile collapse toggle */}\n <button\n onClick={() => setIsCollapsed(!isCollapsed)}\n className={`ml-2 flex w-full items-center justify-center gap-3 rounded-full p-1 text-${textColor}/50 @md:hidden`}\n aria-label={\n isCollapsed ? \"Expand calendar\" : \"Collapse calendar\"\n }\n >\n <div className={`h-1 w-1/2 bg-${textColor}/50`} />\n {isCollapsed ? (\n <ChevronsDown className=\"size-4\" />\n ) : (\n <ChevronsUp className=\"size-4\" />\n )}\n <div className={`h-1 w-1/2 bg-${textColor}/50`} />\n </button>\n </div>\n\n {/* Events Panel */}\n <div className=\"border-muted mt-4 pt-4 @md:mt-0 @md:w-56 @md:border-l @md:pt-0 @md:pl-6\">\n <div className=\"mb-2 text-sm font-medium opacity-60\">\n {selectedDate\n ? selectedDate.toLocaleDateString(\"en-US\", {\n weekday: \"long\",\n month: \"short\",\n day: \"numeric\",\n })\n : \"Select a date\"}\n </div>\n\n {selectedDateEvents.length > 0 ? (\n <div className=\"flex flex-col gap-3\">\n {selectedDateEvents.map((event, idx) => (\n <EventItem\n key={`${event.id}-${idx}`}\n {...event}\n accentColor={`var(--${accentColor})`}\n />\n ))}\n </div>\n ) : (\n <div className=\"text-sm opacity-50\">No events</div>\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const calendarWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CalendarWidget\",\n displayName: \"Calendar 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 calendar\",\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 calendar\",\n defaultValue: \"Calendar\",\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 calendar 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 calendar content\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for today highlight and event indicators\",\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 getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the calendar 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 calendar 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,MAAM,wBAAQ,IAAI,MAAM;AACxB,MAAM,YAAY,IAAI,KAAK,MAAM;AACjC,UAAU,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GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;uDACY;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;uDACa;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;uDACY;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;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;EACH;CACF"}
@@ -8,18 +8,20 @@ const DEFAULT_BACKGROUND = {
8
8
  color: "background"
9
9
  };
10
10
  const DEFAULT_CHILDREN = [];
11
- function CardWidget({ headerEnabled = true, title = "Card Title", titleFontSize = "lg", titleColor = "foreground", headerBackground = "transparent", footerEnabled = false, footerContent = "", footerColor = "muted", footerBackground = "transparent", background = DEFAULT_BACKGROUND, padding = 6, borderRadius = "xl", borderEnabled = true, gapSize = "md", children = DEFAULT_CHILDREN, className = "" }) {
11
+ function CardWidget({ headerEnabled = true, title = "Card Title", titleFontSize = "lg", titleColor = "foreground", headerBackground = "transparent", footerEnabled = false, footerContent = "", footerColor = "muted", footerBackground = "transparent", background = DEFAULT_BACKGROUND, padding = 6, borderRadius = "xl", borderWidth = "thin", borderColor = "muted", borderEnabled, gapSize = "md", children = DEFAULT_CHILDREN, className = "" }) {
12
12
  const contextRegistry = require_ScreenRenderer.useRegistry();
13
13
  const ScreenRenderer$1 = require_ScreenRenderer.useScreenRenderer() ?? require_ScreenRenderer.ScreenRenderer;
14
14
  const backgroundColor = background.color || "background";
15
15
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
16
16
  const gapSizeValue = gapSize ? _fluid_app_portal_core_registries.gapValues[gapSize] : 4;
17
+ const effectiveBorderWidth = borderEnabled === false ? "none" : borderWidth;
17
18
  const cardClasses = [
18
19
  "flex flex-col gap-6",
19
20
  `bg-${backgroundColor}`,
20
21
  `p-${padding}`,
21
22
  `rounded-${borderRadius}`,
22
- borderEnabled ? "border" : "",
23
+ _fluid_app_portal_core_registries.borderWidthClasses[effectiveBorderWidth],
24
+ effectiveBorderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : "",
23
25
  className
24
26
  ].filter(Boolean).join(" ");
25
27
  const containerStyle = { backgroundImage };
@@ -155,14 +157,20 @@ const cardWidgetPropertySchema = {
155
157
  defaultValue: "xl",
156
158
  group: "Design"
157
159
  }),
158
- {
159
- key: "borderEnabled",
160
- label: "Show Border",
161
- type: "boolean",
162
- description: "Toggle card border",
163
- defaultValue: true,
160
+ (0, _fluid_app_portal_core_registries.getBorderWidthField)({
161
+ key: "borderWidth",
162
+ label: "Border Width",
163
+ description: "Card border width",
164
+ defaultValue: "thin",
164
165
  group: "Design"
165
- },
166
+ }),
167
+ (0, _fluid_app_portal_core_registries.getBorderColorField)({
168
+ key: "borderColor",
169
+ label: "Border Color",
170
+ description: "Card border color",
171
+ defaultValue: "muted",
172
+ group: "Design"
173
+ }),
166
174
  (0, _fluid_app_portal_core_registries.getGapField)({
167
175
  key: "gapSize",
168
176
  label: "Gap",
@@ -186,4 +194,4 @@ Object.defineProperty(exports, "cardWidgetPropertySchema", {
186
194
  }
187
195
  });
188
196
 
189
- //# sourceMappingURL=CardWidget-h-FAxb1X.cjs.map
197
+ //# sourceMappingURL=CardWidget-B4cJHq6g.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWidget-B4cJHq6g.cjs","names":["useRegistry","ScreenRenderer","useScreenRenderer","DefaultScreenRenderer","gapValues","borderWidthClasses","borderColorClasses"],"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,M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;GACb,cAAc;GACd,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,MAAM;GACN,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;qDACU;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACH;CACF"}
@@ -1,5 +1,5 @@
1
1
  require("./chunk-DAgNkxik.cjs");
2
2
  require("./ScreenRenderer-C-H-ju1C.cjs");
3
3
  require("./fields-BCNGRVzZ.cjs");
4
- const require_CardWidget = require("./CardWidget-h-FAxb1X.cjs");
4
+ const require_CardWidget = require("./CardWidget-B4cJHq6g.cjs");
5
5
  exports.cardWidgetPropertySchema = require_CardWidget.cardWidgetPropertySchema;
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
2
2
  import { i as useRegistry, n as useScreenRenderer, t as ScreenRenderer } from "./ScreenRenderer-Dt-Qrx9w.mjs";
3
- import { a as getColorField, c as getGapField, o as getFontSizeField, r as getBorderRadiusField, t as gapValues, u as getPaddingField } from "./fields-DW1nDGRz.mjs";
3
+ import { f as getGapField, i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, r as gapValues, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region ../widgets/src/widgets/CardWidget.tsx
6
6
  var CardWidget_exports = /* @__PURE__ */ __exportAll({
@@ -12,18 +12,20 @@ const DEFAULT_BACKGROUND = {
12
12
  color: "background"
13
13
  };
14
14
  const DEFAULT_CHILDREN = [];
15
- function CardWidget({ headerEnabled = true, title = "Card Title", titleFontSize = "lg", titleColor = "foreground", headerBackground = "transparent", footerEnabled = false, footerContent = "", footerColor = "muted", footerBackground = "transparent", background = DEFAULT_BACKGROUND, padding = 6, borderRadius = "xl", borderEnabled = true, gapSize = "md", children = DEFAULT_CHILDREN, className = "" }) {
15
+ function CardWidget({ headerEnabled = true, title = "Card Title", titleFontSize = "lg", titleColor = "foreground", headerBackground = "transparent", footerEnabled = false, footerContent = "", footerColor = "muted", footerBackground = "transparent", background = DEFAULT_BACKGROUND, padding = 6, borderRadius = "xl", borderWidth = "thin", borderColor = "muted", borderEnabled, gapSize = "md", children = DEFAULT_CHILDREN, className = "" }) {
16
16
  const contextRegistry = useRegistry();
17
17
  const ScreenRenderer$1 = useScreenRenderer() ?? ScreenRenderer;
18
18
  const backgroundColor = background.color || "background";
19
19
  const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
20
20
  const gapSizeValue = gapSize ? gapValues[gapSize] : 4;
21
+ const effectiveBorderWidth = borderEnabled === false ? "none" : borderWidth;
21
22
  const cardClasses = [
22
23
  "flex flex-col gap-6",
23
24
  `bg-${backgroundColor}`,
24
25
  `p-${padding}`,
25
26
  `rounded-${borderRadius}`,
26
- borderEnabled ? "border" : "",
27
+ borderWidthClasses[effectiveBorderWidth],
28
+ effectiveBorderWidth !== "none" ? borderColorClasses[borderColor] : "",
27
29
  className
28
30
  ].filter(Boolean).join(" ");
29
31
  const containerStyle = { backgroundImage };
@@ -159,14 +161,20 @@ const cardWidgetPropertySchema = {
159
161
  defaultValue: "xl",
160
162
  group: "Design"
161
163
  }),
162
- {
163
- key: "borderEnabled",
164
- label: "Show Border",
165
- type: "boolean",
166
- description: "Toggle card border",
167
- defaultValue: true,
164
+ getBorderWidthField({
165
+ key: "borderWidth",
166
+ label: "Border Width",
167
+ description: "Card border width",
168
+ defaultValue: "thin",
168
169
  group: "Design"
169
- },
170
+ }),
171
+ getBorderColorField({
172
+ key: "borderColor",
173
+ label: "Border Color",
174
+ description: "Card border color",
175
+ defaultValue: "muted",
176
+ group: "Design"
177
+ }),
170
178
  getGapField({
171
179
  key: "gapSize",
172
180
  label: "Gap",
@@ -179,4 +187,4 @@ const cardWidgetPropertySchema = {
179
187
  //#endregion
180
188
  export { CardWidget_exports as n, cardWidgetPropertySchema as r, CardWidget as t };
181
189
 
182
- //# sourceMappingURL=CardWidget-BOk-hod0.mjs.map
190
+ //# sourceMappingURL=CardWidget-CzRI-odk.mjs.map