@digigov/form 2.0.0-85c27c19 → 2.0.0-87b6232d

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 (612) hide show
  1. package/Field/ErrorGroup/index.js +48 -0
  2. package/{Form.stories → Field/ErrorGroup}/package.json +1 -1
  3. package/Field/ErrorGroup.d.ts +15 -0
  4. package/Field/ErrorGroup.js.map +7 -0
  5. package/Field/FieldBase/index.js +39 -25
  6. package/Field/FieldBase.js.map +2 -2
  7. package/Field/FieldBaseContainer/index.js +7 -5
  8. package/Field/FieldBaseContainer.js.map +2 -2
  9. package/Field/FieldConditional/index.js +11 -3
  10. package/Field/FieldConditional.js.map +2 -2
  11. package/Field/index.js +19 -6
  12. package/Field/index.js.map +2 -2
  13. package/Field/types.d.ts +23 -9
  14. package/Field/utils/index.d.ts +1 -0
  15. package/Field/utils/index.js +26 -2
  16. package/Field/utils/index.js.map +2 -2
  17. package/Field/utils/useField/index.js +14 -1
  18. package/Field/utils/useField.js.map +2 -2
  19. package/FieldArray/FieldArray.stories.d.ts +1 -0
  20. package/FieldArray/FormDialog/index.js +402 -0
  21. package/{Questions/Questions.stories → FieldArray/FormDialog}/package.json +1 -1
  22. package/FieldArray/FormDialog.d.ts +67 -0
  23. package/FieldArray/FormDialog.js.map +7 -0
  24. package/FieldArray/__stories__/WithModal.d.ts +2 -0
  25. package/FieldArray/index.d.ts +7 -0
  26. package/FieldArray/index.js +100 -47
  27. package/FieldArray/index.js.map +3 -3
  28. package/FieldObject/index.d.ts +7 -0
  29. package/FieldObject/index.js +38 -19
  30. package/FieldObject/index.js.map +2 -2
  31. package/Fieldset/index.d.ts +1 -1
  32. package/Fieldset/index.js +5 -5
  33. package/Fieldset/index.js.map +2 -2
  34. package/Fieldset/types.d.ts +2 -3
  35. package/FormBuilder/FormBuilder.stories.d.ts +2 -0
  36. package/FormBuilder/__stories__/AutoErrorGrouping.d.ts +3 -0
  37. package/FormBuilder/__stories__/ErrorGrouping.d.ts +3 -0
  38. package/FormBuilder/index.d.ts +8 -2
  39. package/FormBuilder/index.js +237 -6
  40. package/FormBuilder/index.js.map +3 -3
  41. package/FormBuilder/interaction.test.d.ts +1 -0
  42. package/FormContext.js.map +2 -2
  43. package/MultiplicityField/add-objects/index.js +13 -7
  44. package/MultiplicityField/add-objects.js.map +2 -2
  45. package/MultiplicityField/index.js +18 -12
  46. package/MultiplicityField/index.js.map +2 -2
  47. package/MultiplicityField/types.d.ts +1 -2
  48. package/Questions/Questions/index.js +5 -4
  49. package/Questions/Questions.js.map +2 -2
  50. package/Questions/QuestionsContext.d.ts +0 -1
  51. package/Questions/Step/StepArrayReview.js.map +2 -2
  52. package/Questions/Step/StepContext.d.ts +0 -1
  53. package/Questions/Step/StepTitle/index.js +4 -3
  54. package/Questions/Step/StepTitle.d.ts +1 -1
  55. package/Questions/Step/StepTitle.js.map +2 -2
  56. package/Questions/Step/types.d.ts +0 -1
  57. package/Questions/types.d.ts +0 -1
  58. package/cjs/Field/ErrorGroup/index.js +82 -0
  59. package/cjs/Field/ErrorGroup.js.map +7 -0
  60. package/cjs/Field/FieldBase/index.js +38 -24
  61. package/cjs/Field/FieldBase.js.map +2 -2
  62. package/cjs/Field/FieldBaseContainer/index.js +7 -5
  63. package/cjs/Field/FieldBaseContainer.js.map +3 -3
  64. package/cjs/Field/FieldConditional/index.js +11 -3
  65. package/cjs/Field/FieldConditional.js.map +2 -2
  66. package/cjs/Field/index.js +19 -6
  67. package/cjs/Field/index.js.map +2 -2
  68. package/cjs/Field/types.js.map +1 -1
  69. package/cjs/Field/utils/index.js +26 -1
  70. package/cjs/Field/utils/index.js.map +3 -3
  71. package/cjs/Field/utils/useField/index.js +14 -1
  72. package/cjs/Field/utils/useField.js.map +2 -2
  73. package/cjs/FieldArray/FormDialog/index.js +421 -0
  74. package/cjs/FieldArray/FormDialog.js.map +7 -0
  75. package/cjs/FieldArray/index.js +95 -45
  76. package/cjs/FieldArray/index.js.map +3 -3
  77. package/cjs/FieldObject/index.js +38 -19
  78. package/cjs/FieldObject/index.js.map +3 -3
  79. package/cjs/Fieldset/index.js +10 -10
  80. package/cjs/Fieldset/index.js.map +3 -3
  81. package/cjs/Fieldset/types.js.map +1 -1
  82. package/cjs/FormBuilder/index.js +252 -5
  83. package/cjs/FormBuilder/index.js.map +3 -3
  84. package/cjs/FormContext/index.js +2 -2
  85. package/cjs/FormContext.js.map +3 -3
  86. package/cjs/MultiplicityField/add-objects/index.js +17 -11
  87. package/cjs/MultiplicityField/add-objects.js.map +3 -3
  88. package/cjs/MultiplicityField/index.js +17 -16
  89. package/cjs/MultiplicityField/index.js.map +3 -3
  90. package/cjs/MultiplicityField/types.js.map +1 -1
  91. package/cjs/Questions/Questions/index.js +5 -4
  92. package/cjs/Questions/Questions.js.map +2 -2
  93. package/cjs/Questions/Step/StepArrayReview.js.map +2 -2
  94. package/cjs/Questions/Step/StepTitle/index.js +5 -5
  95. package/cjs/Questions/Step/StepTitle.js.map +3 -3
  96. package/cjs/index.js +11 -155
  97. package/cjs/index.js.map +4 -4
  98. package/cjs/inputs/AutoCompleteInput/index.js +12 -9
  99. package/cjs/inputs/AutoCompleteInput/index.js.map +3 -3
  100. package/cjs/inputs/Checkboxes/index.js +9 -10
  101. package/cjs/inputs/Checkboxes/index.js.map +3 -3
  102. package/cjs/inputs/DateInput/index.js +30 -16
  103. package/cjs/inputs/DateInput/index.js.map +3 -3
  104. package/cjs/inputs/DateTimeInput/index.js +224 -0
  105. package/cjs/inputs/DateTimeInput/index.js.map +7 -0
  106. package/cjs/inputs/FileInput/index.js +54 -36
  107. package/cjs/inputs/FileInput/index.js.map +3 -3
  108. package/cjs/inputs/ImageInput/index.js +16 -10
  109. package/cjs/inputs/ImageInput/index.js.map +3 -3
  110. package/cjs/inputs/Input/index.js +27 -7
  111. package/cjs/inputs/Input/index.js.map +3 -3
  112. package/cjs/inputs/Input/inputsInputScenarios.js.map +2 -2
  113. package/cjs/inputs/Label/index.js +3 -3
  114. package/cjs/inputs/Label/index.js.map +3 -3
  115. package/cjs/inputs/OtpInput/index.js +1 -0
  116. package/cjs/inputs/OtpInput/index.js.map +2 -2
  117. package/cjs/inputs/Radio/index.js +57 -10
  118. package/cjs/inputs/Radio/index.js.map +3 -3
  119. package/cjs/inputs/Select/index.js +11 -5
  120. package/cjs/inputs/Select/index.js.map +3 -3
  121. package/cjs/inputs/inputsScenarios/index.js +6 -13
  122. package/cjs/inputs/inputsScenarios.js.map +2 -2
  123. package/cjs/lazy/index.js +49 -33
  124. package/cjs/lazy.js.map +3 -3
  125. package/cjs/locales/el.js.map +1 -1
  126. package/cjs/registry/index.js +72 -60
  127. package/cjs/registry.js.map +3 -3
  128. package/cjs/types.js.map +1 -1
  129. package/cjs/utils/index.js +22 -7
  130. package/cjs/utils.js.map +2 -2
  131. package/cjs/validators/index.js +61 -89
  132. package/cjs/validators/index.js.map +3 -3
  133. package/cjs/validators/utils/amka/index.js +60 -0
  134. package/cjs/validators/utils/amka.js.map +7 -0
  135. package/cjs/validators/utils/date/index.js +138 -0
  136. package/cjs/validators/utils/date.js.map +7 -0
  137. package/cjs/validators/utils/datetime/index.js +151 -0
  138. package/cjs/validators/utils/datetime.js.map +7 -0
  139. package/cjs/validators/utils/file/index.js +30 -17
  140. package/cjs/validators/utils/file.js.map +2 -2
  141. package/cjs/validators/utils/index.js +10 -2
  142. package/cjs/validators/utils/index.js.map +2 -2
  143. package/cjs/validators/utils/int/index.js +1 -1
  144. package/cjs/validators/utils/int.js.map +2 -2
  145. package/cjs/validators/utils/number/index.js +1 -1
  146. package/cjs/validators/utils/number.js.map +2 -2
  147. package/cjs/validators/utils/phone.js.map +2 -2
  148. package/cjs/validators/utils/postal_code.js.map +1 -1
  149. package/cjs/validators/utils/uuid4.js.map +2 -2
  150. package/index.d.ts +5 -8
  151. package/index.js +9 -152
  152. package/index.js.map +4 -4
  153. package/inputs/AutoCompleteInput/index.d.ts +1 -1
  154. package/inputs/AutoCompleteInput/index.js +14 -9
  155. package/inputs/AutoCompleteInput/index.js.map +2 -2
  156. package/inputs/Checkboxes/index.d.ts +1 -1
  157. package/inputs/Checkboxes/index.js +10 -7
  158. package/inputs/Checkboxes/index.js.map +2 -2
  159. package/inputs/DateInput/index.d.ts +1 -2
  160. package/inputs/DateInput/index.js +32 -15
  161. package/inputs/DateInput/index.js.map +2 -2
  162. package/inputs/DateTimeInput/DateTimeInput.stories.d.ts +7 -0
  163. package/inputs/DateTimeInput/__stories__/Default.d.ts +3 -0
  164. package/inputs/DateTimeInput/index.d.ts +13 -0
  165. package/inputs/DateTimeInput/index.js +194 -0
  166. package/inputs/DateTimeInput/index.js.map +7 -0
  167. package/inputs/DateTimeInput/index.test.d.ts +1 -0
  168. package/inputs/{Input/Input.stories → DateTimeInput}/package.json +1 -1
  169. package/inputs/FileInput/FileInput.stories.d.ts +1 -0
  170. package/inputs/FileInput/__stories__/WithBorderAndLink.d.ts +3 -0
  171. package/inputs/FileInput/index.d.ts +12 -0
  172. package/inputs/FileInput/index.js +58 -37
  173. package/inputs/FileInput/index.js.map +2 -2
  174. package/inputs/ImageInput/ImageInput.stories.d.ts +1 -1
  175. package/inputs/ImageInput/__stories__/MaxSize.d.ts +3 -0
  176. package/inputs/ImageInput/index.js +15 -9
  177. package/inputs/ImageInput/index.js.map +2 -2
  178. package/inputs/Input/Input.stories.d.ts +2 -0
  179. package/inputs/Input/__stories__/AMKA.d.ts +3 -0
  180. package/inputs/Input/__stories__/StringWithTrimValidation.d.ts +3 -0
  181. package/inputs/Input/index.d.ts +2 -1
  182. package/inputs/Input/index.js +25 -5
  183. package/inputs/Input/index.js.map +3 -3
  184. package/inputs/Input/inputsInputScenarios.js.map +2 -2
  185. package/inputs/Label/index.d.ts +0 -2
  186. package/inputs/Label/index.js +2 -2
  187. package/inputs/Label/index.js.map +2 -2
  188. package/inputs/OtpInput/index.js +1 -0
  189. package/inputs/OtpInput/index.js.map +2 -2
  190. package/inputs/Radio/index.d.ts +5 -1
  191. package/inputs/Radio/index.js +58 -8
  192. package/inputs/Radio/index.js.map +2 -2
  193. package/inputs/Select/index.d.ts +3 -2
  194. package/inputs/Select/index.js +13 -4
  195. package/inputs/Select/index.js.map +2 -2
  196. package/inputs/inputsScenarios/index.js +6 -13
  197. package/inputs/inputsScenarios.d.ts +1 -43
  198. package/inputs/inputsScenarios.js.map +2 -2
  199. package/lazy/index.js +77 -65
  200. package/locales/el.js.map +1 -1
  201. package/package.json +5 -5
  202. package/registry/index.js +117 -106
  203. package/src/Field/ErrorGroup.tsx +84 -0
  204. package/src/Field/FieldBase.tsx +55 -35
  205. package/src/Field/FieldBaseContainer.tsx +13 -7
  206. package/src/Field/FieldConditional.tsx +8 -0
  207. package/src/Field/doc.mdx +207 -0
  208. package/src/Field/index.tsx +23 -6
  209. package/src/Field/types.tsx +25 -9
  210. package/src/Field/utils/index.ts +25 -1
  211. package/src/Field/utils/useField.ts +14 -2
  212. package/src/FieldArray/FieldArray.stories.js +1 -0
  213. package/src/FieldArray/FormDialog.tsx +574 -0
  214. package/src/FieldArray/__stories__/Default.tsx +1 -0
  215. package/src/FieldArray/__stories__/WithExactLength.tsx +1 -0
  216. package/src/FieldArray/__stories__/WithModal.tsx +160 -0
  217. package/src/FieldArray/index.test.tsx +8 -0
  218. package/src/FieldArray/index.tsx +121 -61
  219. package/src/FieldObject/index.tsx +46 -19
  220. package/src/Fieldset/index.tsx +5 -5
  221. package/src/Fieldset/types.tsx +2 -2
  222. package/src/FormBuilder/FormBuilder.stories.js +2 -0
  223. package/src/FormBuilder/__stories__/AutoErrorGrouping.tsx +63 -0
  224. package/src/FormBuilder/__stories__/ErrorGrouping.tsx +43 -0
  225. package/src/FormBuilder/{FormBuilder.mdx → doc.mdx} +27 -35
  226. package/src/FormBuilder/index.test.tsx +12 -0
  227. package/src/FormBuilder/index.tsx +273 -7
  228. package/src/FormBuilder/interaction.test.tsx +40 -0
  229. package/src/FormBuilder/scenarios.test.tsx +125 -11
  230. package/src/FormContext.tsx +1 -2
  231. package/src/MultiplicityField/add-objects.tsx +12 -8
  232. package/src/MultiplicityField/{MultiplicityField.mdx → doc.mdx} +112 -98
  233. package/src/MultiplicityField/index.test.tsx +4 -0
  234. package/src/MultiplicityField/index.tsx +17 -12
  235. package/src/MultiplicityField/types.ts +1 -2
  236. package/src/Questions/Questions.tsx +4 -4
  237. package/src/Questions/Step/StepArrayReview.tsx +1 -1
  238. package/src/Questions/Step/StepTitle.tsx +4 -3
  239. package/src/Questions/__snapshots__/index.spec.tsx.snap +11 -5
  240. package/src/Questions/{index.mdx → doc.mdx} +30 -53
  241. package/src/Questions/index.spec.tsx +14 -2
  242. package/src/Questions/index.test.tsx +4 -0
  243. package/src/create-simple-form.mdx +2 -6
  244. package/src/{index.mdx → doc.mdx} +29 -18
  245. package/src/index.ts +6 -0
  246. package/src/inputs/AutoCompleteInput/__stories__/Default.tsx +2 -10
  247. package/src/inputs/AutoCompleteInput/__stories__/Multiple.tsx +1 -8
  248. package/src/inputs/AutoCompleteInput/{index.mdx → doc.mdx} +2 -13
  249. package/src/inputs/AutoCompleteInput/index.test.tsx +4 -0
  250. package/src/inputs/AutoCompleteInput/index.tsx +37 -31
  251. package/src/inputs/Checkboxes/{index.mdx → doc.mdx} +5 -15
  252. package/src/inputs/Checkboxes/index.test.tsx +4 -0
  253. package/src/inputs/Checkboxes/index.tsx +12 -11
  254. package/src/inputs/DateInput/__stories__/Default.tsx +7 -12
  255. package/src/inputs/DateInput/{index.mdx → doc.mdx} +1 -8
  256. package/src/inputs/DateInput/index.test.tsx +4 -0
  257. package/src/inputs/DateInput/index.tsx +33 -14
  258. package/src/inputs/DateTimeInput/DateTimeInput.stories.js +8 -0
  259. package/src/inputs/DateTimeInput/__stories__/Default.tsx +25 -0
  260. package/src/inputs/DateTimeInput/doc.mdx +16 -0
  261. package/src/inputs/DateTimeInput/index.test.tsx +24 -0
  262. package/src/inputs/DateTimeInput/index.tsx +209 -0
  263. package/src/inputs/FileInput/FileInput.stories.js +1 -0
  264. package/src/inputs/FileInput/__stories__/WithBorderAndLink.tsx +34 -0
  265. package/src/inputs/FileInput/{index.mdx → doc.mdx} +1 -5
  266. package/src/inputs/FileInput/index.test.tsx +8 -0
  267. package/src/inputs/FileInput/index.tsx +58 -26
  268. package/src/inputs/ImageInput/ImageInput.stories.js +1 -1
  269. package/src/inputs/ImageInput/__stories__/{WithInvalidImageSize.tsx → MaxSize.tsx} +4 -3
  270. package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +2 -0
  271. package/src/inputs/ImageInput/doc.mdx +23 -0
  272. package/src/inputs/ImageInput/index.test.tsx +8 -4
  273. package/src/inputs/ImageInput/index.tsx +17 -16
  274. package/src/inputs/Input/Input.stories.js +2 -0
  275. package/src/inputs/Input/__stories__/AMKA.tsx +23 -0
  276. package/src/inputs/Input/__stories__/LandlineNumber.tsx +2 -1
  277. package/src/inputs/Input/__stories__/MobilePhone.tsx +1 -0
  278. package/src/inputs/Input/__stories__/PhoneNumber.tsx +1 -0
  279. package/src/inputs/Input/__stories__/PostalCode.tsx +1 -0
  280. package/src/inputs/Input/__stories__/StringWithTrimValidation.tsx +26 -0
  281. package/src/inputs/Input/__stories__/TextWithLimit.tsx +1 -0
  282. package/src/inputs/Input/doc.mdx +56 -0
  283. package/src/inputs/Input/index.test.tsx +8 -0
  284. package/src/inputs/Input/index.tsx +43 -31
  285. package/src/inputs/Input/inputsInputScenarios.ts +244 -245
  286. package/src/inputs/Label/doc.mdx +14 -0
  287. package/src/inputs/Label/index.test.tsx +4 -0
  288. package/src/inputs/Label/index.tsx +2 -6
  289. package/src/inputs/OtpInput/{index.mdx → doc.mdx} +1 -8
  290. package/src/inputs/OtpInput/index.test.tsx +4 -0
  291. package/src/inputs/OtpInput/index.tsx +3 -1
  292. package/src/inputs/Radio/__stories__/Conditional.tsx +2 -1
  293. package/src/inputs/Radio/{index.mdx → doc.mdx} +5 -15
  294. package/src/inputs/Radio/index.test.tsx +4 -0
  295. package/src/inputs/Radio/index.tsx +77 -10
  296. package/src/inputs/Select/{index.mdx → doc.mdx} +1 -5
  297. package/src/inputs/Select/index.test.tsx +4 -0
  298. package/src/inputs/Select/index.tsx +18 -7
  299. package/src/inputs/inputsScenarios.ts +174 -181
  300. package/src/installation.mdx +2 -5
  301. package/src/lazy.js +77 -62
  302. package/src/locales/el.ts +1 -1
  303. package/src/registry.js +109 -99
  304. package/src/types.tsx +5 -3
  305. package/src/utils.ts +29 -8
  306. package/src/validators/index.ts +110 -98
  307. package/src/validators/utils/amka.ts +39 -0
  308. package/src/validators/utils/date.ts +107 -0
  309. package/src/validators/utils/datetime.ts +130 -0
  310. package/src/validators/utils/file.ts +33 -17
  311. package/src/validators/utils/index.ts +6 -1
  312. package/src/validators/utils/int.ts +1 -1
  313. package/src/validators/utils/number.ts +1 -1
  314. package/src/validators/utils/phone.ts +1 -1
  315. package/src/validators/utils/postal_code.ts +1 -1
  316. package/src/validators/utils/uuid4.ts +2 -1
  317. package/src/validators/validators.spec.ts +3 -3
  318. package/types.d.ts +5 -4
  319. package/types.js.map +1 -1
  320. package/utils/index.js +22 -7
  321. package/utils.d.ts +2 -0
  322. package/utils.js.map +2 -2
  323. package/validators/index.d.ts +1 -1
  324. package/validators/index.js +69 -90
  325. package/validators/index.js.map +2 -2
  326. package/validators/utils/amka/index.js +36 -0
  327. package/{FieldArray/FieldArray.stories → validators/utils/amka}/package.json +1 -1
  328. package/validators/utils/amka.d.ts +6 -0
  329. package/validators/utils/amka.js.map +7 -0
  330. package/validators/utils/date/index.js +103 -0
  331. package/validators/utils/date/package.json +6 -0
  332. package/validators/utils/date.d.ts +9 -0
  333. package/validators/utils/date.js.map +7 -0
  334. package/validators/utils/datetime/index.js +116 -0
  335. package/validators/utils/datetime/package.json +6 -0
  336. package/validators/utils/datetime.d.ts +9 -0
  337. package/validators/utils/datetime.js.map +7 -0
  338. package/validators/utils/file/index.js +30 -17
  339. package/validators/utils/file.js.map +2 -2
  340. package/validators/utils/index.d.ts +3 -0
  341. package/validators/utils/index.js +6 -1
  342. package/validators/utils/index.js.map +2 -2
  343. package/validators/utils/int/index.js +1 -1
  344. package/validators/utils/int.js.map +2 -2
  345. package/validators/utils/number/index.js +1 -1
  346. package/validators/utils/number.js.map +2 -2
  347. package/validators/utils/phone.d.ts +1 -1
  348. package/validators/utils/phone.js.map +2 -2
  349. package/validators/utils/postal_code.d.ts +1 -1
  350. package/validators/utils/postal_code.js.map +1 -1
  351. package/validators/utils/uuid4.js.map +2 -2
  352. package/FieldArray/FieldArray.stories/index.js +0 -14
  353. package/FieldArray/FieldArray.stories.js.map +0 -7
  354. package/FieldArray/__stories__/Default/index.js +0 -95
  355. package/FieldArray/__stories__/Default/package.json +0 -6
  356. package/FieldArray/__stories__/Default.js.map +0 -7
  357. package/FieldArray/__stories__/WithExactLength/index.js +0 -95
  358. package/FieldArray/__stories__/WithExactLength/package.json +0 -6
  359. package/FieldArray/__stories__/WithExactLength.js.map +0 -7
  360. package/Form.stories/index.js +0 -7
  361. package/Form.stories.js.map +0 -7
  362. package/FormBuilder/FormBuilder.stories/index.js +0 -12
  363. package/FormBuilder/FormBuilder.stories/package.json +0 -6
  364. package/FormBuilder/FormBuilder.stories.js.map +0 -7
  365. package/FormBuilder/__stories__/Default/index.js +0 -32
  366. package/FormBuilder/__stories__/Default/package.json +0 -6
  367. package/FormBuilder/__stories__/Default.js.map +0 -7
  368. package/MultiplicityField/MultiplicityField.stories/index.js +0 -22
  369. package/MultiplicityField/MultiplicityField.stories/package.json +0 -6
  370. package/MultiplicityField/MultiplicityField.stories.js.map +0 -7
  371. package/MultiplicityField/__stories__/Default/index.js +0 -100
  372. package/MultiplicityField/__stories__/Default/package.json +0 -6
  373. package/MultiplicityField/__stories__/Default.js.map +0 -7
  374. package/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -70
  375. package/MultiplicityField/__stories__/PreviewDisplay/package.json +0 -6
  376. package/MultiplicityField/__stories__/PreviewDisplay.js.map +0 -7
  377. package/MultiplicityField/__stories__/WithExactLength/index.js +0 -97
  378. package/MultiplicityField/__stories__/WithExactLength/package.json +0 -6
  379. package/MultiplicityField/__stories__/WithExactLength.js.map +0 -7
  380. package/MultiplicityField/__stories__/WithMaxLength/index.js +0 -100
  381. package/MultiplicityField/__stories__/WithMaxLength/package.json +0 -6
  382. package/MultiplicityField/__stories__/WithMaxLength.js.map +0 -7
  383. package/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -101
  384. package/MultiplicityField/__stories__/WithMinAndMaxLength/package.json +0 -6
  385. package/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +0 -7
  386. package/MultiplicityField/__stories__/WithMinLength/index.js +0 -100
  387. package/MultiplicityField/__stories__/WithMinLength/package.json +0 -6
  388. package/MultiplicityField/__stories__/WithMinLength.js.map +0 -7
  389. package/Questions/Questions.stories/index.js +0 -12
  390. package/Questions/Questions.stories.js.map +0 -7
  391. package/Questions/__stories__/Default/index.js +0 -108
  392. package/Questions/__stories__/Default/package.json +0 -6
  393. package/Questions/__stories__/Default.js.map +0 -7
  394. package/cjs/FieldArray/FieldArray.stories/index.js +0 -48
  395. package/cjs/FieldArray/FieldArray.stories.js.map +0 -7
  396. package/cjs/FieldArray/__stories__/Default/index.js +0 -128
  397. package/cjs/FieldArray/__stories__/Default.js.map +0 -7
  398. package/cjs/FieldArray/__stories__/WithExactLength/index.js +0 -128
  399. package/cjs/FieldArray/__stories__/WithExactLength.js.map +0 -7
  400. package/cjs/Form.stories/index.js +0 -26
  401. package/cjs/Form.stories.js.map +0 -7
  402. package/cjs/FormBuilder/FormBuilder.stories/index.js +0 -45
  403. package/cjs/FormBuilder/FormBuilder.stories.js.map +0 -7
  404. package/cjs/FormBuilder/__stories__/Default/index.js +0 -65
  405. package/cjs/FormBuilder/__stories__/Default.js.map +0 -7
  406. package/cjs/MultiplicityField/MultiplicityField.stories/index.js +0 -60
  407. package/cjs/MultiplicityField/MultiplicityField.stories.js.map +0 -7
  408. package/cjs/MultiplicityField/__stories__/Default/index.js +0 -133
  409. package/cjs/MultiplicityField/__stories__/Default.js.map +0 -7
  410. package/cjs/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -86
  411. package/cjs/MultiplicityField/__stories__/PreviewDisplay.js.map +0 -7
  412. package/cjs/MultiplicityField/__stories__/WithExactLength/index.js +0 -130
  413. package/cjs/MultiplicityField/__stories__/WithExactLength.js.map +0 -7
  414. package/cjs/MultiplicityField/__stories__/WithMaxLength/index.js +0 -133
  415. package/cjs/MultiplicityField/__stories__/WithMaxLength.js.map +0 -7
  416. package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -134
  417. package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +0 -7
  418. package/cjs/MultiplicityField/__stories__/WithMinLength/index.js +0 -133
  419. package/cjs/MultiplicityField/__stories__/WithMinLength.js.map +0 -7
  420. package/cjs/Questions/Questions.stories/index.js +0 -45
  421. package/cjs/Questions/Questions.stories.js.map +0 -7
  422. package/cjs/Questions/__stories__/Default/index.js +0 -136
  423. package/cjs/Questions/__stories__/Default.js.map +0 -7
  424. package/cjs/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -48
  425. package/cjs/inputs/AutoCompleteInput/AutoComplete.stories.js.map +0 -7
  426. package/cjs/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -83
  427. package/cjs/inputs/AutoCompleteInput/__stories__/Default.js.map +0 -7
  428. package/cjs/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -84
  429. package/cjs/inputs/AutoCompleteInput/__stories__/Multiple.js.map +0 -7
  430. package/cjs/inputs/Checkboxes/Checkboxes.stories/index.js +0 -51
  431. package/cjs/inputs/Checkboxes/Checkboxes.stories.js.map +0 -7
  432. package/cjs/inputs/Checkboxes/__stories__/Conditional/index.js +0 -133
  433. package/cjs/inputs/Checkboxes/__stories__/Conditional.js.map +0 -7
  434. package/cjs/inputs/Checkboxes/__stories__/Default/index.js +0 -77
  435. package/cjs/inputs/Checkboxes/__stories__/Default.js.map +0 -7
  436. package/cjs/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -78
  437. package/cjs/inputs/Checkboxes/__stories__/WithDivider.js.map +0 -7
  438. package/cjs/inputs/DateInput/DateInput.stories/index.js +0 -45
  439. package/cjs/inputs/DateInput/DateInput.stories.js.map +0 -7
  440. package/cjs/inputs/DateInput/__stories__/Default/index.js +0 -61
  441. package/cjs/inputs/DateInput/__stories__/Default.js.map +0 -7
  442. package/cjs/inputs/FileInput/FileInput.stories/index.js +0 -45
  443. package/cjs/inputs/FileInput/FileInput.stories.js.map +0 -7
  444. package/cjs/inputs/FileInput/__stories__/Default/index.js +0 -61
  445. package/cjs/inputs/FileInput/__stories__/Default.js.map +0 -7
  446. package/cjs/inputs/ImageInput/ImageInput.stories/index.js +0 -51
  447. package/cjs/inputs/ImageInput/ImageInput.stories.js.map +0 -7
  448. package/cjs/inputs/ImageInput/__stories__/Default/index.js +0 -63
  449. package/cjs/inputs/ImageInput/__stories__/Default.js.map +0 -7
  450. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -71
  451. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +0 -7
  452. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -68
  453. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +0 -7
  454. package/cjs/inputs/Input/Input.stories/index.js +0 -72
  455. package/cjs/inputs/Input/Input.stories.js.map +0 -7
  456. package/cjs/inputs/Input/__stories__/AFM/index.js +0 -63
  457. package/cjs/inputs/Input/__stories__/AFM.js.map +0 -7
  458. package/cjs/inputs/Input/__stories__/Boolean/index.js +0 -64
  459. package/cjs/inputs/Input/__stories__/Boolean.js.map +0 -7
  460. package/cjs/inputs/Input/__stories__/IBAN/index.js +0 -64
  461. package/cjs/inputs/Input/__stories__/IBAN.js.map +0 -7
  462. package/cjs/inputs/Input/__stories__/Integer/index.js +0 -78
  463. package/cjs/inputs/Input/__stories__/Integer.js.map +0 -7
  464. package/cjs/inputs/Input/__stories__/LandlineNumber/index.js +0 -67
  465. package/cjs/inputs/Input/__stories__/LandlineNumber.js.map +0 -7
  466. package/cjs/inputs/Input/__stories__/MobilePhone/index.js +0 -67
  467. package/cjs/inputs/Input/__stories__/MobilePhone.js.map +0 -7
  468. package/cjs/inputs/Input/__stories__/PhoneNumber/index.js +0 -66
  469. package/cjs/inputs/Input/__stories__/PhoneNumber.js.map +0 -7
  470. package/cjs/inputs/Input/__stories__/PostalCode/index.js +0 -64
  471. package/cjs/inputs/Input/__stories__/PostalCode.js.map +0 -7
  472. package/cjs/inputs/Input/__stories__/String/index.js +0 -64
  473. package/cjs/inputs/Input/__stories__/String.js.map +0 -7
  474. package/cjs/inputs/Input/__stories__/TextWithLimit/index.js +0 -64
  475. package/cjs/inputs/Input/__stories__/TextWithLimit.js.map +0 -7
  476. package/cjs/inputs/Label/Label.stories/index.js +0 -45
  477. package/cjs/inputs/Label/Label.stories.js.map +0 -7
  478. package/cjs/inputs/Label/__stories__/Default/index.js +0 -72
  479. package/cjs/inputs/Label/__stories__/Default.js.map +0 -7
  480. package/cjs/inputs/OtpInput/OtpInput.stories/index.js +0 -45
  481. package/cjs/inputs/OtpInput/OtpInput.stories.js.map +0 -7
  482. package/cjs/inputs/OtpInput/__stories__/Default/index.js +0 -64
  483. package/cjs/inputs/OtpInput/__stories__/Default.js.map +0 -7
  484. package/cjs/inputs/Radio/Radio.stories/index.js +0 -51
  485. package/cjs/inputs/Radio/Radio.stories.js.map +0 -7
  486. package/cjs/inputs/Radio/__stories__/Conditional/index.js +0 -133
  487. package/cjs/inputs/Radio/__stories__/Conditional.js.map +0 -7
  488. package/cjs/inputs/Radio/__stories__/Default/index.js +0 -81
  489. package/cjs/inputs/Radio/__stories__/Default.js.map +0 -7
  490. package/cjs/inputs/Radio/__stories__/WithDivider/index.js +0 -82
  491. package/cjs/inputs/Radio/__stories__/WithDivider.js.map +0 -7
  492. package/cjs/inputs/Select/Select.stories/index.js +0 -45
  493. package/cjs/inputs/Select/Select.stories.js.map +0 -7
  494. package/cjs/inputs/Select/__stories__/Default/index.js +0 -86
  495. package/cjs/inputs/Select/__stories__/Default.js.map +0 -7
  496. package/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -14
  497. package/inputs/AutoCompleteInput/AutoComplete.stories/package.json +0 -6
  498. package/inputs/AutoCompleteInput/AutoComplete.stories.js.map +0 -7
  499. package/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -50
  500. package/inputs/AutoCompleteInput/__stories__/Default/package.json +0 -6
  501. package/inputs/AutoCompleteInput/__stories__/Default.js.map +0 -7
  502. package/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -51
  503. package/inputs/AutoCompleteInput/__stories__/Multiple/package.json +0 -6
  504. package/inputs/AutoCompleteInput/__stories__/Multiple.js.map +0 -7
  505. package/inputs/Checkboxes/Checkboxes.stories/index.js +0 -16
  506. package/inputs/Checkboxes/Checkboxes.stories/package.json +0 -6
  507. package/inputs/Checkboxes/Checkboxes.stories.js.map +0 -7
  508. package/inputs/Checkboxes/__stories__/Conditional/index.js +0 -100
  509. package/inputs/Checkboxes/__stories__/Conditional/package.json +0 -6
  510. package/inputs/Checkboxes/__stories__/Conditional.js.map +0 -7
  511. package/inputs/Checkboxes/__stories__/Default/index.js +0 -44
  512. package/inputs/Checkboxes/__stories__/Default/package.json +0 -6
  513. package/inputs/Checkboxes/__stories__/Default.js.map +0 -7
  514. package/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -45
  515. package/inputs/Checkboxes/__stories__/WithDivider/package.json +0 -6
  516. package/inputs/Checkboxes/__stories__/WithDivider.js.map +0 -7
  517. package/inputs/DateInput/DateInput.stories/index.js +0 -12
  518. package/inputs/DateInput/DateInput.stories/package.json +0 -6
  519. package/inputs/DateInput/DateInput.stories.js.map +0 -7
  520. package/inputs/DateInput/__stories__/Default/index.js +0 -28
  521. package/inputs/DateInput/__stories__/Default/package.json +0 -6
  522. package/inputs/DateInput/__stories__/Default.js.map +0 -7
  523. package/inputs/FileInput/FileInput.stories/index.js +0 -12
  524. package/inputs/FileInput/FileInput.stories/package.json +0 -6
  525. package/inputs/FileInput/FileInput.stories.js.map +0 -7
  526. package/inputs/FileInput/__stories__/Default/index.js +0 -28
  527. package/inputs/FileInput/__stories__/Default/package.json +0 -6
  528. package/inputs/FileInput/__stories__/Default.js.map +0 -7
  529. package/inputs/ImageInput/ImageInput.stories/index.js +0 -16
  530. package/inputs/ImageInput/ImageInput.stories/package.json +0 -6
  531. package/inputs/ImageInput/ImageInput.stories.js.map +0 -7
  532. package/inputs/ImageInput/__stories__/Default/index.js +0 -30
  533. package/inputs/ImageInput/__stories__/Default/package.json +0 -6
  534. package/inputs/ImageInput/__stories__/Default.js.map +0 -7
  535. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -38
  536. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/package.json +0 -6
  537. package/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +0 -7
  538. package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -35
  539. package/inputs/ImageInput/__stories__/WithInvalidImageSize/package.json +0 -6
  540. package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +0 -3
  541. package/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +0 -7
  542. package/inputs/Input/Input.stories/index.js +0 -30
  543. package/inputs/Input/Input.stories.js.map +0 -7
  544. package/inputs/Input/__stories__/AFM/index.js +0 -30
  545. package/inputs/Input/__stories__/AFM/package.json +0 -6
  546. package/inputs/Input/__stories__/AFM.js.map +0 -7
  547. package/inputs/Input/__stories__/Boolean/index.js +0 -31
  548. package/inputs/Input/__stories__/Boolean/package.json +0 -6
  549. package/inputs/Input/__stories__/Boolean.js.map +0 -7
  550. package/inputs/Input/__stories__/IBAN/index.js +0 -31
  551. package/inputs/Input/__stories__/IBAN/package.json +0 -6
  552. package/inputs/Input/__stories__/IBAN.js.map +0 -7
  553. package/inputs/Input/__stories__/Integer/index.js +0 -45
  554. package/inputs/Input/__stories__/Integer/package.json +0 -6
  555. package/inputs/Input/__stories__/Integer.js.map +0 -7
  556. package/inputs/Input/__stories__/LandlineNumber/index.js +0 -34
  557. package/inputs/Input/__stories__/LandlineNumber/package.json +0 -6
  558. package/inputs/Input/__stories__/LandlineNumber.js.map +0 -7
  559. package/inputs/Input/__stories__/MobilePhone/index.js +0 -34
  560. package/inputs/Input/__stories__/MobilePhone/package.json +0 -6
  561. package/inputs/Input/__stories__/MobilePhone.js.map +0 -7
  562. package/inputs/Input/__stories__/PhoneNumber/index.js +0 -33
  563. package/inputs/Input/__stories__/PhoneNumber/package.json +0 -6
  564. package/inputs/Input/__stories__/PhoneNumber.js.map +0 -7
  565. package/inputs/Input/__stories__/PostalCode/index.js +0 -31
  566. package/inputs/Input/__stories__/PostalCode/package.json +0 -6
  567. package/inputs/Input/__stories__/PostalCode.js.map +0 -7
  568. package/inputs/Input/__stories__/String/index.js +0 -31
  569. package/inputs/Input/__stories__/String/package.json +0 -6
  570. package/inputs/Input/__stories__/String.js.map +0 -7
  571. package/inputs/Input/__stories__/TextWithLimit/index.js +0 -31
  572. package/inputs/Input/__stories__/TextWithLimit/package.json +0 -6
  573. package/inputs/Input/__stories__/TextWithLimit.js.map +0 -7
  574. package/inputs/Label/Label.stories/index.js +0 -12
  575. package/inputs/Label/Label.stories/package.json +0 -6
  576. package/inputs/Label/Label.stories.js.map +0 -7
  577. package/inputs/Label/__stories__/Default/index.js +0 -39
  578. package/inputs/Label/__stories__/Default/package.json +0 -6
  579. package/inputs/Label/__stories__/Default.js.map +0 -7
  580. package/inputs/OtpInput/OtpInput.stories/index.js +0 -12
  581. package/inputs/OtpInput/OtpInput.stories/package.json +0 -6
  582. package/inputs/OtpInput/OtpInput.stories.js.map +0 -7
  583. package/inputs/OtpInput/__stories__/Default/index.js +0 -31
  584. package/inputs/OtpInput/__stories__/Default/package.json +0 -6
  585. package/inputs/OtpInput/__stories__/Default.js.map +0 -7
  586. package/inputs/Radio/Radio.stories/index.js +0 -16
  587. package/inputs/Radio/Radio.stories/package.json +0 -6
  588. package/inputs/Radio/Radio.stories.js.map +0 -7
  589. package/inputs/Radio/__stories__/Conditional/index.js +0 -100
  590. package/inputs/Radio/__stories__/Conditional/package.json +0 -6
  591. package/inputs/Radio/__stories__/Conditional.js.map +0 -7
  592. package/inputs/Radio/__stories__/Default/index.js +0 -48
  593. package/inputs/Radio/__stories__/Default/package.json +0 -6
  594. package/inputs/Radio/__stories__/Default.js.map +0 -7
  595. package/inputs/Radio/__stories__/WithDivider/index.js +0 -49
  596. package/inputs/Radio/__stories__/WithDivider/package.json +0 -6
  597. package/inputs/Radio/__stories__/WithDivider.js.map +0 -7
  598. package/inputs/Select/Select.stories/index.js +0 -12
  599. package/inputs/Select/Select.stories/package.json +0 -6
  600. package/inputs/Select/Select.stories.js.map +0 -7
  601. package/inputs/Select/__stories__/Default/index.js +0 -53
  602. package/inputs/Select/__stories__/Default/package.json +0 -6
  603. package/inputs/Select/__stories__/Default.js.map +0 -7
  604. package/lazy.d.ts +0 -72
  605. package/lazy.js.map +0 -7
  606. package/registry.d.ts +0 -70
  607. package/registry.js.map +0 -7
  608. package/src/Field/index.mdx +0 -6
  609. package/src/index.tsx +0 -178
  610. package/src/inputs/ImageInput/index.mdx +0 -19
  611. package/src/inputs/Input/index.mdx +0 -95
  612. package/src/inputs/Label/index.mdx +0 -0
@@ -38,9 +38,8 @@ const INPUTS_INPUT_FIELDS = [
38
38
  type: 'int',
39
39
  required: true,
40
40
  label: {
41
- primary: 'Ποιά είναι η ηλικία σας;',
42
- secondary:
43
- 'Καταχωρίστε την ηλικία σας',
41
+ primary: 'Ποιά είναι η ηλικία σας;',
42
+ secondary: 'Καταχωρίστε την ηλικία σας',
44
43
  },
45
44
  },
46
45
  {
@@ -73,9 +72,9 @@ const INPUTS_INPUT_FIELDS = [
73
72
  },
74
73
  required: true,
75
74
  extra: {
76
- countries: ['gr'],
75
+ countries: ['gr'],
77
76
  phoneType: 'mobile',
78
- }
77
+ },
79
78
  },
80
79
  {
81
80
  key: 'phone-number',
@@ -86,7 +85,7 @@ const INPUTS_INPUT_FIELDS = [
86
85
  required: true,
87
86
  extra: {
88
87
  countries: ['gr'],
89
- }
88
+ },
90
89
  },
91
90
  {
92
91
  key: 'phone-number-landline',
@@ -98,7 +97,7 @@ const INPUTS_INPUT_FIELDS = [
98
97
  extra: {
99
98
  countries: ['gr'],
100
99
  phoneType: 'landline',
101
- }
100
+ },
102
101
  },
103
102
  {
104
103
  key: 'postal-code',
@@ -106,300 +105,300 @@ const INPUTS_INPUT_FIELDS = [
106
105
  label: {
107
106
  primary: 'Συμπληρώστε τον ταχυδρομικό σας κώδικα',
108
107
  },
109
- extra:{ countries: ['GR'] },
108
+ extra: { countries: ['GR'] },
110
109
  required: true,
111
110
  },
112
- ]
113
-
111
+ ];
112
+
114
113
  export const scenarios = [
115
- {
116
- title: 'success fill for inputs Input',
117
- describe: 'inputs Input scenario',
118
- fields: INPUTS_INPUT_FIELDS,
119
- fill: [
120
- {
121
- fieldKey: 'text',
122
- value: 'aaaaaaa',
123
- },
124
- {
114
+ {
115
+ title: 'success fill for inputs Input',
116
+ describe: 'inputs Input scenario',
117
+ fields: INPUTS_INPUT_FIELDS,
118
+ fill: [
119
+ {
120
+ fieldKey: 'text',
121
+ value: 'aaaaaaa',
122
+ },
123
+ {
125
124
  fieldKey: 'age',
126
125
  value: '12',
127
- },
128
- {
126
+ },
127
+ {
129
128
  fieldKey: 'email',
130
129
  value: 'example@mail.com',
131
- },
132
- {
130
+ },
131
+ {
133
132
  fieldKey: 'location',
134
133
  value: 'Location1',
135
- },
136
- {
134
+ },
135
+ {
137
136
  fieldKey: 'postal-code',
138
137
  value: '42100',
139
- },
140
- {
138
+ },
139
+ {
141
140
  fieldKey: 'afm',
142
141
  value: '094536469',
143
- },
144
- {
142
+ },
143
+ {
145
144
  fieldKey: 'desired-mount',
146
- value: '12.5'
147
- },
148
- {
145
+ value: '12.5',
146
+ },
147
+ {
149
148
  fieldKey: 'mobile-phone',
150
- value: '+306900000000'
151
- },
152
- {
149
+ value: '+306900000000',
150
+ },
151
+ {
153
152
  fieldKey: 'phone-number',
154
- value: '6900000000'
155
- },
156
- {
153
+ value: '6900000000',
154
+ },
155
+ {
157
156
  fieldKey: 'phone-number-landline',
158
- value: '2100000000'
159
- },
160
- {
157
+ value: '2100000000',
158
+ },
159
+ {
161
160
  fieldKey: 'iban',
162
- value: 'GR3201122267115323218375195'
163
- },
164
- {
161
+ value: 'GR3201122267115323218375195',
162
+ },
163
+ {
165
164
  fieldKey: 'uuid4',
166
165
  value: '1e805d00-ea67-478a-ab8b-d13ff8b38fa3',
167
- }
168
- ],
169
- expect: [
170
- {
166
+ },
167
+ ],
168
+ expect: [
169
+ {
171
170
  type: 'success',
172
171
  fieldKey: 'age',
173
172
  text: el.form.error.required,
174
- },
175
- {
176
- type: 'success',
177
- fieldKey: 'text',
178
- text: el.form.error.required,
179
- },
180
- {
173
+ },
174
+ {
175
+ type: 'success',
176
+ fieldKey: 'text',
177
+ text: el.form.error.required,
178
+ },
179
+ {
181
180
  type: 'success',
182
181
  fieldKey: 'email',
183
182
  text: el.form.error.required,
184
- },
185
- {
183
+ },
184
+ {
186
185
  type: 'success',
187
186
  fieldKey: 'location',
188
187
  text: el.form.error.required,
189
- },
190
- {
188
+ },
189
+ {
191
190
  type: 'success',
192
191
  fieldKey: 'postal-code',
193
192
  text: el.form.error.required,
194
- },
195
- {
193
+ },
194
+ {
196
195
  type: 'success',
197
196
  fieldKey: 'afm',
198
197
  text: el.form.error.required,
199
- },
200
- {
198
+ },
199
+ {
201
200
  type: 'success',
202
201
  fieldKey: 'desired-mount',
203
202
  text: el.form.error.required,
204
- },
205
- {
203
+ },
204
+ {
206
205
  type: 'success',
207
206
  fieldKey: 'mobile-phone',
208
207
  text: el.form.error.required,
209
- },
210
- {
208
+ },
209
+ {
211
210
  type: 'success',
212
211
  fieldKey: 'phone-number',
213
212
  text: el.form.error.required,
214
- },
215
- {
213
+ },
214
+ {
216
215
  type: 'success',
217
216
  fieldKey: 'phone-number-landline',
218
217
  text: el.form.error.required,
219
- },
220
- {
218
+ },
219
+ {
221
220
  type: 'success',
222
221
  fieldKey: 'iban',
223
222
  text: el.form.error.required,
224
- },
225
- {
223
+ },
224
+ {
226
225
  type: 'success',
227
226
  fieldKey: 'uuid4',
228
227
  text: el.form.error.required,
229
- },
230
- ]
231
- },
232
- {
233
- title: 'empty fill for inputs Input',
234
- describe: 'inputs Input scenario',
235
- fields: INPUTS_INPUT_FIELDS,
236
- fill: [],
237
- expect: [
238
- {
239
- type: 'error',
240
- fieldKey: 'age',
241
- text: el.form.error.required,
242
- },
243
- {
244
- type: 'error',
245
- fieldKey: 'email',
246
- text: el.form.error.required,
247
- },
248
- {
249
- type: 'error',
250
- fieldKey: 'location',
251
- text: el.form.error.required,
252
- },
253
- {
254
- type: 'error',
255
- fieldKey: 'postal-code',
256
- text: el.form.error.required,
257
- },
258
- {
259
- type: 'error',
260
- fieldKey: 'afm',
261
- text: el.form.error.required,
262
- },
263
- {
264
- type: 'error',
265
- fieldKey: 'desired-mount',
266
- text: el.form.error.required,
267
- },
268
- {
269
- type: 'error',
270
- fieldKey: 'mobile-phone',
271
- text: el.form.error.required,
272
- },
273
- {
274
- type: 'error',
275
- fieldKey: 'phone-number',
276
- text: el.form.error.required,
277
- },
278
- {
279
- type: 'error',
280
- fieldKey: 'phone-number-landline',
281
- text: el.form.error.required,
282
- },
283
- {
284
- type: 'error',
285
- fieldKey: 'iban',
286
- text: el.form.error.required,
287
- },
288
- {
289
- type: 'error',
290
- fieldKey: 'uuid4',
291
- text: el.form.error.required,
292
- },
293
- ]
294
- },
295
- {
296
- title: 'incorrect types for inputs Input',
297
- describe: 'inputs Input scenario',
298
- fields: INPUTS_INPUT_FIELDS,
299
- fill: [
300
- {
301
- fieldKey: 'age',
302
- value: 'aa',
303
- },
304
- {
305
- fieldKey: 'email',
306
- value: '23232',
307
- },
308
- {
309
- fieldKey: 'location',
310
- value: '23232',
311
- },
312
- {
313
- fieldKey: 'postal-code',
314
- value: 'aaaaa',
315
- },
316
- {
317
- fieldKey: 'afm',
318
- value: 'aaaaaaaaa',
319
- },
320
- {
321
- fieldKey: 'desired-mount',
322
- value: 'aaa'
323
- },
324
- {
325
- fieldKey: 'mobile-phone',
326
- value: '+33690000000'
327
- },
328
- {
329
- fieldKey: 'phone-number',
330
- value: '000000000'
228
+ },
229
+ ],
331
230
  },
332
231
  {
333
- fieldKey: 'phone-number-landline',
334
- value: '000000000'
335
- },
336
- {
337
- fieldKey: 'iban',
338
- value: 'aaaaaa'
339
- },
340
- {
341
- fieldKey: 'uuid4',
342
- value: 'aaaaaa',
343
- }
344
- ],
345
- expect: [
346
- {
347
- type: 'error',
348
- fieldKey: 'age',
349
- text: el.form.error.number,
350
- },
351
- {
352
- type: 'error',
353
- fieldKey: 'email',
354
- text: el.form.error.email,
355
- },
356
- {
357
- type: 'success',
358
- fieldKey: 'location',
359
- text: el.form.error.string,
360
- },
361
- {
362
- type: 'error',
363
- fieldKey: 'postal-code',
364
- text: el.form.error.postalCode,
365
- },
366
- {
367
- type: 'error',
368
- fieldKey: 'afm',
369
- text: el.form.error.afm,
370
- },
371
- {
372
- type: 'error',
373
- fieldKey: 'desired-mount',
374
- text: el.form.error.number,
375
- },
376
- {
377
- type: 'error',
378
- fieldKey: 'mobile-phone',
379
- text: el.form.error.mobile_phone,
380
- },
381
- {
382
- type: 'error',
383
- fieldKey: 'phone-number',
384
- text: el.form.error.phone_number,
385
- },
386
- {
387
- type: 'error',
388
- fieldKey: 'phone-number-landline',
389
- text: el.form.error.landline,
390
- },
391
- {
392
- type: 'error',
393
- fieldKey: 'iban',
394
- text: el.form.error.iban,
232
+ title: 'empty fill for inputs Input',
233
+ describe: 'inputs Input scenario',
234
+ fields: INPUTS_INPUT_FIELDS,
235
+ fill: [],
236
+ expect: [
237
+ {
238
+ type: 'error',
239
+ fieldKey: 'age',
240
+ text: el.form.error.required,
241
+ },
242
+ {
243
+ type: 'error',
244
+ fieldKey: 'email',
245
+ text: el.form.error.required,
246
+ },
247
+ {
248
+ type: 'error',
249
+ fieldKey: 'location',
250
+ text: el.form.error.required,
251
+ },
252
+ {
253
+ type: 'error',
254
+ fieldKey: 'postal-code',
255
+ text: el.form.error.required,
256
+ },
257
+ {
258
+ type: 'error',
259
+ fieldKey: 'afm',
260
+ text: el.form.error.required,
261
+ },
262
+ {
263
+ type: 'error',
264
+ fieldKey: 'desired-mount',
265
+ text: el.form.error.required,
266
+ },
267
+ {
268
+ type: 'error',
269
+ fieldKey: 'mobile-phone',
270
+ text: el.form.error.required,
271
+ },
272
+ {
273
+ type: 'error',
274
+ fieldKey: 'phone-number',
275
+ text: el.form.error.required,
276
+ },
277
+ {
278
+ type: 'error',
279
+ fieldKey: 'phone-number-landline',
280
+ text: el.form.error.required,
281
+ },
282
+ {
283
+ type: 'error',
284
+ fieldKey: 'iban',
285
+ text: el.form.error.required,
286
+ },
287
+ {
288
+ type: 'error',
289
+ fieldKey: 'uuid4',
290
+ text: el.form.error.required,
291
+ },
292
+ ],
395
293
  },
396
294
  {
397
- type: 'error',
398
- fieldKey: 'uuid4',
399
- text: el.form.error.uuid4,
295
+ title: 'incorrect types for inputs Input',
296
+ describe: 'inputs Input scenario',
297
+ fields: INPUTS_INPUT_FIELDS,
298
+ fill: [
299
+ {
300
+ fieldKey: 'age',
301
+ value: 'aa',
302
+ },
303
+ {
304
+ fieldKey: 'email',
305
+ value: '23232',
306
+ },
307
+ {
308
+ fieldKey: 'location',
309
+ value: '23232',
310
+ },
311
+ {
312
+ fieldKey: 'postal-code',
313
+ value: 'aaaaa',
314
+ },
315
+ {
316
+ fieldKey: 'afm',
317
+ value: 'aaaaaaaaa',
318
+ },
319
+ {
320
+ fieldKey: 'desired-mount',
321
+ value: 'aaa',
322
+ },
323
+ {
324
+ fieldKey: 'mobile-phone',
325
+ value: '+33690000000',
326
+ },
327
+ {
328
+ fieldKey: 'phone-number',
329
+ value: '000000000',
330
+ },
331
+ {
332
+ fieldKey: 'phone-number-landline',
333
+ value: '000000000',
334
+ },
335
+ {
336
+ fieldKey: 'iban',
337
+ value: 'aaaaaa',
338
+ },
339
+ {
340
+ fieldKey: 'uuid4',
341
+ value: 'aaaaaa',
342
+ },
343
+ ],
344
+ expect: [
345
+ {
346
+ type: 'error',
347
+ fieldKey: 'age',
348
+ text: el.form.error.number,
349
+ },
350
+ {
351
+ type: 'error',
352
+ fieldKey: 'email',
353
+ text: el.form.error.email,
354
+ },
355
+ {
356
+ type: 'success',
357
+ fieldKey: 'location',
358
+ text: el.form.error.string,
359
+ },
360
+ {
361
+ type: 'error',
362
+ fieldKey: 'postal-code',
363
+ text: el.form.error.postalCode,
364
+ },
365
+ {
366
+ type: 'error',
367
+ fieldKey: 'afm',
368
+ text: el.form.error.afm,
369
+ },
370
+ {
371
+ type: 'error',
372
+ fieldKey: 'desired-mount',
373
+ text: el.form.error.number,
374
+ },
375
+ {
376
+ type: 'error',
377
+ fieldKey: 'mobile-phone',
378
+ text: el.form.error.mobile_phone,
379
+ },
380
+ {
381
+ type: 'error',
382
+ fieldKey: 'phone-number',
383
+ text: el.form.error.phone_number,
384
+ },
385
+ {
386
+ type: 'error',
387
+ fieldKey: 'phone-number-landline',
388
+ text: el.form.error.landline,
389
+ },
390
+ {
391
+ type: 'error',
392
+ fieldKey: 'iban',
393
+ text: el.form.error.iban,
394
+ },
395
+ {
396
+ type: 'error',
397
+ fieldKey: 'uuid4',
398
+ text: el.form.error.uuid4,
399
+ },
400
+ ],
400
401
  },
401
- ]
402
- },
403
- ]
402
+ ];
404
403
 
405
- export default scenarios
404
+ export default scenarios;
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Label
3
+ ---
4
+
5
+ # Label
6
+
7
+
8
+ The Label component is used to display descriptive text for form sections or fields. It supports both primary and secondary text, allowing for a title and optional subtitle.
9
+
10
+ ## How to use
11
+
12
+ ### Default
13
+
14
+ <code src="@digigov/form/inputs/Label/__stories__/Default.tsx" />
@@ -14,6 +14,10 @@ test('renders the All Label variants', async ({ mount, page }) => {
14
14
  )
15
15
  await page.evaluate(() => document.fonts.ready);
16
16
 
17
+ // Move the mouse to the top-left corner to avoid random hover issues
18
+ await page.mouse.move(0, 0);
19
+
20
+
17
21
  const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
18
22
  expect(screenshot).toMatchSnapshot();
19
23
  });
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { FieldLabelProps } from '@digigov/form/types';
3
- import Hint from '@digigov/react-core/Hint';
4
- import LabelTitle from '@digigov/react-core/LabelTitle';
3
+ import { LabelTitle } from '@digigov/ui/form/LabelContainer';
5
4
  import { useTranslation } from '@digigov/ui/i18n';
5
+ import { Hint } from '@digigov/ui/typography/Hint';
6
6
 
7
7
  export interface FieldOptionProps {
8
8
  label?: FieldLabelProps;
@@ -16,9 +16,6 @@ export interface FieldOptionProps {
16
16
  export interface LabelProps {
17
17
  primary?: string;
18
18
  secondary?: string;
19
- }
20
-
21
- export interface LabelProps {
22
19
  className?: string;
23
20
  value?: string;
24
21
  label?: FieldLabelProps;
@@ -39,5 +36,4 @@ export const Label: React.FC<LabelProps> = ({ className, label, value }) => {
39
36
  );
40
37
  };
41
38
 
42
-
43
39
  export default Label;
@@ -13,11 +13,4 @@ on a computer system or other digital device.
13
13
 
14
14
  ### Default
15
15
 
16
- <Story
17
- packageName="@digigov/form"
18
- component="inputs/OtpInput"
19
- story="Default.tsx"
20
- />
21
-
22
-
23
-
16
+ <code src="@digigov/form/inputs/OtpInput/__stories__/Default.tsx" />
@@ -14,6 +14,10 @@ test('renders the All OtpInput variants', async ({ mount, page }) => {
14
14
  )
15
15
  await page.evaluate(() => document.fonts.ready);
16
16
 
17
+ // Move the mouse to the top-left corner to avoid random hover issues
18
+ await page.mouse.move(0, 0);
19
+
20
+
17
21
  const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
18
22
  expect(screenshot).toMatchSnapshot();
19
23
  });
@@ -40,7 +40,8 @@ export function useOtp(onChange, maxLength) {
40
40
  }, []);
41
41
 
42
42
  const focusToPrevInput = useCallback((target: HTMLElement) => {
43
- const previousElement = target.previousElementSibling as HTMLInputElement | null;
43
+ const previousElement =
44
+ target.previousElementSibling as HTMLInputElement | null;
44
45
  if (previousElement) {
45
46
  previousElement.focus();
46
47
  }
@@ -130,6 +131,7 @@ export const OtpInput = ({ name, maxLength = 6, ...props }) => {
130
131
  {otp.otpValues.map((digit, idx) => (
131
132
  <SingleCharacterInputPart
132
133
  name={`${name}-${idx}`}
134
+ id={`${name}-${idx}`}
133
135
  type="text"
134
136
  key={idx}
135
137
  autoComplete="one-time-code"
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import FormBuilder, { Field, FieldSpec } from '@digigov/form';
2
+ import FormBuilder, { Field } from '@digigov/form';
3
+ import { FieldSpec } from '@digigov/form/types';
3
4
  import { Button } from '@digigov/ui/form/Button';
4
5
 
5
6
  const fields: FieldSpec[] = [