@chayns-components/core 5.0.0-beta.22 → 5.0.0-beta.221

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 (344) hide show
  1. package/README.md +3 -9
  2. package/lib/api/image/post.d.ts +16 -0
  3. package/lib/api/image/post.js +34 -0
  4. package/lib/api/image/post.js.map +1 -0
  5. package/lib/api/video/post.d.ts +16 -0
  6. package/lib/api/video/post.js +31 -0
  7. package/lib/api/video/post.js.map +1 -0
  8. package/lib/components/accordion/Accordion.d.ts +35 -2
  9. package/lib/components/accordion/Accordion.js +87 -78
  10. package/lib/components/accordion/Accordion.js.map +1 -1
  11. package/lib/components/accordion/Accordion.styles.d.ts +3 -2
  12. package/lib/components/accordion/Accordion.styles.js +64 -26
  13. package/lib/components/accordion/Accordion.styles.js.map +1 -1
  14. package/lib/components/accordion/accordion-body/AccordionBody.d.ts +17 -2
  15. package/lib/components/accordion/accordion-body/AccordionBody.js +22 -13
  16. package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
  17. package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +4 -1
  18. package/lib/components/accordion/accordion-body/AccordionBody.styles.js +15 -10
  19. package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  20. package/lib/components/accordion/accordion-content/AccordionContent.d.ts +16 -2
  21. package/lib/components/accordion/accordion-content/AccordionContent.js +13 -11
  22. package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  23. package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +2 -1
  24. package/lib/components/accordion/accordion-content/AccordionContent.styles.js +24 -14
  25. package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
  26. package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +12 -3
  27. package/lib/components/accordion/accordion-group/AccordionGroup.js +33 -44
  28. package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  29. package/lib/components/accordion/accordion-head/AccordionHead.d.ts +1 -1
  30. package/lib/components/accordion/accordion-head/AccordionHead.js +26 -54
  31. package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  32. package/lib/components/accordion/accordion-head/AccordionHead.styles.js +136 -49
  33. package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  34. package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +8 -2
  35. package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -7
  36. package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
  37. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +3 -9
  38. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
  39. package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
  40. package/lib/components/accordion/accordion-item/AccordionItem.js +28 -0
  41. package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
  42. package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +5 -0
  43. package/lib/components/accordion/accordion-item/AccordionItem.styles.js +34 -0
  44. package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
  45. package/lib/components/accordion/utils.js +10 -12
  46. package/lib/components/accordion/utils.js.map +1 -1
  47. package/lib/components/amount-control/AmountControl.d.ts +22 -0
  48. package/lib/components/amount-control/AmountControl.js +186 -0
  49. package/lib/components/amount-control/AmountControl.js.map +1 -0
  50. package/lib/components/amount-control/AmountControl.styles.d.ts +14 -0
  51. package/lib/components/amount-control/AmountControl.styles.js +61 -0
  52. package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
  53. package/lib/components/amount-control/utils.d.ts +7 -0
  54. package/lib/components/amount-control/utils.js +22 -0
  55. package/lib/components/amount-control/utils.js.map +1 -0
  56. package/lib/components/badge/Badge.d.ts +9 -1
  57. package/lib/components/badge/Badge.js +12 -12
  58. package/lib/components/badge/Badge.js.map +1 -1
  59. package/lib/components/badge/Badge.styles.d.ts +4 -1
  60. package/lib/components/badge/Badge.styles.js +22 -15
  61. package/lib/components/badge/Badge.styles.js.map +1 -1
  62. package/lib/components/button/Button.d.ts +6 -2
  63. package/lib/components/button/Button.js +65 -22
  64. package/lib/components/button/Button.js.map +1 -1
  65. package/lib/components/button/Button.styles.d.ts +2 -0
  66. package/lib/components/button/Button.styles.js +57 -24
  67. package/lib/components/button/Button.styles.js.map +1 -1
  68. package/lib/components/checkbox/Checkbox.d.ts +25 -0
  69. package/lib/components/checkbox/Checkbox.js +44 -0
  70. package/lib/components/checkbox/Checkbox.js.map +1 -0
  71. package/lib/components/checkbox/Checkbox.styles.d.ts +6 -0
  72. package/lib/components/checkbox/Checkbox.styles.js +131 -0
  73. package/lib/components/checkbox/Checkbox.styles.js.map +1 -0
  74. package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +2 -2
  75. package/lib/components/color-scheme-provider/ColorSchemeProvider.js +44 -78
  76. package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  77. package/lib/components/color-scheme-provider/font.d.ts +6 -0
  78. package/lib/components/color-scheme-provider/font.js +59 -0
  79. package/lib/components/color-scheme-provider/font.js.map +1 -0
  80. package/lib/components/combobox/ComboBox.d.ts +25 -0
  81. package/lib/components/combobox/ComboBox.js +144 -0
  82. package/lib/components/combobox/ComboBox.js.map +1 -0
  83. package/lib/components/combobox/ComboBox.styles.d.ts +17 -0
  84. package/lib/components/combobox/ComboBox.styles.js +128 -0
  85. package/lib/components/combobox/ComboBox.styles.js.map +1 -0
  86. package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +18 -0
  87. package/lib/components/combobox/combobox-item/ComboBoxItem.js +30 -0
  88. package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
  89. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +6 -0
  90. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +30 -0
  91. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
  92. package/lib/components/content-card/ContentCard.d.ts +9 -0
  93. package/lib/components/content-card/ContentCard.js +19 -0
  94. package/lib/components/content-card/ContentCard.js.map +1 -0
  95. package/lib/components/content-card/ContentCard.styles.d.ts +1 -0
  96. package/lib/components/content-card/ContentCard.styles.js +23 -0
  97. package/lib/components/content-card/ContentCard.styles.js.map +1 -0
  98. package/lib/components/context-menu/ContextMenu.d.ts +6 -6
  99. package/lib/components/context-menu/ContextMenu.js +82 -98
  100. package/lib/components/context-menu/ContextMenu.js.map +1 -1
  101. package/lib/components/context-menu/ContextMenu.styles.js +3 -9
  102. package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
  103. package/lib/components/context-menu/constants/alignment.js +4 -5
  104. package/lib/components/context-menu/constants/alignment.js.map +1 -1
  105. package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
  106. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +32 -28
  107. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  108. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +92 -41
  109. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
  110. package/lib/components/date-info/DateInfo.d.ts +40 -0
  111. package/lib/components/date-info/DateInfo.js +109 -0
  112. package/lib/components/date-info/DateInfo.js.map +1 -0
  113. package/lib/components/date-info/utils/format.d.ts +43 -0
  114. package/lib/components/date-info/utils/format.js +288 -0
  115. package/lib/components/date-info/utils/format.js.map +1 -0
  116. package/lib/components/date-info/utils/language.d.ts +1 -0
  117. package/lib/components/date-info/utils/language.js +34 -0
  118. package/lib/components/date-info/utils/language.js.map +1 -0
  119. package/lib/components/filter-button/FilterButton.d.ts +22 -0
  120. package/lib/components/filter-button/FilterButton.js +89 -0
  121. package/lib/components/filter-button/FilterButton.js.map +1 -0
  122. package/lib/components/filter-button/FilterButton.styles.d.ts +1 -0
  123. package/lib/components/filter-button/FilterButton.styles.js +15 -0
  124. package/lib/components/filter-button/FilterButton.styles.js.map +1 -0
  125. package/lib/components/filter-button/filter-button-item/FilterButtonItem.d.ts +14 -0
  126. package/lib/components/filter-button/filter-button-item/FilterButtonItem.js +48 -0
  127. package/lib/components/filter-button/filter-button-item/FilterButtonItem.js.map +1 -0
  128. package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.d.ts +26 -0
  129. package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js +109 -0
  130. package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js.map +1 -0
  131. package/lib/components/filter-button/types.d.ts +15 -0
  132. package/lib/components/filter-button/types.js +19 -0
  133. package/lib/components/filter-button/types.js.map +1 -0
  134. package/lib/components/grid-image/GridImage.d.ts +1 -1
  135. package/lib/components/grid-image/GridImage.js +15 -52
  136. package/lib/components/grid-image/GridImage.js.map +1 -1
  137. package/lib/components/grid-image/GridImage.styles.d.ts +3 -3
  138. package/lib/components/grid-image/GridImage.styles.js +82 -38
  139. package/lib/components/grid-image/GridImage.styles.js.map +1 -1
  140. package/lib/components/icon/Icon.d.ts +2 -2
  141. package/lib/components/icon/Icon.js +22 -34
  142. package/lib/components/icon/Icon.js.map +1 -1
  143. package/lib/components/icon/Icon.styles.d.ts +1 -1
  144. package/lib/components/icon/Icon.styles.js +61 -39
  145. package/lib/components/icon/Icon.styles.js.map +1 -1
  146. package/lib/components/icon/utils.js +2 -5
  147. package/lib/components/icon/utils.js.map +1 -1
  148. package/lib/components/input/Input.d.ts +44 -0
  149. package/lib/components/input/Input.js +85 -0
  150. package/lib/components/input/Input.js.map +1 -0
  151. package/lib/components/input/Input.styles.d.ts +7 -0
  152. package/lib/components/input/Input.styles.js +71 -0
  153. package/lib/components/input/Input.styles.js.map +1 -0
  154. package/lib/components/list/List.d.ts +1 -1
  155. package/lib/components/list/List.js +26 -63
  156. package/lib/components/list/List.js.map +1 -1
  157. package/lib/components/list/list-item/ListItem.d.ts +10 -1
  158. package/lib/components/list/list-item/ListItem.js +37 -47
  159. package/lib/components/list/list-item/ListItem.js.map +1 -1
  160. package/lib/components/list/list-item/ListItem.styles.js +44 -26
  161. package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
  162. package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +4 -1
  163. package/lib/components/list/list-item/list-item-body/ListItemBody.js +31 -12
  164. package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
  165. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -9
  166. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  167. package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -7
  168. package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
  169. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +8 -11
  170. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
  171. package/lib/components/list/list-item/list-item-head/ListItemHead.d.ts +2 -1
  172. package/lib/components/list/list-item/list-item-head/ListItemHead.js +37 -88
  173. package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  174. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +1 -11
  175. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +88 -81
  176. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  177. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.d.ts +6 -0
  178. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +23 -0
  179. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -0
  180. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +1 -0
  181. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +32 -0
  182. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -0
  183. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.d.ts +7 -0
  184. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +44 -0
  185. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -0
  186. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +10 -0
  187. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +52 -0
  188. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -0
  189. package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
  190. package/lib/components/mention-finder/MentionFinder.js +141 -0
  191. package/lib/components/mention-finder/MentionFinder.js.map +1 -0
  192. package/lib/components/mention-finder/MentionFinder.styles.d.ts +5 -0
  193. package/lib/components/mention-finder/MentionFinder.styles.js +94 -0
  194. package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
  195. package/lib/components/mention-finder/constants/alignment.d.ts +4 -0
  196. package/lib/components/mention-finder/constants/alignment.js +13 -0
  197. package/lib/components/mention-finder/constants/alignment.js.map +1 -0
  198. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
  199. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +32 -0
  200. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
  201. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +8 -0
  202. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +100 -0
  203. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
  204. package/lib/components/popup/Popup.d.ts +26 -0
  205. package/lib/components/popup/Popup.js +145 -0
  206. package/lib/components/popup/Popup.js.map +1 -0
  207. package/lib/components/popup/Popup.styles.d.ts +2 -0
  208. package/lib/components/popup/Popup.styles.js +22 -0
  209. package/lib/components/popup/Popup.styles.js.map +1 -0
  210. package/lib/components/popup/popup-content/PopupContent.d.ts +9 -0
  211. package/lib/components/popup/popup-content/PopupContent.js +64 -0
  212. package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
  213. package/lib/components/popup/popup-content/PopupContent.styles.d.ts +6 -0
  214. package/lib/components/popup/popup-content/PopupContent.styles.js +90 -0
  215. package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
  216. package/lib/components/popup/types.d.ts +16 -0
  217. package/lib/components/popup/types.js +17 -0
  218. package/lib/components/popup/types.js.map +1 -0
  219. package/lib/components/progress-bar/ProgressBar.d.ts +9 -0
  220. package/lib/components/progress-bar/ProgressBar.js +39 -0
  221. package/lib/components/progress-bar/ProgressBar.js.map +1 -0
  222. package/lib/components/progress-bar/ProgressBar.styles.d.ts +7 -0
  223. package/lib/components/progress-bar/ProgressBar.styles.js +39 -0
  224. package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
  225. package/lib/components/radio-button/RadioButton.d.ts +26 -0
  226. package/lib/components/radio-button/RadioButton.js +81 -0
  227. package/lib/components/radio-button/RadioButton.js.map +1 -0
  228. package/lib/components/radio-button/RadioButton.styles.d.ts +22 -0
  229. package/lib/components/radio-button/RadioButton.styles.js +100 -0
  230. package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
  231. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +21 -0
  232. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +54 -0
  233. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
  234. package/lib/components/radio-button/types.d.ts +4 -0
  235. package/lib/components/radio-button/types.js +6 -0
  236. package/lib/components/radio-button/types.js.map +1 -0
  237. package/lib/components/scroll-view/ScrollView.d.ts +9 -0
  238. package/lib/components/scroll-view/ScrollView.js +23 -0
  239. package/lib/components/scroll-view/ScrollView.js.map +1 -0
  240. package/lib/components/scroll-view/ScrollView.styles.d.ts +6 -0
  241. package/lib/components/scroll-view/ScrollView.styles.js +27 -0
  242. package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
  243. package/lib/components/search-box/SearchBox.d.ts +26 -0
  244. package/lib/components/search-box/SearchBox.js +166 -0
  245. package/lib/components/search-box/SearchBox.js.map +1 -0
  246. package/lib/components/search-box/SearchBox.styles.d.ts +7 -0
  247. package/lib/components/search-box/SearchBox.styles.js +58 -0
  248. package/lib/components/search-box/SearchBox.styles.js.map +1 -0
  249. package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +9 -0
  250. package/lib/components/search-box/search-box-item/SearchBoxItem.js +30 -0
  251. package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
  252. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +6 -0
  253. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +30 -0
  254. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
  255. package/lib/components/search-box/types.d.ts +4 -0
  256. package/lib/components/search-box/types.js +6 -0
  257. package/lib/components/search-box/types.js.map +1 -0
  258. package/lib/components/search-box/utils.d.ts +7 -0
  259. package/lib/components/search-box/utils.js +23 -0
  260. package/lib/components/search-box/utils.js.map +1 -0
  261. package/lib/components/search-input/SearchInput.d.ts +18 -0
  262. package/lib/components/search-input/SearchInput.js +94 -0
  263. package/lib/components/search-input/SearchInput.js.map +1 -0
  264. package/lib/components/search-input/SearchInput.styles.d.ts +4 -0
  265. package/lib/components/search-input/SearchInput.styles.js +30 -0
  266. package/lib/components/search-input/SearchInput.styles.js.map +1 -0
  267. package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
  268. package/lib/components/sharing-bar/SharingBar.js +114 -0
  269. package/lib/components/sharing-bar/SharingBar.js.map +1 -0
  270. package/lib/components/sharing-bar/SharingBar.styles.d.ts +5 -0
  271. package/lib/components/sharing-bar/SharingBar.styles.js +27 -0
  272. package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
  273. package/lib/components/slider/Slider.d.ts +21 -0
  274. package/lib/components/slider/Slider.js +52 -0
  275. package/lib/components/slider/Slider.js.map +1 -0
  276. package/lib/components/slider/Slider.styles.d.ts +8 -0
  277. package/lib/components/slider/Slider.styles.js +77 -0
  278. package/lib/components/slider/Slider.styles.js.map +1 -0
  279. package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
  280. package/lib/components/small-wait-cursor/SmallWaitCursor.js +45 -0
  281. package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
  282. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +18 -0
  283. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +105 -0
  284. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
  285. package/lib/components/text-area/TextArea.d.ts +25 -0
  286. package/lib/components/text-area/TextArea.js +63 -0
  287. package/lib/components/text-area/TextArea.js.map +1 -0
  288. package/lib/components/text-area/TextArea.styles.d.ts +8 -0
  289. package/lib/components/text-area/TextArea.styles.js +46 -0
  290. package/lib/components/text-area/TextArea.styles.js.map +1 -0
  291. package/lib/components/textstring/TextString.d.ts +22 -0
  292. package/lib/components/textstring/TextString.js +63 -0
  293. package/lib/components/textstring/TextString.js.map +1 -0
  294. package/lib/components/textstring/TextString.styles.d.ts +1 -0
  295. package/lib/components/textstring/TextString.styles.js +11 -0
  296. package/lib/components/textstring/TextString.styles.js.map +1 -0
  297. package/lib/components/textstring/types.d.ts +8 -0
  298. package/lib/components/textstring/types.js +6 -0
  299. package/lib/components/textstring/types.js.map +1 -0
  300. package/lib/components/textstring-provider/TextStringProvider.d.ts +21 -0
  301. package/lib/components/textstring-provider/TextStringProvider.js +39 -0
  302. package/lib/components/textstring-provider/TextStringProvider.js.map +1 -0
  303. package/lib/components/textstring-provider/utils.d.ts +11 -0
  304. package/lib/components/textstring-provider/utils.js +32 -0
  305. package/lib/components/textstring-provider/utils.js.map +1 -0
  306. package/lib/components/tooltip/Tooltip.d.ts +18 -0
  307. package/lib/components/tooltip/Tooltip.js +33 -0
  308. package/lib/components/tooltip/Tooltip.js.map +1 -0
  309. package/lib/components/tooltip/Tooltip.styles.d.ts +1 -0
  310. package/lib/components/tooltip/Tooltip.styles.js +11 -0
  311. package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
  312. package/lib/components/tooltip/interface.d.ts +4 -0
  313. package/lib/components/tooltip/interface.js +6 -0
  314. package/lib/components/tooltip/interface.js.map +1 -0
  315. package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +7 -0
  316. package/lib/components/tooltip/tooltip-item/TooltipItem.js +21 -0
  317. package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
  318. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +7 -0
  319. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +32 -0
  320. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
  321. package/lib/hooks/uuid.js +2 -21
  322. package/lib/hooks/uuid.js.map +1 -1
  323. package/lib/index.d.ts +35 -0
  324. package/lib/index.js +216 -27
  325. package/lib/index.js.map +1 -1
  326. package/lib/types/chayns.d.ts +98 -0
  327. package/lib/types/chayns.js +14 -0
  328. package/lib/types/chayns.js.map +1 -0
  329. package/lib/types/file.d.ts +42 -0
  330. package/lib/types/file.js +6 -0
  331. package/lib/types/file.js.map +1 -0
  332. package/lib/utils/calculate.d.ts +2 -0
  333. package/lib/utils/calculate.js +40 -0
  334. package/lib/utils/calculate.js.map +1 -0
  335. package/lib/utils/fileDialog.d.ts +7 -0
  336. package/lib/utils/fileDialog.js +70 -0
  337. package/lib/utils/fileDialog.js.map +1 -0
  338. package/lib/utils/isTobitEmployee.d.ts +1 -0
  339. package/lib/utils/isTobitEmployee.js +29 -0
  340. package/lib/utils/isTobitEmployee.js.map +1 -0
  341. package/lib/utils/uploadFile.d.ts +9 -0
  342. package/lib/utils/uploadFile.js +48 -0
  343. package/lib/utils/uploadFile.js.map +1 -0
  344. package/package.json +23 -19
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledSharingBarText = exports.StyledSharingBarIconWrapper = exports.StyledSharingBar = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const StyledSharingBar = _styledComponents.default.div`
10
+ cursor: pointer;
11
+ display: flex;
12
+ align-items: center;
13
+ `;
14
+ exports.StyledSharingBar = StyledSharingBar;
15
+ const StyledSharingBarIconWrapper = _styledComponents.default.div``;
16
+ exports.StyledSharingBarIconWrapper = StyledSharingBarIconWrapper;
17
+ const StyledSharingBarText = _styledComponents.default.p`
18
+ color: ${_ref => {
19
+ let {
20
+ theme
21
+ } = _ref;
22
+ return theme.text;
23
+ }};
24
+ margin: 0 0 0 5px;
25
+ `;
26
+ exports.StyledSharingBarText = StyledSharingBarText;
27
+ //# sourceMappingURL=SharingBar.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SharingBar.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledSharingBar","styled","div","exports","StyledSharingBarIconWrapper","StyledSharingBarText","p","_ref","theme","text"],"sources":["../../../src/components/sharing-bar/SharingBar.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledSharingBar = styled.div`\n cursor: pointer;\n display: flex;\n align-items: center;\n`;\n\nexport const StyledSharingBarIconWrapper = styled.div``;\n\ntype StyledSharingBarTextProps = WithTheme<unknown>;\n\nexport const StyledSharingBarText = styled.p<StyledSharingBarTextProps>`\n color: ${({ theme }: StyledSharingBarTextProps) => theme.text};\n margin: 0 0 0 5px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,gBAAgB,GAAGC,yBAAM,CAACC,GAAI;AAC3C;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAH,gBAAA,GAAAA,gBAAA;AAEK,MAAMI,2BAA2B,GAAGH,yBAAM,CAACC,GAAI,EAAC;AAACC,OAAA,CAAAC,2BAAA,GAAAA,2BAAA;AAIjD,MAAMC,oBAAoB,GAAGJ,yBAAM,CAACK,CAA6B;AACxE,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAiC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,IAAI;AAAA,CAAC;AAClE;AACA,CAAC;AAACN,OAAA,CAAAE,oBAAA,GAAAA,oBAAA"}
@@ -0,0 +1,21 @@
1
+ import { FC } from 'react';
2
+ export type SliderProps = {
3
+ /**
4
+ * The maximum value of the slider.
5
+ */
6
+ maxValue: number;
7
+ /**
8
+ * The minimum value of the slider.
9
+ */
10
+ minValue: number;
11
+ /**
12
+ * Function that will be executed when the value is changed.
13
+ */
14
+ onChange?: (value: number) => void;
15
+ /**
16
+ * the Value that the slider should have.
17
+ */
18
+ value?: number;
19
+ };
20
+ declare const Slider: FC<SliderProps>;
21
+ export default Slider;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _Slider = require("./Slider.styles");
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ const Slider = _ref => {
12
+ let {
13
+ maxValue,
14
+ minValue,
15
+ value,
16
+ onChange
17
+ } = _ref;
18
+ const [editedValue, setEditedValue] = (0, _react.useState)(0);
19
+
20
+ /**
21
+ * This function sets the value
22
+ */
23
+ (0, _react.useEffect)(() => {
24
+ if (typeof value !== 'number') {
25
+ return;
26
+ }
27
+ if (value >= minValue && value <= maxValue) {
28
+ setEditedValue(value);
29
+ }
30
+ }, [maxValue, minValue, value]);
31
+
32
+ /**
33
+ * This function updates the value
34
+ */
35
+ const handleInputChange = (0, _react.useCallback)(event => {
36
+ setEditedValue(Number(event.target.value));
37
+ if (onChange) {
38
+ onChange(Number(event.target.value));
39
+ }
40
+ }, [onChange]);
41
+ return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_Slider.StyledSlider, null, /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderInput, {
42
+ type: "range",
43
+ value: editedValue,
44
+ max: maxValue,
45
+ min: minValue,
46
+ onChange: handleInputChange
47
+ })), [editedValue, handleInputChange, maxValue, minValue]);
48
+ };
49
+ Slider.displayName = 'Slider';
50
+ var _default = Slider;
51
+ exports.default = _default;
52
+ //# sourceMappingURL=Slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.js","names":["_react","_interopRequireWildcard","require","_Slider","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Slider","_ref","maxValue","minValue","value","onChange","editedValue","setEditedValue","useState","useEffect","handleInputChange","useCallback","event","Number","target","useMemo","createElement","StyledSlider","StyledSliderInput","type","max","min","displayName","_default","exports"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { StyledSlider, StyledSliderInput } from './Slider.styles';\n\nexport type SliderProps = {\n /**\n * The maximum value of the slider.\n */\n maxValue: number;\n /**\n * The minimum value of the slider.\n */\n minValue: number;\n /**\n * Function that will be executed when the value is changed.\n */\n onChange?: (value: number) => void;\n /**\n * the Value that the slider should have.\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({ maxValue, minValue, value, onChange }) => {\n const [editedValue, setEditedValue] = useState(0);\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (typeof value !== 'number') {\n return;\n }\n\n if (value >= minValue && value <= maxValue) {\n setEditedValue(value);\n }\n }, [maxValue, minValue, value]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setEditedValue(Number(event.target.value));\n\n if (onChange) {\n onChange(Number(event.target.value));\n }\n },\n [onChange]\n );\n\n return useMemo(\n () => (\n <StyledSlider>\n <StyledSliderInput\n type=\"range\"\n value={editedValue}\n max={maxValue}\n min={minValue}\n onChange={handleInputChange}\n />\n </StyledSlider>\n ),\n [editedValue, handleInputChange, maxValue, minValue]\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAAkE,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BA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K,CAAC,CAAC;;EAE/B;AACJ;AACA;EACI,MAAMM,iBAAiB,GAAG,IAAAC,kBAAW,EAChCC,KAAoC,IAAK;IACtCL,cAAc,CAACM,MAAM,CAACD,KAAK,CAACE,MAAM,CAACV,KAAK,CAAC,CAAC;IAE1C,IAAIC,QAAQ,EAAE;MACVA,QAAQ,CAACQ,MAAM,CAACD,KAAK,CAACE,MAAM,CAACV,KAAK,CAAC,CAAC;IACxC;EACJ,CAAC,EACD,CAACC,QAAQ,CACb,CAAC;EAED,OAAO,IAAAU,cAAO,EACV,mBACIzC,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACvC,OAAA,CAAAwC,YAAY,qBACT3C,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACvC,OAAA,CAAAyC,iBAAiB;IACdC,IAAI,EAAC,OAAO;IACZf,KAAK,EAAEE,WAAY;IACnBc,GAAG,EAAElB,QAAS;IACdmB,GAAG,EAAElB,QAAS;IACdE,QAAQ,EAAEK;EAAkB,CAC/B,CACS,CACjB,EACD,CAACJ,WAAW,EAAEI,iBAAiB,EAAER,QAAQ,EAAEC,QAAQ,CACvD,CAAC;AACL,CAAC;AAEDH,MAAM,CAACsB,WAAW,GAAG,QAAQ;AAAC,IAAAC,QAAA,GAEfvB,MAAM;AAAAwB,OAAA,CAAAvC,OAAA,GAAAsC,QAAA"}
@@ -0,0 +1,8 @@
1
+ export declare const StyledSlider: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledSliderInput: import("styled-components").StyledComponent<"input", any, {
3
+ min: number;
4
+ max: number;
5
+ value: number;
6
+ } & {
7
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
8
+ }, never>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledSliderInput = exports.StyledSlider = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const StyledSlider = _styledComponents.default.div`
10
+ width: 100%;
11
+ cursor: pointer;
12
+ `;
13
+ exports.StyledSlider = StyledSlider;
14
+ const StyledSliderInput = _styledComponents.default.input`
15
+ width: 100%;
16
+ border-radius: 100px;
17
+ -webkit-appearance: none;
18
+ height: 10px;
19
+ background: ${_ref => {
20
+ var _theme$, _theme$2, _theme$3, _theme$4;
21
+ let {
22
+ theme,
23
+ min,
24
+ max,
25
+ value
26
+ } = _ref;
27
+ return `linear-gradient(
28
+ to right,
29
+ ${(_theme$ = theme['409']) !== null && _theme$ !== void 0 ? _theme$ : ''} 0%,
30
+ ${(_theme$2 = theme['409']) !== null && _theme$2 !== void 0 ? _theme$2 : ''}
31
+ ${(value - min) / (max - min) * 100}%,
32
+ ${(_theme$3 = theme['403']) !== null && _theme$3 !== void 0 ? _theme$3 : ''}
33
+ ${(value - min) / (max - min) * 100}%,
34
+ ${(_theme$4 = theme['403']) !== null && _theme$4 !== void 0 ? _theme$4 : ''}
35
+ )`;
36
+ }};
37
+
38
+ outline: none;
39
+ opacity: 0.7;
40
+ -webkit-transition: 0.2s;
41
+ transition: opacity 0.2s;
42
+ cursor: pointer !important;
43
+
44
+ // Slider thumb for chrome
45
+ &::-webkit-slider-thumb {
46
+ -webkit-appearance: none;
47
+ appearance: none;
48
+ width: 20px;
49
+ height: 20px;
50
+ background-color: ${_ref2 => {
51
+ let {
52
+ theme
53
+ } = _ref2;
54
+ return theme['100'];
55
+ }};
56
+ cursor: pointer;
57
+ border-radius: 50%;
58
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
59
+ }
60
+
61
+ // slider thumb for firefox
62
+ &::-moz-range-thumb {
63
+ width: 20px;
64
+ height: 20px;
65
+ background-color: ${_ref3 => {
66
+ let {
67
+ theme
68
+ } = _ref3;
69
+ return theme['100'];
70
+ }};
71
+ cursor: pointer;
72
+ border-radius: 50%;
73
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
74
+ }
75
+ `;
76
+ exports.StyledSliderInput = StyledSliderInput;
77
+ //# sourceMappingURL=Slider.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledSlider","styled","div","exports","StyledSliderInput","input","_ref","_theme$","_theme$2","_theme$3","_theme$4","theme","min","max","value","_ref2","_ref3"],"sources":["../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledSlider = styled.div`\n width: 100%;\n cursor: pointer;\n`;\n\ntype StyledSliderInputProps = WithTheme<{ min: number; max: number; value: number }>;\n\nexport const StyledSliderInput = styled.input<StyledSliderInputProps>`\n width: 100%;\n border-radius: 100px;\n -webkit-appearance: none;\n height: 10px;\n background: ${({ theme, min, max, value }: StyledSliderInputProps) =>\n `linear-gradient(\n to right,\n ${theme['409'] ?? ''} 0%,\n ${theme['409'] ?? ''}\n ${((value - min) / (max - min)) * 100}%,\n ${theme['403'] ?? ''}\n ${((value - min) / (max - min)) * 100}%,\n ${theme['403'] ?? ''}\n )`};\n\n outline: none;\n opacity: 0.7;\n -webkit-transition: 0.2s;\n transition: opacity 0.2s;\n cursor: pointer !important;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background-color: ${({ theme }: StyledSliderInputProps) => theme['100']};\n cursor: pointer;\n border-radius: 50%;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n }\n\n // slider thumb for firefox\n &::-moz-range-thumb {\n width: 20px;\n height: 20px;\n background-color: ${({ theme }: StyledSliderInputProps) => theme['100']};\n cursor: pointer;\n border-radius: 50%;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;A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ACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4BK,KAAA;EAAA,IAAC;IAAEL;EAA8B,CAAC,GAAAK,KAAA;EAAA,OAAKL,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAChF;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAC,iBAAA,GAAAA,iBAAA"}
@@ -0,0 +1,31 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ export declare enum SmallWaitCursorSize {
3
+ Small = 16,
4
+ Medium = 30
5
+ }
6
+ export declare enum SmallWaitCursorSpeed {
7
+ Slow = 1.5,
8
+ Medium = 1,
9
+ Fast = 0.5
10
+ }
11
+ export type SmallWaitCursorProps = {
12
+ color?: CSSProperties['color'];
13
+ /**
14
+ * Specifies whether the wait cursor should be displayed with a background.
15
+ */
16
+ shouldHideBackground?: boolean;
17
+ /**
18
+ * Specifies whether the wait cursor should be displayed.
19
+ */
20
+ shouldHideWaitCursor?: boolean;
21
+ /**
22
+ * The size of the wait cursor in pixels. Use the SmallWaitCursorSize enum for this prop.
23
+ */
24
+ size?: SmallWaitCursorSize;
25
+ /**
26
+ * The speed of the animation in seconds. Use the SmallWaitCursorSpeed enum for this prop.
27
+ */
28
+ speed?: SmallWaitCursorSpeed;
29
+ };
30
+ declare const SmallWaitCursor: FC<SmallWaitCursorProps>;
31
+ export default SmallWaitCursor;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SmallWaitCursorSpeed = exports.SmallWaitCursorSize = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _SmallWaitCursor = require("./SmallWaitCursor.styles");
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ // noinspection JSUnusedGlobalSymbols
11
+ let SmallWaitCursorSize = /*#__PURE__*/function (SmallWaitCursorSize) {
12
+ SmallWaitCursorSize[SmallWaitCursorSize["Small"] = 16] = "Small";
13
+ SmallWaitCursorSize[SmallWaitCursorSize["Medium"] = 30] = "Medium";
14
+ return SmallWaitCursorSize;
15
+ }({});
16
+ exports.SmallWaitCursorSize = SmallWaitCursorSize;
17
+ let SmallWaitCursorSpeed = /*#__PURE__*/function (SmallWaitCursorSpeed) {
18
+ SmallWaitCursorSpeed[SmallWaitCursorSpeed["Slow"] = 1.5] = "Slow";
19
+ SmallWaitCursorSpeed[SmallWaitCursorSpeed["Medium"] = 1] = "Medium";
20
+ SmallWaitCursorSpeed[SmallWaitCursorSpeed["Fast"] = 0.5] = "Fast";
21
+ return SmallWaitCursorSpeed;
22
+ }({});
23
+ exports.SmallWaitCursorSpeed = SmallWaitCursorSpeed;
24
+ const SmallWaitCursor = _ref => {
25
+ let {
26
+ color,
27
+ shouldHideBackground = false,
28
+ shouldHideWaitCursor = false,
29
+ size = SmallWaitCursorSize.Medium,
30
+ speed = SmallWaitCursorSpeed.Medium
31
+ } = _ref;
32
+ return /*#__PURE__*/_react.default.createElement(_SmallWaitCursor.StyledSmallWaitCursor, {
33
+ shouldShowWaitCursor: !shouldHideWaitCursor,
34
+ size: size
35
+ }, /*#__PURE__*/_react.default.createElement(_SmallWaitCursor.StyledSmallWaitCursorWaitCursor, {
36
+ color: color,
37
+ shouldHideBackground: shouldHideBackground,
38
+ size: size,
39
+ speed: speed
40
+ }), !shouldHideBackground && /*#__PURE__*/_react.default.createElement(_SmallWaitCursor.StyledSmallWaitCursorBackground, null));
41
+ };
42
+ SmallWaitCursor.displayName = 'SmallWaitCursor';
43
+ var _default = SmallWaitCursor;
44
+ exports.default = _default;
45
+ //# sourceMappingURL=SmallWaitCursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmallWaitCursor.js","names":["_react","_interopRequireDefault","require","_SmallWaitCursor","obj","__esModule","default","SmallWaitCursorSize","exports","SmallWaitCursorSpeed","SmallWaitCursor","_ref","color","shouldHideBackground","shouldHideWaitCursor","size","Medium","speed","createElement","StyledSmallWaitCursor","shouldShowWaitCursor","StyledSmallWaitCursorWaitCursor","StyledSmallWaitCursorBackground","displayName","_default"],"sources":["../../../src/components/small-wait-cursor/SmallWaitCursor.tsx"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nimport React, { CSSProperties, FC } from 'react';\nimport {\n StyledSmallWaitCursor,\n StyledSmallWaitCursorBackground,\n StyledSmallWaitCursorWaitCursor,\n} from './SmallWaitCursor.styles';\n\nexport enum SmallWaitCursorSize {\n Small = 16,\n Medium = 30,\n}\n\nexport enum SmallWaitCursorSpeed {\n Slow = 1.5,\n Medium = 1,\n Fast = 0.5,\n}\n\nexport type SmallWaitCursorProps = {\n color?: CSSProperties['color'];\n /**\n * Specifies whether the wait cursor should be displayed with a background.\n */\n shouldHideBackground?: boolean;\n /**\n * Specifies whether the wait cursor should be displayed.\n */\n shouldHideWaitCursor?: boolean;\n /**\n * The size of the wait cursor in pixels. Use the SmallWaitCursorSize enum for this prop.\n */\n size?: SmallWaitCursorSize;\n /**\n * The speed of the animation in seconds. Use the SmallWaitCursorSpeed enum for this prop.\n */\n speed?: SmallWaitCursorSpeed;\n};\n\nconst SmallWaitCursor: FC<SmallWaitCursorProps> = ({\n color,\n shouldHideBackground = false,\n shouldHideWaitCursor = false,\n size = SmallWaitCursorSize.Medium,\n speed = SmallWaitCursorSpeed.Medium,\n}) => (\n <StyledSmallWaitCursor shouldShowWaitCursor={!shouldHideWaitCursor} size={size}>\n <StyledSmallWaitCursorWaitCursor\n color={color}\n shouldHideBackground={shouldHideBackground}\n size={size}\n speed={speed}\n />\n {!shouldHideBackground && <StyledSmallWaitCursorBackground />}\n </StyledSmallWaitCursor>\n);\n\nSmallWaitCursor.displayName = 'SmallWaitCursor';\n\nexport default SmallWaitCursor;\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAIkC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CA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@ -0,0 +1,18 @@
1
+ import type { SmallWaitCursorProps, SmallWaitCursorSize, SmallWaitCursorSpeed } from './SmallWaitCursor';
2
+ export declare const StyledSmallWaitCursor: import("styled-components").StyledComponent<"div", any, {
3
+ shouldShowWaitCursor: boolean;
4
+ size: SmallWaitCursorSize;
5
+ } & {
6
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
7
+ }, never>;
8
+ export declare const StyledSmallWaitCursorBackground: import("styled-components").StyledComponent<"div", any, {
9
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
10
+ }, never>;
11
+ export declare const StyledSmallWaitCursorWaitCursor: import("styled-components").StyledComponent<"div", any, {
12
+ color: SmallWaitCursorProps['color'];
13
+ shouldHideBackground: SmallWaitCursorProps['shouldHideBackground'];
14
+ size: SmallWaitCursorSize;
15
+ speed: SmallWaitCursorSpeed;
16
+ } & {
17
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
18
+ }, never>;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledSmallWaitCursorWaitCursor = exports.StyledSmallWaitCursorBackground = exports.StyledSmallWaitCursor = void 0;
7
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ require("./SmallWaitCursor");
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ const StyledSmallWaitCursor = _styledComponents.default.div`
12
+ position: relative;
13
+ height: ${_ref => {
14
+ let {
15
+ size
16
+ } = _ref;
17
+ return size;
18
+ }}px;
19
+ width: ${_ref2 => {
20
+ let {
21
+ size
22
+ } = _ref2;
23
+ return size;
24
+ }}px;
25
+ opacity: ${_ref3 => {
26
+ let {
27
+ shouldShowWaitCursor
28
+ } = _ref3;
29
+ return shouldShowWaitCursor ? 1 : 0;
30
+ }};
31
+ `;
32
+ exports.StyledSmallWaitCursor = StyledSmallWaitCursor;
33
+ const StyledSmallWaitCursorBackground = _styledComponents.default.div`
34
+ background-color: ${_ref4 => {
35
+ let {
36
+ theme
37
+ } = _ref4;
38
+ return theme['100'];
39
+ }};
40
+ border-radius: 50%;
41
+ height: 100%;
42
+ width: 100%;
43
+ position: relative;
44
+ z-index: 1;
45
+ `;
46
+ exports.StyledSmallWaitCursorBackground = StyledSmallWaitCursorBackground;
47
+ const spin = (0, _styledComponents.keyframes)`
48
+ from {
49
+ transform: rotate(0deg);
50
+ }
51
+ to {
52
+ transform: rotate(360deg);
53
+ }
54
+ `;
55
+ const StyledSmallWaitCursorWaitCursor = _styledComponents.default.div`
56
+ position: absolute;
57
+ top: ${_ref5 => {
58
+ let {
59
+ shouldHideBackground
60
+ } = _ref5;
61
+ return shouldHideBackground ? 0 : 5;
62
+ }}px;
63
+ left: ${_ref6 => {
64
+ let {
65
+ shouldHideBackground
66
+ } = _ref6;
67
+ return shouldHideBackground ? 0 : 5;
68
+ }}px;
69
+ z-index: 2;
70
+ border-style: solid;
71
+ border-width: 3px;
72
+ border-color: ${_ref7 => {
73
+ let {
74
+ color,
75
+ theme
76
+ } = _ref7;
77
+ return color !== null && color !== void 0 ? color : theme.headline;
78
+ }};
79
+ height: ${_ref8 => {
80
+ let {
81
+ shouldHideBackground,
82
+ size
83
+ } = _ref8;
84
+ return shouldHideBackground ? '100%' : `${size - 10}px`;
85
+ }};
86
+ width: ${_ref9 => {
87
+ let {
88
+ shouldHideBackground,
89
+ size
90
+ } = _ref9;
91
+ return shouldHideBackground ? '100%' : `${size - 10}px`;
92
+ }};
93
+ border-radius: 50%;
94
+ display: inline-block;
95
+ border-top: 3px solid transparent;
96
+
97
+ animation: ${spin} ${_ref10 => {
98
+ let {
99
+ speed
100
+ } = _ref10;
101
+ return speed;
102
+ }}s linear infinite;
103
+ `;
104
+ exports.StyledSmallWaitCursorWaitCursor = StyledSmallWaitCursorWaitCursor;
105
+ //# sourceMappingURL=SmallWaitCursor.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmallWaitCursor.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledSmallWaitCursor","styled","div","_ref","size","_ref2","_ref3","shouldShowWaitCursor","exports","StyledSmallWaitCursorBackground","_ref4","theme","spin","keyframes","StyledSmallWaitCursorWaitCursor","_ref5","shouldHideBackground","_ref6","_ref7","color","headline","_ref8","_ref9","_ref10","speed"],"sources":["../../../src/components/small-wait-cursor/SmallWaitCursor.styles.ts"],"sourcesContent":["import styled, { keyframes } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type {\n SmallWaitCursorProps,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './SmallWaitCursor';\nimport {} from './SmallWaitCursor';\n\ntype StyledSmallWaitCursorProps = WithTheme<{\n shouldShowWaitCursor: boolean;\n size: SmallWaitCursorSize;\n}>;\n\nexport const StyledSmallWaitCursor = styled.div<StyledSmallWaitCursorProps>`\n position: relative;\n height: ${({ size }) => size}px;\n width: ${({ size }) => size}px;\n opacity: ${({ shouldShowWaitCursor }) => (shouldShowWaitCursor ? 1 : 0)};\n`;\n\ntype StyledSmallWaitCursorBackgroundProps = WithTheme<unknown>;\n\nexport const StyledSmallWaitCursorBackground = styled.div<StyledSmallWaitCursorBackgroundProps>`\n background-color: ${({ theme }: StyledSmallWaitCursorBackgroundProps) => theme['100']};\n border-radius: 50%;\n height: 100%;\n width: 100%;\n position: relative;\n z-index: 1;\n`;\n\ntype StyledSmallWaitCursorWaitCursorProps = WithTheme<{\n color: SmallWaitCursorProps['color'];\n shouldHideBackground: SmallWaitCursorProps['shouldHideBackground'];\n size: SmallWaitCursorSize;\n speed: SmallWaitCursorSpeed;\n}>;\n\nconst spin = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`;\n\nexport const StyledSmallWaitCursorWaitCursor = styled.div<StyledSmallWaitCursorWaitCursorProps>`\n position: absolute;\n top: ${({ shouldHideBackground }) => (shouldHideBackground ? 0 : 5)}px;\n left: ${({ shouldHideBackground }) => (shouldHideBackground ? 0 : 5)}px;\n z-index: 2;\n border-style: solid;\n border-width: 3px;\n border-color: ${({ color, theme }: StyledSmallWaitCursorWaitCursorProps) =>\n color ?? theme.headline};\n height: ${({ shouldHideBackground, size }) =>\n shouldHideBackground ? '100%' : `${size - 10}px`};\n width: ${({ shouldHideBackground, size }) =>\n shouldHideBackground ? '100%' : `${size - 10}px`};\n border-radius: 50%;\n display: inline-block;\n border-top: 3px solid transparent;\n\n animation: ${spin} ${({ speed }) => speed}s linear infinite;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOAA,OAAA;AAAmC,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF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AAA,OACpCN,oBAAoB,GAAG,MAAM,GAAI,GAAEZ,IAAI,GAAG,EAAG,IAAG;AAAA,CAAC;AACzD;AACA;AACA;AACA;AACA,iBAAiBQ,IAAK,IAAGW,MAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,MAAA;EAAA,OAAKC,KAAK;AAAA,CAAC;AAC9C,CAAC;AAAChB,OAAA,CAAAM,+BAAA,GAAAA,+BAAA"}
@@ -0,0 +1,25 @@
1
+ import { ChangeEventHandler, CSSProperties, FC, FocusEventHandler } from 'react';
2
+ export type TextAreaProps = {
3
+ /**
4
+ * The maximum height of the text area.
5
+ */
6
+ maxHeight?: CSSProperties['maxHeight'];
7
+ /**
8
+ * Function that is executed when the text area loses focus.
9
+ */
10
+ onBlur?: FocusEventHandler<HTMLTextAreaElement>;
11
+ /**
12
+ * Function that is executed when the text of the text area changes.
13
+ */
14
+ onChange?: ChangeEventHandler<HTMLTextAreaElement>;
15
+ /**
16
+ * Placeholder for the text area field.
17
+ */
18
+ placeholder?: string;
19
+ /**
20
+ * Value if the text area should be controlled.
21
+ */
22
+ value?: string;
23
+ };
24
+ declare const TextArea: FC<TextAreaProps>;
25
+ export default TextArea;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _TextArea = require("./TextArea.styles");
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ const TextArea = _ref => {
12
+ let {
13
+ placeholder,
14
+ value,
15
+ onChange,
16
+ onBlur,
17
+ maxHeight = '120px'
18
+ } = _ref;
19
+ const [displayedValue, setDisplayedValue] = (0, _react.useState)('');
20
+ const [isOverflowing, setIsOverflowing] = (0, _react.useState)(false);
21
+ const textareaRef = (0, _react.useRef)(null);
22
+
23
+ /**
24
+ * This function sets the external value
25
+ */
26
+ (0, _react.useEffect)(() => {
27
+ if (typeof value === 'string') {
28
+ setDisplayedValue(value);
29
+ }
30
+ }, [value]);
31
+ const adjustTextareaHeight = (0, _react.useCallback)(() => {
32
+ if (textareaRef.current) {
33
+ textareaRef.current.style.height = 'auto';
34
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
35
+ setIsOverflowing(textareaRef.current.scrollHeight > parseInt(maxHeight.toString(), 10));
36
+ }
37
+ }, [maxHeight]);
38
+
39
+ /**
40
+ * This function updates the value
41
+ */
42
+ const handleChange = (0, _react.useCallback)(event => {
43
+ setDisplayedValue(event.target.value);
44
+ adjustTextareaHeight();
45
+ if (onChange) {
46
+ onChange(event);
47
+ }
48
+ }, [adjustTextareaHeight, onChange]);
49
+ return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextArea, null, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaInput, {
50
+ ref: textareaRef,
51
+ value: displayedValue,
52
+ placeholder: placeholder,
53
+ onBlur: onBlur,
54
+ onChange: handleChange,
55
+ maxHeight: maxHeight,
56
+ isOverflowing: isOverflowing,
57
+ rows: 1
58
+ })), [displayedValue, handleChange, isOverflowing, maxHeight, onBlur, placeholder]);
59
+ };
60
+ TextArea.displayName = 'TextArea';
61
+ var _default = TextArea;
62
+ exports.default = _default;
63
+ //# sourceMappingURL=TextArea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.js","names":["_react","_interopRequireWildcard","require","_TextArea","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TextArea","_ref","placeholder","value","onChange","onBlur","maxHeight","displayedValue","setDisplayedValue","useState","isOverflowing","setIsOverflowing","textareaRef","useRef","useEffect","adjustTextareaHeight","useCallback","current","style","height","scrollHeight","parseInt","toString","handleChange","event","target","useMemo","createElement","StyledTextArea","StyledTextAreaInput","ref","rows","displayName","_default","exports"],"sources":["../../../src/components/text-area/TextArea.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FC,\n FocusEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { StyledTextArea, StyledTextAreaInput } from './TextArea.styles';\n\nexport type TextAreaProps = {\n /**\n * The maximum height of the text area.\n */\n maxHeight?: CSSProperties['maxHeight'];\n /**\n * Function that is executed when the text area loses focus.\n */\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n /**\n * Function that is executed when the text of the text area changes.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n /**\n * Placeholder for the text area field.\n */\n placeholder?: string;\n /**\n * Value if the text area should be controlled.\n */\n value?: string;\n};\n\nconst TextArea: FC<TextAreaProps> = ({\n placeholder,\n value,\n onChange,\n onBlur,\n maxHeight = '120px',\n}) => {\n const [displayedValue, setDisplayedValue] = useState('');\n const [isOverflowing, setIsOverflowing] = useState(false);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n /**\n * This function sets the external value\n */\n useEffect(() => {\n if (typeof value === 'string') {\n setDisplayedValue(value);\n }\n }, [value]);\n\n const adjustTextareaHeight = useCallback(() => {\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;\n\n setIsOverflowing(textareaRef.current.scrollHeight > parseInt(maxHeight.toString(), 10));\n }\n }, [maxHeight]);\n\n /**\n * This function updates the value\n */\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n setDisplayedValue(event.target.value);\n\n adjustTextareaHeight();\n\n if (onChange) {\n onChange(event);\n }\n },\n [adjustTextareaHeight, onChange]\n );\n\n return useMemo(\n () => (\n <StyledTextArea>\n <StyledTextAreaInput\n ref={textareaRef}\n value={displayedValue}\n placeholder={placeholder}\n onBlur={onBlur}\n onChange={handleChange}\n maxHeight={maxHeight}\n isOverflowing={isOverflowing}\n rows={1}\n />\n </StyledTextArea>\n ),\n [displayedValue, handleChange, isOverflowing, maxHeight, onBlur, placeholder]\n );\n};\n\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAYA,IAAAC,SAAA,GAAAD,OAAA;AAAwE,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,K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AAQ,CAACgC,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAEnBjC,QAAQ;AAAAkC,OAAA,CAAAjD,OAAA,GAAAgD,QAAA"}
@@ -0,0 +1,8 @@
1
+ import type { CSSProperties } from 'react';
2
+ export declare const StyledTextArea: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledTextAreaInput: import("styled-components").StyledComponent<"textarea", any, {
4
+ maxHeight: CSSProperties['maxHeight'];
5
+ isOverflowing: boolean;
6
+ } & {
7
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
8
+ }, never>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledTextAreaInput = exports.StyledTextArea = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const StyledTextArea = _styledComponents.default.div``;
10
+ exports.StyledTextArea = StyledTextArea;
11
+ const StyledTextAreaInput = _styledComponents.default.textarea`
12
+ border-radius: 3px;
13
+ border: 1px solid rgba(160, 160, 160, 0.3);
14
+ color: ${_ref => {
15
+ let {
16
+ theme
17
+ } = _ref;
18
+ return theme['006'];
19
+ }};
20
+ resize: none;
21
+ overflow-y: ${_ref2 => {
22
+ let {
23
+ isOverflowing
24
+ } = _ref2;
25
+ return isOverflowing ? 'scroll' : 'hidden';
26
+ }};
27
+ max-height: ${_ref3 => {
28
+ let {
29
+ maxHeight
30
+ } = _ref3;
31
+ return maxHeight;
32
+ }};
33
+ width: 100%;
34
+ padding: 8px 10px;
35
+
36
+ &::-webkit-scrollbar {
37
+ width: 5px;
38
+ }
39
+
40
+ &::-webkit-scrollbar-thumb {
41
+ background: rgba(160, 160, 160, 1);
42
+ border-radius: 3px;
43
+ }
44
+ `;
45
+ exports.StyledTextAreaInput = StyledTextAreaInput;
46
+ //# sourceMappingURL=TextArea.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTextArea","styled","div","exports","StyledTextAreaInput","textarea","_ref","theme","_ref2","isOverflowing","_ref3","maxHeight"],"sources":["../../../src/components/text-area/TextArea.styles.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledTextArea = styled.div``;\n\ntype StyledTextAreaInputProps = WithTheme<{\n maxHeight: CSSProperties['maxHeight'];\n isOverflowing: boolean;\n}>;\n\nexport const StyledTextAreaInput = styled.textarea<StyledTextAreaInputProps>`\n border-radius: 3px;\n border: 1px solid rgba(160, 160, 160, 0.3);\n color: ${({ theme }: StyledTextAreaInputProps) => theme['006']};\n resize: none;\n overflow-y: ${({ isOverflowing }) => (isOverflowing ? 'scroll' : 'hidden')};\n max-height: ${({ maxHeight }: StyledTextAreaInputProps) => maxHeight};\n width: 100%;\n padding: 8px 10px;\n\n &::-webkit-scrollbar {\n width: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: rgba(160, 160, 160, 1);\n border-radius: 3px;\n }\n`;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,cAAc,GAAGC,yBAAM,CAACC,GAAI,EAAC;AAACC,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAOpC,MAAMI,mBAAmB,GAAGH,yBAAM,CAACI,QAAmC;AAC7E;AACA;AACA,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAgC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACnE;AACA,kBAAkBC,KAAA;EAAA,IAAC;IAAEC;EAAc,CAAC,GAAAD,KAAA;EAAA,OAAMC,aAAa,GAAG,QAAQ,GAAG,QAAQ;AAAA,CAAE;AAC/E,kBAAkBC,KAAA;EAAA,IAAC;IAAEC;EAAoC,CAAC,GAAAD,KAAA;EAAA,OAAKC,SAAS;AAAA,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAC,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,22 @@
1
+ import { FC, ReactHTML, ReactNode } from 'react';
2
+ import type { ITextstring, TextstringReplacement } from './types';
3
+ export type TextStringProps = {
4
+ /**
5
+ * The element that the text should be displayed in.
6
+ */
7
+ children?: ReactNode;
8
+ /**
9
+ * The tag of the HTML element that the text should be displayed in.
10
+ */
11
+ childrenTagName?: keyof ReactHTML;
12
+ /**
13
+ * A part of the text that should be replaced.
14
+ */
15
+ replacements?: TextstringReplacement[];
16
+ /**
17
+ * The text that should be displayed.
18
+ */
19
+ textString: ITextstring;
20
+ };
21
+ declare const TextString: FC<TextStringProps>;
22
+ export default TextString;