@pareto-engineering/design-system 4.0.0-alpha.63 → 4.0.0-alpha.64

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 (286) hide show
  1. package/dist/cjs/f/FormInput/FormInput.js +13 -43
  2. package/dist/cjs/f/common/Description/Description.js +6 -5
  3. package/dist/cjs/f/common/Label/Label.js +9 -22
  4. package/dist/cjs/f/common/Label/styles.scss +0 -5
  5. package/dist/cjs/f/common/index.js +1 -21
  6. package/dist/cjs/f/fields/Checkbox/Checkbox.js +16 -21
  7. package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
  8. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +13 -23
  9. package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
  10. package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -39
  11. package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
  12. package/dist/cjs/f/fields/LinkInput/LinkInput.js +14 -20
  13. package/dist/cjs/f/fields/LinkInput/styles.scss +52 -51
  14. package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +2 -26
  15. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +4 -30
  16. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +7 -16
  17. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +9 -17
  18. package/dist/cjs/f/fields/QueryCombobox/styles.scss +38 -37
  19. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
  20. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +14 -38
  21. package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
  22. package/dist/cjs/f/fields/SelectInput/SelectInput.js +14 -36
  23. package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
  24. package/dist/cjs/f/fields/TextInput/TextInput.js +19 -37
  25. package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
  26. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -37
  27. package/dist/cjs/f/fields/TextareaInput/styles.scss +30 -27
  28. package/dist/cjs/f/fields/index.js +1 -26
  29. package/dist/es/f/FormInput/FormInput.js +3 -33
  30. package/dist/es/f/common/Description/Description.js +4 -1
  31. package/dist/es/f/common/Label/Label.js +15 -24
  32. package/dist/es/f/common/Label/styles.scss +0 -5
  33. package/dist/es/f/common/index.js +1 -3
  34. package/dist/es/f/fields/Checkbox/Checkbox.js +14 -19
  35. package/dist/es/f/fields/Checkbox/styles.scss +7 -5
  36. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +31 -39
  37. package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
  38. package/dist/es/f/fields/EditorInput/EditorInput.js +12 -35
  39. package/dist/es/f/fields/EditorInput/styles.scss +92 -90
  40. package/dist/es/f/fields/LinkInput/LinkInput.js +14 -20
  41. package/dist/es/f/fields/LinkInput/styles.scss +52 -51
  42. package/dist/es/f/fields/QueryChoices/QueryChoices.js +2 -26
  43. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +4 -26
  44. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +8 -17
  45. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +10 -18
  46. package/dist/es/f/fields/QueryCombobox/styles.scss +38 -37
  47. package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
  48. package/dist/es/f/fields/RatingsInput/RatingsInput.js +15 -35
  49. package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
  50. package/dist/es/f/fields/SelectInput/SelectInput.js +14 -36
  51. package/dist/es/f/fields/SelectInput/styles.scss +5 -2
  52. package/dist/es/f/fields/TextInput/TextInput.js +19 -37
  53. package/dist/es/f/fields/TextInput/styles.scss +37 -30
  54. package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -37
  55. package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
  56. package/dist/es/f/fields/index.js +1 -2
  57. package/package.json +2 -2
  58. package/src/stories/f/Checkbox.stories.jsx +13 -21
  59. package/src/stories/f/ChoicesInput.stories.jsx +12 -27
  60. package/src/stories/f/EditorInput.stories.jsx +7 -14
  61. package/src/stories/f/LinkInput.stories.jsx +15 -22
  62. package/src/stories/f/QueryChoices.stories.jsx +12 -19
  63. package/src/stories/f/QueryCombobox.stories.jsx +16 -24
  64. package/src/stories/f/QuerySelect.stories.jsx +12 -19
  65. package/src/stories/f/RatingsInput.stories.jsx +7 -14
  66. package/src/stories/f/SelectInput.stories.jsx +12 -19
  67. package/src/stories/f/TextInput.stories.jsx +16 -23
  68. package/src/stories/f/TextareaInput.stories.jsx +7 -14
  69. package/src/ui/f/FormInput/FormInput.jsx +12 -57
  70. package/src/ui/f/common/Description/Description.jsx +6 -2
  71. package/src/ui/f/common/Label/Label.jsx +27 -37
  72. package/src/ui/f/common/Label/styles.scss +0 -5
  73. package/src/ui/f/common/index.js +0 -2
  74. package/src/ui/f/fields/Checkbox/Checkbox.jsx +27 -33
  75. package/src/ui/f/fields/Checkbox/styles.scss +7 -5
  76. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +29 -38
  77. package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
  78. package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -41
  79. package/src/ui/f/fields/EditorInput/styles.scss +92 -90
  80. package/src/ui/f/fields/LinkInput/LinkInput.jsx +38 -45
  81. package/src/ui/f/fields/LinkInput/styles.scss +52 -51
  82. package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -28
  83. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +5 -31
  84. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +35 -46
  85. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +63 -73
  86. package/src/ui/f/fields/QueryCombobox/styles.scss +38 -37
  87. package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
  88. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +20 -47
  89. package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
  90. package/src/ui/f/fields/SelectInput/SelectInput.jsx +33 -61
  91. package/src/ui/f/fields/SelectInput/styles.scss +5 -2
  92. package/src/ui/f/fields/TextInput/TextInput.jsx +27 -50
  93. package/src/ui/f/fields/TextInput/styles.scss +37 -30
  94. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +32 -59
  95. package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
  96. package/src/ui/f/fields/index.js +0 -1
  97. package/dist/cjs/f/common/InputWrapper/InputWrapper.js +0 -73
  98. package/dist/cjs/f/common/InputWrapper/index.js +0 -13
  99. package/dist/cjs/f/common/InputWrapper/styles.scss +0 -13
  100. package/dist/cjs/f/common/V2/Description/Description.js +0 -76
  101. package/dist/cjs/f/common/V2/Description/index.js +0 -13
  102. package/dist/cjs/f/common/V2/Description/styles.scss +0 -10
  103. package/dist/cjs/f/common/V2/Label/Label.js +0 -84
  104. package/dist/cjs/f/common/V2/Label/index.js +0 -13
  105. package/dist/cjs/f/common/V2/Label/styles.scss +0 -9
  106. package/dist/cjs/f/common/V2/index.js +0 -19
  107. package/dist/cjs/f/fields/V2/Checkbox/Checkbox.js +0 -122
  108. package/dist/cjs/f/fields/V2/Checkbox/index.js +0 -13
  109. package/dist/cjs/f/fields/V2/Checkbox/styles.scss +0 -16
  110. package/dist/cjs/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -154
  111. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -104
  112. package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -13
  113. package/dist/cjs/f/fields/V2/ChoicesInput/common/index.js +0 -12
  114. package/dist/cjs/f/fields/V2/ChoicesInput/index.js +0 -13
  115. package/dist/cjs/f/fields/V2/ChoicesInput/styles.scss +0 -79
  116. package/dist/cjs/f/fields/V2/EditorInput/EditorInput.js +0 -197
  117. package/dist/cjs/f/fields/V2/EditorInput/common/Toolbar.js +0 -257
  118. package/dist/cjs/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -18
  119. package/dist/cjs/f/fields/V2/EditorInput/common/index.js +0 -20
  120. package/dist/cjs/f/fields/V2/EditorInput/index.js +0 -13
  121. package/dist/cjs/f/fields/V2/EditorInput/styles.scss +0 -149
  122. package/dist/cjs/f/fields/V2/LinkInput/LinkInput.js +0 -156
  123. package/dist/cjs/f/fields/V2/LinkInput/index.js +0 -13
  124. package/dist/cjs/f/fields/V2/LinkInput/styles.scss +0 -90
  125. package/dist/cjs/f/fields/V2/QueryChoices/QueryChoices.js +0 -137
  126. package/dist/cjs/f/fields/V2/QueryChoices/index.js +0 -13
  127. package/dist/cjs/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -229
  128. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -236
  129. package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -13
  130. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -83
  131. package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -13
  132. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -300
  133. package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -13
  134. package/dist/cjs/f/fields/V2/QueryCombobox/common/index.js +0 -26
  135. package/dist/cjs/f/fields/V2/QueryCombobox/index.js +0 -13
  136. package/dist/cjs/f/fields/V2/QueryCombobox/styles.scss +0 -127
  137. package/dist/cjs/f/fields/V2/QuerySelect/QuerySelect.js +0 -198
  138. package/dist/cjs/f/fields/V2/QuerySelect/index.js +0 -13
  139. package/dist/cjs/f/fields/V2/RatingsInput/RatingsInput.js +0 -130
  140. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -117
  141. package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/index.js +0 -13
  142. package/dist/cjs/f/fields/V2/RatingsInput/common/index.js +0 -12
  143. package/dist/cjs/f/fields/V2/RatingsInput/index.js +0 -13
  144. package/dist/cjs/f/fields/V2/RatingsInput/styles.scss +0 -48
  145. package/dist/cjs/f/fields/V2/SelectInput/SelectInput.js +0 -154
  146. package/dist/cjs/f/fields/V2/SelectInput/index.js +0 -13
  147. package/dist/cjs/f/fields/V2/SelectInput/styles.scss +0 -87
  148. package/dist/cjs/f/fields/V2/TextInput/TextInput.js +0 -155
  149. package/dist/cjs/f/fields/V2/TextInput/index.js +0 -13
  150. package/dist/cjs/f/fields/V2/TextInput/styles.scss +0 -78
  151. package/dist/cjs/f/fields/V2/TextareaInput/TextareaInput.js +0 -152
  152. package/dist/cjs/f/fields/V2/TextareaInput/index.js +0 -13
  153. package/dist/cjs/f/fields/V2/TextareaInput/styles.scss +0 -53
  154. package/dist/cjs/f/fields/V2/index.js +0 -82
  155. package/dist/es/f/common/InputWrapper/InputWrapper.js +0 -61
  156. package/dist/es/f/common/InputWrapper/index.js +0 -2
  157. package/dist/es/f/common/InputWrapper/styles.scss +0 -13
  158. package/dist/es/f/common/V2/Description/Description.js +0 -68
  159. package/dist/es/f/common/V2/Description/index.js +0 -2
  160. package/dist/es/f/common/V2/Description/styles.scss +0 -10
  161. package/dist/es/f/common/V2/Label/Label.js +0 -76
  162. package/dist/es/f/common/V2/Label/index.js +0 -2
  163. package/dist/es/f/common/V2/Label/styles.scss +0 -9
  164. package/dist/es/f/common/V2/index.js +0 -2
  165. package/dist/es/f/fields/V2/Checkbox/Checkbox.js +0 -114
  166. package/dist/es/f/fields/V2/Checkbox/index.js +0 -2
  167. package/dist/es/f/fields/V2/Checkbox/styles.scss +0 -16
  168. package/dist/es/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -148
  169. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -97
  170. package/dist/es/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
  171. package/dist/es/f/fields/V2/ChoicesInput/common/index.js +0 -1
  172. package/dist/es/f/fields/V2/ChoicesInput/index.js +0 -2
  173. package/dist/es/f/fields/V2/ChoicesInput/styles.scss +0 -79
  174. package/dist/es/f/fields/V2/EditorInput/EditorInput.js +0 -192
  175. package/dist/es/f/fields/V2/EditorInput/common/Toolbar.js +0 -246
  176. package/dist/es/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -11
  177. package/dist/es/f/fields/V2/EditorInput/common/index.js +0 -2
  178. package/dist/es/f/fields/V2/EditorInput/index.js +0 -2
  179. package/dist/es/f/fields/V2/EditorInput/styles.scss +0 -149
  180. package/dist/es/f/fields/V2/LinkInput/LinkInput.js +0 -148
  181. package/dist/es/f/fields/V2/LinkInput/index.js +0 -2
  182. package/dist/es/f/fields/V2/LinkInput/styles.scss +0 -90
  183. package/dist/es/f/fields/V2/QueryChoices/QueryChoices.js +0 -126
  184. package/dist/es/f/fields/V2/QueryChoices/index.js +0 -2
  185. package/dist/es/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -221
  186. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -229
  187. package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
  188. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -73
  189. package/dist/es/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
  190. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -293
  191. package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
  192. package/dist/es/f/fields/V2/QueryCombobox/common/index.js +0 -3
  193. package/dist/es/f/fields/V2/QueryCombobox/index.js +0 -2
  194. package/dist/es/f/fields/V2/QueryCombobox/styles.scss +0 -127
  195. package/dist/es/f/fields/V2/QuerySelect/QuerySelect.js +0 -186
  196. package/dist/es/f/fields/V2/QuerySelect/index.js +0 -2
  197. package/dist/es/f/fields/V2/RatingsInput/RatingsInput.js +0 -124
  198. package/dist/es/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -109
  199. package/dist/es/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
  200. package/dist/es/f/fields/V2/RatingsInput/common/index.js +0 -1
  201. package/dist/es/f/fields/V2/RatingsInput/index.js +0 -2
  202. package/dist/es/f/fields/V2/RatingsInput/styles.scss +0 -48
  203. package/dist/es/f/fields/V2/SelectInput/SelectInput.js +0 -146
  204. package/dist/es/f/fields/V2/SelectInput/index.js +0 -2
  205. package/dist/es/f/fields/V2/SelectInput/styles.scss +0 -87
  206. package/dist/es/f/fields/V2/TextInput/TextInput.js +0 -147
  207. package/dist/es/f/fields/V2/TextInput/index.js +0 -2
  208. package/dist/es/f/fields/V2/TextInput/styles.scss +0 -78
  209. package/dist/es/f/fields/V2/TextareaInput/TextareaInput.js +0 -146
  210. package/dist/es/f/fields/V2/TextareaInput/index.js +0 -2
  211. package/dist/es/f/fields/V2/TextareaInput/styles.scss +0 -53
  212. package/dist/es/f/fields/V2/index.js +0 -11
  213. package/src/stories/f/v2/Checkbox.stories.jsx +0 -102
  214. package/src/stories/f/v2/ChoicesInput.stories.jsx +0 -139
  215. package/src/stories/f/v2/EditorInput.stories.jsx +0 -81
  216. package/src/stories/f/v2/LinkInput.stories.jsx +0 -93
  217. package/src/stories/f/v2/QueryChoices.stories.jsx +0 -144
  218. package/src/stories/f/v2/QueryCombobox.stories.jsx +0 -301
  219. package/src/stories/f/v2/QuerySelect.stories.jsx +0 -150
  220. package/src/stories/f/v2/RatingsInput.stories.jsx +0 -77
  221. package/src/stories/f/v2/SelectInput.stories.jsx +0 -95
  222. package/src/stories/f/v2/TextInput.stories.jsx +0 -120
  223. package/src/stories/f/v2/TextareaInput.stories.jsx +0 -107
  224. package/src/stories/f/v2/__generated__/FormInputAllTaskStatusesQuery.graphql.js +0 -122
  225. package/src/stories/f/v2/__generated__/FormInputAllTeamsQuery.graphql.js +0 -139
  226. package/src/stories/f/v2/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +0 -122
  227. package/src/stories/f/v2/__generated__/QueryComboboxAllTeamsQuery.graphql.js +0 -139
  228. package/src/stories/f/v2/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +0 -122
  229. package/src/ui/f/common/InputWrapper/InputWrapper.jsx +0 -83
  230. package/src/ui/f/common/InputWrapper/index.js +0 -2
  231. package/src/ui/f/common/InputWrapper/styles.scss +0 -13
  232. package/src/ui/f/common/V2/Description/Description.jsx +0 -94
  233. package/src/ui/f/common/V2/Description/index.js +0 -2
  234. package/src/ui/f/common/V2/Description/styles.scss +0 -10
  235. package/src/ui/f/common/V2/Label/Label.jsx +0 -102
  236. package/src/ui/f/common/V2/Label/index.js +0 -2
  237. package/src/ui/f/common/V2/Label/styles.scss +0 -9
  238. package/src/ui/f/common/V2/index.js +0 -2
  239. package/src/ui/f/fields/V2/Checkbox/Checkbox.jsx +0 -146
  240. package/src/ui/f/fields/V2/Checkbox/index.js +0 -2
  241. package/src/ui/f/fields/V2/Checkbox/styles.scss +0 -16
  242. package/src/ui/f/fields/V2/ChoicesInput/ChoicesInput.jsx +0 -183
  243. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/Choice.jsx +0 -125
  244. package/src/ui/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
  245. package/src/ui/f/fields/V2/ChoicesInput/common/index.js +0 -1
  246. package/src/ui/f/fields/V2/ChoicesInput/index.js +0 -2
  247. package/src/ui/f/fields/V2/ChoicesInput/styles.scss +0 -79
  248. package/src/ui/f/fields/V2/EditorInput/EditorInput.jsx +0 -244
  249. package/src/ui/f/fields/V2/EditorInput/common/Toolbar.jsx +0 -356
  250. package/src/ui/f/fields/V2/EditorInput/common/TreeViewPlugin.jsx +0 -16
  251. package/src/ui/f/fields/V2/EditorInput/common/index.jsx +0 -2
  252. package/src/ui/f/fields/V2/EditorInput/index.js +0 -2
  253. package/src/ui/f/fields/V2/EditorInput/styles.scss +0 -149
  254. package/src/ui/f/fields/V2/LinkInput/LinkInput.jsx +0 -187
  255. package/src/ui/f/fields/V2/LinkInput/index.js +0 -2
  256. package/src/ui/f/fields/V2/LinkInput/styles.scss +0 -90
  257. package/src/ui/f/fields/V2/QueryChoices/QueryChoices.jsx +0 -153
  258. package/src/ui/f/fields/V2/QueryChoices/index.js +0 -2
  259. package/src/ui/f/fields/V2/QueryCombobox/QueryCombobox.jsx +0 -254
  260. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/Combobox.jsx +0 -276
  261. package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
  262. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/Menu.jsx +0 -103
  263. package/src/ui/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
  264. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +0 -362
  265. package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
  266. package/src/ui/f/fields/V2/QueryCombobox/common/index.js +0 -3
  267. package/src/ui/f/fields/V2/QueryCombobox/index.js +0 -2
  268. package/src/ui/f/fields/V2/QueryCombobox/styles.scss +0 -127
  269. package/src/ui/f/fields/V2/QuerySelect/QuerySelect.jsx +0 -220
  270. package/src/ui/f/fields/V2/QuerySelect/index.js +0 -2
  271. package/src/ui/f/fields/V2/RatingsInput/RatingsInput.jsx +0 -152
  272. package/src/ui/f/fields/V2/RatingsInput/common/Rating/Rating.jsx +0 -142
  273. package/src/ui/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
  274. package/src/ui/f/fields/V2/RatingsInput/common/index.js +0 -1
  275. package/src/ui/f/fields/V2/RatingsInput/index.js +0 -2
  276. package/src/ui/f/fields/V2/RatingsInput/styles.scss +0 -48
  277. package/src/ui/f/fields/V2/SelectInput/SelectInput.jsx +0 -187
  278. package/src/ui/f/fields/V2/SelectInput/index.js +0 -2
  279. package/src/ui/f/fields/V2/SelectInput/styles.scss +0 -87
  280. package/src/ui/f/fields/V2/TextInput/TextInput.jsx +0 -192
  281. package/src/ui/f/fields/V2/TextInput/index.js +0 -2
  282. package/src/ui/f/fields/V2/TextInput/styles.scss +0 -78
  283. package/src/ui/f/fields/V2/TextareaInput/TextareaInput.jsx +0 -180
  284. package/src/ui/f/fields/V2/TextareaInput/index.js +0 -2
  285. package/src/ui/f/fields/V2/TextareaInput/styles.scss +0 -53
  286. package/src/ui/f/fields/V2/index.js +0 -11
@@ -1,244 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- /* eslint-disable import/no-extraneous-dependencies -- required here */
3
- import * as React from 'react'
4
- import { useInsertionEffect, memo } from 'react'
5
- import { useFormikContext } from 'formik'
6
- import { LexicalComposer } from '@lexical/react/LexicalComposer'
7
- import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
8
- import { ContentEditable } from '@lexical/react/LexicalContentEditable'
9
- import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'
10
- import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin'
11
- import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin'
12
- import { ListPlugin } from '@lexical/react/LexicalListPlugin'
13
- import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin'
14
- import { AutoLinkNode, LinkNode } from '@lexical/link'
15
- import { ListItemNode, ListNode } from '@lexical/list'
16
-
17
- import PropTypes from 'prop-types'
18
- import styleNames from '@pareto-engineering/bem/exports'
19
-
20
- // Local Definitions
21
-
22
- import { FormLabelV2, FormDescriptionV2 } from '../../../common'
23
- import { Toolbar, TreeViewPlugin } from './common'
24
-
25
- const baseClassName = styleNames.base
26
- const componentClassName = 'editor-input'
27
-
28
- /**
29
- * This is the component description.
30
- */
31
- const EditorInput = ({
32
- id,
33
- className:userClassName,
34
- style,
35
- name,
36
- label,
37
- // validate,
38
- resize,
39
- color,
40
- rows,
41
- optional,
42
- labelColor,
43
- description,
44
- disabled,
45
- showDebugger,
46
- // ...otherProps
47
- }) => {
48
- useInsertionEffect(() => {
49
- import('./styles.scss')
50
- }, [])
51
-
52
- const formik = useFormikContext()
53
-
54
- const setInitialValue = () => {
55
- const value = formik.values[name]
56
- try {
57
- JSON.parse(value)
58
- return value
59
- } catch {
60
- const defaultValue = {
61
- root:{
62
- children:[
63
- {
64
- children:[
65
- {
66
- detail :0,
67
- format :0,
68
- mode :'normal',
69
- style :'',
70
- text :'',
71
- type :'text',
72
- version:1,
73
- },
74
- ],
75
- direction:'ltr',
76
- format :'',
77
- indent :0,
78
- type :'paragraph',
79
- version :1,
80
- },
81
- ],
82
- direction:'ltr',
83
- format :'',
84
- indent :0,
85
- type :'root',
86
- version :1,
87
- },
88
- }
89
- defaultValue.root.children[0].children[0].text = value
90
- return JSON.stringify(defaultValue)
91
- }
92
- }
93
-
94
- const onChange = (state) => {
95
- formik.setValues({
96
- ...formik.values,
97
- [name]:JSON.stringify(state),
98
- })
99
- }
100
-
101
- const initialConfig = {
102
- nameSpace :name,
103
- editable :!disabled,
104
- editorState:setInitialValue(),
105
- theme :{
106
- text:{
107
- italic :'italic',
108
- strikethrough:'strikethrough',
109
- underline :'underlined',
110
- },
111
- },
112
- nodes:[
113
- AutoLinkNode,
114
- LinkNode,
115
- ListNode,
116
- ListItemNode,
117
- ],
118
- }
119
-
120
- return (
121
- <LexicalComposer
122
- initialConfig={initialConfig}
123
- >
124
- <div
125
- id={id}
126
- className={[
127
- baseClassName,
128
- componentClassName,
129
- userClassName,
130
- `y-${color}`,
131
- disabled && 'disabled',
132
- ]
133
- .filter((e) => e)
134
- .join(' ')}
135
- style={{
136
- ...style,
137
- '--resize':resize,
138
- '--rows' :`${rows}em`,
139
- }}
140
- >
141
- <FormLabelV2
142
- name={name}
143
- color={labelColor}
144
- optional={optional}
145
- >
146
- {label}
147
- </FormLabelV2>
148
-
149
- { !disabled && <Toolbar /> }
150
- <RichTextPlugin
151
- contentEditable={(
152
- <ContentEditable
153
- id={name}
154
- className="content-editable"
155
- />
156
- )}
157
- />
158
- <OnChangePlugin onChange={onChange} />
159
- <LinkPlugin />
160
- <ListPlugin />
161
- <TabIndentationPlugin />
162
- <HistoryPlugin />
163
- <FormDescriptionV2 className="s-1" description={description} name={name} />
164
- { showDebugger && <TreeViewPlugin />}
165
- </div>
166
- </LexicalComposer>
167
- )
168
- }
169
-
170
- EditorInput.propTypes = {
171
- /**
172
- * The HTML id for this element
173
- */
174
- id:PropTypes.string,
175
-
176
- /**
177
- * The HTML class names for this element
178
- */
179
- className:PropTypes.string,
180
-
181
- /**
182
- * The React-written, css properties for this element.
183
- */
184
- style:PropTypes.objectOf(PropTypes.string),
185
-
186
- /**
187
- * The input name (html - and Formik state)
188
- */
189
- name:PropTypes.string.isRequired,
190
-
191
- /**
192
- * The input label
193
- */
194
- label:PropTypes.string.isRequired,
195
-
196
- /**
197
- * The input value validator function
198
- */
199
- // validate:PropTypes.func,
200
-
201
- /**
202
- * The number of rows int the text area
203
- */
204
- rows:PropTypes.number,
205
-
206
- /**
207
- * Color of the text
208
- */
209
- color:PropTypes.string,
210
-
211
- /**
212
- * Label base color
213
- */
214
- labelColor:PropTypes.string,
215
-
216
- /**
217
- * Text area description
218
- */
219
- description:PropTypes.string,
220
-
221
- /**
222
- * Whether the text area should be disabled
223
- */
224
- disabled:PropTypes.bool,
225
-
226
- /**
227
- * Whether the input is optional or not
228
- */
229
- optional:PropTypes.bool,
230
-
231
- /**
232
- * The resize property of the text area
233
- */
234
- resize:PropTypes.oneOf(['none', 'both', 'horizontal', 'vertical']),
235
- }
236
-
237
- EditorInput.defaultProps = {
238
- rows :10,
239
- disabled:false,
240
- color :'paragraph',
241
- resize :'vertical',
242
- }
243
-
244
- export default memo(EditorInput)
@@ -1,356 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies -- required here */
2
- import * as React from 'react'
3
-
4
- import {
5
- useEffect,
6
- useState,
7
- useCallback,
8
- useRef,
9
- } from 'react'
10
-
11
- import {
12
- $getSelection,
13
- $isRangeSelection,
14
- FORMAT_TEXT_COMMAND,
15
- FORMAT_ELEMENT_COMMAND,
16
- UNDO_COMMAND,
17
- REDO_COMMAND,
18
- COMMAND_PRIORITY_NORMAL,
19
- createCommand,
20
- } from 'lexical'
21
- import {
22
- INSERT_ORDERED_LIST_COMMAND,
23
- INSERT_UNORDERED_LIST_COMMAND,
24
- REMOVE_LIST_COMMAND,
25
- $isListNode,
26
- ListNode,
27
- } from '@lexical/list'
28
- import {
29
- $isAtNodeEnd,
30
- } from '@lexical/selection'
31
- import {
32
- $isLinkNode,
33
- TOGGLE_LINK_COMMAND,
34
- } from '@lexical/link'
35
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
36
- import { mergeRegister, $getNearestNodeOfType } from '@lexical/utils'
37
-
38
- import { Popover } from 'ui'
39
-
40
- import styleNames from '@pareto-engineering/bem/exports'
41
-
42
- const baseClassName = styleNames.base
43
-
44
- const componentClassName = 'toolbar'
45
-
46
- const getSelectedNode = (selection) => {
47
- const { anchor, focus } = selection
48
- const anchorNode = selection.anchor.getNode()
49
- const focusNode = selection.focus.getNode()
50
- if (anchorNode === focusNode) {
51
- return anchorNode
52
- }
53
- const isBackward = selection.isBackward()
54
- if (isBackward) {
55
- return $isAtNodeEnd(focus) ? anchorNode : focusNode
56
- }
57
- return $isAtNodeEnd(anchor) ? focusNode : anchorNode
58
- }
59
-
60
- const defaultColor = 'var(--paragraph)'
61
-
62
- const colorOptions = [
63
- 'red',
64
- 'blue',
65
- 'green',
66
- 'yellow',
67
- 'orange',
68
- 'purple',
69
- 'pink',
70
- 'brown',
71
- ]
72
-
73
- const Toolbar = () => {
74
- const [editor] = useLexicalComposerContext()
75
- const [isBold, setIsBold] = useState(false)
76
- const [isItalic, setIsItalic] = useState(false)
77
- const [isStrikethrough, setIsStrikethrough] = useState(false)
78
- const [blockType, setBlockType] = useState('paragraph')
79
- const [isLink, setIsLink] = useState(false)
80
- const [isUnderline, setIsUnderline] = useState(false)
81
- const [color, setColor] = useState(defaultColor)
82
-
83
- const colorMenuRef = useRef(false)
84
-
85
- const formatBulletList = () => {
86
- if (blockType !== 'ul') {
87
- editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND)
88
- } else {
89
- editor.dispatchCommand(REMOVE_LIST_COMMAND)
90
- }
91
- }
92
-
93
- const formatNumberedList = () => {
94
- if (blockType !== 'ol') {
95
- editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND)
96
- } else {
97
- editor.dispatchCommand(REMOVE_LIST_COMMAND)
98
- }
99
- }
100
-
101
- const formatLink = useCallback(() => {
102
- if (!isLink) {
103
- // eslint-disable-next-line no-alert
104
- const path = prompt('Enter the full URL. Ex: https://www.example.com')
105
- editor.dispatchCommand(TOGGLE_LINK_COMMAND, path)
106
- } else {
107
- editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)
108
- }
109
- }, [editor, isLink])
110
-
111
- const updateToolbar = useCallback(() => {
112
- const selection = $getSelection()
113
-
114
- // Check list selection
115
- if ($isRangeSelection(selection)) {
116
- const anchorNode = selection.anchor.getNode()
117
- const element = anchorNode.getKey() === 'root'
118
- ? anchorNode
119
- : anchorNode.getTopLevelElementOrThrow()
120
- if ($isListNode(element)) {
121
- const parentList = $getNearestNodeOfType(anchorNode, ListNode)
122
- const type = parentList ? parentList.getTag() : element.getTag()
123
- setBlockType(type)
124
- } else {
125
- setBlockType(element)
126
- }
127
-
128
- // Check nodes for color
129
- const nodes = selection.getNodes().filter((node) => node.getType() === 'text')
130
- nodes.forEach((node) => {
131
- const style = node.getStyle()
132
- const colorProperty = style.match(/color: ([^;]+)/)
133
- if (colorProperty) {
134
- setColor(colorProperty[1])
135
- return
136
- }
137
- setColor(false)
138
- })
139
-
140
- // Check selection text styles
141
- setIsBold(selection.hasFormat('bold'))
142
- setIsItalic(selection.hasFormat('italic'))
143
- setIsStrikethrough(selection.hasFormat('strikethrough'))
144
- setIsUnderline(selection.hasFormat('underline'))
145
- setIsLink(selection.hasFormat('link'))
146
-
147
- // Check links
148
- const node = getSelectedNode(selection)
149
- const parent = node.getParent()
150
- if ($isLinkNode(parent) || $isLinkNode(node)) {
151
- setIsLink(true)
152
- } else {
153
- setIsLink(false)
154
- }
155
- }
156
- }, [editor])
157
-
158
- const UPDATE_COLOR_COMMAND = createCommand()
159
-
160
- editor.registerCommand(UPDATE_COLOR_COMMAND, (payload) => {
161
- const selection = $getSelection()
162
- const nodes = selection?.extract().filter((node) => node.getType() === 'text')
163
- nodes?.forEach((node) => {
164
- const style = node.getStyle()
165
- const colorProperty = style?.match(/color: ([^;]+)/)
166
- if (colorProperty && color !== payload) {
167
- node.setStyle(style.replace(colorProperty[0], `color: ${payload}`))
168
- } else if (colorProperty) {
169
- node.setStyle(`color: ${defaultColor}`)
170
- } else {
171
- node.setStyle(`color: ${payload}`)
172
- }
173
- })
174
- }, COMMAND_PRIORITY_NORMAL)
175
-
176
- useEffect(() => mergeRegister(
177
- editor.registerUpdateListener(({ editorState }) => {
178
- editorState.read(() => {
179
- updateToolbar()
180
- })
181
- }),
182
- ), [updateToolbar, editor])
183
-
184
- const dispatchUpdateColor = useCallback((e, payload) => {
185
- e.stopPropagation()
186
- editor.dispatchCommand(UPDATE_COLOR_COMMAND, payload)
187
- }, [editor])
188
-
189
- return (
190
- <div className={`${baseClassName} ${componentClassName}`}>
191
- <div className="group">
192
- <button
193
- type="button"
194
- className={isBold ? 'active' : undefined}
195
- onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')}
196
- >
197
- <span className="icon">
198
- |
199
- </span>
200
- </button>
201
- <button
202
- type="button"
203
- className={isItalic ? 'active' : undefined}
204
- onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')}
205
- >
206
- <span className="icon">
207
- &#125;
208
- </span>
209
- </button>
210
- <button
211
- type="button"
212
- className={isUnderline ? 'active' : undefined}
213
- onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline')}
214
- >
215
- <span className="icon">
216
- ~
217
- </span>
218
- </button>
219
- <button
220
- type="button"
221
- className={isStrikethrough ? 'active' : undefined}
222
- onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')}
223
- >
224
- <span className="icon">
225
- ?
226
- </span>
227
- </button>
228
- <button
229
- type="button"
230
- className={color && color !== defaultColor ? 'active color-menu-button' : 'color-menu-button'}
231
- onClick={() => editor.dispatchCommand(UPDATE_COLOR_COMMAND,
232
- color !== defaultColor ? defaultColor : color)}
233
- ref={colorMenuRef}
234
- style={{ position: 'relative' }}
235
- >
236
- <span
237
- className="icon"
238
- style={{
239
- color,
240
- }}
241
- >
242
- Q
243
- </span>
244
- <Popover
245
- parentRef={colorMenuRef}
246
- >
247
- <div className="color-menu">
248
- {
249
- colorOptions.map((option) => (
250
- <span
251
- role="button"
252
- className="icon color-option"
253
- style={{
254
- color:option,
255
- }}
256
- onClick={(e) => dispatchUpdateColor(e, option)}
257
- onKeyDown={(e) => dispatchUpdateColor(e, option)}
258
- tabIndex={0}
259
- key={option}
260
- >
261
- o
262
- </span>
263
- ))
264
- }
265
- </div>
266
- </Popover>
267
- </button>
268
-
269
- <button
270
- type="button"
271
- className={isLink ? 'active' : undefined}
272
- onClick={() => formatLink()}
273
- >
274
- <span className="icon">
275
- &#93;
276
- </span>
277
- </button>
278
- <button
279
- type="button"
280
- className={blockType === 'ul' ? 'active' : undefined}
281
- onClick={() => formatBulletList()}
282
- >
283
- <span className="icon">
284
- .
285
- </span>
286
- </button>
287
- <button
288
- type="button"
289
- className={blockType === 'ol' ? 'active' : undefined}
290
- onClick={() => formatNumberedList()}
291
- >
292
- <span className="icon">
293
- -
294
- </span>
295
- </button>
296
- </div>
297
-
298
- <div className="group">
299
- <button
300
- type="button"
301
- onClick={() => editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'left')}
302
- >
303
- <span className="icon">
304
- ^
305
- </span>
306
- </button>
307
- <button
308
- type="button"
309
- onClick={() => editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center')}
310
- >
311
- <span className="icon">
312
- _
313
- </span>
314
- </button>
315
- <button
316
- type="button"
317
- onClick={() => editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'right')}
318
- >
319
- <span className="icon">
320
- `
321
- </span>
322
- </button>
323
- <button
324
- type="button"
325
- onClick={() => editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'justify')}
326
- >
327
- <span className="icon">
328
- &#123;
329
- </span>
330
- </button>
331
- </div>
332
-
333
- <div className="group">
334
- <button
335
- type="button"
336
- onClick={() => editor.dispatchCommand(UNDO_COMMAND)}
337
- >
338
- <span className="icon">
339
- \
340
- </span>
341
- </button>
342
- <button
343
- type="button"
344
- className="flip"
345
- onClick={() => editor.dispatchCommand(REDO_COMMAND)}
346
- >
347
- <span className="icon">
348
- \
349
- </span>
350
- </button>
351
- </div>
352
- </div>
353
- )
354
- }
355
-
356
- export default Toolbar
@@ -1,16 +0,0 @@
1
- import React from 'react'
2
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
3
- import { TreeView } from '@lexical/react/LexicalTreeView'
4
-
5
- const TreeViewPlugin = () => {
6
- const [editor] = useLexicalComposerContext()
7
-
8
- return (
9
- <TreeView
10
- viewClassName="tree-view-output"
11
- editor={editor}
12
- />
13
- )
14
- }
15
-
16
- export default TreeViewPlugin
@@ -1,2 +0,0 @@
1
- export { default as Toolbar } from './Toolbar'
2
- export { default as TreeViewPlugin } from './TreeViewPlugin'
@@ -1,2 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- export { default as EditorInput } from './EditorInput'