@chayns-components/core 5.0.0-beta.5 → 5.0.0-beta.503

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 (446) hide show
  1. package/README.md +3 -19
  2. package/lib/api/image/post.d.ts +14 -0
  3. package/lib/api/image/post.js +33 -0
  4. package/lib/api/image/post.js.map +1 -0
  5. package/lib/api/signature/delete.d.ts +1 -0
  6. package/lib/api/signature/delete.js +27 -0
  7. package/lib/api/signature/delete.js.map +1 -0
  8. package/lib/api/signature/get.d.ts +1 -0
  9. package/lib/api/signature/get.js +33 -0
  10. package/lib/api/signature/get.js.map +1 -0
  11. package/lib/api/signature/put.d.ts +1 -0
  12. package/lib/api/signature/put.js +31 -0
  13. package/lib/api/signature/put.js.map +1 -0
  14. package/lib/api/theme/get.d.ts +2 -0
  15. package/lib/api/theme/get.js +14 -0
  16. package/lib/api/theme/get.js.map +1 -0
  17. package/lib/api/video/post.d.ts +15 -0
  18. package/lib/api/video/post.js +30 -0
  19. package/lib/api/video/post.js.map +1 -0
  20. package/lib/components/accordion/Accordion.d.ts +73 -9
  21. package/lib/components/accordion/Accordion.js +133 -182
  22. package/lib/components/accordion/Accordion.js.map +1 -1
  23. package/lib/components/accordion/Accordion.styles.d.ts +11 -0
  24. package/lib/components/accordion/Accordion.styles.js +94 -0
  25. package/lib/components/accordion/Accordion.styles.js.map +1 -0
  26. package/lib/components/accordion/accordion-body/AccordionBody.d.ts +20 -2
  27. package/lib/components/accordion/accordion-body/AccordionBody.js +23 -31
  28. package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
  29. package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +269 -0
  30. package/lib/components/accordion/accordion-body/AccordionBody.styles.js +16 -0
  31. package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -0
  32. package/lib/components/accordion/accordion-content/AccordionContent.d.ts +14 -3
  33. package/lib/components/accordion/accordion-content/AccordionContent.js +21 -32
  34. package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  35. package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -0
  36. package/lib/components/accordion/accordion-content/AccordionContent.styles.js +26 -0
  37. package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -0
  38. package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +33 -0
  39. package/lib/components/accordion/accordion-group/AccordionGroup.js +52 -0
  40. package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -0
  41. package/lib/components/accordion/accordion-head/AccordionHead.d.ts +12 -5
  42. package/lib/components/accordion/accordion-head/AccordionHead.js +109 -128
  43. package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  44. package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2428 -0
  45. package/lib/components/accordion/accordion-head/AccordionHead.styles.js +167 -0
  46. package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -0
  47. package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +9 -0
  48. package/lib/components/accordion/accordion-intro/AccordionIntro.js +13 -0
  49. package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -0
  50. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -0
  51. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +5 -0
  52. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -0
  53. package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
  54. package/lib/components/accordion/accordion-item/AccordionItem.js +20 -0
  55. package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
  56. package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +7 -0
  57. package/lib/components/accordion/accordion-item/AccordionItem.styles.js +26 -0
  58. package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
  59. package/lib/components/amount-control/AmountControl.d.ts +26 -0
  60. package/lib/components/amount-control/AmountControl.js +179 -0
  61. package/lib/components/amount-control/AmountControl.js.map +1 -0
  62. package/lib/components/amount-control/AmountControl.styles.d.ts +288 -0
  63. package/lib/components/amount-control/AmountControl.styles.js +50 -0
  64. package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
  65. package/lib/components/badge/Badge.d.ts +14 -2
  66. package/lib/components/badge/Badge.js +19 -36
  67. package/lib/components/badge/Badge.js.map +1 -1
  68. package/lib/components/badge/Badge.styles.d.ts +9 -0
  69. package/lib/components/badge/Badge.styles.js +30 -0
  70. package/lib/components/badge/Badge.styles.js.map +1 -0
  71. package/lib/components/button/Button.d.ts +7 -3
  72. package/lib/components/button/Button.js +82 -60
  73. package/lib/components/button/Button.js.map +1 -1
  74. package/lib/components/button/Button.styles.d.ts +814 -0
  75. package/lib/components/button/Button.styles.js +78 -0
  76. package/lib/components/button/Button.styles.js.map +1 -0
  77. package/lib/components/checkbox/Checkbox.d.ts +33 -0
  78. package/lib/components/checkbox/Checkbox.js +41 -0
  79. package/lib/components/checkbox/Checkbox.js.map +1 -0
  80. package/lib/components/checkbox/Checkbox.styles.d.ts +13 -0
  81. package/lib/components/checkbox/Checkbox.styles.js +132 -0
  82. package/lib/components/checkbox/Checkbox.styles.js.map +1 -0
  83. package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +13 -1
  84. package/lib/components/color-scheme-provider/ColorSchemeProvider.js +96 -99
  85. package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  86. package/lib/components/combobox/ComboBox.d.ts +44 -0
  87. package/lib/components/combobox/ComboBox.js +183 -0
  88. package/lib/components/combobox/ComboBox.js.map +1 -0
  89. package/lib/components/combobox/ComboBox.styles.d.ts +291 -0
  90. package/lib/components/combobox/ComboBox.styles.js +198 -0
  91. package/lib/components/combobox/ComboBox.styles.js.map +1 -0
  92. package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +13 -0
  93. package/lib/components/combobox/combobox-item/ComboBoxItem.js +33 -0
  94. package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
  95. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +12 -0
  96. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +54 -0
  97. package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
  98. package/lib/components/content-card/ContentCard.d.ts +13 -0
  99. package/lib/components/content-card/ContentCard.js +14 -0
  100. package/lib/components/content-card/ContentCard.js.map +1 -0
  101. package/lib/components/content-card/ContentCard.styles.d.ts +2 -0
  102. package/lib/components/content-card/ContentCard.styles.js +32 -0
  103. package/lib/components/content-card/ContentCard.styles.js.map +1 -0
  104. package/lib/components/context-menu/ContextMenu.d.ts +51 -0
  105. package/lib/components/context-menu/ContextMenu.js +144 -0
  106. package/lib/components/context-menu/ContextMenu.js.map +1 -0
  107. package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -0
  108. package/lib/components/context-menu/ContextMenu.styles.js +5 -0
  109. package/lib/components/context-menu/ContextMenu.styles.js.map +1 -0
  110. package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +10 -0
  111. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +72 -0
  112. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -0
  113. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +276 -0
  114. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +104 -0
  115. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -0
  116. package/lib/components/file-input/FileInput.d.ts +29 -0
  117. package/lib/components/file-input/FileInput.js +112 -0
  118. package/lib/components/file-input/FileInput.js.map +1 -0
  119. package/lib/components/file-input/FileInput.styles.d.ts +277 -0
  120. package/lib/components/file-input/FileInput.styles.js +39 -0
  121. package/lib/components/file-input/FileInput.styles.js.map +1 -0
  122. package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
  123. package/lib/components/file-input/file-list/FileListItem.js +27 -0
  124. package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
  125. package/lib/components/file-input/file-list/FileListItem.styles.d.ts +2 -0
  126. package/lib/components/file-input/file-list/FileListItem.styles.js +3 -0
  127. package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
  128. package/lib/components/filter-buttons/FilterButtons.d.ts +22 -0
  129. package/lib/components/filter-buttons/FilterButtons.js +79 -0
  130. package/lib/components/filter-buttons/FilterButtons.js.map +1 -0
  131. package/lib/components/filter-buttons/FilterButtons.styles.d.ts +2 -0
  132. package/lib/components/filter-buttons/FilterButtons.styles.js +7 -0
  133. package/lib/components/filter-buttons/FilterButtons.styles.js.map +1 -0
  134. package/lib/components/filter-buttons/filter-button/FilterButton.d.ts +14 -0
  135. package/lib/components/filter-buttons/filter-button/FilterButton.js +38 -0
  136. package/lib/components/filter-buttons/filter-button/FilterButton.js.map +1 -0
  137. package/lib/components/filter-buttons/filter-button/FilterButton.styles.d.ts +287 -0
  138. package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +98 -0
  139. package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
  140. package/lib/components/grid-image/GridImage.d.ts +19 -0
  141. package/lib/components/grid-image/GridImage.js +37 -0
  142. package/lib/components/grid-image/GridImage.js.map +1 -0
  143. package/lib/components/grid-image/GridImage.styles.d.ts +22 -0
  144. package/lib/components/grid-image/GridImage.styles.js +94 -0
  145. package/lib/components/grid-image/GridImage.styles.js.map +1 -0
  146. package/lib/components/icon/Icon.d.ts +11 -3
  147. package/lib/components/icon/Icon.js +50 -97
  148. package/lib/components/icon/Icon.js.map +1 -1
  149. package/lib/components/icon/Icon.styles.d.ts +16 -0
  150. package/lib/components/icon/Icon.styles.js +66 -0
  151. package/lib/components/icon/Icon.styles.js.map +1 -0
  152. package/lib/components/input/Input.d.ts +77 -0
  153. package/lib/components/input/Input.js +137 -0
  154. package/lib/components/input/Input.js.map +1 -0
  155. package/lib/components/input/Input.styles.d.ts +559 -0
  156. package/lib/components/input/Input.styles.js +147 -0
  157. package/lib/components/input/Input.styles.js.map +1 -0
  158. package/lib/components/list/List.d.ts +24 -0
  159. package/lib/components/list/List.js +54 -0
  160. package/lib/components/list/List.js.map +1 -0
  161. package/lib/components/list/list-item/ListItem.d.ts +67 -0
  162. package/lib/components/list/list-item/ListItem.js +97 -0
  163. package/lib/components/list/list-item/ListItem.js.map +1 -0
  164. package/lib/components/list/list-item/ListItem.styles.d.ts +272 -0
  165. package/lib/components/list/list-item/ListItem.styles.js +49 -0
  166. package/lib/components/list/list-item/ListItem.styles.js.map +1 -0
  167. package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +7 -0
  168. package/lib/components/list/list-item/list-item-body/ListItemBody.js +49 -0
  169. package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -0
  170. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -0
  171. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +6 -0
  172. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -0
  173. package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +9 -0
  174. package/lib/components/list/list-item/list-item-content/ListItemContent.js +13 -0
  175. package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -0
  176. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -0
  177. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +11 -0
  178. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -0
  179. package/lib/components/list/list-item/list-item-head/ListItemHead.d.ts +18 -0
  180. package/lib/components/list/list-item/list-item-head/ListItemHead.js +90 -0
  181. package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -0
  182. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +550 -0
  183. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +91 -0
  184. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -0
  185. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.d.ts +6 -0
  186. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +15 -0
  187. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -0
  188. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -0
  189. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +24 -0
  190. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -0
  191. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.d.ts +7 -0
  192. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +34 -0
  193. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -0
  194. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +11 -0
  195. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +43 -0
  196. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -0
  197. package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
  198. package/lib/components/mention-finder/MentionFinder.js +130 -0
  199. package/lib/components/mention-finder/MentionFinder.js.map +1 -0
  200. package/lib/components/mention-finder/MentionFinder.styles.d.ts +272 -0
  201. package/lib/components/mention-finder/MentionFinder.styles.js +84 -0
  202. package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
  203. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
  204. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +23 -0
  205. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
  206. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +11 -0
  207. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +83 -0
  208. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
  209. package/lib/components/number-input/NumberInput.d.ts +58 -0
  210. package/lib/components/number-input/NumberInput.js +134 -0
  211. package/lib/components/number-input/NumberInput.js.map +1 -0
  212. package/lib/components/popup/Popup.d.ts +30 -0
  213. package/lib/components/popup/Popup.js +150 -0
  214. package/lib/components/popup/Popup.js.map +1 -0
  215. package/lib/components/popup/Popup.styles.d.ts +5 -0
  216. package/lib/components/popup/Popup.styles.js +21 -0
  217. package/lib/components/popup/Popup.styles.js.map +1 -0
  218. package/lib/components/popup/popup-content/PopupContent.d.ts +10 -0
  219. package/lib/components/popup/popup-content/PopupContent.js +64 -0
  220. package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
  221. package/lib/components/popup/popup-content/PopupContent.styles.d.ts +274 -0
  222. package/lib/components/popup/popup-content/PopupContent.styles.js +84 -0
  223. package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
  224. package/lib/components/progress-bar/ProgressBar.d.ts +13 -0
  225. package/lib/components/progress-bar/ProgressBar.js +31 -0
  226. package/lib/components/progress-bar/ProgressBar.js.map +1 -0
  227. package/lib/components/progress-bar/ProgressBar.styles.d.ts +272 -0
  228. package/lib/components/progress-bar/ProgressBar.styles.js +30 -0
  229. package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
  230. package/lib/components/radio-button/RadioButton.d.ts +30 -0
  231. package/lib/components/radio-button/RadioButton.js +92 -0
  232. package/lib/components/radio-button/RadioButton.js.map +1 -0
  233. package/lib/components/radio-button/RadioButton.styles.d.ts +287 -0
  234. package/lib/components/radio-button/RadioButton.styles.js +105 -0
  235. package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
  236. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +17 -0
  237. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +38 -0
  238. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
  239. package/lib/components/scroll-view/ScrollView.d.ts +13 -0
  240. package/lib/components/scroll-view/ScrollView.js +19 -0
  241. package/lib/components/scroll-view/ScrollView.js.map +1 -0
  242. package/lib/components/scroll-view/ScrollView.styles.d.ts +9 -0
  243. package/lib/components/scroll-view/ScrollView.styles.js +41 -0
  244. package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
  245. package/lib/components/search-box/SearchBox.d.ts +41 -0
  246. package/lib/components/search-box/SearchBox.js +272 -0
  247. package/lib/components/search-box/SearchBox.js.map +1 -0
  248. package/lib/components/search-box/SearchBox.styles.d.ts +274 -0
  249. package/lib/components/search-box/SearchBox.styles.js +71 -0
  250. package/lib/components/search-box/SearchBox.styles.js.map +1 -0
  251. package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +11 -0
  252. package/lib/components/search-box/search-box-item/SearchBoxItem.js +27 -0
  253. package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
  254. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +13 -0
  255. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +55 -0
  256. package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
  257. package/lib/components/search-input/SearchInput.d.ts +33 -0
  258. package/lib/components/search-input/SearchInput.js +93 -0
  259. package/lib/components/search-input/SearchInput.js.map +1 -0
  260. package/lib/components/search-input/SearchInput.styles.d.ts +534 -0
  261. package/lib/components/search-input/SearchInput.styles.js +19 -0
  262. package/lib/components/search-input/SearchInput.styles.js.map +1 -0
  263. package/lib/components/select-button/SelectButton.d.ts +34 -0
  264. package/lib/components/select-button/SelectButton.js +56 -0
  265. package/lib/components/select-button/SelectButton.js.map +1 -0
  266. package/lib/components/select-button/SelectButton.styles.d.ts +2 -0
  267. package/lib/components/select-button/SelectButton.styles.js +3 -0
  268. package/lib/components/select-button/SelectButton.styles.js.map +1 -0
  269. package/lib/components/setup-wizard/SetupWizard.d.ts +27 -0
  270. package/lib/components/setup-wizard/SetupWizard.js +73 -0
  271. package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
  272. package/lib/components/setup-wizard/SetupWizard.styles.d.ts +2 -0
  273. package/lib/components/setup-wizard/SetupWizard.styles.js +3 -0
  274. package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
  275. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +21 -0
  276. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +49 -0
  277. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
  278. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +3 -0
  279. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +7 -0
  280. package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
  281. package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
  282. package/lib/components/sharing-bar/SharingBar.js +101 -0
  283. package/lib/components/sharing-bar/SharingBar.js.map +1 -0
  284. package/lib/components/sharing-bar/SharingBar.styles.d.ts +6 -0
  285. package/lib/components/sharing-bar/SharingBar.styles.js +17 -0
  286. package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
  287. package/lib/components/signature/Signature.d.ts +33 -0
  288. package/lib/components/signature/Signature.js +95 -0
  289. package/lib/components/signature/Signature.js.map +1 -0
  290. package/lib/components/signature/Signature.styles.d.ts +5 -0
  291. package/lib/components/signature/Signature.styles.js +14 -0
  292. package/lib/components/signature/Signature.styles.js.map +1 -0
  293. package/lib/components/slider/Slider.d.ts +45 -0
  294. package/lib/components/slider/Slider.js +181 -0
  295. package/lib/components/slider/Slider.js.map +1 -0
  296. package/lib/components/slider/Slider.styles.d.ts +16 -0
  297. package/lib/components/slider/Slider.styles.js +98 -0
  298. package/lib/components/slider/Slider.styles.js.map +1 -0
  299. package/lib/components/slider-button/SliderButton.d.ts +23 -0
  300. package/lib/components/slider-button/SliderButton.js +148 -0
  301. package/lib/components/slider-button/SliderButton.js.map +1 -0
  302. package/lib/components/slider-button/SliderButton.styles.d.ts +279 -0
  303. package/lib/components/slider-button/SliderButton.styles.js +62 -0
  304. package/lib/components/slider-button/SliderButton.styles.js.map +1 -0
  305. package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
  306. package/lib/components/small-wait-cursor/SmallWaitCursor.js +36 -0
  307. package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
  308. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +19 -0
  309. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +93 -0
  310. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
  311. package/lib/components/tag-input/TagInput.d.ts +22 -0
  312. package/lib/components/tag-input/TagInput.js +79 -0
  313. package/lib/components/tag-input/TagInput.js.map +1 -0
  314. package/lib/components/tag-input/TagInput.styles.d.ts +9 -0
  315. package/lib/components/tag-input/TagInput.styles.js +42 -0
  316. package/lib/components/tag-input/TagInput.styles.js.map +1 -0
  317. package/lib/components/text-area/TextArea.d.ts +29 -0
  318. package/lib/components/text-area/TextArea.js +49 -0
  319. package/lib/components/text-area/TextArea.js.map +1 -0
  320. package/lib/components/text-area/TextArea.styles.d.ts +16 -0
  321. package/lib/components/text-area/TextArea.styles.js +101 -0
  322. package/lib/components/text-area/TextArea.styles.js.map +1 -0
  323. package/lib/components/tooltip/Tooltip.d.ts +22 -0
  324. package/lib/components/tooltip/Tooltip.js +33 -0
  325. package/lib/components/tooltip/Tooltip.js.map +1 -0
  326. package/lib/components/tooltip/Tooltip.styles.d.ts +2 -0
  327. package/lib/components/tooltip/Tooltip.styles.js +3 -0
  328. package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
  329. package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +13 -0
  330. package/lib/components/tooltip/tooltip-item/TooltipItem.js +22 -0
  331. package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
  332. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +15 -0
  333. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +36 -0
  334. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
  335. package/lib/components/truncation/Truncation.d.ts +34 -0
  336. package/lib/components/truncation/Truncation.js +132 -0
  337. package/lib/components/truncation/Truncation.js.map +1 -0
  338. package/lib/components/truncation/Truncation.styles.d.ts +277 -0
  339. package/lib/components/truncation/Truncation.styles.js +44 -0
  340. package/lib/components/truncation/Truncation.styles.js.map +1 -0
  341. package/lib/constants/mentionFinder.d.ts +4 -0
  342. package/lib/constants/mentionFinder.js +6 -0
  343. package/lib/constants/mentionFinder.js.map +1 -0
  344. package/lib/constants/numberInput.d.ts +5 -0
  345. package/lib/constants/numberInput.js +6 -0
  346. package/lib/constants/numberInput.js.map +1 -0
  347. package/lib/constants/signature.d.ts +1 -0
  348. package/lib/constants/signature.js +2 -0
  349. package/lib/constants/signature.js.map +1 -0
  350. package/lib/hooks/useElementSize.d.ts +2 -0
  351. package/lib/hooks/useElementSize.js +9 -0
  352. package/lib/hooks/useElementSize.js.map +1 -0
  353. package/lib/hooks/uuid.d.ts +1 -0
  354. package/lib/hooks/uuid.js +7 -0
  355. package/lib/hooks/uuid.js.map +1 -0
  356. package/lib/index.d.ts +55 -0
  357. package/lib/index.js +50 -47
  358. package/lib/index.js.map +1 -1
  359. package/lib/types/chayns.d.ts +122 -0
  360. package/lib/types/chayns.js +7 -0
  361. package/lib/types/chayns.js.map +1 -0
  362. package/lib/types/colorSchemeProvider.d.ts +15 -0
  363. package/lib/types/colorSchemeProvider.js +9 -0
  364. package/lib/types/colorSchemeProvider.js.map +1 -0
  365. package/lib/types/comboBox.d.ts +4 -0
  366. package/lib/types/comboBox.js +6 -0
  367. package/lib/types/comboBox.js.map +1 -0
  368. package/lib/types/contextMenu.d.ts +8 -0
  369. package/lib/types/contextMenu.js +10 -0
  370. package/lib/types/contextMenu.js.map +1 -0
  371. package/lib/types/file.d.ts +46 -0
  372. package/lib/types/file.js +2 -0
  373. package/lib/types/file.js.map +1 -0
  374. package/lib/types/filterButtons.d.ts +15 -0
  375. package/lib/types/filterButtons.js +11 -0
  376. package/lib/types/filterButtons.js.map +1 -0
  377. package/lib/types/popup.d.ts +16 -0
  378. package/lib/types/popup.js +10 -0
  379. package/lib/types/popup.js.map +1 -0
  380. package/lib/types/radioButton.d.ts +4 -0
  381. package/lib/types/radioButton.js +2 -0
  382. package/lib/types/radioButton.js.map +1 -0
  383. package/lib/types/searchBox.d.ts +5 -0
  384. package/lib/types/searchBox.js +2 -0
  385. package/lib/types/searchBox.js.map +1 -0
  386. package/lib/types/selectButton.d.ts +4 -0
  387. package/lib/types/selectButton.js +2 -0
  388. package/lib/types/selectButton.js.map +1 -0
  389. package/lib/types/signature.d.ts +10 -0
  390. package/lib/types/signature.js +2 -0
  391. package/lib/types/signature.js.map +1 -0
  392. package/lib/types/slider-button.d.ts +4 -0
  393. package/lib/types/slider-button.js +2 -0
  394. package/lib/types/slider-button.js.map +1 -0
  395. package/lib/types/tagInput.d.ts +4 -0
  396. package/lib/types/tagInput.js +2 -0
  397. package/lib/types/tagInput.js.map +1 -0
  398. package/lib/types/tooltip.d.ts +9 -0
  399. package/lib/types/tooltip.js +2 -0
  400. package/lib/types/tooltip.js.map +1 -0
  401. package/lib/types/truncation.d.ts +5 -0
  402. package/lib/types/truncation.js +7 -0
  403. package/lib/types/truncation.js.map +1 -0
  404. package/lib/utils/accordion.d.ts +11 -0
  405. package/lib/utils/accordion.js +29 -0
  406. package/lib/utils/accordion.js.map +1 -0
  407. package/lib/utils/amountControl.d.ts +7 -0
  408. package/lib/utils/amountControl.js +15 -0
  409. package/lib/utils/amountControl.js.map +1 -0
  410. package/lib/utils/calculate.d.ts +6 -0
  411. package/lib/utils/calculate.js +80 -0
  412. package/lib/utils/calculate.js.map +1 -0
  413. package/lib/utils/file.d.ts +363 -0
  414. package/lib/utils/file.js +393 -0
  415. package/lib/utils/file.js.map +1 -0
  416. package/lib/utils/fileDialog.d.ts +7 -0
  417. package/lib/utils/fileDialog.js +65 -0
  418. package/lib/utils/fileDialog.js.map +1 -0
  419. package/lib/utils/font.d.ts +8 -0
  420. package/lib/utils/font.js +67 -0
  421. package/lib/utils/font.js.map +1 -0
  422. package/lib/utils/icon.d.ts +1 -0
  423. package/lib/utils/icon.js +5 -0
  424. package/lib/utils/icon.js.map +1 -0
  425. package/lib/utils/isTobitEmployee.d.ts +1 -0
  426. package/lib/utils/isTobitEmployee.js +21 -0
  427. package/lib/utils/isTobitEmployee.js.map +1 -0
  428. package/lib/utils/numberInput.d.ts +23 -0
  429. package/lib/utils/numberInput.js +83 -0
  430. package/lib/utils/numberInput.js.map +1 -0
  431. package/lib/utils/searchBox.d.ts +7 -0
  432. package/lib/utils/searchBox.js +16 -0
  433. package/lib/utils/searchBox.js.map +1 -0
  434. package/lib/utils/slider.d.ts +7 -0
  435. package/lib/utils/slider.js +28 -0
  436. package/lib/utils/slider.js.map +1 -0
  437. package/lib/utils/sliderButton.d.ts +15 -0
  438. package/lib/utils/sliderButton.js +45 -0
  439. package/lib/utils/sliderButton.js.map +1 -0
  440. package/lib/utils/truncation.d.ts +1 -0
  441. package/lib/utils/truncation.js +27 -0
  442. package/lib/utils/truncation.js.map +1 -0
  443. package/lib/utils/uploadFile.d.ts +7 -0
  444. package/lib/utils/uploadFile.js +35 -0
  445. package/lib/utils/uploadFile.js.map +1 -0
  446. package/package.json +75 -62
package/README.md CHANGED
@@ -26,25 +26,9 @@ yarn add @chayns-components/core
26
26
  ```
27
27
 
28
28
  > **Information:** Since the components have now been implemented with the styled-components
29
- > library, the styles are delivered directly with the components. There is no need to load an
30
- > extra stylesheet anymore.
29
+ > library, the styles are delivered directly with the components. There is no need to load an extra
30
+ > stylesheet anymore.
31
31
 
32
32
  ## Usage
33
33
 
34
- You can use the components in your project as in the following example.
35
-
36
- ```typescript jsx
37
- import { Button } from '@chayns-components/core';
38
-
39
- const handleButtonClick: MouseEventHandler<HTMLButtonElement> = (event) => {
40
- // Your code
41
- };
42
-
43
- <Button onClick={handleButtonClick}>
44
- Click me!
45
- </Button>
46
- ```
47
-
48
- ## Components Overview
49
-
50
- `coming soon`
34
+ For detailed usage visit the [storybook](https://components.chayns.site/storybook).
@@ -0,0 +1,14 @@
1
+ import type { Meta } from '../../types/file';
2
+ export interface PostImageResult {
3
+ key: string;
4
+ base: string;
5
+ meta?: Meta;
6
+ }
7
+ interface PostImageOptions {
8
+ file: File;
9
+ }
10
+ /**
11
+ * Uploads an image to the tsimg cloud service
12
+ */
13
+ export declare const postImage: ({ file, }: PostImageOptions) => Promise<PostImageResult | undefined>;
14
+ export {};
@@ -0,0 +1,33 @@
1
+ import { getAccessToken, getUser } from 'chayns-api';
2
+ import { getFileAsArrayBuffer } from '../../utils/fileDialog';
3
+ /**
4
+ * Uploads an image to the tsimg cloud service
5
+ */
6
+ export const postImage = async _ref => {
7
+ let {
8
+ file
9
+ } = _ref;
10
+ const {
11
+ accessToken
12
+ } = await getAccessToken();
13
+ const user = getUser();
14
+ if (!accessToken || !user?.personId) {
15
+ return undefined;
16
+ }
17
+ const body = await getFileAsArrayBuffer(file);
18
+ const response = await fetch('https://api.tsimg.cloud/image', {
19
+ body,
20
+ headers: {
21
+ Accept: 'application/json',
22
+ Authorization: `bearer ${accessToken}`,
23
+ 'Content-Type': 'image/*',
24
+ 'X-Person-Id': user.personId
25
+ },
26
+ method: 'POST'
27
+ });
28
+ if (response.ok) {
29
+ return await response.json();
30
+ }
31
+ throw Error(`Failed to POST image (status code: ${response.status}).`);
32
+ };
33
+ //# sourceMappingURL=post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post.js","names":["getAccessToken","getUser","getFileAsArrayBuffer","postImage","_ref","file","accessToken","user","personId","undefined","body","response","fetch","headers","Accept","Authorization","method","ok","json","Error","status"],"sources":["../../../src/api/image/post.ts"],"sourcesContent":["import { getAccessToken, getUser } from 'chayns-api';\nimport type { Meta } from '../../types/file';\nimport { getFileAsArrayBuffer } from '../../utils/fileDialog';\n\nexport interface PostImageResult {\n key: string;\n base: string;\n meta?: Meta;\n}\n\ninterface PostImageOptions {\n file: File;\n}\n\n/**\n * Uploads an image to the tsimg cloud service\n */\nexport const postImage = async ({\n file,\n}: PostImageOptions): Promise<PostImageResult | undefined> => {\n const { accessToken } = await getAccessToken();\n const user = getUser();\n\n if (!accessToken || !user?.personId) {\n return undefined;\n }\n\n const body = await getFileAsArrayBuffer(file);\n\n const response = await fetch('https://api.tsimg.cloud/image', {\n body,\n headers: {\n Accept: 'application/json',\n Authorization: `bearer ${accessToken}`,\n 'Content-Type': 'image/*',\n 'X-Person-Id': user.personId,\n },\n method: 'POST',\n });\n\n if (response.ok) {\n return (await response.json()) as PostImageResult;\n }\n\n throw Error(`Failed to POST image (status code: ${response.status}).`);\n};\n"],"mappings":"AAAA,SAASA,cAAc,EAAEC,OAAO,QAAQ,YAAY;AAEpD,SAASC,oBAAoB,QAAQ,wBAAwB;AAY7D;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,MAAAC,IAAA,IAEqC;EAAA,IAF9B;IAC5BC;EACc,CAAC,GAAAD,IAAA;EACf,MAAM;IAAEE;EAAY,CAAC,GAAG,MAAMN,cAAc,CAAC,CAAC;EAC9C,MAAMO,IAAI,GAAGN,OAAO,CAAC,CAAC;EAEtB,IAAI,CAACK,WAAW,IAAI,CAACC,IAAI,EAAEC,QAAQ,EAAE;IACjC,OAAOC,SAAS;EACpB;EAEA,MAAMC,IAAI,GAAG,MAAMR,oBAAoB,CAACG,IAAI,CAAC;EAE7C,MAAMM,QAAQ,GAAG,MAAMC,KAAK,CAAC,+BAA+B,EAAE;IAC1DF,IAAI;IACJG,OAAO,EAAE;MACLC,MAAM,EAAE,kBAAkB;MAC1BC,aAAa,EAAG,UAAST,WAAY,EAAC;MACtC,cAAc,EAAE,SAAS;MACzB,aAAa,EAAEC,IAAI,CAACC;IACxB,CAAC;IACDQ,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIL,QAAQ,CAACM,EAAE,EAAE;IACb,OAAQ,MAAMN,QAAQ,CAACO,IAAI,CAAC,CAAC;EACjC;EAEA,MAAMC,KAAK,CAAE,sCAAqCR,QAAQ,CAACS,MAAO,IAAG,CAAC;AAC1E,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const deleteUserSignature: () => Promise<boolean>;
@@ -0,0 +1,27 @@
1
+ import { getAccessToken } from 'chayns-api';
2
+ import { SIGNATURE_SERVER_URL } from '../../constants/signature';
3
+ export const deleteUserSignature = async () => {
4
+ const {
5
+ accessToken
6
+ } = await getAccessToken();
7
+ if (!accessToken) {
8
+ return false;
9
+ }
10
+ try {
11
+ const response = await fetch(SIGNATURE_SERVER_URL, {
12
+ method: 'DELETE',
13
+ headers: {
14
+ accept: 'application/json',
15
+ authorization: `bearer ${accessToken}`
16
+ }
17
+ });
18
+ if (response.ok || response.status === 304) {
19
+ return true;
20
+ }
21
+ console.error('[chayns components] Signature: failed to delete user signature', response.status);
22
+ } catch (ex) {
23
+ console.error('[chayns components] Signature: failed to delete user signature', ex);
24
+ }
25
+ return false;
26
+ };
27
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","names":["getAccessToken","SIGNATURE_SERVER_URL","deleteUserSignature","accessToken","response","fetch","method","headers","accept","authorization","ok","status","console","error","ex"],"sources":["../../../src/api/signature/delete.ts"],"sourcesContent":["import { getAccessToken } from 'chayns-api';\nimport { SIGNATURE_SERVER_URL } from '../../constants/signature';\n\nexport const deleteUserSignature = async () => {\n const { accessToken } = await getAccessToken();\n\n if (!accessToken) {\n return false;\n }\n\n try {\n const response = await fetch(SIGNATURE_SERVER_URL, {\n method: 'DELETE',\n headers: {\n accept: 'application/json',\n authorization: `bearer ${accessToken}`,\n },\n });\n\n if (response.ok || response.status === 304) {\n return true;\n }\n\n console.error(\n '[chayns components] Signature: failed to delete user signature',\n response.status,\n );\n } catch (ex) {\n console.error('[chayns components] Signature: failed to delete user signature', ex);\n }\n\n return false;\n};\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,YAAY;AAC3C,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,MAAMC,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EAC3C,MAAM;IAAEC;EAAY,CAAC,GAAG,MAAMH,cAAc,CAAC,CAAC;EAE9C,IAAI,CAACG,WAAW,EAAE;IACd,OAAO,KAAK;EAChB;EAEA,IAAI;IACA,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACJ,oBAAoB,EAAE;MAC/CK,MAAM,EAAE,QAAQ;MAChBC,OAAO,EAAE;QACLC,MAAM,EAAE,kBAAkB;QAC1BC,aAAa,EAAG,UAASN,WAAY;MACzC;IACJ,CAAC,CAAC;IAEF,IAAIC,QAAQ,CAACM,EAAE,IAAIN,QAAQ,CAACO,MAAM,KAAK,GAAG,EAAE;MACxC,OAAO,IAAI;IACf;IAEAC,OAAO,CAACC,KAAK,CACT,gEAAgE,EAChET,QAAQ,CAACO,MACb,CAAC;EACL,CAAC,CAAC,OAAOG,EAAE,EAAE;IACTF,OAAO,CAACC,KAAK,CAAC,gEAAgE,EAAEC,EAAE,CAAC;EACvF;EAEA,OAAO,KAAK;AAChB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const getUserSignature: () => Promise<string | undefined>;
@@ -0,0 +1,33 @@
1
+ import { getAccessToken } from 'chayns-api';
2
+ import { SIGNATURE_SERVER_URL } from '../../constants/signature';
3
+ export const getUserSignature = async () => {
4
+ const {
5
+ accessToken
6
+ } = await getAccessToken();
7
+ if (!accessToken) {
8
+ return undefined;
9
+ }
10
+ try {
11
+ const response = await fetch(SIGNATURE_SERVER_URL, {
12
+ method: 'GET',
13
+ headers: {
14
+ accept: 'application/json',
15
+ authorization: `bearer ${accessToken}`
16
+ }
17
+ });
18
+ if (response.status === 200) {
19
+ const {
20
+ value
21
+ } = await response.json();
22
+ return value;
23
+ }
24
+ if (response.status === 204) {
25
+ return undefined;
26
+ }
27
+ console.error('[chayns components] Signature: failed to get user signature', response.status);
28
+ } catch (ex) {
29
+ console.error('[chayns components] Signature: failed to get user signature', ex);
30
+ }
31
+ return undefined;
32
+ };
33
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","names":["getAccessToken","SIGNATURE_SERVER_URL","getUserSignature","accessToken","undefined","response","fetch","method","headers","accept","authorization","status","value","json","console","error","ex"],"sources":["../../../src/api/signature/get.ts"],"sourcesContent":["import { getAccessToken } from 'chayns-api';\nimport type { GetUserSignatureResult } from '../../types/signature';\nimport { SIGNATURE_SERVER_URL } from '../../constants/signature';\n\nexport const getUserSignature = async (): Promise<string | undefined> => {\n const { accessToken } = await getAccessToken();\n\n if (!accessToken) {\n return undefined;\n }\n\n try {\n const response = await fetch(SIGNATURE_SERVER_URL, {\n method: 'GET',\n headers: {\n accept: 'application/json',\n authorization: `bearer ${accessToken}`,\n },\n });\n\n if (response.status === 200) {\n const { value } = (await response.json()) as GetUserSignatureResult;\n\n return value;\n }\n\n if (response.status === 204) {\n return undefined;\n }\n\n console.error(\n '[chayns components] Signature: failed to get user signature',\n response.status,\n );\n } catch (ex) {\n console.error('[chayns components] Signature: failed to get user signature', ex);\n }\n\n return undefined;\n};\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,YAAY;AAE3C,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAAA,KAAyC;EACrE,MAAM;IAAEC;EAAY,CAAC,GAAG,MAAMH,cAAc,CAAC,CAAC;EAE9C,IAAI,CAACG,WAAW,EAAE;IACd,OAAOC,SAAS;EACpB;EAEA,IAAI;IACA,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACL,oBAAoB,EAAE;MAC/CM,MAAM,EAAE,KAAK;MACbC,OAAO,EAAE;QACLC,MAAM,EAAE,kBAAkB;QAC1BC,aAAa,EAAG,UAASP,WAAY;MACzC;IACJ,CAAC,CAAC;IAEF,IAAIE,QAAQ,CAACM,MAAM,KAAK,GAAG,EAAE;MACzB,MAAM;QAAEC;MAAM,CAAC,GAAI,MAAMP,QAAQ,CAACQ,IAAI,CAAC,CAA4B;MAEnE,OAAOD,KAAK;IAChB;IAEA,IAAIP,QAAQ,CAACM,MAAM,KAAK,GAAG,EAAE;MACzB,OAAOP,SAAS;IACpB;IAEAU,OAAO,CAACC,KAAK,CACT,6DAA6D,EAC7DV,QAAQ,CAACM,MACb,CAAC;EACL,CAAC,CAAC,OAAOK,EAAE,EAAE;IACTF,OAAO,CAACC,KAAK,CAAC,6DAA6D,EAAEC,EAAE,CAAC;EACpF;EAEA,OAAOZ,SAAS;AACpB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const putUserSignature: (dataURL: string) => Promise<boolean>;
@@ -0,0 +1,31 @@
1
+ import { getAccessToken } from 'chayns-api';
2
+ import { SIGNATURE_SERVER_URL } from '../../constants/signature';
3
+ export const putUserSignature = async dataURL => {
4
+ const {
5
+ accessToken
6
+ } = await getAccessToken();
7
+ if (!accessToken) {
8
+ return false;
9
+ }
10
+ try {
11
+ const response = await fetch(SIGNATURE_SERVER_URL, {
12
+ method: 'PUT',
13
+ headers: {
14
+ accept: 'application/json',
15
+ authorization: `bearer ${accessToken}`,
16
+ 'content-type': 'application/json'
17
+ },
18
+ body: JSON.stringify({
19
+ value: dataURL
20
+ })
21
+ });
22
+ if (response.ok) {
23
+ return true;
24
+ }
25
+ console.error('[chayns components] Signature: failed to put user signature', response.status);
26
+ } catch (ex) {
27
+ console.error('[chayns components] Signature: failed to put user signature', ex);
28
+ }
29
+ return false;
30
+ };
31
+ //# sourceMappingURL=put.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put.js","names":["getAccessToken","SIGNATURE_SERVER_URL","putUserSignature","dataURL","accessToken","response","fetch","method","headers","accept","authorization","body","JSON","stringify","value","ok","console","error","status","ex"],"sources":["../../../src/api/signature/put.ts"],"sourcesContent":["import { getAccessToken } from 'chayns-api';\nimport { SIGNATURE_SERVER_URL } from '../../constants/signature';\n\nexport const putUserSignature = async (dataURL: string) => {\n const { accessToken } = await getAccessToken();\n\n if (!accessToken) {\n return false;\n }\n\n try {\n const response = await fetch(SIGNATURE_SERVER_URL, {\n method: 'PUT',\n headers: {\n accept: 'application/json',\n authorization: `bearer ${accessToken}`,\n 'content-type': 'application/json',\n },\n body: JSON.stringify({ value: dataURL }),\n });\n\n if (response.ok) {\n return true;\n }\n\n console.error(\n '[chayns components] Signature: failed to put user signature',\n response.status,\n );\n } catch (ex) {\n console.error('[chayns components] Signature: failed to put user signature', ex);\n }\n\n return false;\n};\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,YAAY;AAC3C,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,MAAMC,gBAAgB,GAAG,MAAOC,OAAe,IAAK;EACvD,MAAM;IAAEC;EAAY,CAAC,GAAG,MAAMJ,cAAc,CAAC,CAAC;EAE9C,IAAI,CAACI,WAAW,EAAE;IACd,OAAO,KAAK;EAChB;EAEA,IAAI;IACA,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACL,oBAAoB,EAAE;MAC/CM,MAAM,EAAE,KAAK;MACbC,OAAO,EAAE;QACLC,MAAM,EAAE,kBAAkB;QAC1BC,aAAa,EAAG,UAASN,WAAY,EAAC;QACtC,cAAc,EAAE;MACpB,CAAC;MACDO,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;QAAEC,KAAK,EAAEX;MAAQ,CAAC;IAC3C,CAAC,CAAC;IAEF,IAAIE,QAAQ,CAACU,EAAE,EAAE;MACb,OAAO,IAAI;IACf;IAEAC,OAAO,CAACC,KAAK,CACT,6DAA6D,EAC7DZ,QAAQ,CAACa,MACb,CAAC;EACL,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTH,OAAO,CAACC,KAAK,CAAC,6DAA6D,EAAEE,EAAE,CAAC;EACpF;EAEA,OAAO,KAAK;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { DesignSettings } from '../../types/colorSchemeProvider';
2
+ export declare const getDesignSettings: () => Promise<DesignSettings | undefined>;
@@ -0,0 +1,14 @@
1
+ import { getSite } from 'chayns-api';
2
+ export const getDesignSettings = async () => {
3
+ const {
4
+ id
5
+ } = getSite();
6
+ const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {
7
+ method: 'GET'
8
+ });
9
+ if (response.status === 200) {
10
+ return await response.json();
11
+ }
12
+ return undefined;
13
+ };
14
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","names":["getSite","getDesignSettings","id","response","fetch","method","status","json","undefined"],"sources":["../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (): Promise<DesignSettings | undefined> => {\n const { id } = getSite();\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AAGpC,OAAO,MAAMC,iBAAiB,GAAG,MAAAA,CAAA,KAAiD;EAC9E,MAAM;IAAEC;EAAG,CAAC,GAAGF,OAAO,CAAC,CAAC;EAExB,MAAMG,QAAQ,GAAG,MAAMC,KAAK,CAAE,8BAA6BF,EAAG,WAAU,EAAE;IACtEG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface PostVideoResult {
2
+ id: string;
3
+ originalVideoQuality: string;
4
+ thumbnailUrl: string;
5
+ url: string;
6
+ urlMP4: string;
7
+ }
8
+ interface PostVideoOptions {
9
+ file: File | Blob;
10
+ }
11
+ /**
12
+ * Uploads a video to the streaming service
13
+ */
14
+ export declare const postVideo: ({ file, }: PostVideoOptions) => Promise<PostVideoResult | undefined>;
15
+ export {};
@@ -0,0 +1,30 @@
1
+ import { getAccessToken } from 'chayns-api';
2
+ /**
3
+ * Uploads a video to the streaming service
4
+ */
5
+ export const postVideo = async _ref => {
6
+ let {
7
+ file
8
+ } = _ref;
9
+ const {
10
+ accessToken
11
+ } = await getAccessToken();
12
+ if (!accessToken) {
13
+ return undefined;
14
+ }
15
+ const formData = new FormData();
16
+ formData.append('files', file);
17
+ const response = await fetch('https://streamingservice.chayns.space/video?disableIntercom=true', {
18
+ body: formData,
19
+ headers: {
20
+ Authorization: `bearer ${accessToken}`
21
+ },
22
+ method: 'POST'
23
+ });
24
+ if (response.ok) {
25
+ const data = await response.json();
26
+ return data[0];
27
+ }
28
+ throw Error(`Failed to POST video (status code: ${response.status}).`);
29
+ };
30
+ //# sourceMappingURL=post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post.js","names":["getAccessToken","postVideo","_ref","file","accessToken","undefined","formData","FormData","append","response","fetch","body","headers","Authorization","method","ok","data","json","Error","status"],"sources":["../../../src/api/video/post.ts"],"sourcesContent":["import { getAccessToken } from 'chayns-api';\n\nexport interface PostVideoResult {\n id: string;\n originalVideoQuality: string;\n thumbnailUrl: string;\n url: string;\n urlMP4: string;\n}\n\ninterface PostVideoOptions {\n file: File | Blob;\n}\n\n/**\n * Uploads a video to the streaming service\n */\nexport const postVideo = async ({\n file,\n}: PostVideoOptions): Promise<PostVideoResult | undefined> => {\n const { accessToken } = await getAccessToken();\n\n if (!accessToken) {\n return undefined;\n }\n\n const formData = new FormData();\n\n formData.append('files', file);\n\n const response = await fetch(\n 'https://streamingservice.chayns.space/video?disableIntercom=true',\n {\n body: formData,\n headers: {\n Authorization: `bearer ${accessToken}`,\n },\n method: 'POST',\n },\n );\n\n if (response.ok) {\n const data = (await response.json()) as PostVideoResult[];\n\n return data[0];\n }\n\n throw Error(`Failed to POST video (status code: ${response.status}).`);\n};\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,YAAY;AAc3C;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAG,MAAAC,IAAA,IAEqC;EAAA,IAF9B;IAC5BC;EACc,CAAC,GAAAD,IAAA;EACf,MAAM;IAAEE;EAAY,CAAC,GAAG,MAAMJ,cAAc,CAAC,CAAC;EAE9C,IAAI,CAACI,WAAW,EAAE;IACd,OAAOC,SAAS;EACpB;EAEA,MAAMC,QAAQ,GAAG,IAAIC,QAAQ,CAAC,CAAC;EAE/BD,QAAQ,CAACE,MAAM,CAAC,OAAO,EAAEL,IAAI,CAAC;EAE9B,MAAMM,QAAQ,GAAG,MAAMC,KAAK,CACxB,kEAAkE,EAClE;IACIC,IAAI,EAAEL,QAAQ;IACdM,OAAO,EAAE;MACLC,aAAa,EAAG,UAAST,WAAY;IACzC,CAAC;IACDU,MAAM,EAAE;EACZ,CACJ,CAAC;EAED,IAAIL,QAAQ,CAACM,EAAE,EAAE;IACb,MAAMC,IAAI,GAAI,MAAMP,QAAQ,CAACQ,IAAI,CAAC,CAAuB;IAEzD,OAAOD,IAAI,CAAC,CAAC,CAAC;EAClB;EAEA,MAAME,KAAK,CAAE,sCAAqCT,QAAQ,CAACU,MAAO,IAAG,CAAC;AAC1E,CAAC"}
@@ -1,10 +1,17 @@
1
- import { FC, ReactNode } from 'react';
2
- declare type AccordionProps = {
1
+ import React, { ChangeEventHandler, FC, ReactNode, UIEvent } from 'react';
2
+ export declare const AccordionContext: React.Context<{
3
+ isWrapped: boolean;
4
+ }>;
5
+ export type AccordionProps = {
3
6
  /**
4
- * Defines the group of the Accordion. Accordions with the same group are
5
- * automatically closed when an Accordion of the group is opened.
7
+ * Maximum height of the accordion body element. This automatically makes the content of the
8
+ * body element scrollable.
6
9
  */
7
- group?: string;
10
+ bodyMaxHeight?: number;
11
+ /**
12
+ * The content of the accordion body
13
+ */
14
+ children: ReactNode;
8
15
  /**
9
16
  * The icon that is displayed in front of the title
10
17
  */
@@ -13,24 +20,81 @@ declare type AccordionProps = {
13
20
  * This can be used to automatically expand the Accordion during the first render.
14
21
  */
15
22
  isDefaultOpen?: boolean;
23
+ /**
24
+ * This will disable the Accordion so that it cannot be opened and will gray out the title. Does not work with isOpened.
25
+ */
26
+ isDisabled?: boolean;
16
27
  /**
17
28
  * This can be used so that the Accordion cannot be opened or closed.
18
29
  * In addition, in this case the icon is exchanged to mark the Accordions.
19
30
  */
20
31
  isFixed?: boolean;
21
32
  /**
22
- * This value must be set for nested Accordions. This adjusts the style of
23
- * the head and the padding of the content.
33
+ * This can be used to open the Accordion from the outside.
34
+ */
35
+ isOpened?: boolean;
36
+ /**
37
+ * This will gray out the title of the Accordion to indicate hidden content, for example.
38
+ */
39
+ isTitleGreyed?: boolean;
40
+ /**
41
+ * Function that is executed when the accordion body will be scrolled
24
42
  */
25
- isWrapped?: boolean;
43
+ onBodyScroll?: (event: UIEvent<HTMLDivElement>) => void;
44
+ /**
45
+ * Function that is executed when the accordion will be closed.
46
+ */
47
+ onClose?: VoidFunction;
48
+ /**
49
+ * Function that is executed when the accordion will be opened.
50
+ */
51
+ onOpen?: VoidFunction;
52
+ /**
53
+ * Function that is executed when the text of the search in the accordion
54
+ * head changes. When this function is given, the search field is displayed
55
+ * in the Accordion Head.
56
+ */
57
+ onSearchChange?: ChangeEventHandler<HTMLInputElement>;
26
58
  /**
27
59
  * Content to be displayed on the right side in the head of the Accordion
28
60
  */
29
- right?: ReactNode;
61
+ rightElement?: ReactNode;
62
+ /**
63
+ * Icon to be displayed on the right side in the search input
64
+ */
65
+ searchIcon?: string[];
66
+ /**
67
+ * The placeholder to be used for the search
68
+ */
69
+ searchPlaceholder?: string;
70
+ /**
71
+ * The value that is displayed inside the search
72
+ */
73
+ searchValue?: string;
74
+ /**
75
+ * This will force the background color of the accordion to be used even if it is closed and not hovered.
76
+ */
77
+ shouldForceBackground?: boolean;
78
+ /**
79
+ * This will hide the background color of the accordion
80
+ */
81
+ shouldHideBackground?: boolean;
82
+ /**
83
+ * Whether the icon should be rotating.
84
+ */
85
+ shouldRotateIcon?: boolean;
30
86
  /**
31
87
  * Title of the Accordion displayed in the head
32
88
  */
33
89
  title: string;
90
+ /**
91
+ * Additional elements to be displayed in the header next to the title.
92
+ */
93
+ titleElement?: ReactNode;
94
+ /**
95
+ * This will render the Accordion closed on the first render.
96
+ */
97
+ shouldRenderClosed?: boolean;
34
98
  };
35
99
  declare const Accordion: FC<AccordionProps>;
36
100
  export default Accordion;