@pareto-engineering/design-system 4.0.0-alpha.4 → 4.0.0-alpha.42

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 (398) hide show
  1. package/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +90 -0
  2. package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
  3. package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
  4. package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +60 -0
  5. package/dist/cjs/a/AnimatedGradient/index.js +13 -0
  6. package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
  7. package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
  8. package/dist/cjs/a/AppContext/ContextProvider.js +0 -2
  9. package/dist/cjs/a/AppContext/useTheme.js +0 -4
  10. package/dist/cjs/a/BlurOverlay/BlurOverlay.js +59 -0
  11. package/dist/cjs/a/BlurOverlay/index.js +13 -0
  12. package/dist/cjs/a/BlurOverlay/styles.scss +31 -0
  13. package/dist/cjs/a/ContentTree/ContentTree.js +11 -5
  14. package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -5
  15. package/dist/cjs/a/ContentTree/styles.scss +34 -11
  16. package/dist/cjs/a/Conversation/Conversation.js +12 -17
  17. package/dist/cjs/a/Conversation/common/Message/Message.js +15 -12
  18. package/dist/cjs/a/Conversation/styles.scss +56 -124
  19. package/dist/cjs/a/DotInfo/DotInfo.js +2 -2
  20. package/dist/cjs/a/Figure/Figure.js +2 -2
  21. package/dist/cjs/a/HamburgerButton/HamburgerButton.js +2 -2
  22. package/dist/cjs/a/IconList/IconList.js +2 -2
  23. package/dist/cjs/a/IconList/common/Item/Item.js +1 -1
  24. package/dist/cjs/a/Label/Label.js +14 -6
  25. package/dist/cjs/a/Label/styles.scss +4 -4
  26. package/dist/cjs/a/LoadingCircle/LoadingCircle.js +2 -2
  27. package/dist/cjs/a/MetaCard/MetaCard.js +65 -0
  28. package/dist/cjs/a/MetaCard/index.js +13 -0
  29. package/dist/cjs/a/MetaCard/styles.scss +45 -0
  30. package/dist/cjs/a/People/People.js +2 -2
  31. package/dist/cjs/a/People/common/Person/Person.js +5 -5
  32. package/dist/cjs/a/People/styles.scss +10 -4
  33. package/dist/cjs/a/Popover/Popover.js +4 -4
  34. package/dist/cjs/a/Popover/styles.scss +1 -1
  35. package/dist/cjs/a/ProgressBar/ProgressBar.js +2 -2
  36. package/dist/cjs/a/Quote/Quote.js +2 -2
  37. package/dist/cjs/a/SVG/SVG.js +2 -2
  38. package/dist/cjs/a/SnapScroller/SnapScroller.js +2 -2
  39. package/dist/cjs/a/SnapScroller/styles.scss +30 -9
  40. package/dist/cjs/a/Spinner/Spinner.js +2 -2
  41. package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
  42. package/dist/cjs/a/TextSteps/index.js +13 -0
  43. package/dist/cjs/a/TextSteps/styles.scss +29 -0
  44. package/dist/cjs/a/Timestamp/Timestamp.js +2 -2
  45. package/dist/cjs/a/Tip/Tip.js +72 -0
  46. package/dist/cjs/a/Tip/index.js +13 -0
  47. package/dist/cjs/a/Tip/styles.scss +22 -0
  48. package/dist/cjs/a/index.js +43 -1
  49. package/dist/cjs/b/Button/Button.js +21 -8
  50. package/dist/cjs/b/Button/common/Group/Group.js +57 -0
  51. package/dist/cjs/b/Button/common/Group/index.js +13 -0
  52. package/dist/cjs/b/Button/common/Group/styles.scss +11 -0
  53. package/dist/cjs/b/Button/common/index.js +12 -0
  54. package/dist/cjs/b/Button/styles.scss +38 -8
  55. package/dist/cjs/b/Card/Card.js +74 -0
  56. package/dist/cjs/b/Card/common/Group/Group.js +73 -0
  57. package/dist/cjs/b/Card/common/Group/index.js +13 -0
  58. package/dist/cjs/b/Card/common/Group/styles.scss +38 -0
  59. package/dist/cjs/b/Card/common/Section/Section.js +59 -0
  60. package/dist/cjs/b/Card/common/Section/index.js +13 -0
  61. package/dist/cjs/b/Card/common/index.js +19 -0
  62. package/dist/cjs/b/Card/index.js +13 -0
  63. package/dist/cjs/b/Card/styles.scss +57 -0
  64. package/dist/cjs/b/Logo/Logo.js +2 -2
  65. package/dist/cjs/b/Page/Page.js +16 -6
  66. package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +4 -2
  67. package/dist/cjs/b/Page/common/Section/Section.js +13 -3
  68. package/dist/cjs/b/Page/styles.scss +25 -4
  69. package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +2 -2
  70. package/dist/cjs/b/SocialMediaButton/styles.scss +1 -15
  71. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +19 -31
  72. package/dist/cjs/b/ThemeSelector/styles.scss +2 -7
  73. package/dist/cjs/b/Title/Title.js +5 -3
  74. package/dist/cjs/b/index.js +8 -1
  75. package/dist/cjs/c/ContentSlides/ContentSlides.js +3 -3
  76. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -3
  77. package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +0 -2
  78. package/dist/cjs/c/ContentSlides/styles.scss +2 -2
  79. package/dist/cjs/c/Modal/Modal.js +3 -3
  80. package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
  81. package/dist/cjs/c/Modal/styles.scss +9 -13
  82. package/dist/cjs/c/Shortener/Shortener.js +2 -2
  83. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
  84. package/dist/cjs/f/FormInput/FormInput.js +14 -4
  85. package/dist/cjs/f/common/Debugger/Debugger.js +2 -2
  86. package/dist/cjs/f/common/Description/Description.js +2 -2
  87. package/dist/cjs/f/common/InputWrapper/InputWrapper.js +74 -0
  88. package/dist/cjs/f/common/InputWrapper/index.js +13 -0
  89. package/dist/cjs/f/common/InputWrapper/styles.scss +13 -0
  90. package/dist/cjs/f/common/Label/Label.js +20 -6
  91. package/dist/cjs/f/common/Label/styles.scss +8 -2
  92. package/dist/cjs/f/common/index.js +8 -1
  93. package/dist/cjs/f/fields/Checkbox/Checkbox.js +42 -12
  94. package/dist/cjs/f/fields/Checkbox/styles.scss +6 -8
  95. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +57 -26
  96. package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +2 -2
  97. package/dist/cjs/f/fields/ChoicesInput/styles.scss +52 -43
  98. package/dist/cjs/f/fields/EditorInput/EditorInput.js +223 -0
  99. package/dist/cjs/f/fields/EditorInput/common/Toolbar.js +193 -0
  100. package/dist/cjs/f/fields/EditorInput/common/TreeViewPlugin.js +19 -0
  101. package/dist/cjs/f/fields/EditorInput/common/index.js +20 -0
  102. package/dist/cjs/f/fields/EditorInput/index.js +13 -0
  103. package/dist/cjs/f/fields/EditorInput/styles.scss +121 -0
  104. package/dist/cjs/f/fields/LinkInput/LinkInput.js +164 -0
  105. package/dist/cjs/f/fields/LinkInput/index.js +13 -0
  106. package/dist/cjs/f/fields/LinkInput/styles.scss +89 -0
  107. package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +27 -3
  108. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +37 -7
  109. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +44 -17
  110. package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +1 -1
  111. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +36 -26
  112. package/dist/cjs/f/fields/QueryCombobox/styles.scss +64 -29
  113. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +17 -3
  114. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +43 -21
  115. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +5 -5
  116. package/dist/cjs/f/fields/RatingsInput/styles.scss +6 -13
  117. package/dist/cjs/f/fields/SelectInput/SelectInput.js +47 -17
  118. package/dist/cjs/f/fields/SelectInput/styles.scss +60 -26
  119. package/dist/cjs/f/fields/TextInput/TextInput.js +50 -17
  120. package/dist/cjs/f/fields/TextInput/styles.scss +56 -20
  121. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +45 -24
  122. package/dist/cjs/f/fields/TextareaInput/styles.scss +42 -25
  123. package/dist/cjs/f/fields/index.js +15 -1
  124. package/dist/cjs/form.scss +1 -1
  125. package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +1 -1
  126. package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +1 -1
  127. package/dist/cjs/test/QueryLoader/QueryLoader.js +2 -0
  128. package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
  129. package/dist/es/a/AnimatedBlobs/index.js +1 -0
  130. package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
  131. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +52 -0
  132. package/dist/es/a/AnimatedGradient/index.js +1 -0
  133. package/dist/es/a/AnimatedGradient/styles.scss +14 -0
  134. package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
  135. package/dist/es/a/AppContext/useTheme.js +0 -4
  136. package/dist/es/a/BlurOverlay/BlurOverlay.js +51 -0
  137. package/dist/es/a/BlurOverlay/index.js +2 -0
  138. package/dist/es/a/BlurOverlay/styles.scss +31 -0
  139. package/dist/es/a/ContentTree/ContentTree.js +11 -5
  140. package/dist/es/a/ContentTree/common/Tree/Tree.js +12 -5
  141. package/dist/es/a/ContentTree/styles.scss +34 -11
  142. package/dist/es/a/Conversation/Conversation.js +12 -17
  143. package/dist/es/a/Conversation/common/Message/Message.js +15 -12
  144. package/dist/es/a/Conversation/styles.scss +56 -124
  145. package/dist/es/a/DotInfo/DotInfo.js +2 -2
  146. package/dist/es/a/Figure/Figure.js +2 -2
  147. package/dist/es/a/HamburgerButton/HamburgerButton.js +2 -2
  148. package/dist/es/a/IconList/IconList.js +2 -2
  149. package/dist/es/a/Label/Label.js +14 -6
  150. package/dist/es/a/Label/styles.scss +4 -4
  151. package/dist/es/a/LoadingCircle/LoadingCircle.js +2 -2
  152. package/dist/es/a/MetaCard/MetaCard.js +57 -0
  153. package/dist/es/a/MetaCard/index.js +1 -0
  154. package/dist/es/a/MetaCard/styles.scss +45 -0
  155. package/dist/es/a/People/People.js +2 -2
  156. package/dist/es/a/People/common/Person/Person.js +5 -5
  157. package/dist/es/a/People/styles.scss +10 -4
  158. package/dist/es/a/Popover/Popover.js +4 -4
  159. package/dist/es/a/Popover/styles.scss +1 -1
  160. package/dist/es/a/ProgressBar/ProgressBar.js +2 -2
  161. package/dist/es/a/Quote/Quote.js +2 -2
  162. package/dist/es/a/SVG/SVG.js +2 -2
  163. package/dist/es/a/SnapScroller/SnapScroller.js +2 -2
  164. package/dist/es/a/SnapScroller/styles.scss +30 -9
  165. package/dist/es/a/Spinner/Spinner.js +2 -2
  166. package/dist/es/a/TextSteps/TextSteps.js +61 -0
  167. package/dist/es/a/TextSteps/index.js +1 -0
  168. package/dist/es/a/TextSteps/styles.scss +29 -0
  169. package/dist/es/a/Timestamp/Timestamp.js +2 -2
  170. package/dist/es/a/Tip/Tip.js +64 -0
  171. package/dist/es/a/Tip/index.js +2 -0
  172. package/dist/es/a/Tip/styles.scss +22 -0
  173. package/dist/es/a/index.js +7 -1
  174. package/dist/es/b/Button/Button.js +21 -7
  175. package/dist/es/b/Button/common/Group/Group.js +49 -0
  176. package/dist/es/b/Button/common/Group/index.js +1 -0
  177. package/dist/es/b/Button/common/Group/styles.scss +11 -0
  178. package/dist/es/b/Button/common/index.js +1 -0
  179. package/dist/es/b/Button/styles.scss +38 -8
  180. package/dist/es/b/Card/Card.js +66 -0
  181. package/dist/es/b/Card/common/Group/Group.js +65 -0
  182. package/dist/es/b/Card/common/Group/index.js +1 -0
  183. package/dist/es/b/Card/common/Group/styles.scss +38 -0
  184. package/dist/es/b/Card/common/Section/Section.js +48 -0
  185. package/dist/es/b/Card/common/Section/index.js +1 -0
  186. package/dist/es/b/Card/common/index.js +2 -0
  187. package/dist/es/b/Card/index.js +1 -0
  188. package/dist/es/b/Card/styles.scss +57 -0
  189. package/dist/es/b/Logo/Logo.js +2 -2
  190. package/dist/es/b/Page/Page.js +16 -5
  191. package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +4 -2
  192. package/dist/es/b/Page/common/Section/Section.js +12 -2
  193. package/dist/es/b/Page/styles.scss +25 -4
  194. package/dist/es/b/SocialMediaButton/SocialMediaButton.js +2 -2
  195. package/dist/es/b/SocialMediaButton/styles.scss +1 -15
  196. package/dist/es/b/ThemeSelector/ThemeSelector.js +19 -32
  197. package/dist/es/b/ThemeSelector/styles.scss +2 -7
  198. package/dist/es/b/Title/Title.js +18 -12
  199. package/dist/es/b/index.js +2 -1
  200. package/dist/es/c/ContentSlides/ContentSlides.js +3 -3
  201. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  202. package/dist/es/c/ContentSlides/styles.scss +2 -2
  203. package/dist/es/c/Modal/Modal.js +3 -3
  204. package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +1 -1
  205. package/dist/es/c/Modal/styles.scss +9 -13
  206. package/dist/es/c/Shortener/Shortener.js +2 -2
  207. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
  208. package/dist/es/f/FormInput/FormInput.js +15 -3
  209. package/dist/es/f/common/Debugger/Debugger.js +2 -2
  210. package/dist/es/f/common/Description/Description.js +2 -2
  211. package/dist/es/f/common/InputWrapper/InputWrapper.js +66 -0
  212. package/dist/es/f/common/InputWrapper/index.js +2 -0
  213. package/dist/es/f/common/InputWrapper/styles.scss +13 -0
  214. package/dist/es/f/common/Label/Label.js +20 -6
  215. package/dist/es/f/common/Label/styles.scss +8 -2
  216. package/dist/es/f/common/index.js +2 -1
  217. package/dist/es/f/fields/Checkbox/Checkbox.js +43 -13
  218. package/dist/es/f/fields/Checkbox/styles.scss +6 -8
  219. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +58 -27
  220. package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +1 -1
  221. package/dist/es/f/fields/ChoicesInput/styles.scss +52 -43
  222. package/dist/es/f/fields/EditorInput/EditorInput.js +218 -0
  223. package/dist/es/f/fields/EditorInput/common/Toolbar.js +182 -0
  224. package/dist/es/f/fields/EditorInput/common/TreeViewPlugin.js +11 -0
  225. package/dist/es/f/fields/EditorInput/common/index.js +2 -0
  226. package/dist/es/f/fields/EditorInput/index.js +2 -0
  227. package/dist/es/f/fields/EditorInput/styles.scss +121 -0
  228. package/dist/es/f/fields/LinkInput/LinkInput.js +156 -0
  229. package/dist/es/f/fields/LinkInput/index.js +2 -0
  230. package/dist/es/f/fields/LinkInput/styles.scss +89 -0
  231. package/dist/es/f/fields/QueryChoices/QueryChoices.js +26 -2
  232. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +37 -7
  233. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +43 -16
  234. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +35 -25
  235. package/dist/es/f/fields/QueryCombobox/styles.scss +64 -29
  236. package/dist/es/f/fields/QuerySelect/QuerySelect.js +17 -3
  237. package/dist/es/f/fields/RatingsInput/RatingsInput.js +44 -22
  238. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +4 -4
  239. package/dist/es/f/fields/RatingsInput/styles.scss +6 -13
  240. package/dist/es/f/fields/SelectInput/SelectInput.js +48 -18
  241. package/dist/es/f/fields/SelectInput/styles.scss +60 -26
  242. package/dist/es/f/fields/TextInput/TextInput.js +51 -18
  243. package/dist/es/f/fields/TextInput/styles.scss +56 -20
  244. package/dist/es/f/fields/TextareaInput/TextareaInput.js +46 -25
  245. package/dist/es/f/fields/TextareaInput/styles.scss +42 -25
  246. package/dist/es/f/fields/index.js +3 -1
  247. package/dist/es/form.scss +1 -1
  248. package/package.json +19 -16
  249. package/src/stories/a/BlurOverlay.stories.jsx +39 -0
  250. package/src/stories/a/Conversation.stories.jsx +11 -42
  251. package/src/stories/a/MetaCard.stories.jsx +35 -0
  252. package/src/stories/a/People.stories.jsx +22 -2
  253. package/src/stories/a/Quote.stories.jsx +1 -1
  254. package/src/stories/a/SnapScroller.stories.jsx +2 -2
  255. package/src/stories/a/Spinner.stories.jsx +1 -1
  256. package/src/stories/a/TextSteps.stories.jsx +19 -0
  257. package/src/stories/a/Tip.stories.jsx +28 -0
  258. package/src/stories/b/{Button.stories.jsx → Button/Button.stories.jsx} +18 -0
  259. package/src/stories/b/Button/Group.stories.jsx +35 -0
  260. package/src/stories/b/Card/Card.stories.jsx +59 -0
  261. package/src/stories/b/Card/Group.stories.jsx +59 -0
  262. package/src/stories/b/Page.stories.jsx +19 -3
  263. package/src/stories/b/ThemeSelector.stories.jsx +1 -1
  264. package/src/stories/b/Title.stories.jsx +1 -1
  265. package/src/stories/c/ContentSlides.stories.jsx +1 -1
  266. package/src/stories/colors.js +22 -10
  267. package/src/stories/f/Checkbox.stories.jsx +22 -7
  268. package/src/stories/f/ChoicesInput.stories.jsx +21 -7
  269. package/src/stories/f/EditorInput.stories.jsx +88 -0
  270. package/src/stories/f/LinkInput.stories.jsx +100 -0
  271. package/src/stories/f/QueryChoices.stories.jsx +20 -4
  272. package/src/stories/f/QueryCombobox.stories.jsx +25 -13
  273. package/src/stories/f/QuerySelect.stories.jsx +20 -5
  274. package/src/stories/f/RatingsInput.stories.jsx +16 -2
  275. package/src/stories/f/SelectInput.stories.jsx +27 -5
  276. package/src/stories/f/TextInput.stories.jsx +33 -12
  277. package/src/stories/f/TextareaInput.stories.jsx +16 -2
  278. package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
  279. package/src/ui/a/AnimatedBlobs/index.js +1 -0
  280. package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
  281. package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +73 -0
  282. package/src/ui/a/AnimatedGradient/index.js +1 -0
  283. package/src/ui/a/AnimatedGradient/styles.scss +14 -0
  284. package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
  285. package/src/ui/a/AppContext/useTheme.js +0 -4
  286. package/src/ui/a/BlurOverlay/BlurOverlay.jsx +75 -0
  287. package/src/ui/a/BlurOverlay/index.js +2 -0
  288. package/src/ui/a/BlurOverlay/styles.scss +31 -0
  289. package/src/ui/a/ContentTree/ContentTree.jsx +10 -6
  290. package/src/ui/a/ContentTree/common/Tree/Tree.jsx +19 -7
  291. package/src/ui/a/ContentTree/styles.scss +34 -11
  292. package/src/ui/a/Conversation/Conversation.jsx +16 -20
  293. package/src/ui/a/Conversation/common/Message/Message.jsx +18 -11
  294. package/src/ui/a/Conversation/styles.scss +56 -124
  295. package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
  296. package/src/ui/a/Figure/Figure.jsx +2 -2
  297. package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
  298. package/src/ui/a/IconList/IconList.jsx +2 -2
  299. package/src/ui/a/Label/Label.jsx +13 -4
  300. package/src/ui/a/Label/styles.scss +4 -4
  301. package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
  302. package/src/ui/a/MetaCard/MetaCard.jsx +81 -0
  303. package/src/ui/a/MetaCard/index.js +1 -0
  304. package/src/ui/a/MetaCard/styles.scss +45 -0
  305. package/src/ui/a/People/People.jsx +2 -2
  306. package/src/ui/a/People/common/Person/Person.jsx +5 -5
  307. package/src/ui/a/People/styles.scss +10 -4
  308. package/src/ui/a/Popover/Popover.jsx +4 -4
  309. package/src/ui/a/Popover/styles.scss +1 -1
  310. package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
  311. package/src/ui/a/Quote/Quote.jsx +2 -2
  312. package/src/ui/a/SVG/SVG.jsx +2 -2
  313. package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
  314. package/src/ui/a/SnapScroller/styles.scss +30 -9
  315. package/src/ui/a/Spinner/Spinner.jsx +2 -2
  316. package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
  317. package/src/ui/a/TextSteps/index.js +1 -0
  318. package/src/ui/a/TextSteps/styles.scss +29 -0
  319. package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
  320. package/src/ui/a/Tip/Tip.jsx +88 -0
  321. package/src/ui/a/Tip/index.js +2 -0
  322. package/src/ui/a/Tip/styles.scss +22 -0
  323. package/src/ui/a/index.js +6 -0
  324. package/src/ui/b/Button/Button.jsx +26 -7
  325. package/src/ui/b/Button/common/Group/Group.jsx +71 -0
  326. package/src/ui/b/Button/common/Group/index.js +1 -0
  327. package/src/ui/b/Button/common/Group/styles.scss +11 -0
  328. package/src/ui/b/Button/common/index.js +1 -0
  329. package/src/ui/b/Button/styles.scss +38 -8
  330. package/src/ui/b/Card/Card.jsx +94 -0
  331. package/src/ui/b/Card/common/Group/Group.jsx +91 -0
  332. package/src/ui/b/Card/common/Group/index.js +1 -0
  333. package/src/ui/b/Card/common/Group/styles.scss +38 -0
  334. package/src/ui/b/Card/common/Section/Section.jsx +70 -0
  335. package/src/ui/b/Card/common/Section/index.js +1 -0
  336. package/src/ui/b/Card/common/index.js +2 -0
  337. package/src/ui/b/Card/index.js +1 -0
  338. package/src/ui/b/Card/styles.scss +57 -0
  339. package/src/ui/b/Logo/Logo.jsx +2 -2
  340. package/src/ui/b/Page/Page.jsx +13 -3
  341. package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -3
  342. package/src/ui/b/Page/common/Section/Section.jsx +16 -1
  343. package/src/ui/b/Page/styles.scss +25 -4
  344. package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
  345. package/src/ui/b/SocialMediaButton/styles.scss +1 -15
  346. package/src/ui/b/ThemeSelector/ThemeSelector.jsx +12 -30
  347. package/src/ui/b/ThemeSelector/styles.scss +2 -7
  348. package/src/ui/b/Title/Title.jsx +30 -23
  349. package/src/ui/b/index.js +1 -0
  350. package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
  351. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
  352. package/src/ui/c/ContentSlides/styles.scss +2 -2
  353. package/src/ui/c/Modal/Modal.jsx +3 -3
  354. package/src/ui/c/Modal/common/ModalHeader/ModalHeader.jsx +1 -1
  355. package/src/ui/c/Modal/styles.scss +9 -13
  356. package/src/ui/c/Shortener/Shortener.jsx +2 -2
  357. package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
  358. package/src/ui/f/FormInput/FormInput.jsx +25 -2
  359. package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
  360. package/src/ui/f/common/Description/Description.jsx +2 -2
  361. package/src/ui/f/common/InputWrapper/InputWrapper.jsx +89 -0
  362. package/src/ui/f/common/InputWrapper/index.js +2 -0
  363. package/src/ui/f/common/InputWrapper/styles.scss +13 -0
  364. package/src/ui/f/common/Label/Label.jsx +20 -4
  365. package/src/ui/f/common/Label/styles.scss +8 -2
  366. package/src/ui/f/common/index.js +1 -0
  367. package/src/ui/f/fields/Checkbox/Checkbox.jsx +67 -29
  368. package/src/ui/f/fields/Checkbox/styles.scss +6 -8
  369. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +85 -50
  370. package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +10 -3
  371. package/src/ui/f/fields/ChoicesInput/styles.scss +52 -43
  372. package/src/ui/f/fields/EditorInput/EditorInput.jsx +273 -0
  373. package/src/ui/f/fields/EditorInput/common/Toolbar.jsx +254 -0
  374. package/src/ui/f/fields/EditorInput/common/TreeViewPlugin.jsx +16 -0
  375. package/src/ui/f/fields/EditorInput/common/index.jsx +2 -0
  376. package/src/ui/f/fields/EditorInput/index.js +2 -0
  377. package/src/ui/f/fields/EditorInput/styles.scss +121 -0
  378. package/src/ui/f/fields/LinkInput/LinkInput.jsx +197 -0
  379. package/src/ui/f/fields/LinkInput/index.js +2 -0
  380. package/src/ui/f/fields/LinkInput/styles.scss +89 -0
  381. package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +28 -0
  382. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +39 -4
  383. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +68 -38
  384. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +81 -66
  385. package/src/ui/f/fields/QueryCombobox/styles.scss +64 -29
  386. package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +16 -1
  387. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +57 -30
  388. package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +4 -4
  389. package/src/ui/f/fields/RatingsInput/styles.scss +6 -13
  390. package/src/ui/f/fields/SelectInput/SelectInput.jsx +90 -51
  391. package/src/ui/f/fields/SelectInput/styles.scss +60 -26
  392. package/src/ui/f/fields/TextInput/TextInput.jsx +71 -35
  393. package/src/ui/f/fields/TextInput/styles.scss +56 -20
  394. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +67 -45
  395. package/src/ui/f/fields/TextareaInput/styles.scss +42 -25
  396. package/src/ui/f/fields/index.js +2 -0
  397. package/src/ui/form.scss +1 -1
  398. package/tests/__snapshots__/Storyshots.test.js.snap +14551 -6190
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useCallback } from 'react';
3
+ import { useInsertionEffect, useCallback } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
  import { useApp } from "../../a";
@@ -17,31 +17,33 @@ const ThemeSelector = ({
17
17
  id,
18
18
  className: userClassName,
19
19
  style,
20
- // children
21
-
22
- themes,
23
- iconMap
20
+ themes
24
21
  }) => {
25
22
  const {
26
23
  userTheme,
27
24
  setPreferredTheme
28
25
  } = useApp();
29
- useLayoutEffect(() => {
26
+ useInsertionEffect(() => {
30
27
  import("./styles.scss");
31
28
  }, []);
32
29
  const loopThemes = useCallback(() => {
33
30
  const current = themes.indexOf(userTheme);
34
31
  setPreferredTheme(themes[(current + 1) % themes.length]);
35
32
  }, [userTheme]);
36
- return /*#__PURE__*/React.createElement("button", {
37
- type: "button",
38
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
39
- id: id,
40
- style: style,
41
- onClick: loopThemes
42
- }, /*#__PURE__*/React.createElement("span", {
43
- className: "v0 m-v icon"
44
- }, iconMap[userTheme]), /*#__PURE__*/React.createElement("span", null, userTheme));
33
+ const current = userTheme ? themes.indexOf(userTheme) : 0;
34
+ const nextTheme = themes[(current + 1) % themes.length];
35
+ const themeText = nextTheme && nextTheme.charAt(0).toUpperCase() + nextTheme.slice(1);
36
+ return (
37
+ /*#__PURE__*/
38
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
39
+ React.createElement("a", {
40
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
41
+ id: id,
42
+ style: style,
43
+ onClick: loopThemes,
44
+ onKeyDown: loopThemes
45
+ }, themeText)
46
+ );
45
47
  };
46
48
  ThemeSelector.propTypes = {
47
49
  /**
@@ -56,27 +58,12 @@ ThemeSelector.propTypes = {
56
58
  * The React-written, css properties for this element.
57
59
  */
58
60
  style: PropTypes.objectOf(PropTypes.string),
59
- /**
60
- * The children JSX
61
- */
62
- // children: PropTypes.node,
63
-
64
61
  /**
65
62
  * The themes and the order in which they appear
66
63
  */
67
- themes: PropTypes.arrayOf(PropTypes.string),
68
- /**
69
- * A map of the theme names with the icons that represent them. Uses the default font icon.
70
- */
71
- iconMap: PropTypes.objectOf(PropTypes.string)
64
+ themes: PropTypes.arrayOf(PropTypes.string)
72
65
  };
73
66
  ThemeSelector.defaultProps = {
74
- themes: ['light', 'dark'],
75
- iconMap: {
76
- dark: 'n',
77
- // sun,
78
- light: 'm' // moon,
79
- }
67
+ themes: ['light', 'dark']
80
68
  };
81
-
82
69
  export default ThemeSelector;
@@ -2,13 +2,8 @@
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
4
 
5
- $default-color:var(--x, var(--contrast));
6
-
7
5
  .#{bem.$base}.theme-selector {
8
- background: transparent;
9
- border: none;
10
- color: $default-color;
11
6
  cursor: pointer;
7
+ display: block;
8
+ text-decoration: none;
12
9
  }
13
-
14
-
@@ -1,13 +1,14 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  /* @pareto-engineering/generator-front 0.3.1 */
3
3
  import * as React from 'react';
4
+ import { useInsertionEffect } from 'react';
4
5
  import PropTypes from 'prop-types';
5
6
 
6
7
  // Package-level Imports
7
8
  import styleNames from '@pareto-engineering/bem/exports';
8
9
 
9
10
  // Component-level imports
10
- import("./styles.scss");
11
+ // import('./styles.scss')
11
12
 
12
13
  // Helper Definition
13
14
  const baseClassName = styleNames.base;
@@ -28,17 +29,22 @@ const Title = ({
28
29
  subtitleStyle,
29
30
  subtitleProps
30
31
  // ...otherProps
31
- }) => /*#__PURE__*/React.createElement("div", {
32
- id: id,
33
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
34
- style: style
35
- }, /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
36
- className: [headingClassName, styleNames.heading].filter(e => e).join(' '),
37
- style: headingStyle
38
- }, headingProps), heading), subtitle && /*#__PURE__*/React.createElement(SubtitleWrapper, _extends({
39
- className: [subtitleClassName, styleNames.subtitle].filter(e => e).join(' '),
40
- style: subtitleStyle
41
- }, subtitleProps), subtitle));
32
+ }) => {
33
+ useInsertionEffect(() => {
34
+ import("./styles.scss");
35
+ }, []);
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ id: id,
38
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
39
+ style: style
40
+ }, /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
41
+ className: [headingClassName, styleNames.heading].filter(e => e).join(' '),
42
+ style: headingStyle
43
+ }, headingProps), heading), subtitle && /*#__PURE__*/React.createElement(SubtitleWrapper, _extends({
44
+ className: [subtitleClassName, styleNames.subtitle].filter(e => e).join(' '),
45
+ style: subtitleStyle
46
+ }, subtitleProps), subtitle));
47
+ };
42
48
  Title.propTypes = {
43
49
  /**
44
50
  * The HTML id for this element
@@ -3,4 +3,5 @@ export { Logo } from "./Logo";
3
3
  export { Page } from "./Page";
4
4
  export { SocialMediaButton } from "./SocialMediaButton";
5
5
  export { ThemeSelector } from "./ThemeSelector";
6
- export { Title } from "./Title";
6
+ export { Title } from "./Title";
7
+ export { Card } from "./Card";
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useReducer } from 'react';
3
+ import { useInsertionEffect, useReducer } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useHistory } from 'react-router-dom';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
@@ -48,7 +48,7 @@ const ContentSlides = ({
48
48
  isDebug
49
49
  // ...otherProps
50
50
  }) => {
51
- useLayoutEffect(() => {
51
+ useInsertionEffect(() => {
52
52
  import("./styles.scss");
53
53
  }, []);
54
54
  const history = useHistory();
@@ -97,7 +97,7 @@ const ContentSlides = ({
97
97
  }
98
98
  });
99
99
  };
100
- useLayoutEffect(() => {
100
+ useInsertionEffect(() => {
101
101
  setCurrentStep(currentStepIndex);
102
102
  }, [currentStepIndex]);
103
103
  return /*#__PURE__*/React.createElement(ContentSlidesContext.Provider, {
@@ -53,7 +53,7 @@ const HorizontalMenu = ({
53
53
  attached: true,
54
54
  height: ".4em",
55
55
  color: color,
56
- className: "y-background1 b-hard-y"
56
+ className: "y-background-far b-hard-y"
57
57
  }), /*#__PURE__*/React.createElement("div", {
58
58
  className: styleNames.elementContent
59
59
  }, /*#__PURE__*/React.createElement("div", {
@@ -16,8 +16,8 @@ $class-navigator:navigator;
16
16
  $default-sidebar-width:minmax(250px, 330px);
17
17
  $default-border:none;//2px solid var(--grid);
18
18
  $default-border-radius:var(--theme-border-radius);
19
- $default-content-background: var(--background1);
20
- $default-padding:var(--u);
19
+ $default-content-background: var(--background-far);
20
+ $default-padding:var(--theme-default-padding);
21
21
 
22
22
  $mobile-content-margin:6em;
23
23
 
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
  import { ModalHeader } from "./common";
@@ -23,7 +23,7 @@ const Modal = ({
23
23
  close
24
24
  // ...otherProps
25
25
  }) => {
26
- useLayoutEffect(() => {
26
+ useInsertionEffect(() => {
27
27
  import("./styles.scss");
28
28
  }, []);
29
29
  return /*#__PURE__*/React.createElement("div", {
@@ -70,6 +70,6 @@ Modal.propTypes = {
70
70
  close: PropTypes.func
71
71
  };
72
72
  Modal.defaultProps = {
73
- //
73
+ color: 'heading'
74
74
  };
75
75
  export default Modal;
@@ -30,7 +30,7 @@ const ModalHeader = ({
30
30
  isCompact: true,
31
31
  className: "close-button"
32
32
  }, /*#__PURE__*/React.createElement("span", {
33
- className: "f-icons"
33
+ className: "icon"
34
34
  }, "Y")));
35
35
  ModalHeader.propTypes = {
36
36
  /**
@@ -1,15 +1,14 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
+ @use "sass:math";
4
5
 
5
- $default-background: var(--background1);
6
+ $default-background: var(--background-cards);
7
+ $default-border: var(--theme-default-border-style) var(--metadata);
6
8
  /* stylelint-disable-next-line color-named -- needed for rgba function */
7
9
  $default-box-shadow: 0 10px 20px rgba(black, .2);
8
- $default-padding: 1em / 2;
10
+ $default-padding: math.div(1em, 2);
9
11
  $default-margin: 2em;
10
- $default-max-height: 75vh;
11
- $default-max-width: 90%;
12
- $default-min-width: 20em;
13
12
 
14
13
  .#{bem.$base}.modal {
15
14
  background: $default-background;
@@ -17,22 +16,15 @@ $default-min-width: 20em;
17
16
  display: flex;
18
17
  flex-direction: column;
19
18
  left: 50%;
20
- max-height: $default-max-height;
21
- max-width: $default-max-width;
22
- min-width: $default-min-width;
23
19
  overflow: auto;
24
20
  position: absolute;
25
21
  top: 50%;
26
22
  transform: translate(-50%, -50%);
27
23
  z-index: 100;
28
24
 
29
- .modal-body {
30
- padding: $default-padding;
31
- }
32
-
33
25
  .modal-header {
34
26
  background: $default-background;
35
- border-bottom: var(--theme-border);
27
+ border-bottom: $default-border;
36
28
  display: flex;
37
29
  font-size: calc(var(--theme-heading-font-size-multiplier, 1) * var(--s1) * 1em);
38
30
  justify-content: space-between;
@@ -44,5 +36,9 @@ $default-min-width: 20em;
44
36
  margin: 0;
45
37
  padding: $default-padding;
46
38
  }
39
+
40
+ .close-button {
41
+ display: block;
42
+ }
47
43
  }
48
44
  }
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useState } from 'react';
3
+ import { useInsertionEffect, useState } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -24,7 +24,7 @@ const Shortener = ({
24
24
  separator,
25
25
  countLetters
26
26
  }) => {
27
- useLayoutEffect(() => {
27
+ useInsertionEffect(() => {
28
28
  import("./styles.scss");
29
29
  }, []);
30
30
  const [displayFull, setDisplayFull] = useState(false);
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -21,7 +21,7 @@ const SocialMediaShareButton = ({
21
21
  type,
22
22
  color
23
23
  }) => {
24
- useLayoutEffect(() => {
24
+ useInsertionEffect(() => {
25
25
  import("./styles.scss");
26
26
  }, []);
27
27
  const isServer = typeof window === 'undefined';
@@ -1,9 +1,9 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  /* @pareto-engineering/generator-front 1.0.12 */
3
3
  import * as React from 'react';
4
- import { memo, useLayoutEffect } from 'react';
4
+ import { memo, useInsertionEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices } from "../fields";
6
+ import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices, LinkInput, EditorInput } from "../fields";
7
7
 
8
8
  // Local Definitions
9
9
 
@@ -21,7 +21,7 @@ const FormInput = ({
21
21
  disabled,
22
22
  ...otherProps
23
23
  }) => {
24
- useLayoutEffect(() => {
24
+ useInsertionEffect(() => {
25
25
  import("./styles.scss");
26
26
  }, []);
27
27
  const newClassName = [className, componentClassName].filter(Boolean).join(' ');
@@ -72,6 +72,18 @@ const FormInput = ({
72
72
  disabled: disabled
73
73
  }, otherProps));
74
74
  }
75
+ if (type === 'link') {
76
+ return /*#__PURE__*/React.createElement(LinkInput, _extends({
77
+ className: newClassName,
78
+ disabled: disabled
79
+ }, otherProps));
80
+ }
81
+ if (type === 'editor') {
82
+ return /*#__PURE__*/React.createElement(EditorInput, _extends({
83
+ className: newClassName,
84
+ disabled: disabled
85
+ }, otherProps));
86
+ }
75
87
  if (extraTypes?.[type]) {
76
88
  const Component = extraTypes[type];
77
89
  return /*#__PURE__*/React.createElement(Component, _extends({
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useState, useLayoutEffect, useContext } from 'react';
3
+ import { useState, useInsertionEffect, useContext } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { Button } from "../../../b";
6
6
  import { FormikContext } from 'formik';
@@ -19,7 +19,7 @@ const Debugger = ({
19
19
  initialIsOpen
20
20
  // ...otherProps
21
21
  }) => {
22
- useLayoutEffect(() => {
22
+ useInsertionEffect(() => {
23
23
  import("./styles.scss");
24
24
  }, []);
25
25
  const [isOpen, setIsOpen] = useState(initialIsOpen);
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import { useField } from 'formik';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
@@ -22,7 +22,7 @@ const Description = ({
22
22
  color
23
23
  // ...otherProps
24
24
  }) => {
25
- useLayoutEffect(() => {
25
+ useInsertionEffect(() => {
26
26
  import("./styles.scss");
27
27
  }, []);
28
28
  const [field, meta] = useField(name);
@@ -0,0 +1,66 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useInsertionEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem/exports';
6
+
7
+ // Local Definitions
8
+
9
+ const baseClassName = styleNames.base;
10
+ const componentClassName = 'input-wrapper';
11
+
12
+ /**
13
+ * This is the component description.
14
+ */
15
+ const InputWrapper = ({
16
+ id,
17
+ className: userClassName,
18
+ style,
19
+ children,
20
+ columnSpan,
21
+ desktopColumnSpan
22
+ // ...otherProps
23
+ }) => {
24
+ useInsertionEffect(() => {
25
+ import("./styles.scss");
26
+ }, []);
27
+ return /*#__PURE__*/React.createElement("div", {
28
+ id: id,
29
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
30
+ style: {
31
+ ...style,
32
+ '--column-span': columnSpan || 'var(--columns)',
33
+ '--column-span-md': desktopColumnSpan || 'var(--columns)'
34
+ }
35
+ }, children);
36
+ };
37
+ InputWrapper.propTypes = {
38
+ /**
39
+ * The HTML id for this element
40
+ */
41
+ id: PropTypes.string,
42
+ /**
43
+ * The HTML class names for this element
44
+ */
45
+ className: PropTypes.string,
46
+ /**
47
+ * The React-written, css properties for this element.
48
+ */
49
+ style: PropTypes.objectOf(PropTypes.string),
50
+ /**
51
+ * The children JSX
52
+ */
53
+ children: PropTypes.node,
54
+ /**
55
+ * How many columns the input should span
56
+ */
57
+ columnSpan: PropTypes.number,
58
+ /**
59
+ * How many columns the input should span on desktop
60
+ */
61
+ desktopColumnSpan: PropTypes.number
62
+ };
63
+ InputWrapper.defaultProps = {
64
+ // as :'label',
65
+ };
66
+ export default InputWrapper;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as InputWrapper } from "./InputWrapper";
@@ -0,0 +1,13 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ .#{bem.$base}.input-wrapper {
8
+ grid-column: span var(--column-span);
9
+
10
+ @include mixins.media($from: $sm-md) {
11
+ grid-column: span var(--column-span-md);
12
+ }
13
+ }
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -20,17 +20,23 @@ const Label = ({
20
20
  name,
21
21
  color,
22
22
  optional,
23
- as: Wrapper
23
+ as: Wrapper,
24
+ columnSpan,
25
+ desktopColumnSpan
24
26
  // ...otherProps
25
27
  }) => {
26
- useLayoutEffect(() => {
28
+ useInsertionEffect(() => {
27
29
  import("./styles.scss");
28
30
  }, []);
29
31
  return /*#__PURE__*/React.createElement(Wrapper, {
30
32
  htmlFor: Wrapper === 'label' ? name : undefined,
31
33
  id: id,
32
34
  className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
33
- style: style
35
+ style: {
36
+ ...style,
37
+ '--column-span': columnSpan || 'var(--columns)',
38
+ '--column-span-md': desktopColumnSpan || 'var(--columns)'
39
+ }
34
40
  // {...otherProps}
35
41
  }, children, optional && ' (Optional)');
36
42
  };
@@ -66,11 +72,19 @@ Label.propTypes = {
66
72
  /**
67
73
  * Whether the input should have an optional tag
68
74
  */
69
- optional: PropTypes.bool
75
+ optional: PropTypes.bool,
76
+ /**
77
+ * How many columns the input should span
78
+ */
79
+ columnSpan: PropTypes.number,
80
+ /**
81
+ * How many columns the input should span on desktop
82
+ */
83
+ desktopColumnSpan: PropTypes.number
70
84
  };
71
85
  Label.defaultProps = {
72
86
  as: 'label',
73
- color: 'main2',
87
+ color: 'paragraph',
74
88
  optional: false
75
89
  };
76
90
  export default Label;
@@ -1,8 +1,14 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
- @use "../../../form.scss";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
5
6
 
6
7
  .#{bem.$base}.form-label {
7
- color: var(--hard-x);
8
+ color: var(--x);
9
+ grid-column: span var(--column-span);
10
+
11
+ @include mixins.media($from: $sm-md) {
12
+ grid-column: span var(--column-span-md);
13
+ }
8
14
  }
@@ -1,3 +1,4 @@
1
1
  export { Label as FormLabel } from "./Label";
2
2
  export { Description as FormDescription } from "./Description";
3
- export { Debugger as FormDebugger } from "./Debugger";
3
+ export { Debugger as FormDebugger } from "./Debugger";
4
+ export { InputWrapper } from "./InputWrapper";