frst-components 0.20.0 → 0.20.2

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 (506) hide show
  1. package/package.json +6 -1
  2. package/.dockerignore +0 -7
  3. package/.env +0 -1
  4. package/.github/pull_request_template.md +0 -26
  5. package/.hintrc +0 -41
  6. package/.prettierrc +0 -7
  7. package/.storybook/i18n.js +0 -26
  8. package/.storybook/main.js +0 -41
  9. package/.storybook/preview.js +0 -23
  10. package/.vscode/settings.json +0 -2
  11. package/Dockerfile +0 -22
  12. package/declarations.d.ts +0 -4
  13. package/images.d.ts +0 -4
  14. package/index.tsx +0 -178
  15. package/publish.sh +0 -19
  16. package/rollup.config.js +0 -15
  17. package/src/components/DS/loading/index.tsx +0 -70
  18. package/src/components/DS/loading/loading.stories.tsx +0 -31
  19. package/src/components/DS/loading/loadingStyle.ts +0 -40
  20. package/src/components/DS/modal/index.stories.tsx +0 -25
  21. package/src/components/DS/modal/index.tsx +0 -100
  22. package/src/components/DS/modal/styles.ts +0 -101
  23. package/src/components/DS/select/Select.tsx +0 -101
  24. package/src/components/DS/select/SelectContext.tsx +0 -9
  25. package/src/components/DS/select/SelectItem.tsx +0 -69
  26. package/src/components/DS/select/index.tsx +0 -18
  27. package/src/components/DS/select/select.stories.tsx +0 -20
  28. package/src/components/DS/select/styles/StylesSelect.tsx +0 -100
  29. package/src/components/DS/tooltip/index.stories.tsx +0 -24
  30. package/src/components/DS/tooltip/index.tsx +0 -81
  31. package/src/components/DS/tooltip/styles.ts +0 -155
  32. package/src/components/DS/tooltip/types.d.ts +0 -21
  33. package/src/components/EBR/buttons-group/index.d.ts +0 -4
  34. package/src/components/EBR/buttons-group/index.stories.tsx +0 -23
  35. package/src/components/EBR/buttons-group/index.tsx +0 -31
  36. package/src/components/EBR/buttons-group/styles.ts +0 -7
  37. package/src/components/EBR/group-statistics/groupStatistics.d.ts +0 -6
  38. package/src/components/EBR/group-statistics/groupStatistics.stories.tsx +0 -89
  39. package/src/components/EBR/group-statistics/groupStatisticsStyles.ts +0 -63
  40. package/src/components/EBR/group-statistics/index.tsx +0 -85
  41. package/src/components/EBR/objective-step/index.tsx +0 -18
  42. package/src/components/EBR/objective-step/objectiveStep.d.ts +0 -5
  43. package/src/components/EBR/objective-step/objectiveStep.stories.tsx +0 -24
  44. package/src/components/EBR/objective-step/objectiveStepStyles.ts +0 -42
  45. package/src/components/EBR/rating/index.tsx +0 -97
  46. package/src/components/EBR/rating/rating.d.ts +0 -42
  47. package/src/components/EBR/rating/rating.stories.tsx +0 -24
  48. package/src/components/EBR/rating/ratingStyles.ts +0 -25
  49. package/src/components/EBR/specialist-contact/index.tsx +0 -40
  50. package/src/components/EBR/specialist-contact/specialistContact.d.ts +0 -13
  51. package/src/components/EBR/specialist-contact/specialistContact.stories.tsx +0 -26
  52. package/src/components/EBR/specialist-contact/specialistContactStyles.ts +0 -93
  53. package/src/components/EBR/stepper/index.d.ts +0 -29
  54. package/src/components/EBR/stepper/index.stories.tsx +0 -43
  55. package/src/components/EBR/stepper/index.tsx +0 -7
  56. package/src/components/EBR/stepper/stepper.tsx +0 -23
  57. package/src/components/EBR/stepper/stepperItem.tsx +0 -38
  58. package/src/components/EBR/stepper/styles.ts +0 -140
  59. package/src/components/EBR/trail-list/index.tsx +0 -82
  60. package/src/components/EBR/trail-list/trailList.d.ts +0 -6
  61. package/src/components/EBR/trail-list/trailList.stories.tsx +0 -59
  62. package/src/components/EBR/trail-list/trailListStyles.ts +0 -54
  63. package/src/components/FI/bannerProblemFeed/bannerProblemFeed.stories.tsx +0 -355
  64. package/src/components/FI/bannerProblemFeed/bannerProblemFeedStyles.ts +0 -128
  65. package/src/components/FI/bannerProblemFeed/index.tsx +0 -388
  66. package/src/components/FI/bannerSRG/bannerSRG.d.ts +0 -33
  67. package/src/components/FI/bannerSRG/bannerSRG.stories.tsx +0 -106
  68. package/src/components/FI/bannerSRG/bannerSRGStyle.ts +0 -226
  69. package/src/components/FI/bannerSRG/index.tsx +0 -93
  70. package/src/components/FI/feedInteraction/feedInteraction.stories.tsx +0 -219
  71. package/src/components/FI/feedInteraction/feedInteractionStyles.ts +0 -142
  72. package/src/components/FI/feedInteraction/index.tsx +0 -343
  73. package/src/components/FI/follow/follow.stories.tsx +0 -59
  74. package/src/components/FI/follow/followStyles.ts +0 -42
  75. package/src/components/FI/follow/index.tsx +0 -144
  76. package/src/components/FI/interactionsModal/InteractionsModal.stories.tsx +0 -123
  77. package/src/components/FI/interactionsModal/InteractionsModalStyles.ts +0 -164
  78. package/src/components/FI/interactionsModal/index.tsx +0 -106
  79. package/src/components/FI/interactionsModal/interactionsModal.d.ts +0 -23
  80. package/src/components/FI/notificationCard/index.tsx +0 -66
  81. package/src/components/FI/notificationCard/notificationCard.stories.tsx +0 -34
  82. package/src/components/FI/notificationCard/notificationCardStyles.ts +0 -41
  83. package/src/components/FI/notificationPopOver/index.tsx +0 -190
  84. package/src/components/FI/notificationPopOver/notificationPopOver.stories.tsx +0 -117
  85. package/src/components/FI/notificationPopOver/notificationPopOverStyles.ts +0 -109
  86. package/src/components/FI/postFeed/index.tsx +0 -188
  87. package/src/components/FI/postFeed/postFeed.stories.tsx +0 -313
  88. package/src/components/FI/postFeed/postFeedStyles.ts +0 -188
  89. package/src/components/FI/searchBox/SearchBox.stories.tsx +0 -34
  90. package/src/components/FI/searchBox/SearchBoxStyles.ts +0 -21
  91. package/src/components/FI/searchBox/index.tsx +0 -25
  92. package/src/components/FI/searchBox/searchBox.d.ts +0 -11
  93. package/src/components/FI/sessionFilters/index.tsx +0 -160
  94. package/src/components/FI/sessionFilters/sessionFilters.d.ts +0 -35
  95. package/src/components/FI/sessionFilters/sessionFilters.stories.tsx +0 -74
  96. package/src/components/FI/sessionFilters/sessionFiltersStyle.ts +0 -86
  97. package/src/components/FI/smallSRGBanner/index.tsx +0 -24
  98. package/src/components/FI/smallSRGBanner/smallSRGBanner.stories.tsx +0 -19
  99. package/src/components/FI/smallSRGBanner/smallSRGBannerStyles.ts +0 -34
  100. package/src/components/IJ/ContentCycle/ContentCycle.d.ts +0 -56
  101. package/src/components/IJ/ContentCycle/ContentCycle.stories.tsx +0 -30
  102. package/src/components/IJ/ContentCycle/ContentCycleStyles.ts +0 -152
  103. package/src/components/IJ/ContentCycle/index.tsx +0 -85
  104. package/src/components/IJ/ListContentCycle/ListContentCycle.d.ts +0 -33
  105. package/src/components/IJ/ListContentCycle/ListContentCycle.stories.tsx +0 -77
  106. package/src/components/IJ/ListContentCycle/ListContentCycleStyles.ts +0 -10
  107. package/src/components/IJ/ListContentCycle/index.tsx +0 -35
  108. package/src/components/IJ/StepLearningCycle/StepLearningCycle.d.ts +0 -39
  109. package/src/components/IJ/StepLearningCycle/StepLearningCycle.stories.tsx +0 -24
  110. package/src/components/IJ/StepLearningCycle/StepLearningCycleStyle.ts +0 -93
  111. package/src/components/IJ/StepLearningCycle/index.tsx +0 -153
  112. package/src/components/IJ/favorite/favorite.stories.tsx +0 -19
  113. package/src/components/IJ/favorite/favoriteStyles.ts +0 -15
  114. package/src/components/IJ/favorite/index.tsx +0 -44
  115. package/src/components/IJ/learningCycleCard/components/menu/index.tsx +0 -92
  116. package/src/components/IJ/learningCycleCard/components/menu/menuStyle.ts +0 -27
  117. package/src/components/IJ/learningCycleCard/index.tsx +0 -93
  118. package/src/components/IJ/learningCycleCard/learningCycleCard.d.ts +0 -28
  119. package/src/components/IJ/learningCycleCard/learningCycleCard.stories.tsx +0 -229
  120. package/src/components/IJ/learningCycleCard/learningCycleCardStyle.ts +0 -173
  121. package/src/components/IJ/listSelector/index.tsx +0 -85
  122. package/src/components/IJ/listSelector/listSelector.stories.tsx +0 -64
  123. package/src/components/IJ/listSelector/listSelectorStyles.ts +0 -49
  124. package/src/components/IJ/pagination/index.tsx +0 -155
  125. package/src/components/IJ/pagination/pagination.stories.tsx +0 -112
  126. package/src/components/IJ/pagination/paginationStyles.ts +0 -61
  127. package/src/components/IJ/participantCard/index.tsx +0 -111
  128. package/src/components/IJ/participantCard/participantCard.d.ts +0 -24
  129. package/src/components/IJ/participantCard/participantCard.stories.tsx +0 -82
  130. package/src/components/IJ/participantCard/participantCardStyle.ts +0 -304
  131. package/src/components/IJ/participantCardOld/index.tsx +0 -108
  132. package/src/components/IJ/participantCardOld/participantCard.d.ts +0 -23
  133. package/src/components/IJ/participantCardOld/participantCard.stories.tsx +0 -34
  134. package/src/components/IJ/participantCardOld/participantCardStyle.ts +0 -218
  135. package/src/components/IJ/thumbListContent/index.tsx +0 -127
  136. package/src/components/IJ/thumbListContent/thumbListContent.stories.tsx +0 -130
  137. package/src/components/IJ/thumbListContent/thumbListContentStyles.ts +0 -196
  138. package/src/components/LXP/DropdownSelectMultiple/dropdownSelectMultiple.stories.tsx +0 -43
  139. package/src/components/LXP/DropdownSelectMultiple/index.tsx +0 -77
  140. package/src/components/LXP/DropdownSelectMultiple/styles/MultiSelectDemo.ts +0 -79
  141. package/src/components/LXP/DropdownSelectMultiple/styles/MultiSelectItems.css +0 -118
  142. package/src/components/LXP/DropdownSelectMultiple/styles/icons/DropdownChevron.png +0 -0
  143. package/src/components/LXP/DropdownSelectMultiple/styles/icons/close.png +0 -0
  144. package/src/components/LXP/DropdownSelectMultiple/styles/icons/vector.png +0 -0
  145. package/src/components/LXP/DropdownSelectMultiple/styles/primeflex.css +0 -20970
  146. package/src/components/LXP/DropdownSelectMultiple/styles/primereact.css +0 -6326
  147. package/src/components/LXP/DropdownSelectMultiple/styles/theme.css +0 -6515
  148. package/src/components/LXP/accordionTrack/IAccordionTrack.d.ts +0 -81
  149. package/src/components/LXP/accordionTrack/accordionTrack.stories.tsx +0 -305
  150. package/src/components/LXP/accordionTrack/accordionTrack.tsx +0 -402
  151. package/src/components/LXP/accordionTrack/accordionTrackList.tsx +0 -263
  152. package/src/components/LXP/accordionTrack/accordionTrackStyle.ts +0 -196
  153. package/src/components/LXP/accordionTrack/contentCourses.tsx +0 -9
  154. package/src/components/LXP/accordionTrack/contentCoursesTrails.tsx +0 -304
  155. package/src/components/LXP/accordionTrack/vectorDown.tsx +0 -26
  156. package/src/components/LXP/accordionTrack/vectorUp.tsx +0 -26
  157. package/src/components/LXP/avatarAssociatedChannel/avatarAssociatedChannel.d.ts +0 -10
  158. package/src/components/LXP/avatarAssociatedChannel/avatarAssociatedChannel.stories.tsx +0 -29
  159. package/src/components/LXP/avatarAssociatedChannel/avatarAssociatedChannelStyles.ts +0 -92
  160. package/src/components/LXP/avatarAssociatedChannel/index.tsx +0 -47
  161. package/src/components/LXP/avatarChannel/avatarChannel.d.ts +0 -13
  162. package/src/components/LXP/avatarChannel/avatarChannel.stories.tsx +0 -38
  163. package/src/components/LXP/avatarChannel/avatarChannelStyles.ts +0 -145
  164. package/src/components/LXP/avatarChannel/index.tsx +0 -112
  165. package/src/components/LXP/bannerLxp/bannerLxp.stories.tsx +0 -37
  166. package/src/components/LXP/bannerLxp/bannerLxp.tsx +0 -141
  167. package/src/components/LXP/bannerLxp/index.tsx +0 -270
  168. package/src/components/LXP/buttonContent/buttonContent.d.ts +0 -12
  169. package/src/components/LXP/buttonContent/buttonContent.stories.tsx +0 -23
  170. package/src/components/LXP/buttonContent/buttonContentStyle.ts +0 -63
  171. package/src/components/LXP/buttonContent/index.tsx +0 -16
  172. package/src/components/LXP/calendarLxp/calendar.css +0 -375
  173. package/src/components/LXP/calendarLxp/calendarLxp.module.css +0 -39
  174. package/src/components/LXP/calendarLxp/calendarLxp.stories.tsx +0 -19
  175. package/src/components/LXP/calendarLxp/defaultRanges.tsx +0 -99
  176. package/src/components/LXP/calendarLxp/index.tsx +0 -72
  177. package/src/components/LXP/cardLearningCicle/cardLearningCicle.d.ts +0 -16
  178. package/src/components/LXP/cardLearningCicle/cardLearningCicle.stories.tsx +0 -31
  179. package/src/components/LXP/cardLearningCicle/cardLearningCicleStyle.ts +0 -118
  180. package/src/components/LXP/cardLearningCicle/index.tsx +0 -129
  181. package/src/components/LXP/colorpicker/colorpicker.d.ts +0 -6
  182. package/src/components/LXP/colorpicker/colorpicker.stories.tsx +0 -18
  183. package/src/components/LXP/colorpicker/colorpickerStyles.ts +0 -46
  184. package/src/components/LXP/colorpicker/index.tsx +0 -30
  185. package/src/components/LXP/contentSwitcher/contentSwitcher.d.ts +0 -12
  186. package/src/components/LXP/contentSwitcher/contentSwitcher.stories.tsx +0 -26
  187. package/src/components/LXP/contentSwitcher/contentSwitcherStyle.ts +0 -92
  188. package/src/components/LXP/contentSwitcher/index.tsx +0 -33
  189. package/src/components/LXP/contentThumbnails/contentThumbnails.d.ts +0 -21
  190. package/src/components/LXP/contentThumbnails/contentThumbnails.stories.tsx +0 -106
  191. package/src/components/LXP/contentThumbnails/contentThumbnailsStyle.ts +0 -170
  192. package/src/components/LXP/contentThumbnails/index.tsx +0 -208
  193. package/src/components/LXP/contentThumbnails/vectorDown.tsx +0 -26
  194. package/src/components/LXP/contentThumbnails/vectorEllipse.tsx +0 -38
  195. package/src/components/LXP/contentThumbnails/vectorUp.tsx +0 -26
  196. package/src/components/LXP/extraContent/adminExtraContent.tsx +0 -127
  197. package/src/components/LXP/extraContent/extraContent.d.ts +0 -42
  198. package/src/components/LXP/extraContent/extraContent.module.css +0 -24
  199. package/src/components/LXP/extraContent/extraContent.stories.tsx +0 -96
  200. package/src/components/LXP/extraContent/index.tsx +0 -27
  201. package/src/components/LXP/extraContent/richTextEditor/components.tsx +0 -194
  202. package/src/components/LXP/extraContent/richTextEditor/index.tsx +0 -262
  203. package/src/components/LXP/extraContent/studentExtraContent.tsx +0 -160
  204. package/src/components/LXP/fileUpload/FileUpload.d.ts +0 -14
  205. package/src/components/LXP/fileUpload/FileUpload.stories.tsx +0 -29
  206. package/src/components/LXP/fileUpload/fileUploadStyles.ts +0 -86
  207. package/src/components/LXP/fileUpload/index.tsx +0 -51
  208. package/src/components/LXP/headerContent/headerContent.stories.tsx +0 -94
  209. package/src/components/LXP/headerContent/headerContent.ts +0 -216
  210. package/src/components/LXP/headerContent/index.tsx +0 -121
  211. package/src/components/LXP/headerContent/selectedCountCircle.tsx +0 -14
  212. package/src/components/LXP/login/index.tsx +0 -410
  213. package/src/components/LXP/login/login.d.ts +0 -50
  214. package/src/components/LXP/login/login.stories.tsx +0 -98
  215. package/src/components/LXP/login/loginStyle.ts +0 -290
  216. package/src/components/LXP/manageLerningCicles/index.tsx +0 -70
  217. package/src/components/LXP/manageLerningCicles/manageLearningCicles.Style.ts +0 -88
  218. package/src/components/LXP/manageLerningCicles/manageLearningCicles.d.ts +0 -12
  219. package/src/components/LXP/manageLerningCicles/manageLearningCicles.stories.tsx +0 -23
  220. package/src/components/LXP/participantThumbnails/index.tsx +0 -85
  221. package/src/components/LXP/participantThumbnails/participantThumbnails.stories.tsx +0 -19
  222. package/src/components/LXP/participantThumbnails/participantThumbnails.ts +0 -114
  223. package/src/components/LXP/participantThumbnailsList/index.tsx +0 -64
  224. package/src/components/LXP/participantThumbnailsList/participantThumbnailsList.stories.tsx +0 -93
  225. package/src/components/LXP/participantThumbnailsList/participantThumbnailsList.ts +0 -114
  226. package/src/components/LXP/permission/index.tsx +0 -223
  227. package/src/components/LXP/permission/permission.d.ts +0 -16
  228. package/src/components/LXP/permission/permission.stories.tsx +0 -28
  229. package/src/components/LXP/permission/permissionStyle.ts +0 -52
  230. package/src/components/LXP/popOver/index.tsx +0 -111
  231. package/src/components/LXP/popOver/popOver.d.ts +0 -30
  232. package/src/components/LXP/popOver/popOver.stories.tsx +0 -128
  233. package/src/components/LXP/popOver/popOverStyle.ts +0 -130
  234. package/src/components/LXP/popOverLXP-antigo/index.tsx +0 -48
  235. package/src/components/LXP/popOverLXP-antigo/popOverLXP.d.ts +0 -9
  236. package/src/components/LXP/popOverLXP-antigo/popOverLXP.stories.tsx +0 -103
  237. package/src/components/LXP/popOverLXP-antigo/popOverLXPStyles.ts +0 -121
  238. package/src/components/LXP/progressBar/index.tsx +0 -18
  239. package/src/components/LXP/progressBar/progressBar.d.ts +0 -8
  240. package/src/components/LXP/progressBar/progressBar.stories.tsx +0 -18
  241. package/src/components/LXP/progressBar/progressStyle.ts +0 -28
  242. package/src/components/LXP/searchResults/index.tsx +0 -36
  243. package/src/components/LXP/searchResults/searchResults.d.ts +0 -11
  244. package/src/components/LXP/searchResults/searchResults.stories.tsx +0 -23
  245. package/src/components/LXP/searchResults/searchResultsStyles.ts +0 -63
  246. package/src/components/LXP/selectLXP/SelectLXP.tsx +0 -170
  247. package/src/components/LXP/selectLXP/SelectLXPContext.tsx +0 -9
  248. package/src/components/LXP/selectLXP/SelectLXPItem.tsx +0 -63
  249. package/src/components/LXP/selectLXP/index.tsx +0 -16
  250. package/src/components/LXP/selectLXP/selectLXP.stories.tsx +0 -20
  251. package/src/components/LXP/star-metric/index.tsx +0 -28
  252. package/src/components/LXP/star-metric/starMetric.d.ts +0 -6
  253. package/src/components/LXP/star-metric/starMetric.stories.tsx +0 -18
  254. package/src/components/LXP/star-metric/starMetricStyles.ts +0 -17
  255. package/src/components/LXP/thumbnails/thumbnails.d.ts +0 -36
  256. package/src/components/LXP/thumbnails/thumbnails.stories.tsx +0 -48
  257. package/src/components/LXP/thumbnails/thumbnails.tsx +0 -217
  258. package/src/components/LXP/thumbnails/thumbnailsDraggable.tsx +0 -73
  259. package/src/components/LXP/thumbnails/thumbnailsStyle.ts +0 -183
  260. package/src/components/LXP/thumbnails/vectorCross.tsx +0 -25
  261. package/src/components/LXP/thumbnails/vectorEllipse.tsx +0 -38
  262. package/src/components/LXP/tooltip/index.tsx +0 -15
  263. package/src/components/LXP/tooltip/tooltip.stories.tsx +0 -19
  264. package/src/components/LXP/tooltip/tooltipStyle.ts +0 -114
  265. package/src/components/LXP/urlAddress/index.tsx +0 -30
  266. package/src/components/LXP/urlAddress/urlAddress.d.ts +0 -10
  267. package/src/components/LXP/urlAddress/urlAddress.stories.tsx +0 -21
  268. package/src/components/LXP/urlAddress/urlAddressStyle.ts +0 -61
  269. package/src/components/LXP/video/Video.d.ts +0 -19
  270. package/src/components/LXP/video/Video.stories.tsx +0 -95
  271. package/src/components/LXP/video/index.tsx +0 -22
  272. package/src/components/LogoFRST/index.tsx +0 -34
  273. package/src/components/LogoFRST/logoFRST.module.css +0 -27
  274. package/src/components/LogoFRST/logoFRST.stories.tsx +0 -38
  275. package/src/components/accordion-tabs/accordionTabs.d.ts +0 -19
  276. package/src/components/accordion-tabs/accordionTabs.stories.tsx +0 -34
  277. package/src/components/accordion-tabs/accordionTabsStyles.ts +0 -114
  278. package/src/components/accordion-tabs/index.tsx +0 -77
  279. package/src/components/audio-player/Royalty.mp3 +0 -0
  280. package/src/components/audio-player/audioPlayer.stories.tsx +0 -39
  281. package/src/components/audio-player/audioPlayerStyles.ts +0 -314
  282. package/src/components/audio-player/index.tsx +0 -209
  283. package/src/components/avatar/avatar.d.ts +0 -8
  284. package/src/components/avatar/avatar.stories.tsx +0 -21
  285. package/src/components/avatar/avatarStyles.ts +0 -23
  286. package/src/components/avatar/index.tsx +0 -21
  287. package/src/components/buttons/buttonStyle.ts +0 -339
  288. package/src/components/buttons/buttons.stories.tsx +0 -52
  289. package/src/components/buttons/buttonsWithIcons.stories.tsx +0 -57
  290. package/src/components/buttons/index.tsx +0 -90
  291. package/src/components/calendar/calendar.stories.tsx +0 -156
  292. package/src/components/calendar/calendarStyle.ts +0 -209
  293. package/src/components/calendar/index.tsx +0 -157
  294. package/src/components/card-trail/cardTrail.stories.tsx +0 -167
  295. package/src/components/card-trail/cardTrailStyle.ts +0 -31
  296. package/src/components/card-trail/index.tsx +0 -160
  297. package/src/components/card-trail/moduleStyle.ts +0 -98
  298. package/src/components/card-trail-carousel/cardsTrailsCarousel.d.ts +0 -13
  299. package/src/components/card-trail-carousel/cardsTrailsCarousel.stories.tsx +0 -152
  300. package/src/components/card-trail-carousel/index.tsx +0 -47
  301. package/src/components/cardLT/AvatarWithInfo/avatarWithInfo.module.css +0 -20
  302. package/src/components/cardLT/AvatarWithInfo/avatarWithInfo.stories.tsx +0 -18
  303. package/src/components/cardLT/AvatarWithInfo/index.tsx +0 -55
  304. package/src/components/cardLT/AvatarWithInfo/vector.tsx +0 -25
  305. package/src/components/cardLT/BannerProblem/BannerProblem.d.ts +0 -98
  306. package/src/components/cardLT/BannerProblem/BannerProblem.module.css +0 -113
  307. package/src/components/cardLT/BannerProblem/BannerProblem.stories.tsx +0 -191
  308. package/src/components/cardLT/BannerProblem/index.tsx +0 -433
  309. package/src/components/cardLT/BannerProblem/styles.ts +0 -16
  310. package/src/components/cardLT/MessageBox/MessageBox.module.css +0 -142
  311. package/src/components/cardLT/MessageBox/icons/errorIcon.tsx +0 -19
  312. package/src/components/cardLT/MessageBox/icons/successIcon.tsx +0 -18
  313. package/src/components/cardLT/MessageBox/icons/warningIcon.tsx +0 -20
  314. package/src/components/cardLT/MessageBox/index.tsx +0 -124
  315. package/src/components/cardLT/MessageBox/messageBox.stories.tsx +0 -53
  316. package/src/components/cardLT/Rating/Rating.module.css +0 -50
  317. package/src/components/cardLT/Rating/index.tsx +0 -92
  318. package/src/components/cardLT/Rating/rating.stories.tsx +0 -34
  319. package/src/components/cardLT/Rating/starIcon.tsx +0 -24
  320. package/src/components/cardLT/RatingCurtidas/RatingCurtidas.module.css +0 -16
  321. package/src/components/cardLT/RatingCurtidas/index.tsx +0 -80
  322. package/src/components/cardLT/RatingCurtidas/ratingCurtidas.stories.tsx +0 -21
  323. package/src/components/cardLT/RocketButton/RocketButton.stories.tsx +0 -28
  324. package/src/components/cardLT/RocketButton/RocketButtonIcon.tsx +0 -36
  325. package/src/components/cardLT/RocketButton/index.tsx +0 -57
  326. package/src/components/cardLT/StepsMission/Planet.module.css +0 -137
  327. package/src/components/cardLT/StepsMission/StepMission.tsx +0 -220
  328. package/src/components/cardLT/StepsMission/Steps.tsx +0 -116
  329. package/src/components/cardLT/StepsMission/planet.stories.tsx +0 -73
  330. package/src/components/cardLT/StepsMission/planetSteps.d.ts +0 -40
  331. package/src/components/cardLT/StepsMission/planets/jupter.png +0 -0
  332. package/src/components/cardLT/StepsMission/planets/lock.png +0 -0
  333. package/src/components/cardLT/StepsMission/planets/marte.png +0 -0
  334. package/src/components/cardLT/StepsMission/planets/netuno.png +0 -0
  335. package/src/components/cardLT/StepsMission/planets/saturno.png +0 -0
  336. package/src/components/cardLT/StepsMission/planets/urano.png +0 -0
  337. package/src/components/cardLT/TextIcon/TextIcon.module.css +0 -8
  338. package/src/components/cardLT/TextIcon/index.tsx +0 -64
  339. package/src/components/cardLT/TextIcon/starIcon.tsx +0 -27
  340. package/src/components/cardLT/TextIcon/textIcon.stories.tsx +0 -21
  341. package/src/components/cardLT/selectCard/avatarWithInfo.module.css +0 -20
  342. package/src/components/cardLT/selectCard/avatarWithInfo.stories.tsx +0 -19
  343. package/src/components/cardLT/selectCard/index.tsx +0 -55
  344. package/src/components/cardLT/selectCard/vector.tsx +0 -25
  345. package/src/components/cards/base/base.stories.tsx +0 -23
  346. package/src/components/cards/base/index.tsx +0 -10
  347. package/src/components/cards/cardDefinicaoProblema/cardDefinicaoProblema.module.css +0 -88
  348. package/src/components/cards/cardDefinicaoProblema/cardDefinicaoProblema.stories.tsx +0 -95
  349. package/src/components/cards/cardDefinicaoProblema/index.tsx +0 -98
  350. package/src/components/cards/cardProblem/cardProblem.module.css +0 -114
  351. package/src/components/cards/cardProblem/cardProblem.stories.tsx +0 -164
  352. package/src/components/cards/cardProblem/index.tsx +0 -251
  353. package/src/components/cards/cardProblemGestor/cardProblemaGestor.module.css +0 -99
  354. package/src/components/cards/cardProblemGestor/cardProblemaGestor.stories.tsx +0 -78
  355. package/src/components/cards/cardProblemGestor/index.tsx +0 -105
  356. package/src/components/cards/cardResultConquista/Icons/Aprendizado.png +0 -0
  357. package/src/components/cards/cardResultConquista/Icons/AprendizadoPressed.png +0 -0
  358. package/src/components/cards/cardResultConquista/Icons/Conquista.png +0 -0
  359. package/src/components/cards/cardResultConquista/Icons/ConquistaPressed.png +0 -0
  360. package/src/components/cards/cardResultConquista/cardResultConquista.module.css +0 -52
  361. package/src/components/cards/cardResultConquista/cardResultConquista.stories.tsx +0 -35
  362. package/src/components/cards/cardResultConquista/index.tsx +0 -76
  363. package/src/components/cards/user/index.tsx +0 -204
  364. package/src/components/cards/user/user.stories.tsx +0 -172
  365. package/src/components/challenge-cards/challengeCard.d.ts +0 -17
  366. package/src/components/challenge-cards/challengeCard.stories.tsx +0 -43
  367. package/src/components/challenge-cards/challengeCardStyles.ts +0 -266
  368. package/src/components/challenge-cards/dropdownMenuStyle.ts +0 -87
  369. package/src/components/challenge-cards/index.tsx +0 -308
  370. package/src/components/checkmark/checkmark.d.ts +0 -11
  371. package/src/components/checkmark/checkmark.stories.tsx +0 -23
  372. package/src/components/checkmark/checkmarkStyles.ts +0 -27
  373. package/src/components/checkmark/index.tsx +0 -61
  374. package/src/components/commentary-box/commentaryBox.d.ts +0 -41
  375. package/src/components/commentary-box/commentaryBox.stories.tsx +0 -57
  376. package/src/components/commentary-box/commentaryBox.utils.ts +0 -31
  377. package/src/components/commentary-box/commentaryBoxStyles.ts +0 -271
  378. package/src/components/commentary-box/index.tsx +0 -260
  379. package/src/components/conquistaCarrossel/conquistaCarrossel.d.ts +0 -13
  380. package/src/components/conquistaCarrossel/conquistaCarrossel.stories.tsx +0 -163
  381. package/src/components/conquistaCarrossel/index.tsx +0 -56
  382. package/src/components/demo/stepController/StepControllerStyle.ts +0 -46
  383. package/src/components/demo/stepController/index.tsx +0 -54
  384. package/src/components/demo/stepController/stepController.stories.tsx +0 -22
  385. package/src/components/dropdown-profile-menu/dropdownProfileMenu.d.ts +0 -28
  386. package/src/components/dropdown-profile-menu/dropdownProfileMenu.stories.tsx +0 -91
  387. package/src/components/dropdown-profile-menu/dropdownProfileMenuStyle.ts +0 -171
  388. package/src/components/dropdown-profile-menu/index.tsx +0 -203
  389. package/src/components/emoji-picker/emojiPicker.stories.tsx +0 -20
  390. package/src/components/emoji-picker/index.tsx +0 -60
  391. package/src/components/exclusive-class/exclusiveClass.d.ts +0 -8
  392. package/src/components/exclusive-class/exclusiveClass.stories.tsx +0 -19
  393. package/src/components/exclusive-class/exclusiveClassStyles.ts +0 -39
  394. package/src/components/exclusive-class/index.tsx +0 -33
  395. package/src/components/field-search-dropdown/fieldSearch.d.ts +0 -36
  396. package/src/components/field-search-dropdown/fieldSearch.stories.tsx +0 -92
  397. package/src/components/field-search-dropdown/fieldSearchStyle.ts +0 -150
  398. package/src/components/field-search-dropdown/index.tsx +0 -233
  399. package/src/components/filter-accordion-checkbox/filterAccordionCheckbox.d.ts +0 -7
  400. package/src/components/filter-accordion-checkbox/filterAccordionCheckbox.stories.tsx +0 -101
  401. package/src/components/filter-accordion-checkbox/filterAccordionCheckbox.utils.ts +0 -7
  402. package/src/components/filter-accordion-checkbox/filterAccordionCheckboxStyles.ts +0 -2
  403. package/src/components/filter-accordion-checkbox/index.tsx +0 -188
  404. package/src/components/form-elements/checkbox/checkbox.d.ts +0 -9
  405. package/src/components/form-elements/checkbox/checkbox.stories.tsx +0 -20
  406. package/src/components/form-elements/checkbox/checkboxStyle.ts +0 -40
  407. package/src/components/form-elements/checkbox/index.tsx +0 -33
  408. package/src/components/form-elements/textarea/index.tsx +0 -6
  409. package/src/components/form-elements/textarea/textArea.stories.tsx +0 -27
  410. package/src/components/form-elements/textfield/index.tsx +0 -104
  411. package/src/components/form-elements/textfield/textField.stories.tsx +0 -124
  412. package/src/components/form-elements/textfield/textFieldStyle.ts +0 -213
  413. package/src/components/global-menu/components/customMenu/index.tsx +0 -1
  414. package/src/components/global-menu/globalMenu.d.ts +0 -66
  415. package/src/components/global-menu/globalMenu.stories.tsx +0 -959
  416. package/src/components/global-menu/globalMenuStyles.ts +0 -197
  417. package/src/components/global-menu/index.tsx +0 -1336
  418. package/src/components/headerChallenge/headerChallenge.stories.tsx +0 -20
  419. package/src/components/headerChallenge/headerChallengeStyle.ts +0 -102
  420. package/src/components/headerChallenge/index.tsx +0 -17
  421. package/src/components/index.tsx +0 -46
  422. package/src/components/input-comment/index.tsx +0 -178
  423. package/src/components/input-comment/inputComment.d.ts +0 -16
  424. package/src/components/input-comment/inputComment.stories.tsx +0 -26
  425. package/src/components/input-comment/inputComment.utils.ts +0 -7
  426. package/src/components/input-comment/inputCommentStyles.ts +0 -116
  427. package/src/components/item-lateral-menu/index.tsx +0 -87
  428. package/src/components/item-lateral-menu/itemLateralMenu.d.ts +0 -30
  429. package/src/components/item-lateral-menu/itemLateralMenu.stories.tsx +0 -159
  430. package/src/components/item-lateral-menu/itemLateralMenuStyles.ts +0 -131
  431. package/src/components/item-menu-global/index.tsx +0 -36
  432. package/src/components/item-menu-global/itemMenuGlobal.d.ts +0 -16
  433. package/src/components/item-menu-global/itemMenuGlobal.stories.tsx +0 -40
  434. package/src/components/item-menu-global/itemMenuGlobalStyles.ts +0 -73
  435. package/src/components/languages-dropdown/index.tsx +0 -102
  436. package/src/components/languages-dropdown/languagesDropdown.d.ts +0 -13
  437. package/src/components/languages-dropdown/languagesDropdown.stories.tsx +0 -38
  438. package/src/components/languages-dropdown/languagesDropdownStyles.ts +0 -66
  439. package/src/components/lateral-menu/index.tsx +0 -68
  440. package/src/components/lateral-menu/lateralMenu.d.ts +0 -17
  441. package/src/components/lateral-menu/lateralMenu.stories.tsx +0 -429
  442. package/src/components/lateral-menu/lateralMenuStyles.ts +0 -68
  443. package/src/components/learning-steps/index.tsx +0 -67
  444. package/src/components/learning-steps/learningSteps.d.ts +0 -16
  445. package/src/components/learning-steps/learningSteps.stories.tsx +0 -123
  446. package/src/components/learning-steps/learningStepsStyles.ts +0 -46
  447. package/src/components/menu-more/index.tsx +0 -79
  448. package/src/components/menu-more/menuMore.d.ts +0 -15
  449. package/src/components/menu-more/menuMore.stories.tsx +0 -76
  450. package/src/components/menu-more/menuMoreStyles.ts +0 -123
  451. package/src/components/modal/modalLearningTech/index.tsx +0 -67
  452. package/src/components/modal/modalLearningTech/modalLearningTech.module.css +0 -79
  453. package/src/components/modal/modalLearningTech/modalLearningTech.stories.tsx +0 -60
  454. package/src/components/modal/modalVideo/index.tsx +0 -129
  455. package/src/components/modal/modalVideo/modalVideo.module.css +0 -27
  456. package/src/components/modal/modalVideo/modalVideo.stories.tsx +0 -41
  457. package/src/components/modal/statusProblema/fecharIcon.tsx +0 -18
  458. package/src/components/modal/statusProblema/index.tsx +0 -124
  459. package/src/components/modal/statusProblema/problemaFRST.png +0 -0
  460. package/src/components/modal/statusProblema/statusProblema.module.css +0 -154
  461. package/src/components/modal/statusProblema/statusProblema.stories.tsx +0 -27
  462. package/src/components/quantidadeDesafios/imgSetas/setasDesafios.svg +0 -60
  463. package/src/components/quantidadeDesafios/index.tsx +0 -152
  464. package/src/components/quantidadeDesafios/quantidadeDesafios.stories.tsx +0 -49
  465. package/src/components/quantidadeDesafios/quantidadeDesafios.ts +0 -121
  466. package/src/components/sandbox.stories.tsx +0 -18
  467. package/src/components/scroll-container/index.tsx +0 -189
  468. package/src/components/scroll-container/scrollContainer.d.ts +0 -17
  469. package/src/components/scroll-container/scrollContainer.stories.tsx +0 -45
  470. package/src/components/scroll-container/scrollContainer.utils.ts +0 -11
  471. package/src/components/scroll-container/scrollContainerStyles.ts +0 -93
  472. package/src/components/search-field/index.tsx +0 -48
  473. package/src/components/search-field/searchField.d.ts +0 -13
  474. package/src/components/search-field/searchField.stories.tsx +0 -40
  475. package/src/components/search-field/searchFieldStyles.ts +0 -100
  476. package/src/components/select/Select.tsx +0 -170
  477. package/src/components/select/SelectContext.tsx +0 -9
  478. package/src/components/select/SelectItem.tsx +0 -63
  479. package/src/components/select/index.tsx +0 -16
  480. package/src/components/select/select.stories.tsx +0 -20
  481. package/src/components/speech-bubble/index.tsx +0 -29
  482. package/src/components/speech-bubble/speechBubble.d.ts +0 -10
  483. package/src/components/speech-bubble/speechBubble.stories.tsx +0 -20
  484. package/src/components/speech-bubble/speechBubbleStyles.ts +0 -121
  485. package/src/components/step-card/index.tsx +0 -48
  486. package/src/components/step-card/stepCard.d.ts +0 -12
  487. package/src/components/step-card/stepCard.stories.tsx +0 -26
  488. package/src/components/step-card/stepCardStyles.ts +0 -109
  489. package/src/components/tag/base.stories.tsx +0 -52
  490. package/src/components/tag/index.tsx +0 -59
  491. package/src/components/totalizer-card/index.tsx +0 -29
  492. package/src/components/totalizer-card/totalizerCard.d.ts +0 -10
  493. package/src/components/totalizer-card/totalizerCard.stories.tsx +0 -34
  494. package/src/components/totalizer-card/totalizerCardStyles.ts +0 -97
  495. package/src/icons.stories.tsx +0 -321
  496. package/src/shared/global.css +0 -146
  497. package/src/shared/globalComponentsStyle.ts +0 -88
  498. package/src/shared/icons.tsx +0 -3544
  499. package/src/shared/stories/AlertCicle.stories.tsx +0 -17
  500. package/src/shared/stories/CheckInCicleIcon.stories.tsx +0 -19
  501. package/src/shared/stories/CloseInCicleIcon.stories.tsx +0 -19
  502. package/src/shared/stories/DotIcon.stories.tsx +0 -17
  503. package/src/shared/stories/MoreDotsHorizontal.stories.tsx +0 -17
  504. package/src/theme/index.ts +0 -6
  505. package/src/theme/tokens.ts +0 -196
  506. package/tsconfig.json +0 -39
@@ -1,96 +0,0 @@
1
- import React from 'react'
2
-
3
- import ExtraContent from './index'
4
-
5
- // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
6
- export default {
7
- title: 'LXP/ExtraContent',
8
- component: ExtraContent,
9
- }
10
-
11
- // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
12
- const Template = (args) => <ExtraContent {...args} />
13
-
14
- export const Student = Template.bind({})
15
- Student.args = {
16
- typeExhibition: 2,
17
- bookList: [{
18
- id: 'abcd',
19
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
20
- title: 'Gerenciamento de projetos',
21
- autor: 'Guilherme Caloba'
22
- },
23
- {
24
- id: 'abcde',
25
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
26
- title: 'O poder do hábito',
27
- autor: 'Charles Duhigg'
28
- },
29
- {
30
- id: 'abcdef',
31
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
32
- title: 'pense de novo: O poder de saber o que você não sabe',
33
- autor: 'Adam Grant'
34
- },
35
- {
36
- id: 'abca',
37
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
38
- title: 'O desafio do impossível',
39
- autor: 'Neuza Chaves'
40
- },
41
- {
42
- id: 'abcc',
43
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
44
- title: 'Entendendo o pensamento A3',
45
- autor: 'Durward K. Sobek II'
46
- },
47
- ],
48
- transcription: `Bacon ipsum dolor amet swine strip steak drumstick pork belly bresaola capicola, picanha pork kielbasa flank pig. Ball tip tri-tip ribeye ground round. Capicola pork pork chop, burgdoggen boudin t-bone landjaeger alcatra pig spare ribs shank prosciutto pancetta. Doner leberkas flank prosciutto biltong kevin tri-tip swine buffalo burgdoggen pork chop short ribs pork loin pork. Cow kevin tri-tip fatback biltong salami boudin frankfurter pork loin strip steak turducken doner alcatra ham. Spare ribs buffalo kevin sausage, tongue frankfurter tail capicola chuck biltong chislic bacon filet mignon hamburger pastrami.
49
-
50
- Ball tip picanha drumstick hamburger cow strip steak spare ribs bresaola pig brisket porchetta landjaeger burgdoggen turducken beef ribs. Andouille chislic pork belly jowl shankle. Jerky landjaeger strip steak pork chop, meatloaf swine buffalo pork loin. Sausage turkey kevin, flank drumstick ham beef ribs turducken. Spare ribs short ribs bresaola tongue ham hock chislic, beef ribs brisket doner. Ham biltong turkey leberkas, sirloin shank filet mignon.
51
-
52
- Frankfurter porchetta ball tip tenderloin pork loin, turkey buffalo strip steak rump beef ribs ham hock. Andouille kielbasa pork chop picanha prosciutto chicken. Shank jerky pork loin swine venison fatback kevin. Beef fatback brisket ball tip, turkey pancetta short loin frankfurter shoulder pork loin prosciutto swine jerky. Kevin pork chop porchetta, shoulder leberkas salami pancetta doner drumstick sausage flank buffalo cow.
53
-
54
- Beef tail ham hock prosciutto andouille capicola jerky t-bone frankfurter. Alcatra bresaola salami pork chop, burgdoggen ribeye short ribs ball tip beef picanha kielbasa venison. T-bone capicola biltong tail fatback. Meatloaf ball tip sirloin leberkas, burgdoggen pig boudin tenderloin short loin shoulder buffalo short ribs spare ribs.
55
-
56
- Ground round biltong venison boudin beef ribs, swine buffalo brisket jerky drumstick rump corned beef kevin turducken spare ribs. Shankle fatback jerky buffalo, ham hock ribeye short ribs meatball filet mignon kielbasa venison shank rump landjaeger. Alcatra hamburger ham landjaeger. Brisket pork chop leberkas chicken.`,
57
- commentList:[{
58
- userName : 'Roberto Lima',
59
- userAvatar: 'https://i.pinimg.com/474x/2b/27/2f/2b272f528c3e14054436edd0d8bd2a26.jpg',
60
- userPosition: 'Estudante/Universitário de TI',
61
- comments: 'Olá, pessoal! Tudo bem? Estou iniciando a trilha Digital Business Mindest essa semana. Este conteúdo é muito bom. recomendo',
62
- isLiked : false,
63
- date : '25/09/2022',
64
- },
65
- {
66
- userName : 'Roberto Lima',
67
- userAvatar: 'https://i.pinimg.com/474x/2b/27/2f/2b272f528c3e14054436edd0d8bd2a26.jpg',
68
- userPosition: 'Estudante/Universitário de TI',
69
- comments: 'Estou iniciando a trilha Digital Business Mindest e queria saber mais sobre as atitudes que o líder deve contruir pra criar uma relação de confiança',
70
- isLiked : false,
71
- date : '25/09/2022',
72
- },
73
- ],
74
- suportMaterial:[{
75
- id : 'abc',
76
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
77
- description: 'Gerenciamento de projetos com PDCA'
78
- },
79
- {
80
- id : 'cba',
81
- img: 'https://media.itpro.co.uk/image/upload/s--X-WVjvBW--/f_auto,t_content-image-full-desktop@1/v1570815813/itpro/2018/01/shutterstock_712558591.jpg',
82
- description: 'Gerenciamento de projetos com PDCA 2'
83
- },
84
- ],
85
-
86
- onClickBook: (id) => alert(id) ,
87
- onClickSuportMaterial: (id) => alert(id),
88
-
89
- }
90
-
91
- export const Admin = Template.bind({})
92
- Admin.args = {
93
- typeExhibition: 1,
94
-
95
- onSaveTranscription: (text) => console.log(text)
96
- }
@@ -1,27 +0,0 @@
1
- import { useRef, useState } from 'react'
2
- import { Tab, Tabs, Box, Typography, Grid } from '@mui/material';
3
- import style from './extraContent.module.css'
4
- import { IExtraContent } from './extraContent'
5
- import Avatar from '@components/avatar';
6
- import InputComment from '@components/input-comment';
7
- import CommentaryBox from '@components/commentary-box';
8
- import AdminExtraContent from './adminExtraContent'
9
- import StudentExtraContent from './studentExtraContent'
10
- // import RichTextEditor from './richTextEditor'
11
-
12
-
13
-
14
-
15
-
16
-
17
- export default function ExtraContent( props : IExtraContent) {
18
- return(
19
- <div>
20
- {props.typeExhibition === 1 ?
21
- AdminExtraContent(props)
22
- :
23
- StudentExtraContent(props)
24
- }
25
- </div>
26
- )
27
- }
@@ -1,194 +0,0 @@
1
- import React, { Ref, PropsWithChildren } from 'react'
2
- import ReactDOM from 'react-dom'
3
- import { cx, css } from '@emotion/css'
4
-
5
- interface BaseProps {
6
- className: string
7
- [key: string]: unknown
8
- }
9
- type OrNull<T> = T | null
10
-
11
- export const Button = React.forwardRef(
12
- (
13
- {
14
- className,
15
- active,
16
- reversed,
17
- ...props
18
- }: PropsWithChildren<
19
- {
20
- active: boolean
21
- reversed: boolean
22
- } & BaseProps
23
- >,
24
- ref: Ref<OrNull<HTMLSpanElement>>
25
- ) => (
26
- <span
27
- {...props}
28
- ref={ref}
29
- className={cx(
30
- className,
31
- css`
32
- cursor: pointer;
33
- color: ${reversed
34
- ? active
35
- ? 'white'
36
- : '#aaa'
37
- : active
38
- ? 'black'
39
- : '#ccc'};
40
- `
41
- )}
42
- />
43
- )
44
- )
45
-
46
- export const EditorValue = React.forwardRef(
47
- (
48
- {
49
- className,
50
- value,
51
- ...props
52
- }: PropsWithChildren<
53
- {
54
- value: any
55
- } & BaseProps
56
- >,
57
- ref: Ref<OrNull<null>>
58
- ) => {
59
- const textLines = value.document.nodes
60
- .map(node => node.text)
61
- .toArray()
62
- .join('\n')
63
- return (
64
- <div
65
- ref={ref}
66
- {...props}
67
- className={cx(
68
- className,
69
- css`
70
- margin: 30px -20px 0;
71
- `
72
- )}
73
- >
74
- <div
75
- className={css`
76
- font-size: 14px;
77
- padding: 5px 20px;
78
- color: #404040;
79
- border-top: 2px solid #eeeeee;
80
- background: #f8f8f8;
81
- `}
82
- >
83
- Slate's value as text
84
- </div>
85
- <div
86
- className={css`
87
- color: #404040;
88
- font: 12px monospace;
89
- white-space: pre-wrap;
90
- padding: 10px 20px;
91
- div {
92
- margin: 0 0 0.5em;
93
- }
94
- `}
95
- >
96
- {textLines}
97
- </div>
98
- </div>
99
- )
100
- }
101
- )
102
-
103
- export const Icon = React.forwardRef(
104
- (
105
- { className, ...props }: PropsWithChildren<BaseProps>,
106
- ref: Ref<OrNull<HTMLSpanElement>>
107
- ) => (
108
- <span
109
- {...props}
110
- ref={ref}
111
- className={cx(
112
- 'material-icons',
113
- className,
114
- css`
115
- font-size: 18px;
116
- vertical-align: text-bottom;
117
- `
118
- )}
119
- />
120
- )
121
- )
122
-
123
- export const Instruction = React.forwardRef(
124
- (
125
- { className, ...props }: PropsWithChildren<BaseProps>,
126
- ref: Ref<OrNull<HTMLDivElement>>
127
- ) => (
128
- <div
129
- {...props}
130
- ref={ref}
131
- className={cx(
132
- className,
133
- css`
134
- white-space: pre-wrap;
135
- margin: 0 -20px 10px;
136
- padding: 10px 20px;
137
- font-size: 14px;
138
- background: #f8f8e8;
139
- `
140
- )}
141
- />
142
- )
143
- )
144
-
145
- export const Menu = React.forwardRef(
146
- (
147
- { className, ...props }: PropsWithChildren<BaseProps>,
148
- ref: Ref<OrNull<HTMLDivElement>>
149
- ) => (
150
- <div
151
- {...props}
152
- ref={ref}
153
- className={cx(
154
- className,
155
- css`
156
- & > * {
157
- display: inline-block;
158
- }
159
-
160
- & > * + * {
161
- margin-left: 15px;
162
- }
163
- `
164
- )}
165
- />
166
- )
167
- )
168
-
169
- export const Portal = ({ children }) => {
170
- return typeof document === 'object'
171
- ? ReactDOM.createPortal(children, document.body)
172
- : null
173
- }
174
-
175
- export const Toolbar = React.forwardRef(
176
- (
177
- { className, ...props }: PropsWithChildren<BaseProps>,
178
- ref: Ref<OrNull<HTMLDivElement>>
179
- ) => (
180
- <Menu
181
- {...props}
182
- ref={ref}
183
- className={cx(
184
- className,
185
- css`
186
- position: relative;
187
- padding: 16px 16px 16px;
188
- border-bottom: 2px solid #eee;
189
- background-color: #FFF
190
- `
191
- )}
192
- />
193
- )
194
- )
@@ -1,262 +0,0 @@
1
- import React, { useCallback, useMemo, useState } from 'react'
2
- import isHotkey from 'is-hotkey'
3
- import { Editable, withReact, useSlate, Slate } from 'slate-react'
4
- import {
5
- Editor,
6
- Transforms,
7
- createEditor,
8
- Descendant,
9
- Element as SlateElement,
10
- } from 'slate'
11
- import { withHistory } from 'slate-history'
12
-
13
- import { Button, Icon, Toolbar } from './components'
14
- import {
15
- FormatBold,
16
- FormatItalic,
17
- FormatUnderlined,
18
- Code,
19
- LooksOne,
20
- LooksTwo,
21
- FormatQuote,
22
- FormatListNumbered,
23
- FormatListBulleted,
24
- FormatAlignLeft,
25
- FormatAlignCenter,
26
- FormatAlignRight,
27
- FormatAlignJustify
28
- } from '@mui/icons-material'
29
-
30
- const HOTKEYS = {
31
- 'mod+b': 'bold',
32
- 'mod+i': 'italic',
33
- 'mod+u': 'underline',
34
- 'mod+`': 'code',
35
- }
36
-
37
- const LIST_TYPES = ['numbered-list', 'bulleted-list']
38
- const TEXT_ALIGN_TYPES = ['left', 'center', 'right', 'justify']
39
-
40
- const RichTextExample = () => {
41
- const renderElement = useCallback(props => <Element {...props} />, [])
42
- const renderLeaf = useCallback(props => <Leaf {...props} />, [])
43
- const editor = useMemo(() => withHistory(withReact(createEditor())), [])
44
- return (
45
- <Slate editor={editor} value={initialValue} >
46
- <Toolbar>
47
- <MarkButton format="bold" icon={<FormatBold/>} />
48
- <MarkButton format="italic" icon={<FormatItalic/>} />
49
- <MarkButton format="underline" icon={<FormatUnderlined/>} />
50
- <MarkButton format="code" icon={<Code/>} />
51
- <BlockButton format="heading-one" icon={<LooksOne/>} />
52
- <BlockButton format="heading-two" icon={<LooksTwo/>} />
53
- <BlockButton format="block-quote" icon={<FormatQuote/>} />
54
- <BlockButton format="numbered-list" icon={<FormatListNumbered/>} />
55
- <BlockButton format="bulleted-list" icon={<FormatListBulleted/>} />
56
- <BlockButton format="left" icon={<FormatAlignLeft/>} />
57
- <BlockButton format="center" icon={<FormatAlignCenter/>} />
58
- <BlockButton format="right" icon={<FormatAlignRight/>} />
59
- <BlockButton format="justify" icon={<FormatAlignJustify/>} />
60
- </Toolbar>
61
- <Editable
62
- renderElement={renderElement}
63
- renderLeaf={renderLeaf}
64
- placeholder="Digite seu texto aqui"
65
- spellCheck
66
- autoFocus
67
- style={{height:275, width:'100%', backgroundColor:'#EBEBEB', border: '1px solid #E0E0E0', overflow:'auto'}}
68
- onKeyDown={event => {
69
- for (const hotkey in HOTKEYS) {
70
- if (isHotkey(hotkey, event as any)) {
71
- event.preventDefault()
72
- const mark = HOTKEYS[hotkey]
73
- toggleMark(editor, mark)
74
- }
75
- }
76
- }}
77
- />
78
- </Slate>
79
- )
80
- }
81
-
82
- const toggleBlock = (editor, format) => {
83
- const isActive = isBlockActive(
84
- editor,
85
- format,
86
- TEXT_ALIGN_TYPES.includes(format) ? 'align' : 'type'
87
- )
88
- const isList = LIST_TYPES.includes(format)
89
-
90
- Transforms.unwrapNodes(editor, {
91
- match: n =>
92
- !Editor.isEditor(n) &&
93
- SlateElement.isElement(n) &&
94
- // @ts-ignore
95
- LIST_TYPES.includes(n.type) &&
96
- !TEXT_ALIGN_TYPES.includes(format),
97
- split: true,
98
- })
99
- let newProperties: Partial<SlateElement>
100
- if (TEXT_ALIGN_TYPES.includes(format)) {
101
- newProperties = {
102
- // @ts-ignore
103
- align: isActive ? undefined : format,
104
- }
105
- } else {
106
- newProperties = {
107
- // @ts-ignore
108
- type: isActive ? 'paragraph' : isList ? 'list-item' : format,
109
- }
110
- }
111
- Transforms.setNodes<SlateElement>(editor, newProperties)
112
-
113
- if (!isActive && isList) {
114
- const block = { type: format, children: [] }
115
- Transforms.wrapNodes(editor, block)
116
- }
117
- }
118
-
119
- const toggleMark = (editor, format) => {
120
- const isActive = isMarkActive(editor, format)
121
-
122
- if (isActive) {
123
- Editor.removeMark(editor, format)
124
- } else {
125
- Editor.addMark(editor, format, true)
126
- }
127
- }
128
-
129
- const isBlockActive = (editor, format, blockType = 'type') => {
130
- const { selection } = editor
131
- if (!selection) return false
132
-
133
- const [match] = Array.from(
134
- Editor.nodes(editor, {
135
- at: Editor.unhangRange(editor, selection),
136
- match: n =>
137
- !Editor.isEditor(n) &&
138
- SlateElement.isElement(n) &&
139
- n[blockType] === format,
140
- })
141
- )
142
-
143
- return !!match
144
- }
145
-
146
- const isMarkActive = (editor, format) => {
147
- const marks = Editor.marks(editor)
148
- return marks ? marks[format] === true : false
149
- }
150
-
151
- const Element = ({ attributes, children, element }) => {
152
- const style = { textAlign: element.align }
153
- switch (element.type) {
154
- case 'block-quote':
155
- return (
156
- <blockquote style={style} {...attributes}>
157
- {children}
158
- </blockquote>
159
- )
160
- case 'bulleted-list':
161
- return (
162
- <ul style={style} {...attributes}>
163
- {children}
164
- </ul>
165
- )
166
- case 'heading-one':
167
- return (
168
- <h1 style={style} {...attributes}>
169
- {children}
170
- </h1>
171
- )
172
- case 'heading-two':
173
- return (
174
- <h2 style={style} {...attributes}>
175
- {children}
176
- </h2>
177
- )
178
- case 'list-item':
179
- return (
180
- <li style={style} {...attributes}>
181
- {children}
182
- </li>
183
- )
184
- case 'numbered-list':
185
- return (
186
- <ol style={style} {...attributes}>
187
- {children}
188
- </ol>
189
- )
190
- default:
191
- return (
192
- <p style={style} {...attributes}>
193
- {children}
194
- </p>
195
- )
196
- }
197
- }
198
-
199
- const Leaf = ({ attributes, children, leaf }) => {
200
- if (leaf.bold) {
201
- children = <strong>{children}</strong>
202
- }
203
-
204
- if (leaf.code) {
205
- children = <code>{children}</code>
206
- }
207
-
208
- if (leaf.italic) {
209
- children = <em>{children}</em>
210
- }
211
-
212
- if (leaf.underline) {
213
- children = <u>{children}</u>
214
- }
215
-
216
- return <span {...attributes}>{children}</span>
217
- }
218
-
219
- const BlockButton = ({ format, icon }) => {
220
- const editor = useSlate()
221
- return (
222
- <Button
223
- active={isBlockActive(
224
- editor,
225
- format,
226
- TEXT_ALIGN_TYPES.includes(format) ? 'align' : 'type'
227
- )}
228
- onMouseDown={event => {
229
- event.preventDefault()
230
- toggleBlock(editor, format)
231
- }}
232
- >
233
- {icon}
234
- </Button>
235
- )
236
- }
237
-
238
- const MarkButton = ({ format, icon }) => {
239
- const editor = useSlate()
240
- return (
241
- <Button
242
- active={isMarkActive(editor, format)}
243
- onMouseDown={event => {
244
- event.preventDefault()
245
- toggleMark(editor, format)
246
- }}
247
- >
248
- {icon}
249
- </Button>
250
- )
251
- }
252
-
253
- const initialValue = [
254
- {
255
- type: 'paragraph',
256
- children: [
257
- { text: '' }
258
- ],
259
- },
260
- ]
261
-
262
- export default RichTextExample