@foundrykit/form-plugin 0.0.0-stage → 1.16.3

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 (511) hide show
  1. package/README.md +486 -2
  2. package/dist/assets/flags/AD.svg +8 -0
  3. package/dist/assets/flags/AE.svg +8 -0
  4. package/dist/assets/flags/AF.svg +7 -0
  5. package/dist/assets/flags/AG.svg +8 -0
  6. package/dist/assets/flags/AI.svg +17 -0
  7. package/dist/assets/flags/AL.svg +4 -0
  8. package/dist/assets/flags/AM.svg +5 -0
  9. package/dist/assets/flags/AO.svg +7 -0
  10. package/dist/assets/flags/AQ.svg +4 -0
  11. package/dist/assets/flags/AR.svg +6 -0
  12. package/dist/assets/flags/AS.svg +7 -0
  13. package/dist/assets/flags/AT.svg +5 -0
  14. package/dist/assets/flags/AU.svg +20 -0
  15. package/dist/assets/flags/AW.svg +7 -0
  16. package/dist/assets/flags/AX.svg +5 -0
  17. package/dist/assets/flags/AZ.svg +7 -0
  18. package/dist/assets/flags/BA.svg +16 -0
  19. package/dist/assets/flags/BB.svg +6 -0
  20. package/dist/assets/flags/BD.svg +4 -0
  21. package/dist/assets/flags/BE.svg +5 -0
  22. package/dist/assets/flags/BF.svg +5 -0
  23. package/dist/assets/flags/BG.svg +5 -0
  24. package/dist/assets/flags/BH.svg +4 -0
  25. package/dist/assets/flags/BI.svg +11 -0
  26. package/dist/assets/flags/BJ.svg +5 -0
  27. package/dist/assets/flags/BM.svg +27 -0
  28. package/dist/assets/flags/BN.svg +11 -0
  29. package/dist/assets/flags/BO.svg +5 -0
  30. package/dist/assets/flags/BQ-SA.svg +6 -0
  31. package/dist/assets/flags/BQ-SE.svg +11 -0
  32. package/dist/assets/flags/BQ.svg +7 -0
  33. package/dist/assets/flags/BR.svg +7 -0
  34. package/dist/assets/flags/BS.svg +6 -0
  35. package/dist/assets/flags/BT.svg +5 -0
  36. package/dist/assets/flags/BW.svg +6 -0
  37. package/dist/assets/flags/BY.svg +13 -0
  38. package/dist/assets/flags/BZ.svg +10 -0
  39. package/dist/assets/flags/CA-BC.svg +26 -0
  40. package/dist/assets/flags/CA.svg +6 -0
  41. package/dist/assets/flags/CC.svg +12 -0
  42. package/dist/assets/flags/CD.svg +6 -0
  43. package/dist/assets/flags/CF.svg +10 -0
  44. package/dist/assets/flags/CG.svg +5 -0
  45. package/dist/assets/flags/CH.svg +6 -0
  46. package/dist/assets/flags/CI.svg +5 -0
  47. package/dist/assets/flags/CK.svg +20 -0
  48. package/dist/assets/flags/CL-EI.svg +4 -0
  49. package/dist/assets/flags/CL.svg +6 -0
  50. package/dist/assets/flags/CM.svg +6 -0
  51. package/dist/assets/flags/CN.svg +8 -0
  52. package/dist/assets/flags/CO.svg +5 -0
  53. package/dist/assets/flags/CR.svg +6 -0
  54. package/dist/assets/flags/CU.svg +8 -0
  55. package/dist/assets/flags/CV.svg +16 -0
  56. package/dist/assets/flags/CW.svg +6 -0
  57. package/dist/assets/flags/CX.svg +12 -0
  58. package/dist/assets/flags/CY.svg +5 -0
  59. package/dist/assets/flags/CZ.svg +5 -0
  60. package/dist/assets/flags/DE.svg +5 -0
  61. package/dist/assets/flags/DJ.svg +6 -0
  62. package/dist/assets/flags/DK.svg +4 -0
  63. package/dist/assets/flags/DM.svg +21 -0
  64. package/dist/assets/flags/DO.svg +10 -0
  65. package/dist/assets/flags/DZ.svg +6 -0
  66. package/dist/assets/flags/EA-ML.svg +18 -0
  67. package/dist/assets/flags/EC-W.svg +5 -0
  68. package/dist/assets/flags/EC.svg +8 -0
  69. package/dist/assets/flags/EE.svg +5 -0
  70. package/dist/assets/flags/EG.svg +6 -0
  71. package/dist/assets/flags/EH.svg +8 -0
  72. package/dist/assets/flags/ER.svg +6 -0
  73. package/dist/assets/flags/ES-BV.svg +5 -0
  74. package/dist/assets/flags/ES-CE.svg +22 -0
  75. package/dist/assets/flags/ES-IB.svg +10 -0
  76. package/dist/assets/flags/ES.svg +7 -0
  77. package/dist/assets/flags/ET.svg +8 -0
  78. package/dist/assets/flags/EU.svg +11 -0
  79. package/dist/assets/flags/FI.svg +4 -0
  80. package/dist/assets/flags/FJ.svg +13 -0
  81. package/dist/assets/flags/FK.svg +17 -0
  82. package/dist/assets/flags/FL-BR.svg +11 -0
  83. package/dist/assets/flags/FM.svg +7 -0
  84. package/dist/assets/flags/FO.svg +5 -0
  85. package/dist/assets/flags/FR-COR.svg +5 -0
  86. package/dist/assets/flags/FR.svg +5 -0
  87. package/dist/assets/flags/GA.svg +5 -0
  88. package/dist/assets/flags/GB-ORK.svg +5 -0
  89. package/dist/assets/flags/GB-SCT.svg +7 -0
  90. package/dist/assets/flags/GB-WLS.svg +7 -0
  91. package/dist/assets/flags/GB.svg +22 -0
  92. package/dist/assets/flags/GD.svg +17 -0
  93. package/dist/assets/flags/GE-AB.svg +16 -0
  94. package/dist/assets/flags/GE.svg +8 -0
  95. package/dist/assets/flags/GG.svg +5 -0
  96. package/dist/assets/flags/GH.svg +6 -0
  97. package/dist/assets/flags/GI.svg +6 -0
  98. package/dist/assets/flags/GL.svg +6 -0
  99. package/dist/assets/flags/GM.svg +6 -0
  100. package/dist/assets/flags/GN.svg +5 -0
  101. package/dist/assets/flags/GQ.svg +9 -0
  102. package/dist/assets/flags/GR.svg +10 -0
  103. package/dist/assets/flags/GT.svg +7 -0
  104. package/dist/assets/flags/GU.svg +10 -0
  105. package/dist/assets/flags/GW.svg +6 -0
  106. package/dist/assets/flags/GY.svg +8 -0
  107. package/dist/assets/flags/HK.svg +8 -0
  108. package/dist/assets/flags/HN.svg +10 -0
  109. package/dist/assets/flags/HR.svg +24 -0
  110. package/dist/assets/flags/HT.svg +10 -0
  111. package/dist/assets/flags/HU.svg +5 -0
  112. package/dist/assets/flags/IC.svg +5 -0
  113. package/dist/assets/flags/ID.svg +4 -0
  114. package/dist/assets/flags/IE.svg +5 -0
  115. package/dist/assets/flags/IL.svg +6 -0
  116. package/dist/assets/flags/IM.svg +4 -0
  117. package/dist/assets/flags/IN.svg +6 -0
  118. package/dist/assets/flags/IO.svg +35 -0
  119. package/dist/assets/flags/IQ.svg +8 -0
  120. package/dist/assets/flags/IR.svg +30 -0
  121. package/dist/assets/flags/IS.svg +5 -0
  122. package/dist/assets/flags/IT.svg +5 -0
  123. package/dist/assets/flags/JE.svg +6 -0
  124. package/dist/assets/flags/JM.svg +7 -0
  125. package/dist/assets/flags/JO.svg +7 -0
  126. package/dist/assets/flags/JP.svg +4 -0
  127. package/dist/assets/flags/KE.svg +12 -0
  128. package/dist/assets/flags/KG.svg +10 -0
  129. package/dist/assets/flags/KH.svg +6 -0
  130. package/dist/assets/flags/KI.svg +9 -0
  131. package/dist/assets/flags/KM.svg +12 -0
  132. package/dist/assets/flags/KN.svg +8 -0
  133. package/dist/assets/flags/KP.svg +9 -0
  134. package/dist/assets/flags/KR.svg +25 -0
  135. package/dist/assets/flags/KW.svg +6 -0
  136. package/dist/assets/flags/KY.svg +17 -0
  137. package/dist/assets/flags/KZ.svg +6 -0
  138. package/dist/assets/flags/LA.svg +6 -0
  139. package/dist/assets/flags/LB.svg +6 -0
  140. package/dist/assets/flags/LC.svg +8 -0
  141. package/dist/assets/flags/LI.svg +5 -0
  142. package/dist/assets/flags/LK.svg +16 -0
  143. package/dist/assets/flags/LR.svg +11 -0
  144. package/dist/assets/flags/LS.svg +6 -0
  145. package/dist/assets/flags/LT.svg +5 -0
  146. package/dist/assets/flags/LU.svg +5 -0
  147. package/dist/assets/flags/LV.svg +5 -0
  148. package/dist/assets/flags/LY.svg +7 -0
  149. package/dist/assets/flags/MA.svg +4 -0
  150. package/dist/assets/flags/MC.svg +4 -0
  151. package/dist/assets/flags/MD-SN.svg +7 -0
  152. package/dist/assets/flags/MD.svg +8 -0
  153. package/dist/assets/flags/ME.svg +8 -0
  154. package/dist/assets/flags/MG.svg +5 -0
  155. package/dist/assets/flags/MH.svg +6 -0
  156. package/dist/assets/flags/MK.svg +13 -0
  157. package/dist/assets/flags/ML.svg +5 -0
  158. package/dist/assets/flags/MM.svg +6 -0
  159. package/dist/assets/flags/MN.svg +12 -0
  160. package/dist/assets/flags/MO.svg +11 -0
  161. package/dist/assets/flags/MQ.svg +8 -0
  162. package/dist/assets/flags/MR.svg +5 -0
  163. package/dist/assets/flags/MS.svg +16 -0
  164. package/dist/assets/flags/MT.svg +5 -0
  165. package/dist/assets/flags/MU.svg +6 -0
  166. package/dist/assets/flags/MV.svg +5 -0
  167. package/dist/assets/flags/MW.svg +6 -0
  168. package/dist/assets/flags/MX.svg +7 -0
  169. package/dist/assets/flags/MY.svg +10 -0
  170. package/dist/assets/flags/MZ.svg +10 -0
  171. package/dist/assets/flags/NA.svg +7 -0
  172. package/dist/assets/flags/NE.svg +6 -0
  173. package/dist/assets/flags/NF.svg +6 -0
  174. package/dist/assets/flags/NG.svg +5 -0
  175. package/dist/assets/flags/NI.svg +9 -0
  176. package/dist/assets/flags/NL.svg +5 -0
  177. package/dist/assets/flags/NO.svg +5 -0
  178. package/dist/assets/flags/NP.svg +8 -0
  179. package/dist/assets/flags/NR.svg +5 -0
  180. package/dist/assets/flags/NU.svg +29 -0
  181. package/dist/assets/flags/NZ.svg +17 -0
  182. package/dist/assets/flags/OM.svg +7 -0
  183. package/dist/assets/flags/PA.svg +7 -0
  184. package/dist/assets/flags/PE.svg +5 -0
  185. package/dist/assets/flags/PF.svg +10 -0
  186. package/dist/assets/flags/PG.svg +10 -0
  187. package/dist/assets/flags/PH.svg +9 -0
  188. package/dist/assets/flags/PK.svg +7 -0
  189. package/dist/assets/flags/PL.svg +5 -0
  190. package/dist/assets/flags/PN.svg +17 -0
  191. package/dist/assets/flags/PR.svg +8 -0
  192. package/dist/assets/flags/PS.svg +6 -0
  193. package/dist/assets/flags/PT.svg +7 -0
  194. package/dist/assets/flags/PW.svg +4 -0
  195. package/dist/assets/flags/PY.svg +7 -0
  196. package/dist/assets/flags/QA.svg +4 -0
  197. package/dist/assets/flags/RO.svg +5 -0
  198. package/dist/assets/flags/RS.svg +11 -0
  199. package/dist/assets/flags/RU.svg +6 -0
  200. package/dist/assets/flags/RW.svg +6 -0
  201. package/dist/assets/flags/SA.svg +11 -0
  202. package/dist/assets/flags/SB.svg +12 -0
  203. package/dist/assets/flags/SC.svg +9 -0
  204. package/dist/assets/flags/SD.svg +8 -0
  205. package/dist/assets/flags/SE.svg +6 -0
  206. package/dist/assets/flags/SG.svg +12 -0
  207. package/dist/assets/flags/SI.svg +10 -0
  208. package/dist/assets/flags/SK.svg +11 -0
  209. package/dist/assets/flags/SL.svg +7 -0
  210. package/dist/assets/flags/SM.svg +9 -0
  211. package/dist/assets/flags/SN.svg +8 -0
  212. package/dist/assets/flags/SO.svg +6 -0
  213. package/dist/assets/flags/SR.svg +9 -0
  214. package/dist/assets/flags/SS.svg +10 -0
  215. package/dist/assets/flags/ST.svg +8 -0
  216. package/dist/assets/flags/SV.svg +8 -0
  217. package/dist/assets/flags/SX.svg +12 -0
  218. package/dist/assets/flags/SY.svg +9 -0
  219. package/dist/assets/flags/SZ.svg +16 -0
  220. package/dist/assets/flags/TB.svg +32 -0
  221. package/dist/assets/flags/TC.svg +20 -0
  222. package/dist/assets/flags/TD.svg +5 -0
  223. package/dist/assets/flags/TG.svg +10 -0
  224. package/dist/assets/flags/TH.svg +8 -0
  225. package/dist/assets/flags/TJ.svg +15 -0
  226. package/dist/assets/flags/TK.svg +11 -0
  227. package/dist/assets/flags/TL.svg +6 -0
  228. package/dist/assets/flags/TM.svg +24 -0
  229. package/dist/assets/flags/TN.svg +8 -0
  230. package/dist/assets/flags/TO.svg +7 -0
  231. package/dist/assets/flags/TR.svg +7 -0
  232. package/dist/assets/flags/TT.svg +7 -0
  233. package/dist/assets/flags/TV.svg +32 -0
  234. package/dist/assets/flags/TW.svg +9 -0
  235. package/dist/assets/flags/TZ.svg +8 -0
  236. package/dist/assets/flags/UA.svg +6 -0
  237. package/dist/assets/flags/UG.svg +11 -0
  238. package/dist/assets/flags/UN.svg +7 -0
  239. package/dist/assets/flags/US-HI.svg +26 -0
  240. package/dist/assets/flags/US-MP.svg +7 -0
  241. package/dist/assets/flags/US.svg +22 -0
  242. package/dist/assets/flags/UY.svg +11 -0
  243. package/dist/assets/flags/UZ.svg +22 -0
  244. package/dist/assets/flags/VA.svg +8 -0
  245. package/dist/assets/flags/VC.svg +10 -0
  246. package/dist/assets/flags/VE.svg +15 -0
  247. package/dist/assets/flags/VG.svg +23 -0
  248. package/dist/assets/flags/VI.svg +13 -0
  249. package/dist/assets/flags/VN.svg +6 -0
  250. package/dist/assets/flags/VU.svg +12 -0
  251. package/dist/assets/flags/WS.svg +9 -0
  252. package/dist/assets/flags/XC.svg +7 -0
  253. package/dist/assets/flags/XO.svg +5 -0
  254. package/dist/assets/flags/XS.svg +13 -0
  255. package/dist/assets/flags/YE.svg +7 -0
  256. package/dist/assets/flags/ZA.svg +10 -0
  257. package/dist/assets/flags/ZM.svg +9 -0
  258. package/dist/assets/flags/ZW.svg +15 -0
  259. package/dist/blocks/fields/Address.d.ts +11 -0
  260. package/dist/blocks/fields/Address.js +46 -0
  261. package/dist/blocks/fields/Address.js.map +1 -0
  262. package/dist/blocks/fields/Checkbox.d.ts +2 -0
  263. package/dist/blocks/fields/Checkbox.js +31 -0
  264. package/dist/blocks/fields/Checkbox.js.map +1 -0
  265. package/dist/blocks/fields/CheckboxGroup.d.ts +2 -0
  266. package/dist/blocks/fields/CheckboxGroup.js +29 -0
  267. package/dist/blocks/fields/CheckboxGroup.js.map +1 -0
  268. package/dist/blocks/fields/Date.d.ts +2 -0
  269. package/dist/blocks/fields/Date.js +46 -0
  270. package/dist/blocks/fields/Date.js.map +1 -0
  271. package/dist/blocks/fields/Email.d.ts +2 -0
  272. package/dist/blocks/fields/Email.js +36 -0
  273. package/dist/blocks/fields/Email.js.map +1 -0
  274. package/dist/blocks/fields/File.d.ts +2 -0
  275. package/dist/blocks/fields/File.js +34 -0
  276. package/dist/blocks/fields/File.js.map +1 -0
  277. package/dist/blocks/fields/Number.d.ts +2 -0
  278. package/dist/blocks/fields/Number.js +34 -0
  279. package/dist/blocks/fields/Number.js.map +1 -0
  280. package/dist/blocks/fields/Phone.d.ts +2 -0
  281. package/dist/blocks/fields/Phone.js +62 -0
  282. package/dist/blocks/fields/Phone.js.map +1 -0
  283. package/dist/blocks/fields/RadioGroup.d.ts +2 -0
  284. package/dist/blocks/fields/RadioGroup.js +29 -0
  285. package/dist/blocks/fields/RadioGroup.js.map +1 -0
  286. package/dist/blocks/fields/Select.d.ts +2 -0
  287. package/dist/blocks/fields/Select.js +37 -0
  288. package/dist/blocks/fields/Select.js.map +1 -0
  289. package/dist/blocks/fields/Text.d.ts +2 -0
  290. package/dist/blocks/fields/Text.js +36 -0
  291. package/dist/blocks/fields/Text.js.map +1 -0
  292. package/dist/blocks/fields/Textarea.d.ts +2 -0
  293. package/dist/blocks/fields/Textarea.js +22 -0
  294. package/dist/blocks/fields/Textarea.js.map +1 -0
  295. package/dist/blocks/fields/TravelDate.d.ts +10 -0
  296. package/dist/blocks/fields/TravelDate.js +30 -0
  297. package/dist/blocks/fields/TravelDate.js.map +1 -0
  298. package/dist/blocks/fields/shared.d.ts +8 -0
  299. package/dist/blocks/fields/shared.js +158 -0
  300. package/dist/blocks/fields/shared.js.map +1 -0
  301. package/dist/blocks/fields/visibility.d.ts +9 -0
  302. package/dist/blocks/fields/visibility.js +203 -0
  303. package/dist/blocks/fields/visibility.js.map +1 -0
  304. package/dist/blocks/submissionActions/ConfirmationMessage.d.ts +7 -0
  305. package/dist/blocks/submissionActions/ConfirmationMessage.js +25 -0
  306. package/dist/blocks/submissionActions/ConfirmationMessage.js.map +1 -0
  307. package/dist/blocks/submissionActions/Redirect.d.ts +2 -0
  308. package/dist/blocks/submissionActions/Redirect.js +29 -0
  309. package/dist/blocks/submissionActions/Redirect.js.map +1 -0
  310. package/dist/blocks/submissionActions/SendEmail.d.ts +2 -0
  311. package/dist/blocks/submissionActions/SendEmail.js +50 -0
  312. package/dist/blocks/submissionActions/SendEmail.js.map +1 -0
  313. package/dist/collections/Forms.d.ts +12 -0
  314. package/dist/collections/Forms.js +327 -0
  315. package/dist/collections/Forms.js.map +1 -0
  316. package/dist/collections/Submissions.d.ts +8 -0
  317. package/dist/collections/Submissions.js +137 -0
  318. package/dist/collections/Submissions.js.map +1 -0
  319. package/dist/components/BeforeDashboardClient.d.ts +1 -0
  320. package/dist/components/BeforeDashboardClient.js +40 -0
  321. package/dist/components/BeforeDashboardClient.js.map +1 -0
  322. package/dist/components/BeforeDashboardServer.d.ts +2 -0
  323. package/dist/components/BeforeDashboardServer.js +22 -0
  324. package/dist/components/BeforeDashboardServer.js.map +1 -0
  325. package/dist/components/BeforeDashboardServer.module.css +5 -0
  326. package/dist/components/EnquiryForm/FieldTooltip.d.ts +5 -0
  327. package/dist/components/EnquiryForm/FieldTooltip.js +33 -0
  328. package/dist/components/EnquiryForm/FieldTooltip.js.map +1 -0
  329. package/dist/components/EnquiryForm/Step.d.ts +8 -0
  330. package/dist/components/EnquiryForm/Step.js +157 -0
  331. package/dist/components/EnquiryForm/Step.js.map +1 -0
  332. package/dist/components/EnquiryForm/StepIndicator.d.ts +17 -0
  333. package/dist/components/EnquiryForm/StepIndicator.js +59 -0
  334. package/dist/components/EnquiryForm/StepIndicator.js.map +1 -0
  335. package/dist/components/EnquiryForm/fields/AddressField.d.ts +20 -0
  336. package/dist/components/EnquiryForm/fields/AddressField.js +253 -0
  337. package/dist/components/EnquiryForm/fields/AddressField.js.map +1 -0
  338. package/dist/components/EnquiryForm/fields/BudgetRangeField.d.ts +8 -0
  339. package/dist/components/EnquiryForm/fields/BudgetRangeField.js +48 -0
  340. package/dist/components/EnquiryForm/fields/BudgetRangeField.js.map +1 -0
  341. package/dist/components/EnquiryForm/fields/CheckboxField.d.ts +8 -0
  342. package/dist/components/EnquiryForm/fields/CheckboxField.js +68 -0
  343. package/dist/components/EnquiryForm/fields/CheckboxField.js.map +1 -0
  344. package/dist/components/EnquiryForm/fields/CountrySelect.d.ts +27 -0
  345. package/dist/components/EnquiryForm/fields/CountrySelect.js +208 -0
  346. package/dist/components/EnquiryForm/fields/CountrySelect.js.map +1 -0
  347. package/dist/components/EnquiryForm/fields/DateInputField.d.ts +18 -0
  348. package/dist/components/EnquiryForm/fields/DateInputField.js +69 -0
  349. package/dist/components/EnquiryForm/fields/DateInputField.js.map +1 -0
  350. package/dist/components/EnquiryForm/fields/EmailInputField.d.ts +8 -0
  351. package/dist/components/EnquiryForm/fields/EmailInputField.js +56 -0
  352. package/dist/components/EnquiryForm/fields/EmailInputField.js.map +1 -0
  353. package/dist/components/EnquiryForm/fields/MultiCounterField.d.ts +8 -0
  354. package/dist/components/EnquiryForm/fields/MultiCounterField.js +97 -0
  355. package/dist/components/EnquiryForm/fields/MultiCounterField.js.map +1 -0
  356. package/dist/components/EnquiryForm/fields/NumberStepperField.d.ts +8 -0
  357. package/dist/components/EnquiryForm/fields/NumberStepperField.js +71 -0
  358. package/dist/components/EnquiryForm/fields/NumberStepperField.js.map +1 -0
  359. package/dist/components/EnquiryForm/fields/OptionCardsField.d.ts +8 -0
  360. package/dist/components/EnquiryForm/fields/OptionCardsField.js +51 -0
  361. package/dist/components/EnquiryForm/fields/OptionCardsField.js.map +1 -0
  362. package/dist/components/EnquiryForm/fields/PhoneInputField.d.ts +14 -0
  363. package/dist/components/EnquiryForm/fields/PhoneInputField.js +170 -0
  364. package/dist/components/EnquiryForm/fields/PhoneInputField.js.map +1 -0
  365. package/dist/components/EnquiryForm/fields/SelectField.d.ts +13 -0
  366. package/dist/components/EnquiryForm/fields/SelectField.js +245 -0
  367. package/dist/components/EnquiryForm/fields/SelectField.js.map +1 -0
  368. package/dist/components/EnquiryForm/fields/TextInputField.d.ts +8 -0
  369. package/dist/components/EnquiryForm/fields/TextInputField.js +46 -0
  370. package/dist/components/EnquiryForm/fields/TextInputField.js.map +1 -0
  371. package/dist/components/EnquiryForm/fields/TextareaField.d.ts +8 -0
  372. package/dist/components/EnquiryForm/fields/TextareaField.js +46 -0
  373. package/dist/components/EnquiryForm/fields/TextareaField.js.map +1 -0
  374. package/dist/components/EnquiryForm/fields/TravelDateField.d.ts +16 -0
  375. package/dist/components/EnquiryForm/fields/TravelDateField.js +351 -0
  376. package/dist/components/EnquiryForm/fields/TravelDateField.js.map +1 -0
  377. package/dist/components/EnquiryForm/fields/YesNoField.d.ts +8 -0
  378. package/dist/components/EnquiryForm/fields/YesNoField.js +51 -0
  379. package/dist/components/EnquiryForm/fields/YesNoField.js.map +1 -0
  380. package/dist/components/EnquiryForm/index.d.ts +2 -0
  381. package/dist/components/EnquiryForm/index.js +173 -0
  382. package/dist/components/EnquiryForm/index.js.map +1 -0
  383. package/dist/components/EnquiryForm/useEnquiryForm.d.ts +19 -0
  384. package/dist/components/EnquiryForm/useEnquiryForm.js +136 -0
  385. package/dist/components/EnquiryForm/useEnquiryForm.js.map +1 -0
  386. package/dist/components/SubmissionAnswers.d.ts +12 -0
  387. package/dist/components/SubmissionAnswers.js +33 -0
  388. package/dist/components/SubmissionAnswers.js.map +1 -0
  389. package/dist/components/SubmissionPanel.d.ts +25 -0
  390. package/dist/components/SubmissionPanel.js +188 -0
  391. package/dist/components/SubmissionPanel.js.map +1 -0
  392. package/dist/components/SubmissionPanel.module.css +147 -0
  393. package/dist/endpoints/customEndpointHandler.d.ts +2 -0
  394. package/dist/endpoints/customEndpointHandler.js +7 -0
  395. package/dist/endpoints/customEndpointHandler.js.map +1 -0
  396. package/dist/endpoints/fetchFormHandler.d.ts +3 -0
  397. package/dist/endpoints/fetchFormHandler.js +54 -0
  398. package/dist/endpoints/fetchFormHandler.js.map +1 -0
  399. package/dist/endpoints/submitFormHandler.d.ts +3 -0
  400. package/dist/endpoints/submitFormHandler.js +156 -0
  401. package/dist/endpoints/submitFormHandler.js.map +1 -0
  402. package/dist/exports/client.d.ts +5 -0
  403. package/dist/exports/client.js +10 -0
  404. package/dist/exports/client.js.map +1 -0
  405. package/dist/exports/frontend.d.ts +10 -0
  406. package/dist/exports/frontend.js +18 -0
  407. package/dist/exports/frontend.js.map +1 -0
  408. package/dist/exports/rich-text.d.ts +18 -0
  409. package/dist/exports/rich-text.js +20 -0
  410. package/dist/exports/rich-text.js.map +1 -0
  411. package/dist/exports/rsc.d.ts +5 -0
  412. package/dist/exports/rsc.js +6 -0
  413. package/dist/exports/rsc.js.map +1 -0
  414. package/dist/fields/conditions/ConditionSourceField.d.ts +7 -0
  415. package/dist/fields/conditions/ConditionSourceField.js +36 -0
  416. package/dist/fields/conditions/ConditionSourceField.js.map +1 -0
  417. package/dist/fields/conditions/ConditionValueField.d.ts +9 -0
  418. package/dist/fields/conditions/ConditionValueField.js +82 -0
  419. package/dist/fields/conditions/ConditionValueField.js.map +1 -0
  420. package/dist/fields/conditions/collectSourceFields.d.ts +30 -0
  421. package/dist/fields/conditions/collectSourceFields.js +67 -0
  422. package/dist/fields/conditions/collectSourceFields.js.map +1 -0
  423. package/dist/fields/conditions/describeSource.d.ts +15 -0
  424. package/dist/fields/conditions/describeSource.js +32 -0
  425. package/dist/fields/conditions/describeSource.js.map +1 -0
  426. package/dist/fields/lockable/LockableTextField.d.ts +11 -0
  427. package/dist/fields/lockable/LockableTextField.js +96 -0
  428. package/dist/fields/lockable/LockableTextField.js.map +1 -0
  429. package/dist/fields/lockable/formatSlug.d.ts +17 -0
  430. package/dist/fields/lockable/formatSlug.js +27 -0
  431. package/dist/fields/lockable/formatSlug.js.map +1 -0
  432. package/dist/fields/lockable/index.d.ts +28 -0
  433. package/dist/fields/lockable/index.js +58 -0
  434. package/dist/fields/lockable/index.js.map +1 -0
  435. package/dist/fields/lockable/index.scss +24 -0
  436. package/dist/index.d.ts +11 -0
  437. package/dist/index.js +102 -0
  438. package/dist/index.js.map +1 -0
  439. package/dist/types.d.ts +432 -0
  440. package/dist/types.js +3 -0
  441. package/dist/types.js.map +1 -0
  442. package/dist/utilities/buildFieldRules.d.ts +19 -0
  443. package/dist/utilities/buildFieldRules.js +54 -0
  444. package/dist/utilities/buildFieldRules.js.map +1 -0
  445. package/dist/utilities/buildFormURL.d.ts +5 -0
  446. package/dist/utilities/buildFormURL.js +6 -0
  447. package/dist/utilities/buildFormURL.js.map +1 -0
  448. package/dist/utilities/buildIndicatorSteps.d.ts +15 -0
  449. package/dist/utilities/buildIndicatorSteps.js +33 -0
  450. package/dist/utilities/buildIndicatorSteps.js.map +1 -0
  451. package/dist/utilities/buildSubmitURL.d.ts +11 -0
  452. package/dist/utilities/buildSubmitURL.js +9 -0
  453. package/dist/utilities/buildSubmitURL.js.map +1 -0
  454. package/dist/utilities/buildZodSchemaFromForm.d.ts +40 -0
  455. package/dist/utilities/buildZodSchemaFromForm.js +218 -0
  456. package/dist/utilities/buildZodSchemaFromForm.js.map +1 -0
  457. package/dist/utilities/conditions/evaluateRule.d.ts +9 -0
  458. package/dist/utilities/conditions/evaluateRule.js +93 -0
  459. package/dist/utilities/conditions/evaluateRule.js.map +1 -0
  460. package/dist/utilities/conditions/index.d.ts +2 -0
  461. package/dist/utilities/conditions/index.js +4 -0
  462. package/dist/utilities/conditions/index.js.map +1 -0
  463. package/dist/utilities/conditions/visibility.d.ts +8 -0
  464. package/dist/utilities/conditions/visibility.js +40 -0
  465. package/dist/utilities/conditions/visibility.js.map +1 -0
  466. package/dist/utilities/countryFromLabel.d.ts +7 -0
  467. package/dist/utilities/countryFromLabel.js +37 -0
  468. package/dist/utilities/countryFromLabel.js.map +1 -0
  469. package/dist/utilities/countryFromLabel.test.d.ts +1 -0
  470. package/dist/utilities/countryFromLabel.test.js +40 -0
  471. package/dist/utilities/countryFromLabel.test.js.map +1 -0
  472. package/dist/utilities/describeSubmission.d.ts +82 -0
  473. package/dist/utilities/describeSubmission.js +291 -0
  474. package/dist/utilities/describeSubmission.js.map +1 -0
  475. package/dist/utilities/fetchEnquiryForm.d.ts +6 -0
  476. package/dist/utilities/fetchEnquiryForm.js +19 -0
  477. package/dist/utilities/fetchEnquiryForm.js.map +1 -0
  478. package/dist/utilities/flagAssets.d.ts +2 -0
  479. package/dist/utilities/flagAssets.js +19 -0
  480. package/dist/utilities/flagAssets.js.map +1 -0
  481. package/dist/utilities/lookupPostcode.d.ts +37 -0
  482. package/dist/utilities/lookupPostcode.js +49 -0
  483. package/dist/utilities/lookupPostcode.js.map +1 -0
  484. package/dist/utilities/normalizeFormSteps.d.ts +25 -0
  485. package/dist/utilities/normalizeFormSteps.js +27 -0
  486. package/dist/utilities/normalizeFormSteps.js.map +1 -0
  487. package/dist/utilities/normalizeSubmitError.d.ts +10 -0
  488. package/dist/utilities/normalizeSubmitError.js +24 -0
  489. package/dist/utilities/normalizeSubmitError.js.map +1 -0
  490. package/dist/utilities/recaptchaClient.d.ts +30 -0
  491. package/dist/utilities/recaptchaClient.js +68 -0
  492. package/dist/utilities/recaptchaClient.js.map +1 -0
  493. package/dist/utilities/sanitizeSubmission.d.ts +4 -0
  494. package/dist/utilities/sanitizeSubmission.js +8 -0
  495. package/dist/utilities/sanitizeSubmission.js.map +1 -0
  496. package/dist/utilities/toDateInputValue.d.ts +15 -0
  497. package/dist/utilities/toDateInputValue.js +27 -0
  498. package/dist/utilities/toDateInputValue.js.map +1 -0
  499. package/dist/utilities/toDateInputValue.test.d.ts +1 -0
  500. package/dist/utilities/toDateInputValue.test.js +39 -0
  501. package/dist/utilities/toDateInputValue.test.js.map +1 -0
  502. package/dist/utilities/travelDate.d.ts +14 -0
  503. package/dist/utilities/travelDate.js +56 -0
  504. package/dist/utilities/travelDate.js.map +1 -0
  505. package/dist/utilities/validateVisibleSubmission.d.ts +10 -0
  506. package/dist/utilities/validateVisibleSubmission.js +28 -0
  507. package/dist/utilities/validateVisibleSubmission.js.map +1 -0
  508. package/dist/utilities/verifyCaptcha.d.ts +55 -0
  509. package/dist/utilities/verifyCaptcha.js +98 -0
  510. package/dist/utilities/verifyCaptcha.js.map +1 -0
  511. package/package.json +123 -3
package/README.md CHANGED
@@ -1,3 +1,487 @@
1
- # Temporary Holding Version
1
+ # @foundrykit/form-plugin
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A multi-step form plugin for [Payload CMS 3](https://payloadcms.com). Adds a form builder to your admin panel with 11 built-in field types, configurable submission actions, and a ready-to-use React component for the frontend.
4
+
5
+ ## Features
6
+
7
+ - **Multi-step forms** — organise fields into named steps with optional icons and a progress indicator
8
+ - **reCAPTCHA v3** — optional, invisible spam protection on every form
9
+ - **12 field types** — text, email, phone, textarea, checkbox, radio group, checkbox group, select, number, date, file upload, address (with postcode lookup)
10
+ - **Submission actions** — send email, show a confirmation message, or redirect after submission (multiple actions per form, executed in order)
11
+ - **Two collections** — `forms` and `form-submissions` added to your Payload config automatically
12
+ - **REST API** — fetch form data and submit forms via Payload custom endpoints
13
+ - **Frontend component** — `<EnquiryForm>` React client component with built-in step navigation and validation
14
+ - **Fully customisable** — disable, replace, or add field block types; rename collection slugs
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ ```sh
21
+ pnpm add @foundrykit/form-plugin
22
+ ```
23
+
24
+ **Peer dependencies** (install if not already present):
25
+
26
+ ```sh
27
+ pnpm add payload react react-hook-form @radix-ui/react-popover
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Quick start
33
+
34
+ ```ts
35
+ // payload.config.ts
36
+ import { formPlugin } from '@foundrykit/form-plugin';
37
+ import { buildConfig } from 'payload';
38
+
39
+ export default buildConfig({
40
+ // Configure your email adapter here — the plugin uses payload.sendEmail
41
+ // for the `sendEmail` submission action.
42
+ // email: nodemailerAdapter({ ... }) or resendAdapter({ ... }), etc.
43
+ plugins: [formPlugin({})],
44
+ // ...rest of your config
45
+ });
46
+ ```
47
+
48
+ The `sendEmail` submission action uses Payload's built-in `payload.sendEmail`, which
49
+ delegates to the [email adapter](https://payloadcms.com/docs/email/overview) you
50
+ configure on the Payload config. No plugin-level email handler is required.
51
+
52
+ ---
53
+
54
+ ## Plugin options
55
+
56
+ ```ts
57
+ formPlugin(options: FormPluginConfig)
58
+ ```
59
+
60
+ | Option | Type | Default | Description |
61
+ | ------------------------- | -------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
62
+ | `disabled` | `boolean` | `false` | Register collections but skip adding endpoints |
63
+ | `baseUrl` | `string` | `''` | Base URL prepended when building form API URLs (e.g. `https://example.com`) |
64
+ | `mediaCollection` | `string` | `'media'` | Slug of your media collection, used for step icon uploads |
65
+ | `collections.forms` | `string` | `'forms'` | Slug for the forms collection |
66
+ | `collections.submissions` | `string` | `'form-submissions'` | Slug for the submissions collection |
67
+ | `labels.forms` | `string` | `'Form'` | Singular admin label for forms |
68
+ | `labels.submissions` | `string` | `'Form Submission'` | Singular admin label for submissions |
69
+ | `fields` | `FieldsConfig` | all built-ins | Control which field block types are available in the form builder — see [Customising field blocks](#customising-field-blocks) |
70
+
71
+ ---
72
+
73
+ ## Spam protection (reCAPTCHA v3)
74
+
75
+ Pass a `captcha` config and every form's submit endpoint requires a verified
76
+ reCAPTCHA v3 token. Leave it out — or leave either key unset — and nothing
77
+ changes: no script is loaded, no token is required.
78
+
79
+ ```ts
80
+ formPlugin({
81
+ captcha: {
82
+ siteKey: process.env.RECAPTCHA_SITE_KEY,
83
+ secretKey: process.env.RECAPTCHA_SECRET_KEY,
84
+ minScore: 0.5, // optional, default 0.5
85
+ action: 'form_submit', // optional, default 'form_submit'
86
+ },
87
+ });
88
+ ```
89
+
90
+ Nothing else to wire up. `GET /api/form-data/:slug` advertises the **site key**
91
+ (public by design) to the browser, `EnquiryForm` mints a token per submission,
92
+ and `POST /api/form-submit/:formSlug` verifies it before the form is even
93
+ loaded. The **secret key never leaves the server** — an integration test
94
+ asserts it is absent from the form response.
95
+
96
+ **Score, not a challenge.** v3 is invisible: it returns 0.0–1.0 and you choose
97
+ the cut-off. Tune `minScore` from the reCAPTCHA console once you can see real
98
+ traffic; too high silently rejects real people.
99
+
100
+ **It fails open, on purpose.** If Google is unreachable, or the secret is
101
+ wrong, the submission is allowed and the reason is logged as an error. Blocking
102
+ would throw away genuine enquiries for the length of an outage or a
103
+ misconfiguration, which costs more than the spam it would stop. A missing or
104
+ rejected token is still a hard `403` — only _infrastructure_ failure is
105
+ forgiven. Watch the logs for `[forms] captcha could not be verified`.
106
+
107
+ Register the site key against every domain that serves forms, including
108
+ `localhost` for development, or every local submit will fail verification.
109
+
110
+ ---
111
+
112
+ ## Collections
113
+
114
+ ### Forms (`forms`)
115
+
116
+ Stores form definitions. Publicly readable; create/update/delete require authentication.
117
+
118
+ Each form document has:
119
+
120
+ - **title** — display name
121
+ - **slug** — unique identifier used in the API (e.g. `contact-form`)
122
+ - **steps** — one or more steps, each with a title, optional icon, and a list of field blocks
123
+ - **additionalContent** — optional rich text positioned above or below the form
124
+ - **submissionActions** — one or more actions executed on successful submission
125
+
126
+ ### Form Submissions (`form-submissions`)
127
+
128
+ One document per submission. Stores:
129
+
130
+ - **title** — who sent it: the answer named `name`, `full-name` or `first-name` + `last-name`, else the email, else the date. Used as the page title.
131
+ - **form** — relationship to the parent form
132
+ - **submittedAt** — ISO timestamp
133
+ - **data** — key/value pairs of submitted field values
134
+ - **metadata** — `userAgent`, `ip`, `referrer` captured from the request
135
+
136
+ In the admin, a submission's answers are shown under the form's own questions, grouped by step,
137
+ with option values shown as their labels and phone, counter and address answers spelled out.
138
+ **Edit** on the Answers card turns text answers into inputs and choice answers into dropdowns, so
139
+ staff can fix a mistyped email before resending; the change is kept when they save. Phone, counter
140
+ and address answers can't be edited there. The form, the date, and a **Details** card (the page it
141
+ came from, IP, browser and the submission context) are read-only.
142
+
143
+ Sites can show their own submission fields in the same card style with `SubmissionPanel` from
144
+ `@foundrykit/form-plugin/rsc`, as a field's `admin.components.Field`:
145
+
146
+ ```tsx
147
+ import { SubmissionPanel } from '@foundrykit/form-plugin/rsc';
148
+
149
+ export const NotesField = ({ data }) => (
150
+ <SubmissionPanel
151
+ heading='Notes'
152
+ id='notes'
153
+ groups={[{ items: [{ label: 'Follow-up', value: data?.followUp ?? '' }] }]}
154
+ />
155
+ );
156
+ ```
157
+
158
+ **Upgrading to the submission view on Postgres:** the `title` column is new, so add it with a
159
+ migration (`ALTER TABLE "form_submissions" ADD COLUMN "title" varchar;`) and regenerate the import
160
+ map. Older submissions get their title on read until they are next saved.
161
+
162
+ ---
163
+
164
+ ## Field types
165
+
166
+ | Block slug | Description |
167
+ | --------------- | ------------------------------------------------------------------------------------------- |
168
+ | `text` | Single-line text input (supports `half` width) |
169
+ | `email` | Email address input |
170
+ | `phone` | Phone number input |
171
+ | `textarea` | Multi-line text (configurable `rows`) |
172
+ | `checkbox` | Single boolean checkbox |
173
+ | `radioGroup` | Single choice from a list (`row` or `grid` layout) |
174
+ | `checkboxGroup` | Multiple choices from a list (`row` or `grid` layout) |
175
+ | `select` | Dropdown select |
176
+ | `number` | Numeric input with optional `min`, `max`, `step` |
177
+ | `date` | Date picker with optional `min`/`max` |
178
+ | `file` | File upload to a Payload collection (configurable `accept`, `maxSizeMB`) |
179
+ | `address` | Address with UK postcode lookup (configurable `defaultCountry`, `showLine2`, `lookupLabel`) |
180
+
181
+ All field blocks share these base properties: `name`, `label`, `required`, `tooltip`.
182
+
183
+ ### Travel date field (opt-in)
184
+
185
+ "When would you like to travel?": a calendar panel where the visitor picks **a month** (a year
186
+ of month buttons) or **an exact date** (a day calendar, via `react-day-picker`). It's our own
187
+ panel rather than native selects and date inputs, so sites can brand it: style the
188
+ `enquiry-field__calendar*` classes. It isn't in the default set, so adding it to the plugin doesn't
189
+ change any existing site's schema. Register it, then add a migration for its table on Postgres:
190
+
191
+ ```ts
192
+ import { formPlugin, TravelDateBlock } from '@foundrykit/form-plugin';
193
+
194
+ formPlugin({ fields: { travelDate: { block: TravelDateBlock } } });
195
+ ```
196
+
197
+ The answer is stored as `2027-08` or `2027-08-14` and shows on the submission page as
198
+ "August 2027" or "14 Aug 2027". `parseTravelDate(value)` gives the first and last day it covers
199
+ (`from`/`to`, the same day for an exact date) and that label, for mapping into a CRM.
200
+
201
+ To ask "Are you flexible?" and only require a date when they aren't, add a Yes / No field and
202
+ give the travel date a visibility rule: **Require this field when rules match**, flexible
203
+ equals `no`.
204
+
205
+ ### Address field
206
+
207
+ Stores a composite value — `{ line1, line2, city, county, postcode, country }` —
208
+ serialised to JSON in the submission, the same way `phone` stores
209
+ `{ country, number, e164 }`.
210
+
211
+ The lookup is backed by [postcodes.io](https://postcodes.io): free, no API key,
212
+ nobody billed per call, so the field can go on any public form without watching
213
+ a quota. It resolves a postcode to its town, county and country only — it does
214
+ not return a premises list, so the street line is always typed. Manual entry is
215
+ never blocked, which keeps the field usable for non-UK addresses and when the
216
+ lookup is unreachable.
217
+
218
+ A **required** address needs a street line and a postcode: a postcode alone is
219
+ not deliverable, and the lookup can never supply the street. Reuse the lookup
220
+ outside a form with the exported helper:
221
+
222
+ ```ts
223
+ import { lookupPostcode } from '@foundrykit/form-plugin/client';
224
+
225
+ const result = await lookupPostcode('SW1A 1AA');
226
+ // { status: 'ok', address: { postcode, city, county, country } }
227
+ // | { status: 'notFound' } | { status: 'error' }
228
+ ```
229
+
230
+ ---
231
+
232
+ ## Submission actions
233
+
234
+ Configure one or more actions per form. They execute in the order they appear.
235
+
236
+ | Block | Description |
237
+ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
238
+ | `sendEmail` | Sends an email via `payload.sendEmail` (uses your Payload [email adapter](https://payloadcms.com/docs/email/overview)). Subject supports `{{fieldName}}` interpolation. |
239
+ | `confirmationMessage` | Returns a Lexical rich-text message in the API response for the frontend to display. |
240
+ | `redirect` | Returns a `redirectUrl` in the API response. The frontend component handles the navigation. |
241
+
242
+ ---
243
+
244
+ ## REST API
245
+
246
+ Both endpoints are registered at the Payload API root (`/api` by default).
247
+
248
+ ### `GET /api/form-data/:slug`
249
+
250
+ Fetches a form document by its slug.
251
+
252
+ **Response:** the full `FormDocument` JSON.
253
+
254
+ ### `POST /api/form-submit/:formSlug`
255
+
256
+ Submits field data for a form.
257
+
258
+ **Request body:**
259
+
260
+ ```json
261
+ {
262
+ "data": { "name": "Alice", "email": "alice@example.com" },
263
+ "metadata": { "referrer": "https://example.com/about" }
264
+ }
265
+ ```
266
+
267
+ **Success response (`200`):**
268
+
269
+ ```json
270
+ {
271
+ "success": true,
272
+ "actions": {
273
+ "confirmationMessage": { /* Lexical rich-text node */ },
274
+ "redirectUrl": "/thank-you"
275
+ }
276
+ }
277
+ ```
278
+
279
+ **Validation error response (`422`):**
280
+
281
+ ```json
282
+ {
283
+ "success": false,
284
+ "errors": [{ "field": "email", "message": "Email is required" }]
285
+ }
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Frontend usage
291
+
292
+ ### Server component — fetch form data
293
+
294
+ Import from `@foundrykit/form-plugin/rsc`:
295
+
296
+ ```tsx
297
+ import { fetchForm } from '@foundrykit/form-plugin/rsc';
298
+
299
+ export default async function ContactPage() {
300
+ const form = await fetchForm({ slug: 'contact-form' });
301
+ return <ContactForm form={form} />;
302
+ }
303
+ ```
304
+
305
+ `fetchForm` options:
306
+
307
+ | Option | Type | Default | Description |
308
+ | ----------- | -------- | --------- | ------------------------------------------------------- |
309
+ | `slug` | `string` | required | The form slug to fetch |
310
+ | `baseUrl` | `string` | `''` | Override the API base URL |
311
+ | `formsSlug` | `string` | `'forms'` | Override the forms collection slug used in the URL path |
312
+
313
+ ### Client component — render the form
314
+
315
+ Import from `@foundrykit/form-plugin/client`:
316
+
317
+ ```tsx
318
+ 'use client';
319
+
320
+ import { EnquiryForm } from '@foundrykit/form-plugin/client';
321
+ import type { FormDocument } from '@foundrykit/form-plugin';
322
+
323
+ export function ContactForm({ form }: { form: FormDocument }) {
324
+ return (
325
+ <EnquiryForm
326
+ form={form}
327
+ onSuccess={result => console.log('submitted', result)}
328
+ onError={err => console.error(err)}
329
+ />
330
+ );
331
+ }
332
+ ```
333
+
334
+ `EnquiryForm` props:
335
+
336
+ | Prop | Type | Default | Description |
337
+ | ------------------- | ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
338
+ | `form` | `FormDocument` | required | Form data returned by `fetchForm` |
339
+ | `apiBase` | `string` | `''` | Base URL for the submit endpoint |
340
+ | `className` | `string` | — | CSS class applied to the root element |
341
+ | `onSuccess` | `(result: SubmitResult) => void` | — | Called after successful submission |
342
+ | `onError` | `(error: SubmitError) => void` | — | Called when the server returns validation errors |
343
+ | `additionalContent` | `ReactNode` | — | Extra content rendered above or below the form (respects the `additionalContent.position` setting) |
344
+ | `resolver` | `Resolver<Record<string, unknown>>` | — | Optional react-hook-form resolver (e.g. `zodResolver(schema)`). Merged with the per-field admin rules. |
345
+
346
+ ### Validation
347
+
348
+ Every field block exposes an admin **Validation** group: `requiredMessage`,
349
+ `minLength` / `maxLength` / `pattern` / `patternMessage` (for text-shaped
350
+ fields), and `min` / `max` / `minMessage` / `maxMessage` (for numeric fields
351
+ and the multi-counter total). These rules are wired into RHF via the
352
+ `buildFieldRules` helper and are also exported from `/client` for use in
353
+ custom field components.
354
+
355
+ For richer cross-field logic, pass a form-level resolver. The plugin does
356
+ **not** bundle `zod` or `@hookform/resolvers` — install them in your app:
357
+
358
+ ```sh
359
+ pnpm add zod @hookform/resolvers
360
+ ```
361
+
362
+ ```tsx
363
+ 'use client';
364
+
365
+ import { EnquiryForm } from '@foundrykit/form-plugin/client';
366
+ import { zodResolver } from '@hookform/resolvers/zod';
367
+ import { z } from 'zod';
368
+
369
+ const schema = z
370
+ .object({
371
+ travelKnown: z.enum(['yes', 'no']).optional(),
372
+ travelPlans: z.string().optional(),
373
+ })
374
+ .passthrough()
375
+ .superRefine((data, ctx) => {
376
+ if (data.travelKnown === 'no' && !data.travelPlans) {
377
+ ctx.addIssue({
378
+ path: ['travelPlans'],
379
+ code: 'custom',
380
+ message: 'Tell us a bit about what you’re looking for',
381
+ });
382
+ }
383
+ });
384
+
385
+ export function ContactForm({ form }) {
386
+ return <EnquiryForm form={form} resolver={zodResolver(schema)} />;
387
+ }
388
+ ```
389
+
390
+ Per-field admin rules and the resolver run together — either source can flag
391
+ a field invalid, and step-by-step validation (`goNext`) respects both.
392
+
393
+ ### Hook — custom form UI
394
+
395
+ If you need full control over the form UI, use `useEnquiryForm` directly:
396
+
397
+ ```tsx
398
+ 'use client';
399
+
400
+ import { useEnquiryForm } from '@foundrykit/form-plugin/client';
401
+
402
+ export function MyCustomForm({ form }) {
403
+ const {
404
+ currentStep,
405
+ totalSteps,
406
+ stepData,
407
+ form: rhf,
408
+ goNext,
409
+ goBack,
410
+ submit,
411
+ isSubmitting,
412
+ } = useEnquiryForm({ form, apiBase: '' });
413
+
414
+ // render whatever you like
415
+ }
416
+ ```
417
+
418
+ ---
419
+
420
+ ## Customising field blocks
421
+
422
+ The `fields` option in the plugin config controls which block types appear in the form builder:
423
+
424
+ ```ts
425
+ formPlugin({
426
+ fields: {
427
+ // disable a built-in type
428
+ file: false,
429
+
430
+ // replace a built-in type with your own block
431
+ text: { block: myCustomTextBlock },
432
+
433
+ // add a new type
434
+ budgetRange: { block: BudgetRangeBlock },
435
+ },
436
+ });
437
+ ```
438
+
439
+ Built-in slugs: `text`, `email`, `phone`, `textarea`, `checkbox`, `radioGroup`, `checkboxGroup`, `select`, `number`, `date`, `file`, `address`.
440
+
441
+ ---
442
+
443
+ ## Architecture overview
444
+
445
+ ```
446
+ src/
447
+ ├── index.ts # Plugin entry — merges collections and endpoints into Payload config
448
+ ├── types.ts # All shared TypeScript types (field blocks, FormDocument, plugin config)
449
+ ├── collections/
450
+ │ ├── Forms.ts # createFormsCollection factory
451
+ │ └── Submissions.ts # createSubmissionsCollection factory
452
+ ├── blocks/
453
+ │ ├── fields/ # One file per built-in field block type
454
+ │ └── submissionActions/ # SendEmail, ConfirmationMessage, Redirect blocks
455
+ ├── endpoints/
456
+ │ ├── fetchFormHandler.ts # GET /api/form-data/:slug
457
+ │ └── submitFormHandler.ts # POST /api/form-submit/:formSlug — validates, stores, fires actions
458
+ ├── components/
459
+ │ └── EnquiryForm/ # React client component and useEnquiryForm hook
460
+ ├── utilities/
461
+ │ ├── fetchEnquiryForm.ts # fetchForm — RSC utility wrapping the fetch endpoint
462
+ │ ├── buildFormURL.ts # URL builder for the form-data endpoint
463
+ │ └── sanitizeSubmission.ts # Sanitises raw form data before storage
464
+ └── exports/
465
+ ├── client.ts # @foundrykit/form-plugin/client exports
466
+ └── rsc.ts # @foundrykit/form-plugin/rsc exports
467
+ ```
468
+
469
+ The plugin follows the standard Payload plugin pattern: `formPlugin(options)` returns a function that receives and returns the Payload `Config` object. Collections and endpoints are added using spread syntax to avoid overwriting existing config.
470
+
471
+ ---
472
+
473
+ ## Development
474
+
475
+ ```sh
476
+ pnpm dev # Start the dev app at http://localhost:3000
477
+ pnpm test # Run unit + integration + e2e tests
478
+ pnpm build # Compile to dist/
479
+ ```
480
+
481
+ Copy `dev/.env.example` to `dev/.env` and set `DATABASE_URL` and `PAYLOAD_SECRET` before running `dev`.
482
+
483
+ ## Releasing
484
+
485
+ Run `pnpm release` on `prod`. It bumps the version, updates the changelog and pushes a `v*` tag.
486
+ The tag triggers `.github/workflows/publish.yml`, which publishes to npm through trusted
487
+ publishing, so no npm token is stored locally or in GitHub.
@@ -0,0 +1,8 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0H0V20H30V0Z" fill="#FFDA44"/>
3
+ <path d="M9.99977 0H0V20H9.99977V0Z" fill="#0052B4"/>
4
+ <path d="M30 0H20.0002V20H30V0Z" fill="#D80027"/>
5
+ <path d="M15 13.4779C15 11.8822 15 9.99968 15 9.99968H17.6087V11.304C17.6087 11.5307 17.1739 12.3609 16.1008 13.0432C15.6943 13.3016 15.2736 13.3847 15 13.4779Z" fill="#D80027"/>
6
+ <path d="M14.9993 7.39106H12.3906V9.99974H14.9993V7.39106Z" fill="#D80027"/>
7
+ <path d="M16.3041 6.52147C16.3041 6.04124 15.9147 5.65195 15.4345 5.65195C15.2759 5.65195 15.1277 5.69507 14.9997 5.76919C14.8717 5.69501 14.7235 5.65195 14.5649 5.65195C14.0847 5.65195 13.6954 6.04124 13.6954 6.52147H11.5215V10.8692C11.5215 12.4878 12.8069 13.4238 13.8148 13.909C13.7394 14.0378 13.6954 14.1873 13.6954 14.3475C13.6954 14.8277 14.0847 15.217 14.5649 15.217C14.7235 15.217 14.8717 15.1739 14.9997 15.0997C15.1277 15.1739 15.2759 15.217 15.4345 15.217C15.9147 15.217 16.3041 14.8277 16.3041 14.3475C16.3041 14.1873 16.2601 14.0379 16.1845 13.909C17.1925 13.4238 18.478 12.4877 18.478 10.8692V6.52147H16.3041ZM17.1736 10.8693C17.1736 11.0959 17.1736 11.7854 16.1005 12.4676C15.6941 12.7261 15.2733 12.8936 14.9997 12.9868C14.7261 12.8936 14.3054 12.7261 13.8989 12.4676C12.8258 11.7854 12.8258 11.0959 12.8258 10.8693V7.82593H17.1737V10.8693L17.1736 10.8693Z" fill="#FF9811"/>
8
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="30" height="20" fill="#F5F5F5"/>
3
+ <rect width="1876" height="988" transform="translate(-1160 -900)" fill="white"/>
4
+ <path d="M30 0H0V20H30V0Z" fill="#F0F0F0"/>
5
+ <path d="M30 0H0V6.66643H30V0Z" fill="#6DA544"/>
6
+ <path d="M30 13.3329H0V19.9993H30V13.3329Z" fill="black"/>
7
+ <path d="M9.99978 0H0V20H9.99978V0Z" fill="#A2001D"/>
8
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0H0V19.9994H30V0Z" fill="#D80027"/>
3
+ <path d="M29.9996 0H19.3477V20H29.9996V0Z" fill="#496E2D"/>
4
+ <path d="M10.6519 0H0V20H10.6519V0Z" fill="black"/>
5
+ <path d="M14.9997 6.52147C13.0787 6.52147 11.5215 8.0787 11.5215 9.99967C11.5215 11.9206 13.0787 13.4779 14.9997 13.4779C16.9207 13.4779 18.478 11.9206 18.478 9.99967C18.478 8.0787 16.9207 6.52147 14.9997 6.52147ZM14.9997 12.1735C13.7991 12.1735 12.8258 11.2002 12.8258 9.99967C12.8258 8.7991 13.7991 7.82581 14.9997 7.82581C16.2004 7.82581 17.1736 8.79904 17.1736 9.99967C17.1736 11.2003 16.2004 12.1735 14.9997 12.1735Z" fill="#FFDA44"/>
6
+ <path d="M15.0004 8.69539C14.5202 8.69539 14.1309 9.08469 14.1309 9.56492V10.8693H15.87V9.56492C15.8699 9.08463 15.4806 8.69539 15.0004 8.69539Z" fill="#FFDA44"/>
7
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M29.9999 0.000114441H0V19.9999H29.9999V0.000114441Z" fill="black"/>
3
+ <path d="M5.20021 7.99989C5.06902 8.64612 5 9.31492 5 9.99994C5 10.6849 5.06908 11.3538 5.20021 12L14.9999 12.6086L24.7997 11.9999C24.9309 11.3536 24.9999 10.6849 24.9999 9.99983C24.9999 9.3148 24.9308 8.64601 24.7997 7.99977" fill="#0052B4"/>
4
+ <path d="M24.8006 11.9999H5.20117C6.12771 16.5644 10.1631 20 15.0009 20C19.8387 20 23.8741 16.5644 24.8006 11.9999Z" fill="#F0F0F0"/>
5
+ <path d="M19.348 7.99988H10.6523L12.4289 7.16421L11.4828 5.44358L13.4119 5.81261L13.6565 3.86376L15.0002 5.2971L16.3439 3.86376L16.5883 5.81261L18.5175 5.44358L17.5715 7.16426L19.348 7.99988Z" fill="#FFDA44"/>
6
+ <path d="M14.9998 19.9998L0 0V19.9998H14.9998Z" fill="#A2001D"/>
7
+ <path d="M30 19.9998V0L15.0002 19.9998H30Z" fill="#A2001D"/>
8
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.000286102H0V20H30V0.000286102Z" fill="#0052B4"/>
3
+ <path d="M25.0645 12.3331C25.352 11.9375 25.5441 11.4544 25.5441 10.8693V6.52162C25.1807 6.79461 24.7292 6.95644 24.2397 6.95644C23.5285 6.95644 22.8972 6.6149 22.5006 6.08699C22.1039 6.6149 21.4726 6.95644 20.7614 6.95644C20.272 6.95644 19.8204 6.79466 19.457 6.5218V10.8694C19.457 11.4544 19.6491 11.9377 19.9366 12.3332H25.0645V12.3331Z" fill="#F3F3F3"/>
4
+ <path d="M24.1603 10.0628C24.2987 9.72509 24.4064 9.23145 24.4064 8.98572C24.4064 8.59098 23.8918 8.27101 23.8918 8.27101C23.8918 8.27101 23.3771 8.59098 23.3771 8.98572C23.3771 9.23145 23.4848 9.72509 23.6232 10.0628L23.3262 10.7335C23.5008 10.8045 23.6916 10.844 23.8918 10.844C24.0919 10.844 24.2828 10.8045 24.4574 10.7335L24.1603 10.0628Z" fill="#FF9811"/>
5
+ <path d="M22.1479 7.89092C21.7863 7.9399 21.305 8.09359 21.0922 8.21645C20.7503 8.41385 20.7305 9.0194 20.7305 9.0194C20.7305 9.0194 21.2649 9.30504 21.6067 9.1077C21.8196 8.98483 22.1931 8.64482 22.4163 8.35608L23.1458 8.27798C23.12 8.0913 23.0586 7.90633 22.9587 7.73295C22.8585 7.55963 22.729 7.41397 22.5802 7.29831L22.1479 7.89092Z" fill="#FF9811"/>
6
+ <path d="M21.2725 10.7188C21.4956 11.0073 21.8694 11.3473 22.0821 11.4701C22.424 11.6675 22.9584 11.3818 22.9584 11.3818C22.9584 11.3818 22.9385 10.7762 22.5967 10.5788C22.3838 10.456 21.9026 10.3025 21.5409 10.2535L21.1086 9.66087C20.9598 9.77659 20.8303 9.92225 20.7301 10.0954C20.6301 10.2688 20.5688 10.4537 20.543 10.6405L21.2725 10.7188Z" fill="#FF9811"/>
7
+ <path d="M19.8281 12.1737C20.6402 13.4766 22.4995 13.9127 22.4995 13.9127C22.4995 13.9127 24.3589 13.4766 25.1709 12.1737H19.8281Z" fill="#338AF3"/>
8
+ <path d="M14.9996 5.9375H8.4375V9.99976H9.37465V7.13355L13.6738 9.99976H14.9996L10.3118 6.87463H11.6377L14.9996 9.11613V8.67464L12.3003 6.87469H14.9996V5.9375Z" fill="#F0F0F0"/>
9
+ <path d="M10.3118 3.12478L14.9996 0.000286102H13.6738L9.37465 2.86586V0.000286102H8.4375V4.06255H14.9996V3.12478H12.3003L14.9996 1.32547V0.883975L11.6377 3.12478H10.3118Z" fill="#F0F0F0"/>
10
+ <path d="M5.625 0.000286102V2.86586L1.32586 0.000286102H0L4.68785 3.12478H3.36193L0 0.883916V1.32547L2.69936 3.12478H0V4.0626H6.56215V0.000286102H5.625Z" fill="#F0F0F0"/>
11
+ <path d="M0 5.9375V6.87463H2.69936L0 8.67464V9.11613L3.36193 6.87469H4.68779L0 9.99982H1.32586L5.625 7.13355V9.99976H6.56215V5.9375H0Z" fill="#F0F0F0"/>
12
+ <path d="M8.4375 0H6.5625V4.06244H0V5.93739H6.5625V9.99982H8.4375V5.93739H15V4.06244H8.4375V0Z" fill="#D80027"/>
13
+ <path d="M4.6875 3.12496L0 0V0.883747L3.36193 3.12496H4.6875Z" fill="#D80027"/>
14
+ <path d="M10.3125 3.12496H11.6381L15 0.883747V0L10.3125 3.12496Z" fill="#D80027"/>
15
+ <path d="M3.36193 6.87486L0 9.11614V9.99982L4.6875 6.87486H3.36193Z" fill="#D80027"/>
16
+ <path d="M10.3125 6.87486L15 9.99982V9.11614L11.6381 6.87486H10.3125Z" fill="#D80027"/>
17
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0H0V20H30V0Z" fill="#D80027"/>
3
+ <path d="M20.652 7.42193H17.0299C17.2536 7.18779 17.3912 6.87086 17.3912 6.52147C17.3912 5.80107 16.8072 5.21713 16.0868 5.21713C15.633 5.21713 15.2335 5.44899 14.9998 5.8006C14.7662 5.44904 14.3667 5.21713 13.9129 5.21713C13.1925 5.21713 12.6085 5.80107 12.6085 6.52147C12.6085 6.87086 12.7462 7.18779 12.9697 7.42193H9.34766C9.34766 8.38245 10.1843 9.16098 11.1447 9.16098H11.0868C11.0868 10.1215 11.8655 10.9001 12.826 10.9001C12.826 11.2112 12.908 11.5029 13.0511 11.7553L11.6086 13.1979L12.7153 14.3046L14.2853 12.7347C14.3468 12.7572 14.4104 12.7752 14.4761 12.7876L13.5274 14.9296L14.9998 16.5214L16.4723 14.9296L15.5236 12.7876C15.5894 12.7753 15.6529 12.7572 15.7145 12.7347L17.2844 14.3046L18.3911 13.1979L16.9485 11.7553C17.0916 11.5028 17.1736 11.2112 17.1736 10.9001C18.1341 10.9001 18.9128 10.1215 18.9128 9.16098H18.8549C19.8154 9.16103 20.652 8.38245 20.652 7.42193Z" fill="black"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.00012207H0V20.0001H30V0.00012207Z" fill="#0052B4"/>
3
+ <path d="M30 0.00012207H0V6.66677H30V0.00012207Z" fill="#D80027"/>
4
+ <path d="M30 13.3335H0V20.0001H30V13.3335Z" fill="#FF9811"/>
5
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0H0V20H30V0Z" fill="black"/>
3
+ <path d="M30 0H0V9.99968H30V0Z" fill="#D80027"/>
4
+ <path d="M13.6289 7.95331L14.4767 8.56854L14.1537 9.56491L15.0007 8.94875L15.8486 9.56392L15.5242 8.56789L16.3713 7.95161L15.3238 7.95231L14.9995 6.95623L14.6764 7.95266L13.6289 7.95331Z" fill="#FFDA44"/>
5
+ <path d="M17.5 5.66965C16.7119 5.21467 15.8504 4.99993 15 5.00145V6.30544C15.6286 6.30433 16.2653 6.46294 16.8478 6.79921C18.6126 7.81808 19.2195 10.0827 18.2005 11.8475C17.1817 13.6122 14.9169 14.2191 13.1522 13.2002C12.6381 12.9034 12.223 12.5004 11.917 12.0353L10.8281 12.7542C11.2421 13.3834 11.8044 13.9282 12.5 14.3298C14.8877 15.7083 17.9515 14.8873 19.3301 12.4997C20.7086 10.1121 19.8877 7.04811 17.5 5.66965Z" fill="#FFDA44"/>
6
+ <path d="M12.1173 9.13016C11.7716 9.76214 12.0037 10.5547 12.6356 10.9005L16.8719 13.2153C16.5838 13.7419 16.7368 14.3829 17.2634 14.6709L18.4078 15.2968C18.9344 15.5849 19.595 15.3915 19.8831 14.8649L20.509 13.7206L12.1173 9.13016Z" fill="#FFDA44"/>
7
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0H0V20H30V0Z" fill="#3A7DCE"/>
3
+ <path d="M10.2 9.56667L10.1 9.1H10L9.83334 9.26667L9.80001 8.83333L9.60001 8.66667L9.46667 8.73333V8.8L9.23334 8.7L9.06667 8.5L9.46667 8.16667L8.80001 7.63333L8.46667 6.4L10.9333 8.16667L12.4667 7.76667L12.4 7.53333L12.7 7.46667L12.8333 6.96667L12.8 6.8L12.9 6.66667L12.9667 6.33333L12.9 6.2L13.1333 6L13.0667 5.5L13.6 5.26667L14.0333 4.83333L14 4.6L14.3 4.76667L14.5667 4.6L14.6667 4.33333L14.8 4.53333L16.2333 4.6L16.5333 4.86667L17.7 5.1L17.9333 5.33333L18.1 5.26667L18.2667 5.83333H18.3667L18.5 5.66667L19.5667 6.03333L19.6333 6.2L19.9 6.13333L20.2 6.4L20.5 8.03333L20.2333 8.93333L21.3667 9.26667L21.4333 10.0333L21.2 10.6L21.5333 10.8667L21.3667 11.8333L20.8 12.2667L20.9333 12.9333L20.6 13.1667L20.4 13.1V13.7333H20.1333L20.2333 13.9667L19.6667 14.2L19.8333 14.5333L19.4667 14.9333L19.5667 15.0333L19.3333 14.9667L18.2667 15.6L18.3333 15.4333L18 15.5L17.9333 15.3333L17.6667 15.5333L17.5667 15.5L17.4 15.7L16.2 15.5333L16.0333 15.4333L15.8333 15.5333L15.4 15.2L15.6 15L15.9 14.4V14.0333L15.6667 13.5L15.4 13.7667L13.8333 13.3667L13.5 13.4L13.2333 13.5667L12.4667 13.5V13.6333L10.8667 13.0667V12.7333H10.6L10.5333 11.7667L10.3333 11.8333L10.0333 11.1333L10.1 11.3L9.53334 10.7H9.86668L9.76667 10.0333L10.0333 9.56667H10.2Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.00012207H0V20.0001H30V0.00012207Z" fill="#F0F0F0"/>
3
+ <path d="M30 0.00012207H0V6.66677H30V0.00012207Z" fill="#338AF3"/>
4
+ <path d="M30 13.3335H0V20.0001H30V13.3335Z" fill="#338AF3"/>
5
+ <path d="M17.3917 10.0001L16.4146 10.4597L16.9349 11.406L15.8739 11.203L15.7395 12.2748L15.0005 11.4865L14.2615 12.2748L14.1271 11.203L13.0662 11.4059L13.5864 10.4596L12.6094 10.0001L13.5865 9.54049L13.0662 8.5943L14.1271 8.79721L14.2615 7.72545L15.0005 8.51373L15.7395 7.72545L15.8739 8.79721L16.9349 8.5943L16.4146 9.54055L17.3917 10.0001Z" fill="#FFDA44"/>
6
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.00012207H0V19.8358H30V0.00012207Z" fill="#0052B4"/>
3
+ <path d="M30 1.43105L3.49799 10.1334L30 18.8356V20.0001L0 10.1334L30 0.266571V1.43105Z" fill="#D80027"/>
4
+ <path d="M30 16.8692V18.8356L3.49805 10.1334L30 1.43105V3.3975" fill="#F0F0F0"/>
5
+ <path d="M28.9052 9.85444H27.1899C27.6359 9.32334 27.6083 8.53317 27.106 8.0349C27.6382 7.50712 27.6382 6.65122 27.106 6.12326L27.074 6.15516C27.6061 5.62738 27.6382 4.73958 27.106 4.21179L19.3965 11.8581C19.9287 12.386 20.7765 12.3797 21.3086 11.8518L21.457 11.7173L25.1486 11.3845V12.9592H26.4007V11.2715L28.279 11.1023L28.9052 9.85444Z" fill="#A2001D"/>
6
+ <path d="M19.5143 13.4918L18.2617 12.8709L19.5143 12.2499H27.6535V13.4918H19.5143Z" fill="#FFDA44"/>
7
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.00012207H0V20.0001H30V0.00012207Z" fill="#F0F0F0"/>
3
+ <path d="M30 0.00012207H0V6.66677H30V0.00012207Z" fill="#D80027"/>
4
+ <path d="M30 13.3335H0V20.0001H30V13.3335Z" fill="#D80027"/>
5
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.000167847H0V20H30V0.000167847Z" fill="#0052B4"/>
3
+ <path d="M13.0903 9.99976C13.1063 9.98195 13.1221 9.96408 13.1379 9.94609C13.1221 9.96414 13.1059 9.98183 13.0898 9.99976H13.0903Z" fill="#F0F0F0"/>
4
+ <path d="M11.0872 12.4564L11.7292 13.7989L13.1793 13.4639L12.5299 14.8029L13.6959 15.7275L12.2442 16.0548L12.2482 17.5429L11.0872 16.6119L9.92619 17.5429L9.93023 16.0548L8.47852 15.7275L9.64453 14.8029L8.99514 13.4639L10.4451 13.7989L11.0872 12.4564Z" fill="#F0F0F0"/>
5
+ <path d="M22.6798 14.1242L22.9861 14.7645L23.6776 14.6047L23.3679 15.2433L23.9241 15.6844L23.2316 15.8404L23.2335 16.5502L22.6798 16.1062L22.1261 16.5502L22.1279 15.8404L21.4355 15.6844L21.9917 15.2433L21.682 14.6047L22.3736 14.7645L22.6798 14.1242Z" fill="#F0F0F0"/>
6
+ <path d="M19.8322 7.331L20.1385 7.97142L20.83 7.81152L20.5203 8.45024L21.0764 8.89132L20.384 9.04735L20.3859 9.7572L19.8322 9.31307L19.2784 9.7572L19.2804 9.04735L18.5879 8.89132L19.144 8.45024L18.8344 7.81152L19.5259 7.97142L19.8322 7.331Z" fill="#F0F0F0"/>
7
+ <path d="M22.6798 3.44924L22.9861 4.08966L23.6776 3.9297L23.3679 4.56848L23.924 5.0095L23.2316 5.16559L23.2335 5.87539L22.6798 5.43125L22.1261 5.87539L22.1279 5.16559L21.4355 5.0095L21.9917 4.56848L21.682 3.9297L22.3736 4.08966L22.6798 3.44924Z" fill="#F0F0F0"/>
8
+ <path d="M25.1681 6.36059L25.4743 7.00095L26.1659 6.84111L25.8562 7.47977L26.4124 7.92079L25.7199 8.07688L25.7218 8.78667L25.1681 8.34266L24.6144 8.78667L24.6162 8.07688L23.9238 7.92079L24.4799 7.47977L24.1702 6.84111L24.8618 7.00095L25.1681 6.36059Z" fill="#F0F0F0"/>
9
+ <path d="M23.3896 9.75719L23.6304 10.4985H24.41L23.7793 10.9567L24.0203 11.698L23.3896 11.2399L22.7588 11.698L22.9998 10.9567L22.3691 10.4985H23.1487L23.3896 9.75719Z" fill="#F0F0F0"/>
10
+ <path d="M15 0.000167847V1.79035L12.3535 3.26096H15V6.73896H11.5369L15 8.66285V9.99976H13.4367L9.13043 7.60765V9.99976H5.86957V7.15374L0.746719 9.99976H0V8.20958L2.6465 6.73896H0V3.26096H3.46307L0 1.33643V0.000167847H1.56328L5.86957 2.39233V0.000167847H9.13043V2.84619L14.2533 0.000167847H15Z" fill="#F0F0F0"/>
11
+ <path d="M8.4375 0H6.5625V4.06234H0V5.93731H6.5625V9.99976H8.4375V5.93731H15V4.06234H8.4375V0Z" fill="#D80027"/>
12
+ <path d="M9.13086 6.73898L15.0004 9.99977V9.0777L10.7906 6.73898H9.13086Z" fill="#0052B4"/>
13
+ <path d="M9.13086 6.73898L15.0004 9.99977V9.0777L10.7906 6.73898H9.13086Z" fill="#F0F0F0"/>
14
+ <path d="M9.13086 6.73898L15.0004 9.99977V9.0777L10.7906 6.73898H9.13086Z" fill="#D80027"/>
15
+ <path d="M4.20973 6.73898L0 9.0777V9.99977L5.86957 6.73898H4.20973Z" fill="#D80027"/>
16
+ <path d="M5.86957 3.26079L0 0V0.922072L4.20979 3.26079H5.86957Z" fill="#0052B4"/>
17
+ <path d="M5.86957 3.26079L0 0V0.922072L4.20979 3.26079H5.86957Z" fill="#F0F0F0"/>
18
+ <path d="M5.86957 3.26079L0 0V0.922072L4.20979 3.26079H5.86957Z" fill="#D80027"/>
19
+ <path d="M10.7907 3.26079L15.0004 0.922072V0L9.13086 3.26079H10.7907Z" fill="#D80027"/>
20
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.00012207H0V20.0001H30V0.00012207Z" fill="#338AF3"/>
3
+ <path d="M2.84456 4.78574L0.890625 3.92339L2.84456 3.06112L3.70663 1.10728L4.56887 3.06112L6.52273 3.92339L4.56887 4.78574L3.70663 6.73942L2.84456 4.78574Z" fill="#F0F0F0"/>
4
+ <path d="M3.70586 2.18418L4.23837 3.39086L5.44508 3.92338L4.23837 4.45591L3.70586 5.66259L3.17352 4.45591L1.9668 3.92338L3.17352 3.39086L3.70586 2.18418Z" fill="#D80027"/>
5
+ <path d="M30 12.6093H0V13.9139H30V12.6093Z" fill="#FFDA44"/>
6
+ <path d="M30 15.2179H0V16.5225H30V15.2179Z" fill="#FFDA44"/>
7
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="30" height="20" viewBox="0 0 30 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30 0.000286102H0V20H30V0.000286102Z" fill="#0052B4"/>
3
+ <path d="M30 12.3368H11.8474V19.9997H10.7609H8.26043H7.17393V12.3368H0V11.2497V8.74999V7.66281H7.17393V0H8.26043H10.7609H11.8474V7.66281H30V8.74999V11.2497V12.3368Z" fill="#FFDA44"/>
4
+ <path d="M30 8.74999V11.2497H10.7609V19.9997H8.26043V11.2497H0V8.74999H8.26043V0H10.7609V8.74999H30Z" fill="#D80027"/>
5
+ </svg>