@digigov/form 2.0.0-daaf7bdf → 2.0.0-eaf330f5

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 (603) 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 +38 -25
  6. package/Field/FieldBase.js.map +2 -2
  7. package/Field/FieldBaseContainer/index.js +6 -4
  8. package/Field/FieldBaseContainer.js.map +2 -2
  9. package/Field/FieldConditional/index.js +4 -0
  10. package/Field/FieldConditional.js.map +2 -2
  11. package/Field/index.js +14 -4
  12. package/Field/index.js.map +2 -2
  13. package/Field/types.d.ts +21 -10
  14. package/Field/utils/index.js +8 -1
  15. package/Field/utils/index.js.map +2 -2
  16. package/Field/utils/useField/index.js +14 -1
  17. package/Field/utils/useField.js.map +2 -2
  18. package/FieldArray/FieldArray.stories.d.ts +1 -0
  19. package/FieldArray/FormDialog/index.js +402 -0
  20. package/{Questions/Questions.stories → FieldArray/FormDialog}/package.json +1 -1
  21. package/FieldArray/FormDialog.d.ts +67 -0
  22. package/FieldArray/FormDialog.js.map +7 -0
  23. package/FieldArray/__stories__/WithModal.d.ts +2 -0
  24. package/FieldArray/index.d.ts +6 -0
  25. package/FieldArray/index.js +99 -48
  26. package/FieldArray/index.js.map +3 -3
  27. package/FieldObject/index.d.ts +5 -0
  28. package/FieldObject/index.js +32 -17
  29. package/FieldObject/index.js.map +2 -2
  30. package/Fieldset/index.d.ts +1 -1
  31. package/Fieldset/index.js +5 -5
  32. package/Fieldset/index.js.map +2 -2
  33. package/Fieldset/types.d.ts +2 -2
  34. package/FormBuilder/FormBuilder.stories.d.ts +2 -0
  35. package/FormBuilder/__stories__/AutoErrorGrouping.d.ts +3 -0
  36. package/FormBuilder/__stories__/ErrorGrouping.d.ts +3 -0
  37. package/FormBuilder/index.js +95 -8
  38. package/FormBuilder/index.js.map +2 -2
  39. package/FormBuilder/interaction.test.d.ts +1 -0
  40. package/FormContext.js.map +2 -2
  41. package/MultiplicityField/add-objects/index.js +10 -6
  42. package/MultiplicityField/add-objects.js.map +2 -2
  43. package/MultiplicityField/index.js +14 -10
  44. package/MultiplicityField/index.js.map +2 -2
  45. package/MultiplicityField/types.d.ts +1 -2
  46. package/Questions/Questions/index.js +5 -4
  47. package/Questions/Questions.js.map +2 -2
  48. package/Questions/Step/StepArrayReview.js.map +2 -2
  49. package/Questions/Step/StepTitle/index.js +4 -3
  50. package/Questions/Step/StepTitle.d.ts +1 -1
  51. package/Questions/Step/StepTitle.js.map +2 -2
  52. package/cjs/Field/ErrorGroup/index.js +82 -0
  53. package/cjs/Field/ErrorGroup.js.map +7 -0
  54. package/cjs/Field/FieldBase/index.js +37 -24
  55. package/cjs/Field/FieldBase.js.map +2 -2
  56. package/cjs/Field/FieldBaseContainer/index.js +6 -4
  57. package/cjs/Field/FieldBaseContainer.js.map +3 -3
  58. package/cjs/Field/FieldConditional/index.js +4 -0
  59. package/cjs/Field/FieldConditional.js.map +2 -2
  60. package/cjs/Field/index.js +14 -4
  61. package/cjs/Field/index.js.map +2 -2
  62. package/cjs/Field/types.js.map +1 -1
  63. package/cjs/Field/utils/index.js +8 -1
  64. package/cjs/Field/utils/index.js.map +3 -3
  65. package/cjs/Field/utils/useField/index.js +14 -1
  66. package/cjs/Field/utils/useField.js.map +2 -2
  67. package/cjs/FieldArray/FormDialog/index.js +421 -0
  68. package/cjs/FieldArray/FormDialog.js.map +7 -0
  69. package/cjs/FieldArray/index.js +94 -46
  70. package/cjs/FieldArray/index.js.map +3 -3
  71. package/cjs/FieldObject/index.js +32 -17
  72. package/cjs/FieldObject/index.js.map +3 -3
  73. package/cjs/Fieldset/index.js +10 -10
  74. package/cjs/Fieldset/index.js.map +3 -3
  75. package/cjs/Fieldset/types.js.map +1 -1
  76. package/cjs/FormBuilder/index.js +94 -7
  77. package/cjs/FormBuilder/index.js.map +3 -3
  78. package/cjs/FormContext/index.js +2 -2
  79. package/cjs/FormContext.js.map +3 -3
  80. package/cjs/MultiplicityField/add-objects/index.js +14 -10
  81. package/cjs/MultiplicityField/add-objects.js.map +3 -3
  82. package/cjs/MultiplicityField/index.js +13 -14
  83. package/cjs/MultiplicityField/index.js.map +3 -3
  84. package/cjs/MultiplicityField/types.js.map +1 -1
  85. package/cjs/Questions/Questions/index.js +5 -4
  86. package/cjs/Questions/Questions.js.map +2 -2
  87. package/cjs/Questions/Step/StepArrayReview.js.map +2 -2
  88. package/cjs/Questions/Step/StepTitle/index.js +5 -5
  89. package/cjs/Questions/Step/StepTitle.js.map +3 -3
  90. package/cjs/inputs/AutoCompleteInput/index.js +8 -7
  91. package/cjs/inputs/AutoCompleteInput/index.js.map +3 -3
  92. package/cjs/inputs/Checkboxes/index.js +8 -9
  93. package/cjs/inputs/Checkboxes/index.js.map +3 -3
  94. package/cjs/inputs/DateInput/index.js +30 -16
  95. package/cjs/inputs/DateInput/index.js.map +3 -3
  96. package/cjs/inputs/DateTimeInput/index.js +224 -0
  97. package/cjs/inputs/DateTimeInput/index.js.map +7 -0
  98. package/cjs/inputs/FileInput/index.js +54 -36
  99. package/cjs/inputs/FileInput/index.js.map +3 -3
  100. package/cjs/inputs/ImageInput/index.js +15 -10
  101. package/cjs/inputs/ImageInput/index.js.map +3 -3
  102. package/cjs/inputs/Input/index.js +12 -4
  103. package/cjs/inputs/Input/index.js.map +2 -2
  104. package/cjs/inputs/Input/inputsInputScenarios.js.map +2 -2
  105. package/cjs/inputs/Label/index.js +3 -3
  106. package/cjs/inputs/Label/index.js.map +3 -3
  107. package/cjs/inputs/OtpInput/index.js +1 -0
  108. package/cjs/inputs/OtpInput/index.js.map +2 -2
  109. package/cjs/inputs/Radio/index.js +12 -13
  110. package/cjs/inputs/Radio/index.js.map +3 -3
  111. package/cjs/inputs/Select/index.js +11 -5
  112. package/cjs/inputs/Select/index.js.map +3 -3
  113. package/cjs/inputs/inputsScenarios/index.js +6 -12
  114. package/cjs/inputs/inputsScenarios.js.map +2 -2
  115. package/cjs/lazy/index.js +50 -36
  116. package/cjs/lazy.js.map +3 -3
  117. package/cjs/locales/el.js.map +1 -1
  118. package/cjs/registry/index.js +76 -64
  119. package/cjs/registry.js.map +3 -3
  120. package/cjs/types.js.map +1 -1
  121. package/cjs/utils/index.js +22 -7
  122. package/cjs/utils.js.map +2 -2
  123. package/cjs/validators/index.js +61 -89
  124. package/cjs/validators/index.js.map +3 -3
  125. package/cjs/validators/utils/amka/index.js +60 -0
  126. package/cjs/validators/utils/amka.js.map +7 -0
  127. package/cjs/validators/utils/date/index.js +138 -0
  128. package/cjs/validators/utils/date.js.map +7 -0
  129. package/cjs/validators/utils/datetime/index.js +151 -0
  130. package/cjs/validators/utils/datetime.js.map +7 -0
  131. package/cjs/validators/utils/file/index.js +30 -17
  132. package/cjs/validators/utils/file.js.map +2 -2
  133. package/cjs/validators/utils/index.js +10 -2
  134. package/cjs/validators/utils/index.js.map +2 -2
  135. package/cjs/validators/utils/int/index.js +1 -1
  136. package/cjs/validators/utils/int.js.map +2 -2
  137. package/cjs/validators/utils/number/index.js +1 -1
  138. package/cjs/validators/utils/number.js.map +2 -2
  139. package/cjs/validators/utils/phone.js.map +2 -2
  140. package/cjs/validators/utils/postal_code.js.map +1 -1
  141. package/cjs/validators/utils/uuid4.js.map +2 -2
  142. package/index.js +1 -1
  143. package/inputs/AutoCompleteInput/index.d.ts +1 -1
  144. package/inputs/AutoCompleteInput/index.js +10 -7
  145. package/inputs/AutoCompleteInput/index.js.map +2 -2
  146. package/inputs/Checkboxes/index.d.ts +1 -1
  147. package/inputs/Checkboxes/index.js +9 -6
  148. package/inputs/Checkboxes/index.js.map +2 -2
  149. package/inputs/DateInput/index.d.ts +1 -2
  150. package/inputs/DateInput/index.js +32 -15
  151. package/inputs/DateInput/index.js.map +2 -2
  152. package/inputs/DateTimeInput/DateTimeInput.stories.d.ts +7 -0
  153. package/inputs/DateTimeInput/__stories__/Default.d.ts +3 -0
  154. package/inputs/DateTimeInput/index.d.ts +13 -0
  155. package/inputs/DateTimeInput/index.js +194 -0
  156. package/inputs/DateTimeInput/index.js.map +7 -0
  157. package/inputs/DateTimeInput/index.test.d.ts +1 -0
  158. package/inputs/{Input/Input.stories → DateTimeInput}/package.json +1 -1
  159. package/inputs/FileInput/FileInput.stories.d.ts +1 -0
  160. package/inputs/FileInput/__stories__/WithBorderAndLink.d.ts +3 -0
  161. package/inputs/FileInput/index.d.ts +12 -0
  162. package/inputs/FileInput/index.js +58 -37
  163. package/inputs/FileInput/index.js.map +2 -2
  164. package/inputs/ImageInput/index.js +14 -9
  165. package/inputs/ImageInput/index.js.map +2 -2
  166. package/inputs/Input/Input.stories.d.ts +2 -0
  167. package/inputs/Input/__stories__/AMKA.d.ts +3 -0
  168. package/inputs/Input/__stories__/StringWithTrimValidation.d.ts +3 -0
  169. package/inputs/Input/index.d.ts +2 -1
  170. package/inputs/Input/index.js +12 -4
  171. package/inputs/Input/index.js.map +2 -2
  172. package/inputs/Input/inputsInputScenarios.js.map +2 -2
  173. package/inputs/Label/index.d.ts +0 -2
  174. package/inputs/Label/index.js +2 -2
  175. package/inputs/Label/index.js.map +2 -2
  176. package/inputs/OtpInput/index.js +1 -0
  177. package/inputs/OtpInput/index.js.map +2 -2
  178. package/inputs/Radio/index.d.ts +1 -1
  179. package/inputs/Radio/index.js +8 -5
  180. package/inputs/Radio/index.js.map +2 -2
  181. package/inputs/Select/index.d.ts +3 -2
  182. package/inputs/Select/index.js +13 -4
  183. package/inputs/Select/index.js.map +2 -2
  184. package/inputs/inputsScenarios/index.js +6 -12
  185. package/inputs/inputsScenarios.d.ts +1 -1
  186. package/inputs/inputsScenarios.js.map +2 -2
  187. package/lazy/index.js +77 -67
  188. package/locales/el.js.map +1 -1
  189. package/package.json +5 -5
  190. package/registry/index.js +119 -108
  191. package/src/Field/ErrorGroup.tsx +84 -0
  192. package/src/Field/FieldBase.tsx +55 -36
  193. package/src/Field/FieldBaseContainer.tsx +13 -7
  194. package/src/Field/FieldConditional.tsx +6 -2
  195. package/src/Field/doc.mdx +207 -0
  196. package/src/Field/index.tsx +19 -5
  197. package/src/Field/types.tsx +42 -29
  198. package/src/Field/utils/index.ts +7 -0
  199. package/src/Field/utils/useField.ts +14 -2
  200. package/src/FieldArray/FieldArray.stories.js +1 -0
  201. package/src/FieldArray/FormDialog.tsx +574 -0
  202. package/src/FieldArray/__stories__/Default.tsx +1 -0
  203. package/src/FieldArray/__stories__/WithExactLength.tsx +1 -0
  204. package/src/FieldArray/__stories__/WithModal.tsx +160 -0
  205. package/src/FieldArray/index.test.tsx +8 -0
  206. package/src/FieldArray/index.tsx +119 -62
  207. package/src/FieldObject/index.tsx +41 -20
  208. package/src/Fieldset/index.tsx +5 -5
  209. package/src/Fieldset/types.tsx +2 -2
  210. package/src/FormBuilder/FormBuilder.stories.js +2 -0
  211. package/src/FormBuilder/__stories__/AutoErrorGrouping.tsx +63 -0
  212. package/src/FormBuilder/__stories__/ErrorGrouping.tsx +43 -0
  213. package/src/FormBuilder/{FormBuilder.mdx → doc.mdx} +27 -35
  214. package/src/FormBuilder/index.test.tsx +12 -0
  215. package/src/FormBuilder/index.tsx +105 -11
  216. package/src/FormBuilder/interaction.test.tsx +40 -0
  217. package/src/FormBuilder/scenarios.test.tsx +124 -10
  218. package/src/FormContext.tsx +1 -2
  219. package/src/MultiplicityField/add-objects.tsx +11 -9
  220. package/src/MultiplicityField/{MultiplicityField.mdx → doc.mdx} +112 -98
  221. package/src/MultiplicityField/index.test.tsx +4 -0
  222. package/src/MultiplicityField/index.tsx +15 -12
  223. package/src/MultiplicityField/types.ts +1 -2
  224. package/src/Questions/Questions.tsx +4 -4
  225. package/src/Questions/Step/StepArrayReview.tsx +1 -1
  226. package/src/Questions/Step/StepTitle.tsx +4 -3
  227. package/src/Questions/__snapshots__/index.spec.tsx.snap +11 -5
  228. package/src/Questions/{index.mdx → doc.mdx} +30 -53
  229. package/src/Questions/index.spec.tsx +14 -2
  230. package/src/Questions/index.test.tsx +4 -0
  231. package/src/create-simple-form.mdx +2 -6
  232. package/src/{index.mdx → doc.mdx} +29 -18
  233. package/src/inputs/AutoCompleteInput/__stories__/Default.tsx +2 -10
  234. package/src/inputs/AutoCompleteInput/__stories__/Multiple.tsx +1 -7
  235. package/src/inputs/AutoCompleteInput/{index.mdx → doc.mdx} +2 -13
  236. package/src/inputs/AutoCompleteInput/index.test.tsx +4 -0
  237. package/src/inputs/AutoCompleteInput/index.tsx +32 -28
  238. package/src/inputs/Checkboxes/{index.mdx → doc.mdx} +5 -15
  239. package/src/inputs/Checkboxes/index.test.tsx +4 -0
  240. package/src/inputs/Checkboxes/index.tsx +29 -28
  241. package/src/inputs/DateInput/__stories__/Default.tsx +7 -12
  242. package/src/inputs/DateInput/{index.mdx → doc.mdx} +1 -8
  243. package/src/inputs/DateInput/index.test.tsx +4 -0
  244. package/src/inputs/DateInput/index.tsx +33 -14
  245. package/src/inputs/DateTimeInput/DateTimeInput.stories.js +8 -0
  246. package/src/inputs/DateTimeInput/__stories__/Default.tsx +25 -0
  247. package/src/inputs/DateTimeInput/doc.mdx +16 -0
  248. package/src/inputs/DateTimeInput/index.test.tsx +24 -0
  249. package/src/inputs/DateTimeInput/index.tsx +209 -0
  250. package/src/inputs/FileInput/FileInput.stories.js +1 -0
  251. package/src/inputs/FileInput/__stories__/WithBorderAndLink.tsx +34 -0
  252. package/src/inputs/FileInput/{index.mdx → doc.mdx} +1 -5
  253. package/src/inputs/FileInput/index.test.tsx +8 -0
  254. package/src/inputs/FileInput/index.tsx +58 -26
  255. package/src/inputs/ImageInput/ImageInput.stories.js +0 -1
  256. package/src/inputs/ImageInput/__stories__/MaxSize.tsx +2 -2
  257. package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +2 -0
  258. package/src/inputs/ImageInput/doc.mdx +23 -0
  259. package/src/inputs/ImageInput/index.test.tsx +4 -4
  260. package/src/inputs/ImageInput/index.tsx +17 -16
  261. package/src/inputs/Input/Input.stories.js +2 -0
  262. package/src/inputs/Input/__stories__/AMKA.tsx +23 -0
  263. package/src/inputs/Input/__stories__/LandlineNumber.tsx +2 -1
  264. package/src/inputs/Input/__stories__/MobilePhone.tsx +1 -0
  265. package/src/inputs/Input/__stories__/PhoneNumber.tsx +1 -0
  266. package/src/inputs/Input/__stories__/PostalCode.tsx +1 -0
  267. package/src/inputs/Input/__stories__/StringWithTrimValidation.tsx +26 -0
  268. package/src/inputs/Input/__stories__/TextWithLimit.tsx +1 -0
  269. package/src/inputs/Input/doc.mdx +56 -0
  270. package/src/inputs/Input/index.test.tsx +8 -0
  271. package/src/inputs/Input/index.tsx +30 -12
  272. package/src/inputs/Input/inputsInputScenarios.ts +244 -245
  273. package/src/inputs/Label/doc.mdx +14 -0
  274. package/src/inputs/Label/index.test.tsx +4 -0
  275. package/src/inputs/Label/index.tsx +2 -6
  276. package/src/inputs/OtpInput/{index.mdx → doc.mdx} +1 -8
  277. package/src/inputs/OtpInput/index.test.tsx +4 -0
  278. package/src/inputs/OtpInput/index.tsx +3 -1
  279. package/src/inputs/Radio/{index.mdx → doc.mdx} +5 -15
  280. package/src/inputs/Radio/index.test.tsx +4 -0
  281. package/src/inputs/Radio/index.tsx +59 -56
  282. package/src/inputs/Select/{index.mdx → doc.mdx} +1 -5
  283. package/src/inputs/Select/index.test.tsx +4 -0
  284. package/src/inputs/Select/index.tsx +18 -7
  285. package/src/inputs/inputsScenarios.ts +36 -42
  286. package/src/installation.mdx +2 -5
  287. package/src/lazy.js +77 -64
  288. package/src/locales/el.ts +1 -1
  289. package/src/registry.js +111 -101
  290. package/src/types.tsx +4 -3
  291. package/src/utils.ts +29 -8
  292. package/src/validators/index.ts +110 -98
  293. package/src/validators/utils/amka.ts +39 -0
  294. package/src/validators/utils/date.ts +107 -0
  295. package/src/validators/utils/datetime.ts +130 -0
  296. package/src/validators/utils/file.ts +33 -17
  297. package/src/validators/utils/index.ts +6 -1
  298. package/src/validators/utils/int.ts +1 -1
  299. package/src/validators/utils/number.ts +1 -1
  300. package/src/validators/utils/phone.ts +1 -1
  301. package/src/validators/utils/postal_code.ts +1 -1
  302. package/src/validators/utils/uuid4.ts +2 -1
  303. package/src/validators/validators.spec.ts +3 -3
  304. package/types.d.ts +4 -3
  305. package/types.js.map +1 -1
  306. package/utils/index.js +22 -7
  307. package/utils.d.ts +2 -0
  308. package/utils.js.map +2 -2
  309. package/validators/index.d.ts +1 -1
  310. package/validators/index.js +69 -90
  311. package/validators/index.js.map +2 -2
  312. package/validators/utils/amka/index.js +36 -0
  313. package/{FieldArray/FieldArray.stories → validators/utils/amka}/package.json +1 -1
  314. package/validators/utils/amka.d.ts +6 -0
  315. package/validators/utils/amka.js.map +7 -0
  316. package/validators/utils/date/index.js +103 -0
  317. package/validators/utils/date/package.json +6 -0
  318. package/validators/utils/date.d.ts +9 -0
  319. package/validators/utils/date.js.map +7 -0
  320. package/validators/utils/datetime/index.js +116 -0
  321. package/validators/utils/datetime/package.json +6 -0
  322. package/validators/utils/datetime.d.ts +9 -0
  323. package/validators/utils/datetime.js.map +7 -0
  324. package/validators/utils/file/index.js +30 -17
  325. package/validators/utils/file.js.map +2 -2
  326. package/validators/utils/index.d.ts +3 -0
  327. package/validators/utils/index.js +6 -1
  328. package/validators/utils/index.js.map +2 -2
  329. package/validators/utils/int/index.js +1 -1
  330. package/validators/utils/int.js.map +2 -2
  331. package/validators/utils/number/index.js +1 -1
  332. package/validators/utils/number.js.map +2 -2
  333. package/validators/utils/phone.d.ts +1 -1
  334. package/validators/utils/phone.js.map +2 -2
  335. package/validators/utils/postal_code.d.ts +1 -1
  336. package/validators/utils/postal_code.js.map +1 -1
  337. package/validators/utils/uuid4.js.map +2 -2
  338. package/FieldArray/FieldArray.stories/index.js +0 -14
  339. package/FieldArray/FieldArray.stories.js.map +0 -7
  340. package/FieldArray/__stories__/Default/index.js +0 -95
  341. package/FieldArray/__stories__/Default/package.json +0 -6
  342. package/FieldArray/__stories__/Default.js.map +0 -7
  343. package/FieldArray/__stories__/WithExactLength/index.js +0 -95
  344. package/FieldArray/__stories__/WithExactLength/package.json +0 -6
  345. package/FieldArray/__stories__/WithExactLength.js.map +0 -7
  346. package/Form.stories/index.js +0 -7
  347. package/Form.stories.js.map +0 -7
  348. package/FormBuilder/FormBuilder.stories/index.js +0 -12
  349. package/FormBuilder/FormBuilder.stories/package.json +0 -6
  350. package/FormBuilder/FormBuilder.stories.js.map +0 -7
  351. package/FormBuilder/__stories__/Default/index.js +0 -32
  352. package/FormBuilder/__stories__/Default/package.json +0 -6
  353. package/FormBuilder/__stories__/Default.js.map +0 -7
  354. package/MultiplicityField/MultiplicityField.stories/index.js +0 -22
  355. package/MultiplicityField/MultiplicityField.stories/package.json +0 -6
  356. package/MultiplicityField/MultiplicityField.stories.js.map +0 -7
  357. package/MultiplicityField/__stories__/Default/index.js +0 -100
  358. package/MultiplicityField/__stories__/Default/package.json +0 -6
  359. package/MultiplicityField/__stories__/Default.js.map +0 -7
  360. package/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -70
  361. package/MultiplicityField/__stories__/PreviewDisplay/package.json +0 -6
  362. package/MultiplicityField/__stories__/PreviewDisplay.js.map +0 -7
  363. package/MultiplicityField/__stories__/WithExactLength/index.js +0 -97
  364. package/MultiplicityField/__stories__/WithExactLength/package.json +0 -6
  365. package/MultiplicityField/__stories__/WithExactLength.js.map +0 -7
  366. package/MultiplicityField/__stories__/WithMaxLength/index.js +0 -100
  367. package/MultiplicityField/__stories__/WithMaxLength/package.json +0 -6
  368. package/MultiplicityField/__stories__/WithMaxLength.js.map +0 -7
  369. package/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -101
  370. package/MultiplicityField/__stories__/WithMinAndMaxLength/package.json +0 -6
  371. package/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +0 -7
  372. package/MultiplicityField/__stories__/WithMinLength/index.js +0 -100
  373. package/MultiplicityField/__stories__/WithMinLength/package.json +0 -6
  374. package/MultiplicityField/__stories__/WithMinLength.js.map +0 -7
  375. package/Questions/Questions.stories/index.js +0 -12
  376. package/Questions/Questions.stories.js.map +0 -7
  377. package/Questions/__stories__/Default/index.js +0 -108
  378. package/Questions/__stories__/Default/package.json +0 -6
  379. package/Questions/__stories__/Default.js.map +0 -7
  380. package/cjs/FieldArray/FieldArray.stories/index.js +0 -48
  381. package/cjs/FieldArray/FieldArray.stories.js.map +0 -7
  382. package/cjs/FieldArray/__stories__/Default/index.js +0 -128
  383. package/cjs/FieldArray/__stories__/Default.js.map +0 -7
  384. package/cjs/FieldArray/__stories__/WithExactLength/index.js +0 -128
  385. package/cjs/FieldArray/__stories__/WithExactLength.js.map +0 -7
  386. package/cjs/Form.stories/index.js +0 -26
  387. package/cjs/Form.stories.js.map +0 -7
  388. package/cjs/FormBuilder/FormBuilder.stories/index.js +0 -45
  389. package/cjs/FormBuilder/FormBuilder.stories.js.map +0 -7
  390. package/cjs/FormBuilder/__stories__/Default/index.js +0 -65
  391. package/cjs/FormBuilder/__stories__/Default.js.map +0 -7
  392. package/cjs/MultiplicityField/MultiplicityField.stories/index.js +0 -60
  393. package/cjs/MultiplicityField/MultiplicityField.stories.js.map +0 -7
  394. package/cjs/MultiplicityField/__stories__/Default/index.js +0 -133
  395. package/cjs/MultiplicityField/__stories__/Default.js.map +0 -7
  396. package/cjs/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -86
  397. package/cjs/MultiplicityField/__stories__/PreviewDisplay.js.map +0 -7
  398. package/cjs/MultiplicityField/__stories__/WithExactLength/index.js +0 -130
  399. package/cjs/MultiplicityField/__stories__/WithExactLength.js.map +0 -7
  400. package/cjs/MultiplicityField/__stories__/WithMaxLength/index.js +0 -133
  401. package/cjs/MultiplicityField/__stories__/WithMaxLength.js.map +0 -7
  402. package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -134
  403. package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +0 -7
  404. package/cjs/MultiplicityField/__stories__/WithMinLength/index.js +0 -133
  405. package/cjs/MultiplicityField/__stories__/WithMinLength.js.map +0 -7
  406. package/cjs/Questions/Questions.stories/index.js +0 -45
  407. package/cjs/Questions/Questions.stories.js.map +0 -7
  408. package/cjs/Questions/__stories__/Default/index.js +0 -136
  409. package/cjs/Questions/__stories__/Default.js.map +0 -7
  410. package/cjs/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -48
  411. package/cjs/inputs/AutoCompleteInput/AutoComplete.stories.js.map +0 -7
  412. package/cjs/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -83
  413. package/cjs/inputs/AutoCompleteInput/__stories__/Default.js.map +0 -7
  414. package/cjs/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -83
  415. package/cjs/inputs/AutoCompleteInput/__stories__/Multiple.js.map +0 -7
  416. package/cjs/inputs/Checkboxes/Checkboxes.stories/index.js +0 -51
  417. package/cjs/inputs/Checkboxes/Checkboxes.stories.js.map +0 -7
  418. package/cjs/inputs/Checkboxes/__stories__/Conditional/index.js +0 -133
  419. package/cjs/inputs/Checkboxes/__stories__/Conditional.js.map +0 -7
  420. package/cjs/inputs/Checkboxes/__stories__/Default/index.js +0 -77
  421. package/cjs/inputs/Checkboxes/__stories__/Default.js.map +0 -7
  422. package/cjs/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -78
  423. package/cjs/inputs/Checkboxes/__stories__/WithDivider.js.map +0 -7
  424. package/cjs/inputs/DateInput/DateInput.stories/index.js +0 -45
  425. package/cjs/inputs/DateInput/DateInput.stories.js.map +0 -7
  426. package/cjs/inputs/DateInput/__stories__/Default/index.js +0 -61
  427. package/cjs/inputs/DateInput/__stories__/Default.js.map +0 -7
  428. package/cjs/inputs/FileInput/FileInput.stories/index.js +0 -45
  429. package/cjs/inputs/FileInput/FileInput.stories.js.map +0 -7
  430. package/cjs/inputs/FileInput/__stories__/Default/index.js +0 -61
  431. package/cjs/inputs/FileInput/__stories__/Default.js.map +0 -7
  432. package/cjs/inputs/ImageInput/ImageInput.stories/index.js +0 -51
  433. package/cjs/inputs/ImageInput/ImageInput.stories.js.map +0 -7
  434. package/cjs/inputs/ImageInput/__stories__/Default/index.js +0 -63
  435. package/cjs/inputs/ImageInput/__stories__/Default.js.map +0 -7
  436. package/cjs/inputs/ImageInput/__stories__/MaxSize/index.js +0 -69
  437. package/cjs/inputs/ImageInput/__stories__/MaxSize.js.map +0 -7
  438. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -71
  439. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +0 -7
  440. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -68
  441. package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +0 -7
  442. package/cjs/inputs/Input/Input.stories/index.js +0 -72
  443. package/cjs/inputs/Input/Input.stories.js.map +0 -7
  444. package/cjs/inputs/Input/__stories__/AFM/index.js +0 -63
  445. package/cjs/inputs/Input/__stories__/AFM.js.map +0 -7
  446. package/cjs/inputs/Input/__stories__/Boolean/index.js +0 -64
  447. package/cjs/inputs/Input/__stories__/Boolean.js.map +0 -7
  448. package/cjs/inputs/Input/__stories__/IBAN/index.js +0 -64
  449. package/cjs/inputs/Input/__stories__/IBAN.js.map +0 -7
  450. package/cjs/inputs/Input/__stories__/Integer/index.js +0 -78
  451. package/cjs/inputs/Input/__stories__/Integer.js.map +0 -7
  452. package/cjs/inputs/Input/__stories__/LandlineNumber/index.js +0 -67
  453. package/cjs/inputs/Input/__stories__/LandlineNumber.js.map +0 -7
  454. package/cjs/inputs/Input/__stories__/MobilePhone/index.js +0 -67
  455. package/cjs/inputs/Input/__stories__/MobilePhone.js.map +0 -7
  456. package/cjs/inputs/Input/__stories__/PhoneNumber/index.js +0 -66
  457. package/cjs/inputs/Input/__stories__/PhoneNumber.js.map +0 -7
  458. package/cjs/inputs/Input/__stories__/PostalCode/index.js +0 -64
  459. package/cjs/inputs/Input/__stories__/PostalCode.js.map +0 -7
  460. package/cjs/inputs/Input/__stories__/String/index.js +0 -64
  461. package/cjs/inputs/Input/__stories__/String.js.map +0 -7
  462. package/cjs/inputs/Input/__stories__/TextWithLimit/index.js +0 -64
  463. package/cjs/inputs/Input/__stories__/TextWithLimit.js.map +0 -7
  464. package/cjs/inputs/Label/Label.stories/index.js +0 -45
  465. package/cjs/inputs/Label/Label.stories.js.map +0 -7
  466. package/cjs/inputs/Label/__stories__/Default/index.js +0 -72
  467. package/cjs/inputs/Label/__stories__/Default.js.map +0 -7
  468. package/cjs/inputs/OtpInput/OtpInput.stories/index.js +0 -45
  469. package/cjs/inputs/OtpInput/OtpInput.stories.js.map +0 -7
  470. package/cjs/inputs/OtpInput/__stories__/Default/index.js +0 -64
  471. package/cjs/inputs/OtpInput/__stories__/Default.js.map +0 -7
  472. package/cjs/inputs/Radio/Radio.stories/index.js +0 -51
  473. package/cjs/inputs/Radio/Radio.stories.js.map +0 -7
  474. package/cjs/inputs/Radio/__stories__/Conditional/index.js +0 -133
  475. package/cjs/inputs/Radio/__stories__/Conditional.js.map +0 -7
  476. package/cjs/inputs/Radio/__stories__/Default/index.js +0 -81
  477. package/cjs/inputs/Radio/__stories__/Default.js.map +0 -7
  478. package/cjs/inputs/Radio/__stories__/WithDivider/index.js +0 -82
  479. package/cjs/inputs/Radio/__stories__/WithDivider.js.map +0 -7
  480. package/cjs/inputs/Select/Select.stories/index.js +0 -45
  481. package/cjs/inputs/Select/Select.stories.js.map +0 -7
  482. package/cjs/inputs/Select/__stories__/Default/index.js +0 -86
  483. package/cjs/inputs/Select/__stories__/Default.js.map +0 -7
  484. package/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -14
  485. package/inputs/AutoCompleteInput/AutoComplete.stories/package.json +0 -6
  486. package/inputs/AutoCompleteInput/AutoComplete.stories.js.map +0 -7
  487. package/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -50
  488. package/inputs/AutoCompleteInput/__stories__/Default/package.json +0 -6
  489. package/inputs/AutoCompleteInput/__stories__/Default.js.map +0 -7
  490. package/inputs/AutoCompleteInput/__stories__/Multiple/index.js +0 -50
  491. package/inputs/AutoCompleteInput/__stories__/Multiple/package.json +0 -6
  492. package/inputs/AutoCompleteInput/__stories__/Multiple.js.map +0 -7
  493. package/inputs/Checkboxes/Checkboxes.stories/index.js +0 -16
  494. package/inputs/Checkboxes/Checkboxes.stories/package.json +0 -6
  495. package/inputs/Checkboxes/Checkboxes.stories.js.map +0 -7
  496. package/inputs/Checkboxes/__stories__/Conditional/index.js +0 -100
  497. package/inputs/Checkboxes/__stories__/Conditional/package.json +0 -6
  498. package/inputs/Checkboxes/__stories__/Conditional.js.map +0 -7
  499. package/inputs/Checkboxes/__stories__/Default/index.js +0 -44
  500. package/inputs/Checkboxes/__stories__/Default/package.json +0 -6
  501. package/inputs/Checkboxes/__stories__/Default.js.map +0 -7
  502. package/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -45
  503. package/inputs/Checkboxes/__stories__/WithDivider/package.json +0 -6
  504. package/inputs/Checkboxes/__stories__/WithDivider.js.map +0 -7
  505. package/inputs/DateInput/DateInput.stories/index.js +0 -12
  506. package/inputs/DateInput/DateInput.stories/package.json +0 -6
  507. package/inputs/DateInput/DateInput.stories.js.map +0 -7
  508. package/inputs/DateInput/__stories__/Default/index.js +0 -28
  509. package/inputs/DateInput/__stories__/Default/package.json +0 -6
  510. package/inputs/DateInput/__stories__/Default.js.map +0 -7
  511. package/inputs/FileInput/FileInput.stories/index.js +0 -12
  512. package/inputs/FileInput/FileInput.stories/package.json +0 -6
  513. package/inputs/FileInput/FileInput.stories.js.map +0 -7
  514. package/inputs/FileInput/__stories__/Default/index.js +0 -28
  515. package/inputs/FileInput/__stories__/Default/package.json +0 -6
  516. package/inputs/FileInput/__stories__/Default.js.map +0 -7
  517. package/inputs/ImageInput/ImageInput.stories/index.js +0 -16
  518. package/inputs/ImageInput/ImageInput.stories/package.json +0 -6
  519. package/inputs/ImageInput/ImageInput.stories.js.map +0 -7
  520. package/inputs/ImageInput/__stories__/Default/index.js +0 -30
  521. package/inputs/ImageInput/__stories__/Default/package.json +0 -6
  522. package/inputs/ImageInput/__stories__/Default.js.map +0 -7
  523. package/inputs/ImageInput/__stories__/MaxSize/index.js +0 -36
  524. package/inputs/ImageInput/__stories__/MaxSize/package.json +0 -6
  525. package/inputs/ImageInput/__stories__/MaxSize.js.map +0 -7
  526. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -38
  527. package/inputs/ImageInput/__stories__/WithInvalidImageDimension/package.json +0 -6
  528. package/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +0 -7
  529. package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -35
  530. package/inputs/ImageInput/__stories__/WithInvalidImageSize/package.json +0 -6
  531. package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +0 -3
  532. package/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +0 -7
  533. package/inputs/Input/Input.stories/index.js +0 -30
  534. package/inputs/Input/Input.stories.js.map +0 -7
  535. package/inputs/Input/__stories__/AFM/index.js +0 -30
  536. package/inputs/Input/__stories__/AFM/package.json +0 -6
  537. package/inputs/Input/__stories__/AFM.js.map +0 -7
  538. package/inputs/Input/__stories__/Boolean/index.js +0 -31
  539. package/inputs/Input/__stories__/Boolean/package.json +0 -6
  540. package/inputs/Input/__stories__/Boolean.js.map +0 -7
  541. package/inputs/Input/__stories__/IBAN/index.js +0 -31
  542. package/inputs/Input/__stories__/IBAN/package.json +0 -6
  543. package/inputs/Input/__stories__/IBAN.js.map +0 -7
  544. package/inputs/Input/__stories__/Integer/index.js +0 -45
  545. package/inputs/Input/__stories__/Integer/package.json +0 -6
  546. package/inputs/Input/__stories__/Integer.js.map +0 -7
  547. package/inputs/Input/__stories__/LandlineNumber/index.js +0 -34
  548. package/inputs/Input/__stories__/LandlineNumber/package.json +0 -6
  549. package/inputs/Input/__stories__/LandlineNumber.js.map +0 -7
  550. package/inputs/Input/__stories__/MobilePhone/index.js +0 -34
  551. package/inputs/Input/__stories__/MobilePhone/package.json +0 -6
  552. package/inputs/Input/__stories__/MobilePhone.js.map +0 -7
  553. package/inputs/Input/__stories__/PhoneNumber/index.js +0 -33
  554. package/inputs/Input/__stories__/PhoneNumber/package.json +0 -6
  555. package/inputs/Input/__stories__/PhoneNumber.js.map +0 -7
  556. package/inputs/Input/__stories__/PostalCode/index.js +0 -31
  557. package/inputs/Input/__stories__/PostalCode/package.json +0 -6
  558. package/inputs/Input/__stories__/PostalCode.js.map +0 -7
  559. package/inputs/Input/__stories__/String/index.js +0 -31
  560. package/inputs/Input/__stories__/String/package.json +0 -6
  561. package/inputs/Input/__stories__/String.js.map +0 -7
  562. package/inputs/Input/__stories__/TextWithLimit/index.js +0 -31
  563. package/inputs/Input/__stories__/TextWithLimit/package.json +0 -6
  564. package/inputs/Input/__stories__/TextWithLimit.js.map +0 -7
  565. package/inputs/Label/Label.stories/index.js +0 -12
  566. package/inputs/Label/Label.stories/package.json +0 -6
  567. package/inputs/Label/Label.stories.js.map +0 -7
  568. package/inputs/Label/__stories__/Default/index.js +0 -39
  569. package/inputs/Label/__stories__/Default/package.json +0 -6
  570. package/inputs/Label/__stories__/Default.js.map +0 -7
  571. package/inputs/OtpInput/OtpInput.stories/index.js +0 -12
  572. package/inputs/OtpInput/OtpInput.stories/package.json +0 -6
  573. package/inputs/OtpInput/OtpInput.stories.js.map +0 -7
  574. package/inputs/OtpInput/__stories__/Default/index.js +0 -31
  575. package/inputs/OtpInput/__stories__/Default/package.json +0 -6
  576. package/inputs/OtpInput/__stories__/Default.js.map +0 -7
  577. package/inputs/Radio/Radio.stories/index.js +0 -16
  578. package/inputs/Radio/Radio.stories/package.json +0 -6
  579. package/inputs/Radio/Radio.stories.js.map +0 -7
  580. package/inputs/Radio/__stories__/Conditional/index.js +0 -100
  581. package/inputs/Radio/__stories__/Conditional/package.json +0 -6
  582. package/inputs/Radio/__stories__/Conditional.js.map +0 -7
  583. package/inputs/Radio/__stories__/Default/index.js +0 -48
  584. package/inputs/Radio/__stories__/Default/package.json +0 -6
  585. package/inputs/Radio/__stories__/Default.js.map +0 -7
  586. package/inputs/Radio/__stories__/WithDivider/index.js +0 -49
  587. package/inputs/Radio/__stories__/WithDivider/package.json +0 -6
  588. package/inputs/Radio/__stories__/WithDivider.js.map +0 -7
  589. package/inputs/Select/Select.stories/index.js +0 -12
  590. package/inputs/Select/Select.stories/package.json +0 -6
  591. package/inputs/Select/Select.stories.js.map +0 -7
  592. package/inputs/Select/__stories__/Default/index.js +0 -53
  593. package/inputs/Select/__stories__/Default/package.json +0 -6
  594. package/inputs/Select/__stories__/Default.js.map +0 -7
  595. package/lazy.d.ts +0 -77
  596. package/lazy.js.map +0 -7
  597. package/registry.d.ts +0 -70
  598. package/registry.js.map +0 -7
  599. package/src/Field/index.mdx +0 -6
  600. package/src/inputs/ImageInput/__stories__/WithInvalidImageSize.tsx +0 -36
  601. package/src/inputs/ImageInput/index.mdx +0 -19
  602. package/src/inputs/Input/index.mdx +0 -95
  603. 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"