@bbl-digital/snorre 4.1.76 → 4.1.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. package/.husky/_/husky.sh +30 -30
  2. package/.prettierrc +6 -6
  3. package/.vscode/settings.json +3 -3
  4. package/README.md +3 -3
  5. package/dist/bundle.js +563 -563
  6. package/esm/app-shell/index.js +2 -2
  7. package/esm/core/Alert/styles.js +6 -6
  8. package/esm/core/AppLoader/styles.js +1 -1
  9. package/esm/core/Autocomplete/styles.js +18 -18
  10. package/esm/core/Banner/styles.js +4 -4
  11. package/esm/core/BarAndLineComposedChart/styles.js +1 -1
  12. package/esm/core/BarChartWithCustomizedEvent/styles.js +1 -1
  13. package/esm/core/Box/styles.js +7 -7
  14. package/esm/core/BoxedTable/DraggableRow/styles.js +5 -5
  15. package/esm/core/BoxedTable/HeaderCell/styles.js +2 -2
  16. package/esm/core/BoxedTable/RowCell/index.js +1 -1
  17. package/esm/core/BoxedTable/RowCell/styles.js +9 -9
  18. package/esm/core/BoxedTable/TableHeader/styles.js +1 -1
  19. package/esm/core/BoxedTable/TableRow/styles.js +8 -8
  20. package/esm/core/BoxedTable/styles.js +11 -11
  21. package/esm/core/Button/styles.js +19 -19
  22. package/esm/core/Calendar/CalendarEvent/styles.js +5 -5
  23. package/esm/core/Calendar/CalendarSmallEvent/styles.js +5 -5
  24. package/esm/core/Calendar/styles.js +5 -5
  25. package/esm/core/Card/styles.js +11 -11
  26. package/esm/core/Checkbox/styles.js +5 -5
  27. package/esm/core/CollapseList/styles.js +2 -2
  28. package/esm/core/CommentsTimeline/CommentLine/styles.js +4 -4
  29. package/esm/core/CommentsTimeline/styles.js +1 -1
  30. package/esm/core/CustomText/styles.js +2 -2
  31. package/esm/core/Datepicker/styles.js +9 -9
  32. package/esm/core/DatepickerRange/styles.js +9 -9
  33. package/esm/core/Divider/styles.js +5 -5
  34. package/esm/core/Dropdown/styles.js +3 -3
  35. package/esm/core/DropdownMenu/styles.js +3 -3
  36. package/esm/core/FileInput/styles.js +14 -14
  37. package/esm/core/GoogleButton/styles.js +1 -1
  38. package/esm/core/Header/styles.js +7 -7
  39. package/esm/core/HighlightText/styles.js +1 -1
  40. package/esm/core/Image/styles.js +6 -6
  41. package/esm/core/ImagePicker/IconWithBackground.js +1 -1
  42. package/esm/core/ImagePicker/UploadButton.js +1 -1
  43. package/esm/core/ImagePicker/styles.js +11 -11
  44. package/esm/core/ImageViewer/index.js +1 -1
  45. package/esm/core/ImageViewer/styles.js +7 -7
  46. package/esm/core/InfoButton/styles.js +9 -9
  47. package/esm/core/Input/index.js +1 -1
  48. package/esm/core/Input/styles.js +19 -19
  49. package/esm/core/Link/styles.js +10 -10
  50. package/esm/core/List/Item.js +1 -1
  51. package/esm/core/List/styles.js +11 -11
  52. package/esm/core/ListPager/styles.js +3 -3
  53. package/esm/core/Modal/ActionButtons/index.js +1 -1
  54. package/esm/core/Modal/styles.js +8 -8
  55. package/esm/core/NoticeCard/privateComponents/NoticeAttachmentBlock/styles.js +4 -4
  56. package/esm/core/NoticeCard/privateComponents/NoticeAttachmentList/styles.js +1 -1
  57. package/esm/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.js +3 -3
  58. package/esm/core/NoticeCard/styles.js +4 -4
  59. package/esm/core/NotificationCounter/styles.js +1 -1
  60. package/esm/core/NotificationsMenu/NotificationRow/styles.js +3 -3
  61. package/esm/core/NotificationsMenu/styles.js +3 -3
  62. package/esm/core/PieChart/styles.js +2 -2
  63. package/esm/core/PreemptionCard/styles.js +3 -3
  64. package/esm/core/PreemptionCardLoading/styles.js +3 -3
  65. package/esm/core/QuillEditor/styles.js +3 -3
  66. package/esm/core/Radio/styles.js +4 -4
  67. package/esm/core/SearchFilter/index.js +1 -1
  68. package/esm/core/SearchFilter/styles.js +14 -14
  69. package/esm/core/SearchSelect/styles.js +5 -5
  70. package/esm/core/Select/index.js +1 -1
  71. package/esm/core/Select/styles.js +18 -18
  72. package/esm/core/SimpleBarChart/styles.js +1 -1
  73. package/esm/core/SimpleLineChart/styles.js +1 -1
  74. package/esm/core/Skeleton/styles.js +4 -4
  75. package/esm/core/Spinner/styles.js +5 -5
  76. package/esm/core/Stepper/MobileStep/styles.js +7 -7
  77. package/esm/core/Stepper/Step/index.js +1 -1
  78. package/esm/core/Stepper/Step/styles.js +5 -5
  79. package/esm/core/Stepper/styles.js +3 -3
  80. package/esm/core/TabBar/TabItem/styles.js +1 -1
  81. package/esm/core/TabBar/styles.js +1 -1
  82. package/esm/core/TabNav/TabNavItem/styles.js +5 -5
  83. package/esm/core/TabNav/styles.js +8 -8
  84. package/esm/core/Table/styles.js +16 -16
  85. package/esm/core/Tag/styles.js +13 -13
  86. package/esm/core/Text/styles.js +16 -16
  87. package/esm/core/Textarea/styles.js +7 -7
  88. package/esm/core/Timeline/TimelineStep/styles.js +6 -6
  89. package/esm/core/Timeline/styles.js +1 -1
  90. package/esm/core/Timepicker/index.js +3 -3
  91. package/esm/core/Timepicker/styles.js +7 -7
  92. package/esm/core/Tooltip/styles.js +2 -2
  93. package/esm/core/UnitIllustration/index.js +9 -9
  94. package/esm/core/UserMenu/styles.js +7 -7
  95. package/esm/core/Video/styles.js +1 -1
  96. package/esm/core/YearWheel/styles.js +3 -3
  97. package/esm/enums/Keyboard.js +2 -2
  98. package/esm/globals/styles/quill.module.js +1 -0
  99. package/esm/globals/styles/styles.js +1 -1
  100. package/esm/illustrations/styles.js +2 -2
  101. package/esm/layout/Footer/FooterButton/styles.js +1 -1
  102. package/esm/layout/Footer/FooterCol/styles.js +1 -1
  103. package/esm/layout/Footer/FooterGroup/styles.js +1 -1
  104. package/esm/layout/Footer/FooterLabel/styles.js +1 -1
  105. package/esm/layout/Footer/FooterLink/styles.js +1 -1
  106. package/esm/layout/Footer/styles.js +2 -2
  107. package/esm/layout/Layout/styles.js +1 -1
  108. package/esm/layout/LayoutShell/styles.js +8 -8
  109. package/esm/layout/Menu/AppPicker/styles.js +5 -5
  110. package/esm/layout/Menu/MainMenu/styles.js +2 -2
  111. package/esm/layout/Menu/MenuItem/styles.js +3 -3
  112. package/esm/layout/Menu/MenuSpacer/styles.js +1 -1
  113. package/esm/layout/Menu/MenuTop/styles.js +3 -3
  114. package/esm/layout/Menu/SecondaryMenu/styles.js +4 -4
  115. package/esm/layout/Menu/SecondaryMenuItem/styles.js +1 -1
  116. package/esm/layout/Menu/styles.js +1 -1
  117. package/esm/layout/Submenu/SubmenuItem/styles.js +3 -3
  118. package/esm/layout/Submenu/styles.js +11 -11
  119. package/esm/layout/Topbar/styles.js +1 -1
  120. package/esm/shared/components/SbIconGrid/index.js +1 -1
  121. package/esm/shared/components/VisuallyHidden/index.js +4 -4
  122. package/esm/shared/recharts/CustomLegend/styles.js +2 -2
  123. package/esm/shared/recharts/CustomTooltip/styles.js +3 -3
  124. package/esm/utils/time.js +14 -14
  125. package/esm/v2/Memberbenefits/MemberbenefitsCard/styles.js +16 -16
  126. package/esm/v2/core/Box/styles.js +9 -9
  127. package/esm/v2/core/Button/styles.js +19 -19
  128. package/esm/v2/core/ButtonsFilter/styles.js +1 -1
  129. package/esm/v2/core/Chip/styles.js +11 -11
  130. package/esm/v2/core/TabNav/TabNavItem/styles.js +6 -6
  131. package/esm/v2/core/TabNav/styles.js +7 -7
  132. package/infrastructure/azure-pipelines.yml +34 -34
  133. package/jest.config.js +34 -34
  134. package/lib/app-shell/index.js +2 -2
  135. package/lib/core/Alert/styles.js +6 -6
  136. package/lib/core/AppLoader/styles.js +1 -1
  137. package/lib/core/Autocomplete/styles.d.ts.map +1 -1
  138. package/lib/core/Autocomplete/styles.js +18 -18
  139. package/lib/core/Banner/styles.d.ts.map +1 -1
  140. package/lib/core/Banner/styles.js +4 -4
  141. package/lib/core/BarAndLineComposedChart/styles.d.ts.map +1 -1
  142. package/lib/core/BarAndLineComposedChart/styles.js +1 -1
  143. package/lib/core/BarChartWithCustomizedEvent/styles.d.ts.map +1 -1
  144. package/lib/core/BarChartWithCustomizedEvent/styles.js +1 -1
  145. package/lib/core/Box/styles.d.ts.map +1 -1
  146. package/lib/core/Box/styles.js +7 -7
  147. package/lib/core/BoxedTable/DraggableRow/styles.d.ts.map +1 -1
  148. package/lib/core/BoxedTable/DraggableRow/styles.js +5 -5
  149. package/lib/core/BoxedTable/HeaderCell/styles.js +2 -2
  150. package/lib/core/BoxedTable/RowCell/index.js +1 -1
  151. package/lib/core/BoxedTable/RowCell/styles.js +9 -9
  152. package/lib/core/BoxedTable/TableHeader/styles.d.ts.map +1 -1
  153. package/lib/core/BoxedTable/TableHeader/styles.js +1 -1
  154. package/lib/core/BoxedTable/TableRow/styles.d.ts.map +1 -1
  155. package/lib/core/BoxedTable/TableRow/styles.js +8 -8
  156. package/lib/core/BoxedTable/styles.d.ts.map +1 -1
  157. package/lib/core/BoxedTable/styles.js +11 -11
  158. package/lib/core/Button/index.d.ts.map +1 -1
  159. package/lib/core/Button/styles.js +19 -19
  160. package/lib/core/Calendar/CalendarEvent/styles.d.ts.map +1 -1
  161. package/lib/core/Calendar/CalendarEvent/styles.js +5 -5
  162. package/lib/core/Calendar/CalendarSmallEvent/styles.d.ts.map +1 -1
  163. package/lib/core/Calendar/CalendarSmallEvent/styles.js +5 -5
  164. package/lib/core/Calendar/styles.d.ts.map +1 -1
  165. package/lib/core/Calendar/styles.js +5 -5
  166. package/lib/core/Card/styles.js +11 -11
  167. package/lib/core/Checkbox/styles.js +5 -5
  168. package/lib/core/CollapseList/styles.d.ts.map +1 -1
  169. package/lib/core/CollapseList/styles.js +2 -2
  170. package/lib/core/CommentsTimeline/CommentLine/styles.d.ts.map +1 -1
  171. package/lib/core/CommentsTimeline/CommentLine/styles.js +4 -4
  172. package/lib/core/CommentsTimeline/styles.d.ts.map +1 -1
  173. package/lib/core/CommentsTimeline/styles.js +1 -1
  174. package/lib/core/CustomText/styles.d.ts.map +1 -1
  175. package/lib/core/CustomText/styles.js +2 -2
  176. package/lib/core/Datepicker/styles.d.ts.map +1 -1
  177. package/lib/core/Datepicker/styles.js +9 -9
  178. package/lib/core/DatepickerRange/styles.d.ts.map +1 -1
  179. package/lib/core/DatepickerRange/styles.js +9 -9
  180. package/lib/core/Divider/styles.js +5 -5
  181. package/lib/core/Dropdown/styles.js +3 -3
  182. package/lib/core/DropdownMenu/styles.d.ts.map +1 -1
  183. package/lib/core/DropdownMenu/styles.js +3 -3
  184. package/lib/core/FileInput/styles.d.ts.map +1 -1
  185. package/lib/core/FileInput/styles.js +14 -14
  186. package/lib/core/GoogleButton/styles.d.ts.map +1 -1
  187. package/lib/core/GoogleButton/styles.js +1 -1
  188. package/lib/core/Header/styles.js +7 -7
  189. package/lib/core/HighlightText/styles.d.ts.map +1 -1
  190. package/lib/core/HighlightText/styles.js +1 -1
  191. package/lib/core/Image/styles.js +6 -6
  192. package/lib/core/ImagePicker/IconWithBackground.js +1 -1
  193. package/lib/core/ImagePicker/UploadButton.js +1 -1
  194. package/lib/core/ImagePicker/styles.js +11 -11
  195. package/lib/core/ImageViewer/index.js +1 -1
  196. package/lib/core/ImageViewer/styles.js +7 -7
  197. package/lib/core/InfoButton/styles.d.ts.map +1 -1
  198. package/lib/core/InfoButton/styles.js +9 -9
  199. package/lib/core/Input/index.d.ts.map +1 -1
  200. package/lib/core/Input/index.js +1 -1
  201. package/lib/core/Input/styles.js +19 -19
  202. package/lib/core/Link/styles.d.ts.map +1 -1
  203. package/lib/core/Link/styles.js +10 -10
  204. package/lib/core/List/Item.js +1 -1
  205. package/lib/core/List/styles.js +11 -11
  206. package/lib/core/ListPager/styles.d.ts.map +1 -1
  207. package/lib/core/ListPager/styles.js +3 -3
  208. package/lib/core/Modal/ActionButtons/index.js +1 -1
  209. package/lib/core/Modal/index.d.ts.map +1 -1
  210. package/lib/core/Modal/styles.d.ts.map +1 -1
  211. package/lib/core/Modal/styles.js +8 -8
  212. package/lib/core/NoticeCard/privateComponents/NoticeAttachmentBlock/styles.d.ts.map +1 -1
  213. package/lib/core/NoticeCard/privateComponents/NoticeAttachmentBlock/styles.js +4 -4
  214. package/lib/core/NoticeCard/privateComponents/NoticeAttachmentList/styles.d.ts.map +1 -1
  215. package/lib/core/NoticeCard/privateComponents/NoticeAttachmentList/styles.js +1 -1
  216. package/lib/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.d.ts.map +1 -1
  217. package/lib/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.js +3 -3
  218. package/lib/core/NoticeCard/styles.d.ts.map +1 -1
  219. package/lib/core/NoticeCard/styles.js +4 -4
  220. package/lib/core/NotificationCounter/styles.js +1 -1
  221. package/lib/core/NotificationsMenu/NotificationRow/styles.d.ts.map +1 -1
  222. package/lib/core/NotificationsMenu/NotificationRow/styles.js +3 -3
  223. package/lib/core/NotificationsMenu/styles.d.ts.map +1 -1
  224. package/lib/core/NotificationsMenu/styles.js +3 -3
  225. package/lib/core/PieChart/styles.d.ts.map +1 -1
  226. package/lib/core/PieChart/styles.js +2 -2
  227. package/lib/core/PreemptionCard/styles.d.ts.map +1 -1
  228. package/lib/core/PreemptionCard/styles.js +3 -3
  229. package/lib/core/PreemptionCardLoading/styles.d.ts.map +1 -1
  230. package/lib/core/PreemptionCardLoading/styles.js +3 -3
  231. package/lib/core/QuillEditor/config.d.ts +3 -3
  232. package/lib/core/QuillEditor/styles.d.ts.map +1 -1
  233. package/lib/core/QuillEditor/styles.js +3 -3
  234. package/lib/core/Radio/styles.js +4 -4
  235. package/lib/core/SearchFilter/index.js +1 -1
  236. package/lib/core/SearchFilter/styles.d.ts.map +1 -1
  237. package/lib/core/SearchFilter/styles.js +14 -14
  238. package/lib/core/SearchSelect/styles.d.ts.map +1 -1
  239. package/lib/core/SearchSelect/styles.js +5 -5
  240. package/lib/core/Select/index.js +1 -1
  241. package/lib/core/Select/styles.d.ts.map +1 -1
  242. package/lib/core/Select/styles.js +18 -18
  243. package/lib/core/SimpleBarChart/styles.d.ts.map +1 -1
  244. package/lib/core/SimpleBarChart/styles.js +1 -1
  245. package/lib/core/SimpleLineChart/styles.d.ts.map +1 -1
  246. package/lib/core/SimpleLineChart/styles.js +1 -1
  247. package/lib/core/Skeleton/styles.d.ts.map +1 -1
  248. package/lib/core/Skeleton/styles.js +4 -4
  249. package/lib/core/Spinner/styles.js +5 -5
  250. package/lib/core/Stepper/MobileStep/styles.d.ts.map +1 -1
  251. package/lib/core/Stepper/MobileStep/styles.js +7 -7
  252. package/lib/core/Stepper/Step/index.js +1 -1
  253. package/lib/core/Stepper/Step/styles.d.ts.map +1 -1
  254. package/lib/core/Stepper/Step/styles.js +5 -5
  255. package/lib/core/Stepper/styles.d.ts.map +1 -1
  256. package/lib/core/Stepper/styles.js +3 -3
  257. package/lib/core/TabBar/TabItem/styles.d.ts.map +1 -1
  258. package/lib/core/TabBar/TabItem/styles.js +1 -1
  259. package/lib/core/TabBar/styles.d.ts.map +1 -1
  260. package/lib/core/TabBar/styles.js +1 -1
  261. package/lib/core/TabNav/TabNavItem/styles.d.ts.map +1 -1
  262. package/lib/core/TabNav/TabNavItem/styles.js +5 -5
  263. package/lib/core/TabNav/styles.d.ts.map +1 -1
  264. package/lib/core/TabNav/styles.js +8 -8
  265. package/lib/core/Table/styles.d.ts.map +1 -1
  266. package/lib/core/Table/styles.js +16 -16
  267. package/lib/core/Tag/styles.js +13 -13
  268. package/lib/core/Text/styles.js +16 -16
  269. package/lib/core/Textarea/styles.d.ts.map +1 -1
  270. package/lib/core/Textarea/styles.js +7 -7
  271. package/lib/core/Timeline/TimelineStep/styles.d.ts.map +1 -1
  272. package/lib/core/Timeline/TimelineStep/styles.js +6 -6
  273. package/lib/core/Timeline/styles.d.ts.map +1 -1
  274. package/lib/core/Timeline/styles.js +1 -1
  275. package/lib/core/Timepicker/index.js +3 -3
  276. package/lib/core/Timepicker/styles.d.ts.map +1 -1
  277. package/lib/core/Timepicker/styles.js +7 -7
  278. package/lib/core/Tooltip/styles.js +2 -2
  279. package/lib/core/UnitIllustration/index.js +9 -9
  280. package/lib/core/UserMenu/styles.d.ts.map +1 -1
  281. package/lib/core/UserMenu/styles.js +7 -7
  282. package/lib/core/Video/styles.d.ts.map +1 -1
  283. package/lib/core/Video/styles.js +1 -1
  284. package/lib/core/YearWheel/styles.d.ts.map +1 -1
  285. package/lib/core/YearWheel/styles.js +3 -3
  286. package/lib/enums/Keyboard.js +2 -2
  287. package/lib/globals/styles/quill.module.d.ts +2 -0
  288. package/lib/globals/styles/quill.module.d.ts.map +1 -0
  289. package/lib/globals/styles/quill.module.js +1 -0
  290. package/lib/globals/styles/styles.js +1 -1
  291. package/lib/illustrations/styles.js +2 -2
  292. package/lib/layout/Footer/FooterButton/styles.d.ts.map +1 -1
  293. package/lib/layout/Footer/FooterButton/styles.js +1 -1
  294. package/lib/layout/Footer/FooterCol/styles.d.ts.map +1 -1
  295. package/lib/layout/Footer/FooterCol/styles.js +1 -1
  296. package/lib/layout/Footer/FooterGroup/styles.d.ts.map +1 -1
  297. package/lib/layout/Footer/FooterGroup/styles.js +1 -1
  298. package/lib/layout/Footer/FooterLabel/styles.d.ts.map +1 -1
  299. package/lib/layout/Footer/FooterLabel/styles.js +1 -1
  300. package/lib/layout/Footer/FooterLink/styles.d.ts.map +1 -1
  301. package/lib/layout/Footer/FooterLink/styles.js +1 -1
  302. package/lib/layout/Footer/styles.d.ts.map +1 -1
  303. package/lib/layout/Footer/styles.js +2 -2
  304. package/lib/layout/Layout/styles.d.ts.map +1 -1
  305. package/lib/layout/Layout/styles.js +1 -1
  306. package/lib/layout/LayoutShell/styles.d.ts.map +1 -1
  307. package/lib/layout/LayoutShell/styles.js +8 -8
  308. package/lib/layout/Menu/AppPicker/styles.d.ts.map +1 -1
  309. package/lib/layout/Menu/AppPicker/styles.js +5 -5
  310. package/lib/layout/Menu/MainMenu/styles.d.ts.map +1 -1
  311. package/lib/layout/Menu/MainMenu/styles.js +2 -2
  312. package/lib/layout/Menu/MenuItem/styles.d.ts.map +1 -1
  313. package/lib/layout/Menu/MenuItem/styles.js +3 -3
  314. package/lib/layout/Menu/MenuSpacer/styles.d.ts.map +1 -1
  315. package/lib/layout/Menu/MenuSpacer/styles.js +1 -1
  316. package/lib/layout/Menu/MenuTop/styles.d.ts.map +1 -1
  317. package/lib/layout/Menu/MenuTop/styles.js +3 -3
  318. package/lib/layout/Menu/SecondaryMenu/styles.d.ts.map +1 -1
  319. package/lib/layout/Menu/SecondaryMenu/styles.js +4 -4
  320. package/lib/layout/Menu/SecondaryMenuItem/styles.js +1 -1
  321. package/lib/layout/Menu/styles.d.ts.map +1 -1
  322. package/lib/layout/Menu/styles.js +1 -1
  323. package/lib/layout/Submenu/SubmenuItem/styles.js +3 -3
  324. package/lib/layout/Submenu/styles.d.ts.map +1 -1
  325. package/lib/layout/Submenu/styles.js +11 -11
  326. package/lib/layout/Topbar/styles.js +1 -1
  327. package/lib/shared/components/SbIconGrid/index.js +1 -1
  328. package/lib/shared/components/VisuallyHidden/index.d.ts.map +1 -1
  329. package/lib/shared/components/VisuallyHidden/index.js +4 -4
  330. package/lib/shared/recharts/CustomLegend/styles.d.ts.map +1 -1
  331. package/lib/shared/recharts/CustomLegend/styles.js +2 -2
  332. package/lib/shared/recharts/CustomTooltip/styles.d.ts.map +1 -1
  333. package/lib/shared/recharts/CustomTooltip/styles.js +3 -3
  334. package/lib/utils/time.js +14 -14
  335. package/lib/v2/Memberbenefits/MemberbenefitsCard/styles.d.ts.map +1 -1
  336. package/lib/v2/Memberbenefits/MemberbenefitsCard/styles.js +16 -16
  337. package/lib/v2/core/Box/styles.d.ts.map +1 -1
  338. package/lib/v2/core/Box/styles.js +9 -9
  339. package/lib/v2/core/Button/index.d.ts.map +1 -1
  340. package/lib/v2/core/Button/styles.js +19 -19
  341. package/lib/v2/core/ButtonsFilter/styles.d.ts.map +1 -1
  342. package/lib/v2/core/ButtonsFilter/styles.js +1 -1
  343. package/lib/v2/core/Chip/styles.d.ts.map +1 -1
  344. package/lib/v2/core/Chip/styles.js +11 -11
  345. package/lib/v2/core/TabNav/TabNavItem/styles.d.ts.map +1 -1
  346. package/lib/v2/core/TabNav/TabNavItem/styles.js +6 -6
  347. package/lib/v2/core/TabNav/styles.d.ts.map +1 -1
  348. package/lib/v2/core/TabNav/styles.js +7 -7
  349. package/package.json +1 -1
  350. package/rollup.config.js +13 -13
  351. package/theme-bbls.js +467 -467
  352. package/theme-generator.js +448 -448
  353. package/theme-helpers.js +62 -62
  354. package/vite.config.js +6 -6
  355. package/esm/core/Editor/Editor.stories.js +0 -56
  356. package/esm/core/Editor/config.js +0 -7
  357. package/esm/core/Editor/index.js +0 -113
  358. package/esm/core/Editor/styles.js +0 -43
  359. package/esm/core/EditorQuillReact/EditorQuillReact.stories.js +0 -59
  360. package/esm/core/EditorQuillReact/IndentAttributor.js +0 -15
  361. package/esm/core/EditorQuillReact/config.js +0 -31
  362. package/esm/core/EditorQuillReact/index.js +0 -103
  363. package/esm/core/EditorQuillReact/styles.js +0 -34
  364. package/esm/shared/types/LoadedType.js +0 -1
  365. package/lib/core/Editor/Editor.stories.d.ts +0 -11
  366. package/lib/core/Editor/Editor.stories.d.ts.map +0 -1
  367. package/lib/core/Editor/Editor.stories.js +0 -56
  368. package/lib/core/Editor/config.d.ts +0 -6
  369. package/lib/core/Editor/config.d.ts.map +0 -1
  370. package/lib/core/Editor/config.js +0 -7
  371. package/lib/core/Editor/index.d.ts +0 -44
  372. package/lib/core/Editor/index.d.ts.map +0 -1
  373. package/lib/core/Editor/index.js +0 -113
  374. package/lib/core/Editor/styles.d.ts +0 -14
  375. package/lib/core/Editor/styles.d.ts.map +0 -1
  376. package/lib/core/Editor/styles.js +0 -43
  377. package/lib/core/EditorQuillReact/EditorQuillReact.stories.d.ts +0 -8
  378. package/lib/core/EditorQuillReact/EditorQuillReact.stories.d.ts.map +0 -1
  379. package/lib/core/EditorQuillReact/EditorQuillReact.stories.js +0 -59
  380. package/lib/core/EditorQuillReact/IndentAttributor.d.ts +0 -7
  381. package/lib/core/EditorQuillReact/IndentAttributor.d.ts.map +0 -1
  382. package/lib/core/EditorQuillReact/IndentAttributor.js +0 -15
  383. package/lib/core/EditorQuillReact/config.d.ts +0 -30
  384. package/lib/core/EditorQuillReact/config.d.ts.map +0 -1
  385. package/lib/core/EditorQuillReact/config.js +0 -31
  386. package/lib/core/EditorQuillReact/index.d.ts +0 -23
  387. package/lib/core/EditorQuillReact/index.d.ts.map +0 -1
  388. package/lib/core/EditorQuillReact/index.js +0 -103
  389. package/lib/core/EditorQuillReact/styles.d.ts +0 -13
  390. package/lib/core/EditorQuillReact/styles.d.ts.map +0 -1
  391. package/lib/core/EditorQuillReact/styles.js +0 -34
  392. package/lib/shared/types/LoadedType.d.ts +0 -7
  393. package/lib/shared/types/LoadedType.d.ts.map +0 -1
  394. package/lib/shared/types/LoadedType.js +0 -1
package/theme-helpers.js CHANGED
@@ -1,62 +1,62 @@
1
- // Helpers
2
- const hexToRGBA = (hex, alpha) => {
3
- var r = parseInt(hex.slice(1, 3), 16),
4
- g = parseInt(hex.slice(3, 5), 16),
5
- b = parseInt(hex.slice(5, 7), 16)
6
-
7
- return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'
8
- }
9
-
10
- const hexifyWithWhiteBackground = (color) => {
11
- var values = color
12
- .replace(/rgba?\(/, '')
13
- .replace(/\)/, '')
14
- .replace(/[\s+]/g, '')
15
- .split(',')
16
- var a = parseFloat(values[3] || 1),
17
- r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
18
- g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
19
- b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255)
20
- return (
21
- '#' +
22
- ('0' + r.toString(16)).slice(-2) +
23
- ('0' + g.toString(16)).slice(-2) +
24
- ('0' + b.toString(16)).slice(-2)
25
- )
26
- }
27
-
28
- const shadeColor = (color, percent) => {
29
- var R = parseInt(color.substring(1, 3), 16)
30
- var G = parseInt(color.substring(3, 5), 16)
31
- var B = parseInt(color.substring(5, 7), 16)
32
-
33
- R = parseInt('' + (R * (100 + percent)) / 100)
34
- G = parseInt('' + (G * (100 + percent)) / 100)
35
- B = parseInt('' + (B * (100 + percent)) / 100)
36
-
37
- R = R < 255 ? R : 255
38
- G = G < 255 ? G : 255
39
- B = B < 255 ? B : 255
40
-
41
- var RR = R.toString(16).length === 1 ? '0' + R.toString(16) : R.toString(16)
42
- var GG = G.toString(16).length === 1 ? '0' + G.toString(16) : G.toString(16)
43
- var BB = B.toString(16).length === 1 ? '0' + B.toString(16) : B.toString(16)
44
-
45
- return '#' + RR + GG + BB
46
- }
47
-
48
- const getContrastYIQ = (hexcolor) => {
49
- hexcolor = hexcolor.replace('#', '')
50
- var r = parseInt(hexcolor.substr(0, 2), 16)
51
- var g = parseInt(hexcolor.substr(2, 2), 16)
52
- var b = parseInt(hexcolor.substr(4, 2), 16)
53
- var yiq = (r * 299 + g * 587 + b * 114) / 1000
54
- return yiq >= 128 ? 'black' : 'white'
55
- }
56
-
57
- module.exports = {
58
- hexToRGBA,
59
- hexifyWithWhiteBackground,
60
- shadeColor,
61
- getContrastYIQ,
62
- }
1
+ // Helpers
2
+ const hexToRGBA = (hex, alpha) => {
3
+ var r = parseInt(hex.slice(1, 3), 16),
4
+ g = parseInt(hex.slice(3, 5), 16),
5
+ b = parseInt(hex.slice(5, 7), 16)
6
+
7
+ return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'
8
+ }
9
+
10
+ const hexifyWithWhiteBackground = (color) => {
11
+ var values = color
12
+ .replace(/rgba?\(/, '')
13
+ .replace(/\)/, '')
14
+ .replace(/[\s+]/g, '')
15
+ .split(',')
16
+ var a = parseFloat(values[3] || 1),
17
+ r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255),
18
+ g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255),
19
+ b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255)
20
+ return (
21
+ '#' +
22
+ ('0' + r.toString(16)).slice(-2) +
23
+ ('0' + g.toString(16)).slice(-2) +
24
+ ('0' + b.toString(16)).slice(-2)
25
+ )
26
+ }
27
+
28
+ const shadeColor = (color, percent) => {
29
+ var R = parseInt(color.substring(1, 3), 16)
30
+ var G = parseInt(color.substring(3, 5), 16)
31
+ var B = parseInt(color.substring(5, 7), 16)
32
+
33
+ R = parseInt('' + (R * (100 + percent)) / 100)
34
+ G = parseInt('' + (G * (100 + percent)) / 100)
35
+ B = parseInt('' + (B * (100 + percent)) / 100)
36
+
37
+ R = R < 255 ? R : 255
38
+ G = G < 255 ? G : 255
39
+ B = B < 255 ? B : 255
40
+
41
+ var RR = R.toString(16).length === 1 ? '0' + R.toString(16) : R.toString(16)
42
+ var GG = G.toString(16).length === 1 ? '0' + G.toString(16) : G.toString(16)
43
+ var BB = B.toString(16).length === 1 ? '0' + B.toString(16) : B.toString(16)
44
+
45
+ return '#' + RR + GG + BB
46
+ }
47
+
48
+ const getContrastYIQ = (hexcolor) => {
49
+ hexcolor = hexcolor.replace('#', '')
50
+ var r = parseInt(hexcolor.substr(0, 2), 16)
51
+ var g = parseInt(hexcolor.substr(2, 2), 16)
52
+ var b = parseInt(hexcolor.substr(4, 2), 16)
53
+ var yiq = (r * 299 + g * 587 + b * 114) / 1000
54
+ return yiq >= 128 ? 'black' : 'white'
55
+ }
56
+
57
+ module.exports = {
58
+ hexToRGBA,
59
+ hexifyWithWhiteBackground,
60
+ shadeColor,
61
+ getContrastYIQ,
62
+ }
package/vite.config.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
-
4
- export default defineConfig({
5
- plugins: [react()],
6
- })
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ })
@@ -1,56 +0,0 @@
1
- import Editor from '.';
2
- const meta = {
3
- title: 'Core/Editor',
4
- component: Editor
5
- };
6
- export default meta;
7
- export const Default = {
8
- args: {
9
- label: 'Editor-label',
10
- initialValue: 'Initial value',
11
- onChange: e => console.log(e)
12
- },
13
- name: 'Default'
14
- };
15
- export const Rich = {
16
- args: {
17
- label: 'Editor-label',
18
- onChange: e => console.log(e),
19
- type: 'rich',
20
- allowImages: true
21
- },
22
- name: 'Rich'
23
- };
24
- export const ValidElements = {
25
- args: {
26
- label: 'Editor-label',
27
- onChange: e => console.log(e),
28
- type: 'custom',
29
- customToolbar: 'bold italic underline',
30
- validElements: 'strong,p,span,em'
31
- },
32
- name: 'Valid elements'
33
- };
34
- export const InvalidElements = {
35
- args: {
36
- label: 'Editor-label',
37
- onChange: e => console.log(e),
38
- type: 'custom',
39
- customToolbar: 'bold italic underline',
40
- invalidElements: 'button,a,h1,h2,h3,h4,h5,h6'
41
- },
42
- name: 'Invalid elements'
43
- };
44
- export const AllProps = {
45
- args: {
46
- label: 'Editor-label',
47
- onChange: e => console.log(e),
48
- type: 'rich',
49
- allowImages: true,
50
- invalidElements: 'button,a,h1,h2,h3,h4,h5,h6',
51
- invalidMessage: 'Memes are not allowed',
52
- height: 400,
53
- maxHeight: 600
54
- },
55
- name: 'All props'
56
- };
@@ -1,7 +0,0 @@
1
- export const editorContentCss = `
2
- body { font-family:'Source Sans Pro',sans-serif; font-size:16px; } p {margin: 0;} h1,h2,h3,h4,h5,h6 {margin-top: 0;margin-bottom: 0;}
3
- `;
4
- export const editorBlockFormats = 'Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;';
5
- export const plugins = 'autolink lists link image code print preview media paste';
6
- export const richToolbar = 'formatselect | ' + ' | bold italic underline' + ' | bullist numlist indent outdent' + ' | alignleft aligncenter alignright alignjustify' + ' | link unlink';
7
- export const basicToolbar = 'bold italic underline | bullist numlist indent outdent';
@@ -1,113 +0,0 @@
1
- /** @jsxImportSource @emotion/react */
2
- import { useState } from 'react';
3
- import { Editor as TinyEditor } from '@tinymce/tinymce-react';
4
- import { ErrorWrapper, Label, styles } from './styles';
5
- import { basicToolbar, editorBlockFormats, editorContentCss, plugins, richToolbar } from './config';
6
- import Skeleton from '../Skeleton';
7
- import Text from '../Text';
8
- import IconErrorOutline from '../../icons/General/IconErrorOutline';
9
- import { useTheme } from '@emotion/react';
10
- import { useIsMobile } from '../../hooks/useIsMobile';
11
- import { useEffect } from 'react';
12
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
13
- const TINYMCE_API_KEY = '1n4id0n4p67gr15sq9hvnk965wgh5ku8xjgqt30e2hnpccp3';
14
- /**
15
- * @deprecated Use QuillEditor instead
16
- */
17
- const Editor = ({
18
- initialValue,
19
- overrideValue,
20
- type = 'basic',
21
- label,
22
- height = 500,
23
- maxHeight,
24
- maxWidth,
25
- customToolbar,
26
- invalidMessage,
27
- allowImages,
28
- pasteAsText,
29
- resize = true,
30
- validElements,
31
- invalidElements = 'button',
32
- disabled,
33
- onChange,
34
- onBlur
35
- }) => {
36
- const [loaded, setLoaded] = useState(false);
37
- const [value, setValue] = useState(initialValue || '');
38
- const {
39
- alert
40
- } = useTheme();
41
- const isMobile = useIsMobile();
42
- const handleChange = (html, editor) => {
43
- setValue(html);
44
- onChange(html, editor.getContent({
45
- format: 'text'
46
- }).length);
47
- };
48
- const handleBlur = () => onBlur?.(value);
49
- const toolbar = type === 'basic' ? basicToolbar : type === 'rich' ? richToolbar : customToolbar;
50
- useEffect(() => {
51
- if (overrideValue === undefined) return;
52
- setValue(() => overrideValue);
53
- // eslint-disable-next-line react-hooks/exhaustive-deps
54
- }, [overrideValue]);
55
- return _jsxs("div", {
56
- css: theme => [styles.default(theme), !loaded && styles.hideEditor],
57
- children: [label && _jsx(Label, {
58
- children: label
59
- }), _jsx("div", {
60
- className: "editor-wrapper",
61
- children: _jsx(TinyEditor, {
62
- onBlur: handleBlur,
63
- onInit: _e => setLoaded(true),
64
- apiKey: TINYMCE_API_KEY,
65
- value: value,
66
- onEditorChange: handleChange,
67
- disabled: disabled,
68
- init: {
69
- browser_spellcheck: true,
70
- height,
71
- min_height: 100,
72
- max_height: maxHeight,
73
- min_width: 100,
74
- max_width: maxWidth,
75
- toolbar_mode: 'wrap',
76
- menubar: false,
77
- branding: false,
78
- elementpath: false,
79
- resize: resize,
80
- statusbar: !isMobile,
81
- plugins,
82
- toolbar,
83
- content_style: editorContentCss,
84
- language: 'nb_NO',
85
- block_formats: editorBlockFormats,
86
- paste_data_images: allowImages,
87
- paste_as_text: pasteAsText !== undefined ? pasteAsText : type === 'basic',
88
- contextmenu: false,
89
- invalid_elements: !allowImages ? 'img,' + invalidElements : invalidElements,
90
- valid_elements: validElements,
91
- default_link_target: '_blank',
92
- link_assume_external_targets: 'https',
93
- link_title: false,
94
- target_list: false
95
- }
96
- })
97
- }), !loaded && _jsx(Skeleton, {
98
- height: `${height}px`,
99
- width: "100%",
100
- borderRadius: "3px",
101
- rectangle: true
102
- }), invalidMessage && _jsx(ErrorWrapper, {
103
- children: invalidMessage && _jsxs(Text, {
104
- color: alert,
105
- children: [_jsx(IconErrorOutline, {
106
- size: "16px",
107
- color: alert
108
- }), " ", invalidMessage]
109
- })
110
- })]
111
- });
112
- };
113
- export default Editor;
@@ -1,43 +0,0 @@
1
- import _styled from "@emotion/styled/base";
2
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
- import { css } from '@emotion/react';
4
- export const styles = {
5
- default: theme => /*#__PURE__*/css("display:flex;flex-direction:column;gap:4px;.tox-tinymce{border:1px solid ", theme.border, ";border-radius:3px;}.tox-toolbar__group{border-color:", theme.border, "!important;}.tox-toolbar__primary{background:none!important;border-bottom:1px solid ", theme.border, ";}.tox-statusbar{border-top:none!important;}.editor-wrapper{display:grid;.tox-toolbar--scrolling,.tox-edit-area{&::-webkit-scrollbar{width:2px;height:2px;}}}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdl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AgICAgZGlzcGxheTogZ3JpZDtcclxuXHJcbiAgICAgIC50b3gtdG9vbGJhci0tc2Nyb2xsaW5nLFxyXG4gICAgICAudG94LWVkaXQtYXJlYSB7XHJcbiAgICAgICAgJjo6LXdlYmtpdC1zY3JvbGxiYXIge1xyXG4gICAgICAgICAgd2lkdGg6IDJweDtcclxuICAgICAgICAgIGhlaWdodDogMnB4O1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gIGAsXHJcbiAgaGlkZUVkaXRvcjogY3NzYFxyXG4gICAgLmVkaXRvci13cmFwcGVyIHtcclxuICAgICAgZGlzcGxheTogbm9uZTtcclxuICAgIH1cclxuICBgLFxyXG59XHJcblxyXG5leHBvcnQgY29uc3QgTGFiZWwgPSBzdHlsZWQuc3BhbmBcclxuICBsaW5lLWhlaWdodDogMjJweDtcclxuICBmb250LXNpemU6IDFlbTtcclxuICBmb250LXdlaWdodDogNjAwO1xyXG4gIG1hcmdpbi1ib3R0b206IDRweDtcclxuYFxyXG5cclxuZXhwb3J0IGNvbnN0IEVycm9yV3JhcHBlciA9IHN0eWxlZC5kaXZgXHJcbiAgZGlzcGxheTogZ3JpZDtcclxuXHJcbiAgJiA+IHNwYW4ge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgICBnYXA6IDZweDtcclxuICAgIG1hcmdpbi1sZWZ0OiAycHg7XHJcbiAgfVxyXG5gXHJcbiJdfQ== */"),
6
- hideEditor: process.env.NODE_ENV === "production" ? {
7
- name: "l41m35",
8
- styles: ".editor-wrapper{display:none;}"
9
- } : {
10
- name: "c0y57c-hideEditor",
11
- styles: ".editor-wrapper{display:none;};label:hideEditor;",
12
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMi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WQ7XHJcblxyXG4gICAgICAudG94LXRvb2xiYXItLXNjcm9sbGluZyxcclxuICAgICAgLnRveC1lZGl0LWFyZWEge1xyXG4gICAgICAgICY6Oi13ZWJraXQtc2Nyb2xsYmFyIHtcclxuICAgICAgICAgIHdpZHRoOiAycHg7XHJcbiAgICAgICAgICBoZWlnaHQ6IDJweDtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICBgLFxyXG4gIGhpZGVFZGl0b3I6IGNzc2BcclxuICAgIC5lZGl0b3Itd3JhcHBlciB7XHJcbiAgICAgIGRpc3BsYXk6IG5vbmU7XHJcbiAgICB9XHJcbiAgYCxcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IExhYmVsID0gc3R5bGVkLnNwYW5gXHJcbiAgbGluZS1oZWlnaHQ6IDIycHg7XHJcbiAgZm9udC1zaXplOiAxZW07XHJcbiAgZm9udC13ZWlnaHQ6IDYwMDtcclxuICBtYXJnaW4tYm90dG9tOiA0cHg7XHJcbmBcclxuXHJcbmV4cG9ydCBjb25zdCBFcnJvcldyYXBwZXIgPSBzdHlsZWQuZGl2YFxyXG4gIGRpc3BsYXk6IGdyaWQ7XHJcblxyXG4gICYgPiBzcGFuIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgZ2FwOiA2cHg7XHJcbiAgICBtYXJnaW4tbGVmdDogMnB4O1xyXG4gIH1cclxuYFxyXG4iXX0= */",
13
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
14
- }
15
- };
16
- export const Label = /*#__PURE__*/_styled("span", process.env.NODE_ENV === "production" ? {
17
- target: "e1b0idrw1"
18
- } : {
19
- target: "e1b0idrw1",
20
- label: "Label"
21
- })(process.env.NODE_ENV === "production" ? {
22
- name: "1ge8ozm",
23
- styles: "line-height:22px;font-size:1em;font-weight:600;margin-bottom:4px"
24
- } : {
25
- name: "1ge8ozm",
26
- styles: "line-height:22px;font-size:1em;font-weight:600;margin-bottom:4px",
27
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkNnQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvcGFja2FnZXMvY29yZS9FZGl0b3Ivc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXHJcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xyXG5pbXBvcnQgeyBJQXBwVGhlbWUgfSBmcm9tICcuLi8uLi9hcHAtc2hlbGwvdGhlbWUnXHJcblxyXG5leHBvcnQgY29uc3Qgc3R5bGVzID0ge1xyXG4gIGRlZmF1bHQ6ICh0aGVtZTogSUFwcFRoZW1lKSA9PiBjc3NgXHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICAgIGdhcDogNHB4O1xyXG5cclxuICAgIC50b3gtdGlueW1jZSB7XHJcbiAgICAgIGJvcmRlcjogMXB4IHNvbGlkICR7dGhlbWUuYm9yZGVyfTtcclxuICAgICAgYm9yZGVyLXJhZGl1czogM3B4O1xyXG4gICAgfVxyXG4gICAgLnRveC10b29sYmFyX19ncm91cCB7XHJcbiAgICAgIGJvcmRlci1jb2xvcjogJHt0aGVtZS5ib3JkZXJ9ICFpbXBvcnRhbnQ7XHJcbiAgICB9XHJcbiAgICAudG94LXRvb2xiYXJfX3ByaW1hcnkge1xyXG4gICAgICBiYWNrZ3JvdW5kOiBub25lICFpbXBvcnRhbnQ7XHJcbiAgICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAke3RoZW1lLmJvcmRlcn07XHJcbiAgICB9XHJcbiAgICAudG94LXN0YXR1c2JhciB7XHJcbiAgICAgIGJvcmRlci10b3A6IG5vbmUgIWltcG9ydGFudDtcclxuICAgIH1cclxuICAgIC5lZGl0b3Itd3JhcHBlciB7XHJcbiAgICAgIGRpc3BsYXk6IGdyaWQ7XHJcblxyXG4gICAgICAudG94LXRvb2xiYXItLXNjcm9sbGluZyxcclxuICAgICAgLnRveC1lZGl0LWFyZWEge1xyXG4gICAgICAgICY6Oi13ZWJraXQtc2Nyb2xsYmFyIHtcclxuICAgICAgICAgIHdpZHRoOiAycHg7XHJcbiAgICAgICAgICBoZWlnaHQ6IDJweDtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICBgLFxyXG4gIGhpZGVFZGl0b3I6IGNzc2BcclxuICAgIC5lZGl0b3Itd3JhcHBlciB7XHJcbiAgICAgIGRpc3BsYXk6IG5vbmU7XHJcbiAgICB9XHJcbiAgYCxcclxufVxyXG5cclxuZXhwb3J0IGNvbnN0IExhYmVsID0gc3R5bGVkLnNwYW5gXHJcbiAgbGluZS1oZWlnaHQ6IDIycHg7XHJcbiAgZm9udC1zaXplOiAxZW07XHJcbiAgZm9udC13ZWlnaHQ6IDYwMDtcclxuICBtYXJnaW4tYm90dG9tOiA0cHg7XHJcbmBcclxuXHJcbmV4cG9ydCBjb25zdCBFcnJvcldyYXBwZXIgPSBzdHlsZWQuZGl2YFxyXG4gIGRpc3BsYXk6IGdyaWQ7XHJcblxyXG4gICYgPiBzcGFuIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgZ2FwOiA2cHg7XHJcbiAgICBtYXJnaW4tbGVmdDogMnB4O1xyXG4gIH1cclxuYFxyXG4iXX0= */",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
- });
30
- export const ErrorWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
31
- target: "e1b0idrw0"
32
- } : {
33
- target: "e1b0idrw0",
34
- label: "ErrorWrapper"
35
- })(process.env.NODE_ENV === "production" ? {
36
- name: "p12i1l",
37
- styles: "display:grid;&>span{display:flex;align-items:center;gap:6px;margin-left:2px;}"
38
- } : {
39
- name: "p12i1l",
40
- styles: "display:grid;&>span{display:flex;align-items:center;gap:6px;margin-left:2px;}",
41
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0RzQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvcGFja2FnZXMvY29yZS9FZGl0b3Ivc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXHJcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xyXG5pbXBvcnQgeyBJQXBwVGhlbWUgfSBmcm9tICcuLi8uLi9hcHAtc2hlbGwvdGhlbWUnXHJcblxyXG5leHBvcnQgY29uc3Qgc3R5bGVzID0ge1xyXG4gIGRlZmF1bHQ6ICh0aGVtZTogSUFwcFRoZW1lKSA9PiBjc3NgXHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICAgIGdhcDogNHB4O1xyXG5cclxuICAgIC50b3gtdGlueW1jZSB7XHJcbiAgICAgIGJvcmRlcjogMXB4IHNvbGlkICR7dGhlbWUuYm9yZGVyfTtcclxuICAgICAgYm9yZGVyLXJhZGl1czogM3B4O1xyXG4gICAgfVxyXG4gICAgLnRveC10b29sYmFyX19ncm91cCB7XHJcbiAgICAgIGJvcmRlci1jb2xvcjogJHt0aGVtZS5ib3JkZXJ9ICFpbXBvcnRhbnQ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7XHJcbiAgICBtYXJnaW4tbGVmdDogMnB4O1xyXG4gIH1cclxuYFxyXG4iXX0= */",
42
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
43
- });
@@ -1,59 +0,0 @@
1
- import EditorQuillReact from '.';
2
- const meta = {
3
- title: 'Core/EditorQuillReact',
4
- component: EditorQuillReact
5
- };
6
- export default meta;
7
- export const Default = {
8
- args: {
9
- label: 'Editor-label',
10
- onChange: e => console.log(e),
11
- invalidMessage: 'Memes are not allowed'
12
- },
13
- name: 'Default'
14
- };
15
- export const Rich = {
16
- args: {
17
- label: 'Editor-label',
18
- onChange: e => console.log(e),
19
- type: 'rich',
20
- allowImages: true
21
- },
22
- name: 'Rich'
23
- };
24
-
25
- // export const ValidElements: Story = {
26
- // args: {
27
- // label: 'Editor-label',
28
- // onChange: (e) => console.log(e),
29
- // type: 'custom',
30
- // customToolbar: 'bold italic underline',
31
- // validElements: 'strong,p,span,em',
32
- // },
33
- // name: 'Valid elements',
34
- // }
35
-
36
- // export const InvalidElements: Story = {
37
- // args: {
38
- // label: 'Editor-label',
39
- // onChange: (e) => console.log(e),
40
- // type: 'custom',
41
- // customToolbar: 'bold italic underline',
42
- // invalidElements: 'button,a,h1,h2,h3,h4,h5,h6',
43
- // },
44
- // name: 'Invalid elements',
45
- // }
46
-
47
- // export const AllProps: Story = {
48
- // args: {
49
- // label: 'Editor-label',
50
- // onChange: (e) => console.log(e),
51
- // type: 'rich',
52
- // allowImages: true,
53
- // invalidElements: 'button,a,h1,h2,h3,h4,h5,h6',
54
- // invalidMessage: 'Memes are not allowed',
55
- // height: 400,
56
- // maxHeight: 600,
57
- // },
58
- // name: 'All props',
59
- // }
@@ -1,15 +0,0 @@
1
- import { Quill } from 'react-quill';
2
- const Parchment = Quill.import('parchment');
3
- export class IndentAttributor extends Parchment.StyleAttributor {
4
- constructor(...args) {
5
- super(...args);
6
- }
7
- add(node, value) {
8
- if (value === 0) {
9
- this.remove(node);
10
- return true;
11
- } else {
12
- return super.add(node, `${value}em`);
13
- }
14
- }
15
- }
@@ -1,31 +0,0 @@
1
- // Toolbar options
2
- const sizes = [{
3
- header: [false, 1, 2, 3, 4, 5, 6]
4
- }];
5
- const decorations = ['bold', 'italic', 'underline'];
6
- const lists = [{
7
- list: 'bullet'
8
- }, {
9
- list: 'ordered'
10
- }, {
11
- indent: '+1'
12
- }, {
13
- indent: '-1'
14
- }];
15
- const alignments = [{
16
- align: ''
17
- }, {
18
- align: 'center'
19
- }, {
20
- align: 'right'
21
- }, {
22
- align: 'justify'
23
- }];
24
- const link = 'link';
25
- const image = 'image';
26
- const clean = 'clean';
27
- // const image = 'image'
28
-
29
- export const basicToolbar = [decorations, lists];
30
- export const richToolbar = [sizes, decorations, lists, alignments, [link]];
31
- export const fullToolbar = [sizes, decorations, lists, alignments, [link, image], [clean]];
@@ -1,103 +0,0 @@
1
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
2
- /** @jsxImportSource @emotion/react */
3
- import { useState, useEffect } from 'react';
4
- import Text from '../Text';
5
- import IconErrorOutline from '../../icons/General/IconErrorOutline';
6
- import { useTheme } from '@emotion/react';
7
- import { ErrorWrapper, Label, styles } from './styles';
8
- import ReactQuill, { Quill } from 'react-quill';
9
- import 'react-quill/dist/quill.snow.css';
10
- import { basicToolbar, richToolbar } from './config';
11
- import { IndentAttributor } from './IndentAttributor';
12
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
13
- const Parchment = Quill.import('parchment');
14
-
15
- //Text direction
16
- Quill.register(Quill.import('attributors/style/direction'), true);
17
- //Alignment
18
- Quill.register(Quill.import('attributors/style/align'), true);
19
- // Text sizes
20
- const Size = Quill.import('attributors/style/size');
21
- Size.whitelist = ['0.75em', '1em', '1.5em', '2.5em'];
22
- Quill.register(Size, true);
23
- let IndentStyle = new IndentAttributor('indent', 'text-indent', {
24
- scope: Parchment.Scope.BLOCK,
25
- whitelist: ['1em', '2em', '3em', '4em', '5em', '6em', '7em', '8em', '9em']
26
- });
27
- Quill.register(IndentStyle, true);
28
- var _ref = process.env.NODE_ENV === "production" ? {
29
- name: "1fttcpj",
30
- styles: "display:flex;flex-direction:column"
31
- } : {
32
- name: "beovm0-EditorQuillReact",
33
- styles: "display:flex;flex-direction:column;label:EditorQuillReact;",
34
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvclF1aWxsUmVhY3QvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFHUSIsImZpbGUiOiIuLi8uLi8uLi9zcmMvcGFja2FnZXMvY29yZS9FZGl0b3JRdWlsbFJlYWN0L2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4SW1wb3J0U291cmNlIEBlbW90aW9uL3JlYWN0ICovXHJcbmltcG9ydCB7IHVzZVN0YXRlLCB1c2VFZmZlY3QgfSBmcm9tICdyZWFjdCdcclxuaW1wb3J0IFRleHQgZnJvbSAnLi4vVGV4dCdcclxuaW1wb3J0IEljb25FcnJvck91dGxpbmUgZnJvbSAnLi4vLi4vaWNvbnMvR2VuZXJhbC9JY29uRXJyb3JPdXRsaW5lJ1xyXG5pbXBvcnQgeyB1c2VUaGVtZSB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xyXG5pbXBvcnQgeyBFcnJvcldyYXBwZXIsIExhYmVsLCBzdHlsZXMgfSBmcm9tICcuL3N0eWxlcydcclxuaW1wb3J0IFJlYWN0UXVpbGwsIHsgUXVpbGwgfSBmcm9tICdyZWFjdC1xdWlsbCdcclxuaW1wb3J0ICdyZWFjdC1xdWlsbC9kaXN0L3F1aWxsLnNub3cuY3NzJ1xyXG5pbXBvcnQgeyBiYXNpY1Rv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aXYgY3NzPXsodGhlbWUpID0+IFtzdHlsZXMuZGVmYXVsdCh0aGVtZSwgbWF4SGVpZ2h0KV19PlxyXG4gICAgICB7bGFiZWwgJiYgPExhYmVsPntsYWJlbH08L0xhYmVsPn1cclxuICAgICAgPFJlYWN0UXVpbGxcclxuICAgICAgICBjc3M9e3tcclxuICAgICAgICAgIC8vIG1pbkhlaWdodDogMTUwLFxyXG4gICAgICAgICAgLy8gbWF4SGVpZ2h0LFxyXG4gICAgICAgICAgLy8gbWF4V2lkdGgsXHJcbiAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICB9fVxyXG4gICAgICAgIHRoZW1lPVwic25vd1wiXHJcbiAgICAgICAgcmVhZE9ubHk9e2Rpc2FibGVkfVxyXG4gICAgICAgIGZvcm1hdHM9e1tcclxuICAgICAgICAgICdoZWFkZXInLFxyXG4gICAgICAgICAgJ3NpemUnLFxyXG4gICAgICAgICAgJ2JvbGQnLFxyXG4gICAgICAgICAgJ2l0YWxpYycsXHJcbiAgICAgICAgICAndW5kZXJsaW5lJyxcclxuICAgICAgICAgICdsaXN0JyxcclxuICAgICAgICAgICdpbmRlbnQnLFxyXG4gICAgICAgICAgJ2xpbmsnLFxyXG4gICAgICAgICAgJ2ltYWdlJyxcclxuICAgICAgICAgICdhbGlnbicsXHJcbiAgICAgICAgXX1cclxuICAgICAgICBtb2R1bGVzPXtjdXN0b21Nb2R1bGVzfVxyXG4gICAgICAgIHZhbHVlPXt2YWx1ZX1cclxuICAgICAgICBvbkNoYW5nZT17aGFuZGxlQ2hhbmdlfVxyXG4gICAgICAgIG9uQmx1cj17KCkgPT4gb25CbHVyPy4odmFsdWUpfVxyXG4gICAgICAvPlxyXG5cclxuICAgICAge2ludmFsaWRNZXNzYWdlICYmIChcclxuICAgICAgICA8RXJyb3JXcmFwcGVyPlxyXG4gICAgICAgICAge2ludmFsaWRNZXNzYWdlICYmIChcclxuICAgICAgICAgICAgPFRleHQgY29sb3I9e2FsZXJ0fT5cclxuICAgICAgICAgICAgICA8SWNvbkVycm9yT3V0bGluZSBzaXplPVwiMTZweFwiIGNvbG9yPXthbGVydH0gLz4ge2ludmFsaWRNZXNzYWdlfVxyXG4gICAgICAgICAgICA8L1RleHQ+XHJcbiAgICAgICAgICApfVxyXG4gICAgICAgIDwvRXJyb3JXcmFwcGVyPlxyXG4gICAgICApfVxyXG4gICAgPC9kaXY+XHJcbiAgKVxyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCBFZGl0b3JRdWlsbFJlYWN0XHJcbiJdfQ== */",
35
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
- };
37
- const EditorQuillReact = ({
38
- initialValue,
39
- overrideValue,
40
- type = 'basic',
41
- label,
42
- height = 500,
43
- // trenger ??
44
- maxHeight = 500,
45
- maxWidth,
46
- customToolbar,
47
- invalidMessage,
48
- allowImages,
49
- // trenger ??
50
- pasteAsText,
51
- // trenger ??
52
- resize = true,
53
- // trenger ??
54
- validElements,
55
- // trenger ??
56
- invalidElements = 'button',
57
- // trenger ??
58
- disabled,
59
- onChange,
60
- onBlur
61
- }) => {
62
- const [value, setValue] = useState(initialValue || '');
63
- const {
64
- alert
65
- } = useTheme();
66
- const handleChange = (html, _delta, _source, editor) => {
67
- setValue(html);
68
- onChange(html, editor.getText().trim().length);
69
- };
70
- const customModules = {
71
- toolbar: {
72
- container: type === 'basic' ? basicToolbar : type === 'rich' ? richToolbar : customToolbar
73
- }
74
- };
75
- useEffect(() => {
76
- if (overrideValue === undefined) return;
77
- setValue(() => overrideValue);
78
- }, [overrideValue]);
79
- return _jsxs("div", {
80
- css: theme => [styles.default(theme, maxHeight)],
81
- children: [label && _jsx(Label, {
82
- children: label
83
- }), _jsx(ReactQuill, {
84
- css: _ref,
85
- theme: "snow",
86
- readOnly: disabled,
87
- formats: ['header', 'size', 'bold', 'italic', 'underline', 'list', 'indent', 'link', 'image', 'align'],
88
- modules: customModules,
89
- value: value,
90
- onChange: handleChange,
91
- onBlur: () => onBlur?.(value)
92
- }), invalidMessage && _jsx(ErrorWrapper, {
93
- children: invalidMessage && _jsxs(Text, {
94
- color: alert,
95
- children: [_jsx(IconErrorOutline, {
96
- size: "16px",
97
- color: alert
98
- }), " ", invalidMessage]
99
- })
100
- })]
101
- });
102
- };
103
- export default EditorQuillReact;