loon-bulma-react 2025.0.34 → 2025.1.0

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 (468) hide show
  1. package/.github/workflows/deploy-example.yml +43 -0
  2. package/.github/workflows/run-test.yml +31 -0
  3. package/.prettierignore +5 -0
  4. package/.prettierrc.json +19 -0
  5. package/dist/classes/Console.d.ts +29 -0
  6. package/dist/classes/FetchWrapper.d.ts +124 -0
  7. package/dist/components/AspectRatio/AspectRatio.d.ts +28 -0
  8. package/dist/components/Block/Block.d.ts +9 -0
  9. package/dist/components/Box/BorderBox.d.ts +29 -0
  10. package/dist/components/Box/Box.d.ts +20 -0
  11. package/dist/components/Button/Button.d.ts +84 -0
  12. package/dist/components/ButtonGroup/ButtonGroup.d.ts +26 -0
  13. package/dist/components/Calendar/CalendarItems/CalendarColoredItem.d.ts +18 -0
  14. package/dist/components/Calendar/CalendarItems/CalendarItem.d.ts +18 -0
  15. package/dist/components/Calendar/DayContainer.d.ts +25 -0
  16. package/dist/components/Calendar/EventDescriptions.d.ts +33 -0
  17. package/dist/components/Calendar/Fourweeks/FourweeksView.d.ts +23 -0
  18. package/dist/components/Calendar/Mini/MiniView.d.ts +24 -0
  19. package/dist/components/Calendar/Month/MonthView.d.ts +23 -0
  20. package/dist/components/Calendar/Planning/PlanningView.d.ts +42 -0
  21. package/dist/components/Calendar/Props.d.ts +58 -0
  22. package/dist/components/Calendar/Week/AlldayContainer.d.ts +19 -0
  23. package/dist/components/Calendar/Week/HourRow.d.ts +30 -0
  24. package/dist/components/Calendar/Week/WeekView.d.ts +24 -0
  25. package/dist/components/Calendar/calendar.functions.d.ts +10 -0
  26. package/dist/components/Calendar/index.d.ts +15 -0
  27. package/dist/components/CodeBlock/CodeBlock.d.ts +49 -0
  28. package/dist/components/Columns/Column.d.ts +207 -0
  29. package/dist/components/Columns/Columns.d.ts +35 -0
  30. package/dist/components/Container/Container.d.ts +44 -0
  31. package/dist/components/Content/Content.d.ts +22 -0
  32. package/dist/components/DataTable/DataTable.d.ts +187 -0
  33. package/dist/components/Divider/Divider.d.ts +8 -0
  34. package/dist/components/Dropdown/Dropdown.d.ts +25 -0
  35. package/dist/components/Footer/Footer.d.ts +22 -0
  36. package/dist/components/Help/Help.d.ts +19 -0
  37. package/dist/components/Hero/Hero.d.ts +104 -0
  38. package/dist/components/Icon/Icon.d.ts +82 -0
  39. package/dist/components/Image/Image.d.ts +28 -0
  40. package/dist/components/Indicator/Indicator.d.ts +25 -0
  41. package/dist/components/Kbd/Kbd.d.ts +30 -0
  42. package/dist/components/Label/Label.d.ts +11 -0
  43. package/dist/components/Link/Link.d.ts +44 -0
  44. package/dist/components/Menu/Menu.d.ts +64 -0
  45. package/dist/components/Message/Message.d.ts +49 -0
  46. package/dist/components/Modal/Modal.d.ts +74 -0
  47. package/dist/components/Notification/Notification.d.ts +38 -0
  48. package/dist/components/Pagination/Pagination.d.ts +56 -0
  49. package/dist/components/Panel/Panel.d.ts +98 -0
  50. package/dist/components/ProgressBar/ProgressBar.d.ts +28 -0
  51. package/dist/components/QuickView/QuickView.d.ts +61 -0
  52. package/dist/components/ScrollArea/ScrollArea.d.ts +76 -0
  53. package/dist/components/Section/Section.d.ts +21 -0
  54. package/dist/components/SimpleTable/SimpleTable.d.ts +121 -0
  55. package/dist/components/Steps/Steps.d.ts +61 -0
  56. package/dist/components/TabBar/TabBar.d.ts +47 -0
  57. package/dist/components/Tag/Tag.d.ts +54 -0
  58. package/dist/components/TimeLine/TimeLine.d.ts +62 -0
  59. package/dist/components/Titles/Titles.d.ts +71 -0
  60. package/dist/components/ToggleBar/ToggleBar.d.ts +80 -0
  61. package/dist/components/Tooltip/Tooltip.d.ts +49 -0
  62. package/dist/components/TreeView/TreeView.d.ts +48 -0
  63. package/dist/contexts/ActionSheet/ActionSheetContextProvider.d.ts +76 -0
  64. package/dist/contexts/AppProvider/AppProviders.d.ts +18 -0
  65. package/dist/contexts/ColorSchemeProvider/ColorSchemeProvider.d.ts +15 -0
  66. package/dist/contexts/Confirm/ConfirmContextProvider.d.ts +60 -0
  67. package/dist/contexts/DefaultsProvider/DefaultsProvider.d.ts +94 -0
  68. package/dist/contexts/DialogsProvider/DialogsProvider.d.ts +4 -0
  69. package/dist/contexts/KeysProvider/KeysProvider.d.ts +35 -0
  70. package/dist/contexts/ModalProvider/ModalProvider.d.ts +11 -0
  71. package/dist/contexts/ModeProvider/ModeProvider.d.ts +14 -0
  72. package/dist/contexts/Notifier/Notifier.d.ts +81 -0
  73. package/dist/contexts/Prompt/PromptContextProvider.d.ts +71 -0
  74. package/dist/forms/Checkbox/Checkbox.d.ts +47 -0
  75. package/dist/forms/ComboBox/ComboBox.d.ts +44 -0
  76. package/dist/forms/ComboBox/MultiComboBox.d.ts +44 -0
  77. package/dist/forms/ComboBox/useComboBoxScroll.d.ts +4 -0
  78. package/dist/forms/Currency/CurrencyInput.d.ts +47 -0
  79. package/dist/forms/Datetimes/DateInput.d.ts +37 -0
  80. package/dist/forms/Datetimes/DateTimeInput.d.ts +44 -0
  81. package/dist/forms/Datetimes/TimeInput.d.ts +42 -0
  82. package/dist/forms/File/FileInput.d.ts +71 -0
  83. package/dist/forms/Input.d.ts +223 -0
  84. package/dist/forms/MaskedInput/MaskedInput.d.ts +46 -0
  85. package/dist/forms/Numeric/NumberInput.d.ts +14 -0
  86. package/dist/forms/Numeric/RangeInput.d.ts +21 -0
  87. package/dist/forms/Others/ColorInput.d.ts +56 -0
  88. package/dist/forms/Others/HiddenInput.d.ts +29 -0
  89. package/dist/forms/Others/TelephoneInput.d.ts +14 -0
  90. package/dist/forms/Others/URLInput.d.ts +14 -0
  91. package/dist/forms/Periodes/MonthInput.d.ts +43 -0
  92. package/dist/forms/Periodes/WeekInput.d.ts +43 -0
  93. package/dist/forms/Radio/Radio.d.ts +97 -0
  94. package/dist/forms/Select/Select.d.ts +132 -0
  95. package/dist/forms/TagsInput/TagsInput.d.ts +44 -0
  96. package/dist/forms/Text/EmailInput.d.ts +14 -0
  97. package/dist/forms/Text/FormattedInput.d.ts +54 -0
  98. package/dist/forms/Text/PasswordInput.d.ts +19 -0
  99. package/dist/forms/Text/TextArea.d.ts +31 -0
  100. package/dist/forms/Text/TextEditor.d.ts +36 -0
  101. package/dist/forms/Text/TextInput.d.ts +30 -0
  102. package/dist/hooks/useCaretPosition.d.ts +8 -0
  103. package/dist/hooks/useClickOutside.d.ts +15 -0
  104. package/dist/hooks/useClipboard.d.ts +21 -0
  105. package/dist/hooks/useContextMenu.d.ts +29 -0
  106. package/dist/hooks/useCookieState.d.ts +37 -0
  107. package/dist/hooks/useDebounced.hooks.d.ts +55 -0
  108. package/dist/hooks/useFetchApi.d.ts +65 -0
  109. package/dist/hooks/useHotkeys.d.ts +44 -0
  110. package/dist/hooks/useIndexedDb.d.ts +89 -0
  111. package/dist/hooks/useLocalStoredState.d.ts +36 -0
  112. package/dist/hooks/usePagination.d.ts +25 -0
  113. package/dist/hooks/usePropState.d.ts +16 -0
  114. package/dist/hooks/useScrollIntoView.d.ts +59 -0
  115. package/dist/hooks/useSessionStoredState.d.ts +38 -0
  116. package/dist/hooks/useToggle.d.ts +16 -0
  117. package/dist/hooks/useUncontrolled.d.ts +44 -0
  118. package/dist/hooks/useValidatedState.d.ts +21 -0
  119. package/dist/index.d.ts +169 -5773
  120. package/dist/index.js +37319 -55
  121. package/dist/internal_functions/createIconsInternal.d.ts +17 -0
  122. package/dist/internal_functions/getAlignmentClass.d.ts +16 -0
  123. package/dist/internal_functions/getColorClass.d.ts +23 -0
  124. package/dist/internal_functions/getPositionClass.d.ts +2 -0
  125. package/dist/internal_functions/getSizeClass.d.ts +23 -0
  126. package/dist/internal_functions/index.d.ts +8 -0
  127. package/{styles → dist/styles}/_all.scss +3 -1
  128. package/dist/styles/tooltip.scss +32 -0
  129. package/dist/test-data.d.ts +9 -0
  130. package/dist/types/index.d.ts +111 -0
  131. package/dist/utils/JSDateTime.class.d.ts +510 -0
  132. package/dist/utils/JSDuration.class.d.ts +79 -0
  133. package/dist/utils/calculateTxtColor.function.d.ts +14 -0
  134. package/dist/utils/colors.d.ts +26 -0
  135. package/dist/utils/colorscheme.d.ts +5 -0
  136. package/dist/utils/compare.d.ts +7 -0
  137. package/dist/utils/deserialize.function.d.ts +2 -0
  138. package/dist/utils/hasBSN.function.d.ts +27 -0
  139. package/dist/utils/isIBAN.function.d.ts +24 -0
  140. package/dist/utils/math.d.ts +22 -0
  141. package/dist/utils/operators.d.ts +192 -0
  142. package/dist/utils/serialize.function.d.ts +2 -0
  143. package/dist/utils/sorting.d.ts +34 -0
  144. package/dist/utils/string.utils.d.ts +72 -0
  145. package/eslint.config.js +108 -0
  146. package/index.html +16 -0
  147. package/jest.config.ts +12 -0
  148. package/lib/classes/Console.ts +78 -0
  149. package/lib/classes/FetchWrapper.ts +392 -0
  150. package/lib/components/AspectRatio/AspectRatio.test.tsx +67 -0
  151. package/lib/components/AspectRatio/AspectRatio.tsx +40 -0
  152. package/lib/components/Block/Block.test.tsx +24 -0
  153. package/lib/components/Block/Block.tsx +13 -0
  154. package/lib/components/Box/BorderBox.test.tsx +24 -0
  155. package/lib/components/Box/BorderBox.tsx +79 -0
  156. package/lib/components/Box/Box.test.tsx +24 -0
  157. package/lib/components/Box/Box.tsx +30 -0
  158. package/lib/components/Button/Button.test.tsx +871 -0
  159. package/lib/components/Button/Button.tsx +217 -0
  160. package/lib/components/ButtonGroup/ButtonGroup.test.tsx +115 -0
  161. package/lib/components/ButtonGroup/ButtonGroup.tsx +130 -0
  162. package/lib/components/Calendar/CalendarItems/CalendarColoredItem.tsx +63 -0
  163. package/lib/components/Calendar/CalendarItems/CalendarItem.tsx +49 -0
  164. package/lib/components/Calendar/DayContainer.tsx +115 -0
  165. package/lib/components/Calendar/EventDescriptions.tsx +131 -0
  166. package/lib/components/Calendar/Fourweeks/FourweeksView.test.tsx +262 -0
  167. package/lib/components/Calendar/Fourweeks/FourweeksView.tsx +169 -0
  168. package/lib/components/Calendar/Mini/MiniView.tsx +127 -0
  169. package/lib/components/Calendar/Month/MonthView.test.tsx +266 -0
  170. package/lib/components/Calendar/Month/MonthView.tsx +178 -0
  171. package/lib/components/Calendar/Planning/PlanningView.tsx +195 -0
  172. package/lib/components/Calendar/Props.tsx +64 -0
  173. package/lib/components/Calendar/Week/AlldayContainer.tsx +38 -0
  174. package/lib/components/Calendar/Week/HourRow.tsx +159 -0
  175. package/lib/components/Calendar/Week/WeekView.test.tsx +291 -0
  176. package/lib/components/Calendar/Week/WeekView.tsx +176 -0
  177. package/lib/components/Calendar/calendar.functions.ts +32 -0
  178. package/lib/components/Calendar/index.ts +17 -0
  179. package/lib/components/CodeBlock/CodeBlock.tsx +128 -0
  180. package/lib/components/Columns/Column.test.tsx +145 -0
  181. package/lib/components/Columns/Column.tsx +316 -0
  182. package/lib/components/Columns/Columns.test.tsx +95 -0
  183. package/lib/components/Columns/Columns.tsx +62 -0
  184. package/lib/components/Container/Container.test.tsx +87 -0
  185. package/lib/components/Container/Container.tsx +140 -0
  186. package/lib/components/Content/Content.test.tsx +51 -0
  187. package/lib/components/Content/Content.tsx +31 -0
  188. package/lib/components/DataTable/DataTable.test.tsx +403 -0
  189. package/lib/components/DataTable/DataTable.tsx +726 -0
  190. package/lib/components/Divider/Divider.tsx +18 -0
  191. package/lib/components/Dropdown/Dropdown.tsx +112 -0
  192. package/lib/components/Footer/Footer.test.tsx +42 -0
  193. package/lib/components/Footer/Footer.tsx +34 -0
  194. package/lib/components/Help/Help.test.tsx +83 -0
  195. package/lib/components/Help/Help.tsx +25 -0
  196. package/lib/components/Hero/Hero.test.tsx +222 -0
  197. package/lib/components/Hero/Hero.tsx +214 -0
  198. package/lib/components/Icon/Icon.test.tsx +157 -0
  199. package/lib/components/Icon/Icon.tsx +192 -0
  200. package/lib/components/Image/Image.test.tsx +72 -0
  201. package/lib/components/Image/Image.tsx +60 -0
  202. package/lib/components/Indicator/Indicator.test.tsx +68 -0
  203. package/lib/components/Indicator/Indicator.tsx +46 -0
  204. package/lib/components/Kbd/Kbd.test.tsx +49 -0
  205. package/lib/components/Kbd/Kbd.tsx +51 -0
  206. package/lib/components/Label/Label.tsx +21 -0
  207. package/lib/components/Link/Link.test.tsx +84 -0
  208. package/lib/components/Link/Link.tsx +87 -0
  209. package/lib/components/Menu/Menu.test.tsx +154 -0
  210. package/lib/components/Menu/Menu.tsx +264 -0
  211. package/lib/components/Message/Message.test.tsx +112 -0
  212. package/lib/components/Message/Message.tsx +154 -0
  213. package/lib/components/Modal/Modal.test.tsx +188 -0
  214. package/lib/components/Modal/Modal.tsx +188 -0
  215. package/lib/components/Notification/Notification.test.tsx +175 -0
  216. package/lib/components/Notification/Notification.tsx +110 -0
  217. package/lib/components/Pagination/Pagination.tsx +143 -0
  218. package/lib/components/Panel/Panel.tsx +225 -0
  219. package/lib/components/ProgressBar/ProgressBar.test.tsx +92 -0
  220. package/lib/components/ProgressBar/ProgressBar.tsx +42 -0
  221. package/lib/components/QuickView/QuickView.test.tsx +81 -0
  222. package/lib/components/QuickView/QuickView.tsx +122 -0
  223. package/lib/components/ScrollArea/ScrollArea.test.tsx +682 -0
  224. package/lib/components/ScrollArea/ScrollArea.tsx +183 -0
  225. package/lib/components/Section/Section.test.tsx +24 -0
  226. package/lib/components/Section/Section.tsx +32 -0
  227. package/lib/components/SimpleTable/SimpleTable.test.tsx +135 -0
  228. package/lib/components/SimpleTable/SimpleTable.tsx +327 -0
  229. package/lib/components/Steps/Steps.test.tsx +356 -0
  230. package/lib/components/Steps/Steps.tsx +164 -0
  231. package/lib/components/TabBar/TabBar.test.tsx +134 -0
  232. package/lib/components/TabBar/TabBar.tsx +125 -0
  233. package/lib/components/Tag/Tag.test.tsx +184 -0
  234. package/lib/components/Tag/Tag.tsx +131 -0
  235. package/lib/components/TimeLine/TimeLine.test.tsx +149 -0
  236. package/lib/components/TimeLine/TimeLine.tsx +116 -0
  237. package/lib/components/Titles/Titles.test.tsx +53 -0
  238. package/lib/components/Titles/Titles.tsx +205 -0
  239. package/lib/components/ToggleBar/ToggleBar.test.tsx +228 -0
  240. package/lib/components/ToggleBar/ToggleBar.tsx +208 -0
  241. package/lib/components/Tooltip/Tooltip.test.tsx +61 -0
  242. package/lib/components/Tooltip/Tooltip.tsx +203 -0
  243. package/lib/components/TreeView/TreeView.tsx +233 -0
  244. package/lib/contexts/ActionSheet/ActionSheetContextProvider.test.tsx +24 -0
  245. package/lib/contexts/ActionSheet/ActionSheetContextProvider.tsx +237 -0
  246. package/lib/contexts/AppProvider/AppProviders.tsx +56 -0
  247. package/lib/contexts/ColorSchemeProvider/ColorSchemeProvider.tsx +49 -0
  248. package/lib/contexts/Confirm/ConfirmContextProvider.test.tsx +24 -0
  249. package/lib/contexts/Confirm/ConfirmContextProvider.tsx +227 -0
  250. package/lib/contexts/DefaultsProvider/DefaultsProvider.tsx +178 -0
  251. package/lib/contexts/DialogsProvider/DialogsProvider.tsx +14 -0
  252. package/lib/contexts/KeysProvider/KeysProvider.tsx +344 -0
  253. package/lib/contexts/ModalProvider/ModalProvider.tsx +59 -0
  254. package/lib/contexts/ModeProvider/ModeProvider.tsx +26 -0
  255. package/lib/contexts/Notifier/Notifier.test.tsx +342 -0
  256. package/lib/contexts/Notifier/Notifier.tsx +209 -0
  257. package/lib/contexts/Prompt/PromptContextProvider.test.tsx +24 -0
  258. package/lib/contexts/Prompt/PromptContextProvider.tsx +280 -0
  259. package/lib/forms/Checkbox/Checkbox.test.tsx +171 -0
  260. package/lib/forms/Checkbox/Checkbox.tsx +256 -0
  261. package/lib/forms/ComboBox/ComboBox.test.tsx +24 -0
  262. package/lib/forms/ComboBox/ComboBox.tsx +464 -0
  263. package/lib/forms/ComboBox/MultiComboBox.test.tsx +30 -0
  264. package/lib/forms/ComboBox/MultiComboBox.tsx +282 -0
  265. package/lib/forms/ComboBox/useComboBoxScroll.test.ts +30 -0
  266. package/lib/forms/ComboBox/useComboBoxScroll.ts +35 -0
  267. package/lib/forms/Currency/CurrencyInput.test.tsx +131 -0
  268. package/lib/forms/Currency/CurrencyInput.tsx +269 -0
  269. package/lib/forms/Datetimes/DateInput.test.tsx +198 -0
  270. package/lib/forms/Datetimes/DateInput.tsx +56 -0
  271. package/lib/forms/Datetimes/DateTimeInput.test.tsx +223 -0
  272. package/lib/forms/Datetimes/DateTimeInput.tsx +102 -0
  273. package/lib/forms/Datetimes/TimeInput.test.tsx +218 -0
  274. package/lib/forms/Datetimes/TimeInput.tsx +100 -0
  275. package/lib/forms/File/FileInput.test.tsx +175 -0
  276. package/lib/forms/File/FileInput.tsx +240 -0
  277. package/lib/forms/Input.test.tsx +158 -0
  278. package/lib/forms/Input.tsx +542 -0
  279. package/lib/forms/MaskedInput/MaskedInput.tsx +651 -0
  280. package/lib/forms/Numeric/NumberInput.test.tsx +233 -0
  281. package/lib/forms/Numeric/NumberInput.tsx +171 -0
  282. package/lib/forms/Numeric/RangeInput.test.tsx +187 -0
  283. package/lib/forms/Numeric/RangeInput.tsx +166 -0
  284. package/lib/forms/Others/ColorInput.test.tsx +181 -0
  285. package/lib/forms/Others/ColorInput.tsx +117 -0
  286. package/lib/forms/Others/HiddenInput.test.tsx +25 -0
  287. package/lib/forms/Others/HiddenInput.tsx +46 -0
  288. package/lib/forms/Others/TelephoneInput.test.tsx +153 -0
  289. package/lib/forms/Others/TelephoneInput.tsx +26 -0
  290. package/lib/forms/Others/URLInput.test.tsx +153 -0
  291. package/lib/forms/Others/URLInput.tsx +30 -0
  292. package/lib/forms/Periodes/MonthInput.test.tsx +119 -0
  293. package/lib/forms/Periodes/MonthInput.tsx +63 -0
  294. package/lib/forms/Periodes/WeekInput.test.tsx +119 -0
  295. package/lib/forms/Periodes/WeekInput.tsx +63 -0
  296. package/lib/forms/Radio/Radio.test.tsx +322 -0
  297. package/lib/forms/Radio/Radio.tsx +347 -0
  298. package/lib/forms/Select/Select.test.tsx +223 -0
  299. package/lib/forms/Select/Select.tsx +405 -0
  300. package/lib/forms/TagsInput/TagsInput.test.tsx +27 -0
  301. package/lib/forms/TagsInput/TagsInput.tsx +289 -0
  302. package/lib/forms/Text/EmailInput.test.tsx +153 -0
  303. package/lib/forms/Text/EmailInput.tsx +29 -0
  304. package/lib/forms/Text/FormattedInput.tsx +271 -0
  305. package/lib/forms/Text/PasswordInput.test.tsx +160 -0
  306. package/lib/forms/Text/PasswordInput.tsx +154 -0
  307. package/lib/forms/Text/TextArea.test.tsx +164 -0
  308. package/lib/forms/Text/TextArea.tsx +169 -0
  309. package/lib/forms/Text/TextEditor.test.tsx +12 -0
  310. package/lib/forms/Text/TextEditor.tsx +612 -0
  311. package/lib/forms/Text/TextInput.test.tsx +147 -0
  312. package/lib/forms/Text/TextInput.tsx +60 -0
  313. package/lib/hooks/useCaretPosition.test.tsx +31 -0
  314. package/lib/hooks/useCaretPosition.tsx +23 -0
  315. package/lib/hooks/useClickOutside.test.tsx +101 -0
  316. package/lib/hooks/useClickOutside.ts +44 -0
  317. package/lib/hooks/useClipboard.ts +59 -0
  318. package/lib/hooks/useContextMenu.tsx +74 -0
  319. package/lib/hooks/useCookieState.tsx +117 -0
  320. package/lib/hooks/useDebounced.hooks.test.ts +70 -0
  321. package/lib/hooks/useDebounced.hooks.ts +110 -0
  322. package/lib/hooks/useFetchApi.ts +91 -0
  323. package/lib/hooks/useHotkeys.test.tsx +111 -0
  324. package/lib/hooks/useHotkeys.ts +139 -0
  325. package/lib/hooks/useIndexedDb.tsx +337 -0
  326. package/lib/hooks/useLocalStoredState.test.tsx +98 -0
  327. package/lib/hooks/useLocalStoredState.ts +86 -0
  328. package/lib/hooks/usePagination.test.ts +113 -0
  329. package/lib/hooks/usePagination.ts +96 -0
  330. package/lib/hooks/usePropState.ts +25 -0
  331. package/lib/hooks/useScrollIntoView.ts +250 -0
  332. package/lib/hooks/useSessionStoredState.ts +87 -0
  333. package/lib/hooks/useToggle.test.tsx +52 -0
  334. package/lib/hooks/useToggle.ts +30 -0
  335. package/lib/hooks/useUncontrolled.test.ts +52 -0
  336. package/lib/hooks/useUncontrolled.ts +65 -0
  337. package/lib/hooks/useValidatedState.test.tsx +37 -0
  338. package/lib/hooks/useValidatedState.ts +37 -0
  339. package/lib/index.ts +246 -0
  340. package/lib/internal_functions/createIconsInternal.tsx +94 -0
  341. package/lib/internal_functions/getAlignmentClass.ts +37 -0
  342. package/lib/internal_functions/getColorClass.ts +73 -0
  343. package/lib/internal_functions/getPositionClass.ts +15 -0
  344. package/lib/internal_functions/getSizeClass.ts +57 -0
  345. package/lib/internal_functions/index.ts +9 -0
  346. package/lib/styles/_all.scss +457 -0
  347. package/lib/styles/bulma-box.scss +135 -0
  348. package/lib/styles/button.scss +565 -0
  349. package/lib/styles/buttons.scss +19 -0
  350. package/lib/styles/calendar.scss +148 -0
  351. package/lib/styles/checkradio.scss +662 -0
  352. package/lib/styles/datalist.scss +27 -0
  353. package/lib/styles/divider.scss +30 -0
  354. package/lib/styles/dropdown.scss +175 -0
  355. package/lib/styles/extra-inputs.scss +77 -0
  356. package/lib/styles/hero.scss +285 -0
  357. package/lib/styles/indicators.scss +142 -0
  358. package/lib/styles/keyboard.scss +15 -0
  359. package/lib/styles/linkbutton.scss +40 -0
  360. package/lib/styles/menu.scss +164 -0
  361. package/lib/styles/mini-calendar.scss +70 -0
  362. package/lib/styles/notifier-container.scss +27 -0
  363. package/lib/styles/panel.scss +222 -0
  364. package/lib/styles/quickview.scss +140 -0
  365. package/lib/styles/range-sliders.scss +298 -0
  366. package/lib/styles/select.scss +144 -0
  367. package/lib/styles/steps.scss +288 -0
  368. package/lib/styles/table.scss +330 -0
  369. package/lib/styles/tabs.scss +271 -0
  370. package/lib/styles/timeline.scss +314 -0
  371. package/lib/styles/tooltip.scss +32 -0
  372. package/lib/styles/treeview.scss +37 -0
  373. package/lib/test-data.ts +9002 -0
  374. package/lib/types/index.tsx +180 -0
  375. package/lib/types/react-app-env.d.ts +1 -0
  376. package/lib/types/typings.d.ts +373 -0
  377. package/lib/utils/JSDateTime.class.test.ts +890 -0
  378. package/lib/utils/JSDateTime.class.ts +766 -0
  379. package/lib/utils/JSDuration.class.test.ts +98 -0
  380. package/lib/utils/JSDuration.class.ts +159 -0
  381. package/lib/utils/calculateTxtColor.function.test.ts +53 -0
  382. package/lib/utils/calculateTxtColor.function.ts +56 -0
  383. package/lib/utils/colors.test.ts +78 -0
  384. package/lib/utils/colors.ts +178 -0
  385. package/lib/utils/colorscheme.ts +26 -0
  386. package/lib/utils/compare.test.ts +137 -0
  387. package/lib/utils/compare.ts +32 -0
  388. package/lib/utils/deserialize.function.test.ts +15 -0
  389. package/lib/utils/deserialize.function.ts +9 -0
  390. package/lib/utils/hasBSN.function.test.ts +27 -0
  391. package/lib/utils/hasBSN.function.ts +53 -0
  392. package/lib/utils/isIBAN.function.test.ts +25 -0
  393. package/lib/utils/isIBAN.function.ts +131 -0
  394. package/lib/utils/math.test.ts +70 -0
  395. package/lib/utils/math.ts +32 -0
  396. package/lib/utils/operators.test.ts +619 -0
  397. package/lib/utils/operators.ts +242 -0
  398. package/lib/utils/serialize.function.test.ts +13 -0
  399. package/lib/utils/serialize.function.ts +9 -0
  400. package/lib/utils/sorting.test.ts +114 -0
  401. package/lib/utils/sorting.ts +50 -0
  402. package/lib/utils/string.utils.test.ts +85 -0
  403. package/lib/utils/string.utils.ts +146 -0
  404. package/lib/vite-env.d.ts +1 -0
  405. package/package.json +55 -83
  406. package/public/vite.svg +1 -0
  407. package/src/App.tsx +77 -0
  408. package/src/AppHero.tsx +102 -0
  409. package/src/Console.ts +28 -0
  410. package/src/MOCK_DATA.ts +10014 -0
  411. package/src/Tabs/AspectRatioTab.tsx +235 -0
  412. package/src/Tabs/ButtonsAndTags.tsx +843 -0
  413. package/src/Tabs/CalendarTab.tsx +560 -0
  414. package/src/Tabs/ContextsTab.tsx +820 -0
  415. package/src/Tabs/DataTableTab.tsx +291 -0
  416. package/src/Tabs/FunctionsTab.tsx +947 -0
  417. package/src/Tabs/HooksTab.tsx +1008 -0
  418. package/src/Tabs/InputsTab.tsx +2319 -0
  419. package/src/Tabs/LayoutsTab.tsx +751 -0
  420. package/src/Tabs/Nieuw.tsx +440 -0
  421. package/src/Tabs/NotificationTab.tsx +301 -0
  422. package/src/Tabs/OverigeTab.tsx +1631 -0
  423. package/src/Tabs/ReadmeTab.tsx +260 -0
  424. package/src/Tabs/TestTab.tsx +44 -0
  425. package/src/Tabs/datatable.css +7 -0
  426. package/src/Tabs/index.ts +14 -0
  427. package/src/assets/react.svg +1 -0
  428. package/src/components/Chevrons.tsx +15 -0
  429. package/src/components/CodeVoorbeeld.tsx +41 -0
  430. package/src/components/Nieuwsblok.tsx +22 -0
  431. package/src/main.tsx +10 -0
  432. package/src/styles/example-styles.scss +8 -0
  433. package/src/styles.css +14244 -0
  434. package/src/styles.css.map +1 -0
  435. package/src/vite-env.d.ts +1 -0
  436. package/tsconfig.app.json +32 -0
  437. package/tsconfig.build.json +132 -0
  438. package/tsconfig.json +11 -0
  439. package/tsconfig.node.json +30 -0
  440. package/vite.config.ts +52 -0
  441. package/dist/index.cjs +0 -283
  442. package/dist/index.d.cts +0 -5773
  443. package/styles/tooltip.scss +0 -201
  444. /package/{styles → dist/styles}/bulma-box.scss +0 -0
  445. /package/{styles → dist/styles}/button.scss +0 -0
  446. /package/{styles → dist/styles}/buttons.scss +0 -0
  447. /package/{styles → dist/styles}/calendar.scss +0 -0
  448. /package/{styles → dist/styles}/checkradio.scss +0 -0
  449. /package/{styles → dist/styles}/datalist.scss +0 -0
  450. /package/{styles → dist/styles}/divider.scss +0 -0
  451. /package/{styles → dist/styles}/dropdown.scss +0 -0
  452. /package/{styles → dist/styles}/extra-inputs.scss +0 -0
  453. /package/{styles → dist/styles}/hero.scss +0 -0
  454. /package/{styles → dist/styles}/indicators.scss +0 -0
  455. /package/{styles → dist/styles}/keyboard.scss +0 -0
  456. /package/{styles → dist/styles}/linkbutton.scss +0 -0
  457. /package/{styles → dist/styles}/menu.scss +0 -0
  458. /package/{styles → dist/styles}/mini-calendar.scss +0 -0
  459. /package/{styles → dist/styles}/notifier-container.scss +0 -0
  460. /package/{styles → dist/styles}/panel.scss +0 -0
  461. /package/{styles → dist/styles}/quickview.scss +0 -0
  462. /package/{styles → dist/styles}/range-sliders.scss +0 -0
  463. /package/{styles → dist/styles}/select.scss +0 -0
  464. /package/{styles → dist/styles}/steps.scss +0 -0
  465. /package/{styles → dist/styles}/table.scss +0 -0
  466. /package/{styles → dist/styles}/tabs.scss +0 -0
  467. /package/{styles → dist/styles}/timeline.scss +0 -0
  468. /package/{styles → dist/styles}/treeview.scss +0 -0
@@ -0,0 +1,187 @@
1
+ import { KeyOf, AlignmentProp, SizeProp } from '@lib/types';
2
+ import React from 'react';
3
+ type DataTableColumnProp<T extends unknown = unknown> = {
4
+ /** Instellen van de volgorde van de kolommen. Kolommen worden gesorteerd obv de waarde. De default waarde = `0`
5
+ * - `positive`: de kolom wordt naar rechts verplaatst, hoogste waarde meest rechts
6
+ * - `negative`: de kolom wordt naar links verplaatst, laagste waarde meest links
7
+ */
8
+ order?: number;
9
+ /** Is deze kolom zichtbaar? (default = false) */
10
+ hidden?: boolean;
11
+ /** sorteer-functie voor deze kolom. Als niet gedefinieerd kan je niet op deze kolom sorteren */
12
+ sort?: (a: T, b: T) => -1 | 0 | 1 | number;
13
+ /** de waarde van de kolom. Een fucnction of een property van object van type `T` (string) */
14
+ value: KeyOf<T> | ((item: T, hovered?: boolean) => React.ReactNode);
15
+ /** manier om deze cel te identificeren */
16
+ cellIdentifier?: KeyOf<T> | ((item: T) => string);
17
+ /** header voor de kolom. Als niet gedefinieerd wordt de `value` gebruikt, Dus als `value` een `function` is, **moet** je deze setten */
18
+ header?: string | React.ReactNode;
19
+ /** alignment van deze kolom (default = `l` */
20
+ alignment?: AlignmentProp;
21
+ /** className voor de kolom, om een cel te stylen afhankelijk van de waarde */
22
+ columnClass?: string | ((item: T) => string);
23
+ };
24
+ type PaginationOptionsProp = {
25
+ /** tonen we paginatie? */
26
+ hidden?: boolean;
27
+ /** vanaf wel aantal rijen is paginatie actief */
28
+ threshold?: number;
29
+ /** initiele pagination number. default = 1 (first) */
30
+ initialPage?: number;
31
+ /** Default aantal rijen per pagina (-1 voor alles)*/
32
+ defaultRowsPerPage?: number;
33
+ /** Opties voor aantal rijen per pagina (gebruik `-1` voor alles) */
34
+ rowsPerPageOptions?: {
35
+ label: string;
36
+ value: number;
37
+ }[];
38
+ };
39
+ type DataTableProps<T extends unknown = unknown> = {
40
+ /** De kolommen voor de DataTable
41
+ * @param sort een functie die twee items vergelijkt en -1, 0, 1 of een `number` teruggeeft. Als er geen sort-function is, kan de tabel **niet** op deze kolom gesorteerd worden.
42
+ * @param value De waarde voor in de tabel: een `keyof T` of een functie die een `React.ReactNode` teruggeeft.
43
+ * - `keyof T`: de property op het object van type `T`
44
+ * - `function`: een function die een `React.ReactNode` returned om te renderen in de cell.
45
+ * @param cellIdentifier een `keyof T` of een functie die een `string` teruggeeft. Deze waarde wordt gebruikt om de cell te identificeren. Als er geen `cellIdentifier` is, wordt de `value` gebruikt.
46
+ * @param header De header voor de kolom. Als er geen `header` is, wordt de `value` gebruikt.
47
+ * @param alignment De uitlijning van de cellen in de kolom. Standaard is dit `l` (links).
48
+ * @param columnClass een `string` of een functie die een `string` teruggeeft. Deze waarde wordt gebruikt om de cell te stylen afhankelijk van de value.
49
+ * @example // Een DataTable met een kolom met een `keyof T` als `value`:
50
+ * const columns: Array<DataTableColumnProp<{firstName: string, active: boolean, lastName: string}>> = [
51
+ * ..{ value: 'firstName', header: 'Naam' }, // value is een `keyof T`
52
+ * ..{ value: (u) => `${u.firstName} ${u.lastName}`, header: 'Achternaam'}, // value samengesteld met een function
53
+ * ..{ value: 'active', // true or false
54
+ * .. sort: (a,b) => a.active === b.active ? 0 : a.active ? -1 : 1 // sortable kolom
55
+ * ..},
56
+ * ];
57
+ */
58
+ columns: Array<DataTableColumnProp<T>>;
59
+ /** het kolom-nummer waarop default gesorteerd moet worden. **LET OP: de 1e kolom heeft nr 1! ** */
60
+ defaultSortColNum?: number;
61
+ /** data-array in de tabel */
62
+ data?: Array<T>;
63
+ /** moet de tabel compact wwergegevens worden (voorheen `narrow`, default = `false`) */
64
+ compact?: boolean;
65
+ /** moet de tabel smaller worden weergegeven? */
66
+ narrow?: boolean;
67
+ /** moet de tabel borders hebben? (default = `false`) */
68
+ bordered?: boolean;
69
+ /** moet het kleurverschil tussen even en oneven rijen verdwijnen? */
70
+ noStripes?: boolean;
71
+ /** is de header van de tabel sticky ? (default = `none`)
72
+ * - none: geen sticky header
73
+ * - header: alleen de kolom-namen zijn sticky
74
+ * - all: de hele header is sticky, inclusief search en de `headerContent`
75
+ * */
76
+ sticky?: 'none' | 'header' | 'all';
77
+ /** is de tabel is de tabel hoverbaar (en is dat ook zichtbaar?) hebben? (default = `false`) */
78
+ hoverable?: boolean;
79
+ /** paginatie verstoppen? (default = `false`)
80
+ * @deprecated gebruik de paginationOptions prop
81
+ */
82
+ hidePagination?: boolean;
83
+ /** initiele pagination number. default = 1 (first)
84
+ * @deprecated gebruik de paginationOptions prop
85
+ */
86
+ initialPage?: number;
87
+ /** maximaal aantal rijen in de tabel voor paginatie aangaat. (default = 20)
88
+ * @deprecated gebruik de paginationOptions prop
89
+ * - 0: geen maximum, alle rijen worden getoond
90
+ * - number: maximum aantal rijen voor paginatie */
91
+ maxRows?: 0 | number;
92
+ /** bepaal grootte van paginatie en zoek-input in de tabel */
93
+ size?: SizeProp;
94
+ /** moet het zoeken verborgen zijn? (default = `false`) */
95
+ hideSearch?: boolean;
96
+ /** placeholder voor zoek-input (default = 'Zoek ...') */
97
+ searchPlaceholder?: string;
98
+ /** zoek-function voor de datatable. Default gebruikt `JSON.stringify` op het object om te controleren of de zoekterm in een row voorkomt
99
+ * @param searchTerm de zoekterm
100
+ * @param data de data-array
101
+ * @returns een array van de data die overeenkomen met de zoekterm
102
+ */
103
+ onSearch?: (searchTerm: string, data: T[]) => T[];
104
+ /** opmaak voor informatie over het zoeken
105
+ * @param fc aantal items dat voldoet aan de zoekterm
106
+ * @param tc totaal aantal items in de tabel
107
+ * @param term de zoekterm
108
+ */
109
+ searchInfoMessage?: (fc: number, tc: number, term: string) => string;
110
+ /**
111
+ * callback voor geselecteerde rij
112
+ * @param item het item (als object van type `T`)
113
+ * @param row click-event met row-item (HTMLTableRowElement)
114
+ */
115
+ onRowSelected?: (item: T, row?: React.MouseEvent<HTMLTableRowElement>) => void;
116
+ /** Wat voor component moet er gerendered worden in het context menu van een rij? */
117
+ onRowRightClick?: (item: T) => React.ReactNode;
118
+ /** wat moet er in de tabel getoont worden als er **GEEN** data is
119
+ * @param isSearchAction is de tabel leeg omdat er gezocht is en er geen resultaten zijn of omdat er gewoon geen data is?
120
+ */
121
+ renderWhenNoData?: (isSearchAction: boolean) => React.ReactNode;
122
+ /** een `string` of een functie die een `string` teruggeeft. Deze waarde wordt gebruikt om de row te stylen afhankelijk van de value. */
123
+ rowClass?: string | ((item: T) => string);
124
+ /** een `keyof T` of een functie die een `string` teruggeeft. Deze waarde wordt gebruikt om de row te identificeren.
125
+ * - string: de property op het object van type `T`
126
+ * - function: een function die een `string` returned om te gebruiken als `key` voor de row.
127
+ */
128
+ rowIdentifier: KeyOf<T> | ((item: T) => string);
129
+ /** extra content boven de tabel, links van het zoekveld. Deze content wordt automatisch gewrapped met een `<td>...</td>` */
130
+ headerContent?: React.ReactNode;
131
+ /** extra content onder de tabel. Een ReactNode.
132
+ * Deze content **MOET** een `<tr><td>...</td></tr>` bevatten!
133
+ */
134
+ footerContent?: React.ReactNode;
135
+ itemRef?: React.RefObject<any> | null;
136
+ id?: string;
137
+ paginationOptions?: PaginationOptionsProp | undefined;
138
+ };
139
+ /**
140
+ * Maak een tabel voor grote hoeveelheden data. De tabel is doorzoekbaar en heeft paginatie. Dat is allemaal uit te zetten.
141
+ * Het sorteren moet per kolom ingesteld worden.
142
+ * @example
143
+ * const naamSort = (a: User, B: User) => { a.first_name < b.first_name ? -1 : 1; }
144
+ * const searchFn = (searchTerm: string, data: User[]) => data.filter((u) => u.first_name.includes(searchTerm));
145
+ * const columns: Array<DataTableColumnProp<User>> = [
146
+ * ..{ value: 'first_name', header: 'Naam', sort: naamSort },
147
+ * ..{ value: 'last_name', header: 'Achternaam' },
148
+ * ]
149
+ * const data: Array<User> = [ ... ];
150
+ * return (
151
+ * ..<DataTable<User>
152
+ * .. columns={columns}
153
+ * .. data={data}
154
+ * .. onSearch={searchFn}
155
+ * .. defaultSortColNum={1}
156
+ * .. maxRows={10}
157
+ * .. onRowSelected={(u) => console.log(u)}
158
+ * .. renderWhenNoData={(isSearchAction) => isSearchAction ? 'Geen resultaten' : 'Geen data'}
159
+ * ../>
160
+ *
161
+ * @param data de data-array
162
+ * @param columns de kolommen van het type `DataTableColumnProp<T>`
163
+ * @param defaultSortColNum het kolom-nummer waarop default gesorteerd moet worden. **LET OP: de 1e kolom heeft nr 1! **
164
+ * @param headerContent extra content boven de tabel, links van het zoekveld. Deze content wordt automatisch gewrapped met een `<td>...</td>`
165
+ * @param footerContent extra content onder de tabel. Een ReactNode. Deze content **MOET** een `<tr><td>...</td></tr>` bevatten!
166
+ * @param maxRows maximaal aantal rijen in de tabel voor paginatie aangaat. (default = 20)
167
+ * - 0: geen maximum, alle rijen worden getoond
168
+ * - number: maximum aantal rijen voor paginatie
169
+ * @param rowIdentifier welke `keyof T` is de unieke identifier van een row? (default = `id`). Mag ook een functie zijn die een string returned
170
+ * @param onSearch zoek-function voor de datatable. Default gebruikt `JSON.stringify` op het object om te controleren of de zoekterm in een row voorkomt
171
+ * @param onRowSelected callback voor geselecteerde rij
172
+ * @param rowClass een `string` of een functie die een `string` teruggeeft. Deze waarde wordt gebruikt om de row te stylen afhankelijk van de value.
173
+ * @param renderWhenNoData wat moet er in de tabel getoont worden als er **GEEN** data is, of als er geen zoek-resultaten zijn.
174
+ * @param searchInfoMessage opmaak voor informatie over het zoeken (default: 'Toon XXX rijen' bij geen zoekopdracht, 'Toon XXX van de YYY rijen' bij een zoekopdracht)
175
+ * @param compact moet de tabel compact weergegeven worden (voorheen `narrow`, default = `false`)
176
+ * @param striped moet de tabel om-en-om gestreept weergegeven worden ? (default = `false`)
177
+ * @param bordered moet de tabel borders hebben? (default = `false`)
178
+ * @param hoverable is de tabel is de tabel hoverbaar (en is dat ook zichtbaar?) hebben? (default = `false`)
179
+ * @param hidePagination paginatie verstoppen? (default = `false`)
180
+ * @param hideSearch moet het zoeken verborgen zijn? (default = `false`)
181
+ * @param size bepaal grootte van paginatie en zoek-input in de tabel (default ='s')
182
+ * @param searchPlaceholder placeholder voor zoek-input (default = 'Zoek ...')
183
+ * @returns
184
+ */
185
+ declare function DataTable<T extends unknown = unknown>({ data, columns: cols, defaultSortColNum, compact, noStripes, narrow, bordered, hoverable, sticky, hidePagination, initialPage, hideSearch, headerContent, footerContent, size, maxRows, searchPlaceholder, rowIdentifier, onSearch, onRowSelected, onRowRightClick, rowClass, renderWhenNoData, searchInfoMessage, id: tableID, itemRef, paginationOptions: paginationOptionsProp, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
186
+ export { DataTable };
187
+ export type { DataTableProps, DataTableColumnProp as DataTableColumn };
@@ -0,0 +1,8 @@
1
+ import { ColorProp } from '@lib/types';
2
+ type DividerProps = {
3
+ color?: ColorProp | 'default' | undefined;
4
+ className?: string | undefined;
5
+ style?: React.CSSProperties | undefined;
6
+ };
7
+ declare function Divider({ color, style, className: cnProp }: DividerProps): import("react/jsx-runtime").JSX.Element;
8
+ export { Divider };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ type DropDownProps = {
3
+ children?: React.ReactNode;
4
+ trigger: string | React.ReactNode | ((open: boolean, disabled?: boolean | undefined) => string | React.ReactNode);
5
+ disabled?: boolean | undefined;
6
+ startOpen?: boolean | undefined;
7
+ onHover?: boolean | undefined;
8
+ id?: string | undefined;
9
+ alignment?: 'l' | 'r' | undefined;
10
+ dropUp?: boolean | undefined;
11
+ className?: string | undefined;
12
+ };
13
+ declare const Dropdown: {
14
+ ({ onHover, id, children: childrenProp, trigger: triggerProp, disabled, alignment, dropUp, startOpen, className: classNameProp, }: DropDownProps): import("react/jsx-runtime").JSX.Element;
15
+ Divider(): import("react/jsx-runtime").JSX.Element;
16
+ Item({ children, onClick, ...props }: {
17
+ children: React.ReactNode;
18
+ onClick?: () => void;
19
+ } & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
20
+ Link({ children, ...props }: {
21
+ children: React.ReactNode;
22
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
23
+ };
24
+ export { Dropdown };
25
+ export type { DropDownProps };
@@ -0,0 +1,22 @@
1
+ import { AlignmentProp } from '@lib/types';
2
+ import React from 'react';
3
+ export type FooterProps = {
4
+ /** De content voor de footer */
5
+ children: React.ReactNode;
6
+ /** Alignment bij de footer. (default = 'c') */
7
+ alignment?: AlignmentProp;
8
+ /** Extra classes voor op de footer */
9
+ className?: string;
10
+ /** Custom styles voor de footer */
11
+ styles?: React.CSSProperties;
12
+ itemRef?: React.RefObject<any> | null;
13
+ id?: string;
14
+ };
15
+ /**
16
+ * Maak een footer voor onderaan de pagina.
17
+ * - de footer bevat een container waarvan de text default 'centered' is.
18
+ * @param props
19
+ * @returns een footer met daarin de content.
20
+ * @example <Footer>This is a footer</Footer>
21
+ */
22
+ export declare function Footer({ children, alignment, className: cn, styles, id, itemRef }: FooterProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { ColorProp, StrictOmit } from '@lib/types';
2
+ import React from 'react';
3
+ type HelpTxtProps = {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ color?: ColorProp;
7
+ };
8
+ type HelpTxtPropsNoColor = StrictOmit<HelpTxtProps, 'color'>;
9
+ declare const HelpTxt: {
10
+ ({ color, className: cn, children }: HelpTxtProps): import("react/jsx-runtime").JSX.Element;
11
+ Info(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
12
+ Link(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
13
+ Primary(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
14
+ Danger(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
15
+ Success(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
16
+ Warning(props: HelpTxtPropsNoColor): import("react/jsx-runtime").JSX.Element;
17
+ };
18
+ export { HelpTxt };
19
+ export type { HelpTxtProps };
@@ -0,0 +1,104 @@
1
+ import { SizeProp, AnchorTargetProp, AnchorRelProp } from '@lib/types';
2
+ import React from 'react';
3
+ type HeroProps = {
4
+ itemRef?: React.RefObject<any> | null;
5
+ id?: string;
6
+ children?: React.ReactNode;
7
+ /**
8
+ * force dark of light hero
9
+ * @ignore werkt nog niet. */
10
+ forceScheme?: 'dark' | 'light' | undefined;
11
+ /** Type hero */
12
+ heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | undefined;
13
+ /** De grootte van de hero (default = small ('s')) */
14
+ size?: SizeProp | undefined;
15
+ };
16
+ /**
17
+ * Maak een schermbrede hero aan. Optionele top-buttons en/of tabs voor navigatie
18
+ * @param props
19
+ * @returns een Hero
20
+ * @example
21
+ */
22
+ declare const Hero: {
23
+ ({ children: nodes, heroColorFor, size, itemRef, id, forceScheme }: HeroProps): import("react/jsx-runtime").JSX.Element;
24
+ Body({ children }: {
25
+ children: React.ReactNode;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ /**
28
+ * Hero foot with navigation
29
+ * @param props props
30
+ * @returns hero foot with navigation
31
+ * @example
32
+ * <Hero.Foot>
33
+ * <ul>
34
+ * <li className="is-active"><a href="">Active Navigation Link </a></li>
35
+ * <li><a href="">Another Navigation Link</a></li>
36
+ * </ul>
37
+ * </Hero.Foot>
38
+ *
39
+ * <Hero.NavList>
40
+ * <Hero.NavItem to="/">Navigation Link</Hero.NavItem>
41
+ * </Hero.NavList>
42
+ */
43
+ Foot: {
44
+ ({ children, narrow }: {
45
+ children: React.ReactNode;
46
+ narrow?: boolean;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ NavList({ children }: {
49
+ children: React.ReactNode;
50
+ }): import("react/jsx-runtime").JSX.Element;
51
+ NavItem: typeof FootNavItem;
52
+ /** Navigation Item voor in een Hero Foot. Parent should be <Hero.Foot.NavList>
53
+ * @param props props
54
+ * @returns Navigation Item for Hero's
55
+ * @example <Hero.Foot.NavItem to="/">URL</Hero.Foot.NavItem>
56
+ */
57
+ NavLink: typeof FootNavLink;
58
+ };
59
+ /** Top-bar van de hero met
60
+ * - een BurgerMenu voor de navigatie-items
61
+ * - items aan de rechterkant van het scherm
62
+ * @param props props
63
+ * @returns een HeroHead met daarin optionele links of buttons
64
+ * @example
65
+ * <Hero.Head>
66
+ * <Hero.Head.Button onClick={handleClickNotify}>Notify</Hero.Head.Button>
67
+ * <Hero.Head.Button onClick={handleClickClear}>Clear</Hero.Head.Button>
68
+ * <Hero.Head.Link to="https://www.bulma.io">Bulma</Hero.Head.Link>
69
+ * <Hero.Head.Link to="https://www.nodeJS.org">NodeJS</Hero.Head.Link>
70
+ * </Hero.Head>
71
+ */
72
+ Head: {
73
+ ({ children }: {
74
+ children: React.ReactNode;
75
+ }): import("react/jsx-runtime").JSX.Element;
76
+ Button({ children, title, onClick }: {
77
+ children: React.ReactNode;
78
+ title?: string;
79
+ onClick?: (e: any) => void;
80
+ }): import("react/jsx-runtime").JSX.Element;
81
+ Link({ children, title, to, target, rel, }: {
82
+ children: React.ReactNode;
83
+ title?: string;
84
+ to?: string;
85
+ target?: AnchorTargetProp;
86
+ rel?: AnchorRelProp;
87
+ }): import("react/jsx-runtime").JSX.Element;
88
+ };
89
+ };
90
+ declare function FootNavItem({ children, active, title }: {
91
+ children: React.ReactNode;
92
+ active?: boolean;
93
+ title?: string;
94
+ }): import("react/jsx-runtime").JSX.Element;
95
+ declare function FootNavLink({ children, active, title, to, target, rel, }: {
96
+ children: React.ReactNode;
97
+ active?: boolean;
98
+ title?: string;
99
+ to?: string;
100
+ target?: AnchorTargetProp;
101
+ rel?: AnchorRelProp;
102
+ }): import("react/jsx-runtime").JSX.Element;
103
+ export { Hero };
104
+ export type { HeroProps };
@@ -0,0 +1,82 @@
1
+ import { IconProp } from '@fortawesome/fontawesome-svg-core';
2
+ import { SizeProp, ColorProp } from '@lib/types';
3
+ import React from 'react';
4
+ type IconProps = {
5
+ /** React font-awesome icon
6
+ * - `string`: geef de gehele font-awesome-class op. 'flip', 'animate', 'rotation' worden dan al gebruikt in deze class.
7
+ * - `IconProp (fontawesome)`: geef een react IconProp object door.
8
+ */
9
+ icon: string | IconProp;
10
+ /** De icon-grootte (default = `m` */
11
+ size?: SizeProp;
12
+ /** De kleur voor het icoon (default = `p`) */
13
+ color?: ColorProp;
14
+ /** Hoeveel graden moet het icoon gedraait zijn (default = 0) */
15
+ rotation?: 0 | 90 | 180 | 270;
16
+ /** Horizontaal, verticaal of beiden gespiegeld */
17
+ flip?: 'horizontal' | 'vertical' | 'both';
18
+ /** Moet het icon spinnen of pulseren */
19
+ animate?: 'spin' | 'pulse';
20
+ /** extra classes voor op de icon-container */
21
+ className?: string;
22
+ };
23
+ /**
24
+ * Toon een Font Awesome Icon
25
+ * default: 1.5rem x 1.5rem, de font-size is inherited.
26
+ * @returns een Icon element
27
+ * @example
28
+ * <Icon icon="fas fa-flag" />
29
+ * <Icon icon={faFlag} /> // import { faFlag } from '@fortawesome/free-solid-svg-icons';
30
+ */
31
+ declare function Icon({ color, size, rotation, icon, flip, animate, className: classNameProp }: IconProps): import("react/jsx-runtime").JSX.Element;
32
+ type IconTextProps = {
33
+ /** React font-awesome icon
34
+ * - `string`: geef de gehele font-awesome-class op. 'flip', 'animate', 'rotation' worden dan al gebruikt in deze class.
35
+ * - `IconProp (fontawesome)`: geef een react IconProp object door.
36
+ */
37
+ icon: string | IconProp;
38
+ /** De icon-grootte */
39
+ size?: SizeProp;
40
+ /** De kleur voor het icoon */
41
+ color?: ColorProp;
42
+ /** Hoeveel graden moet het icoon gedraait zijn (0 - 360) */
43
+ rotation?: 0 | 90 | 180 | 270;
44
+ /** Horizontaal, verticaal of beiden geflipt */
45
+ flip?: 'horizontal' | 'vertical' | 'both';
46
+ /** Moet het icon spinnen of pulseren */
47
+ animate?: 'spin' | 'pulse';
48
+ /** Tekst bij het icon */
49
+ children: React.ReactNode;
50
+ /** mag dit item wrappen? text op volgende regel? (default = 'false') */
51
+ allowWrap?: boolean;
52
+ /** extra classes voor op de icon-container */
53
+ className?: string;
54
+ };
55
+ /**
56
+ * Toon een Font Awesome Icon met bijhorende tekst. De tekst krijgt dezeflde kleur als de icon
57
+ * IconText is een inline-flex element dus kan in een paragraaf worden gebruikt.
58
+ * default: 1.5rem x 1.5rem, de font-size is inherited.
59
+ * @returns een Icon met tekst in dezelfde kleur als het icon
60
+ * @example
61
+ * <IconText icon="fas fa-flag">Flag</IconText>
62
+ * <IconText icon={faFlag}>Flag</IconText> // import { faFlag } from '@fortawesome/free-solid-svg-icons';
63
+ */
64
+ declare function IconText({ icon, size, color, rotation, flip, animate, allowWrap, children, className: classNameProp, }: IconTextProps): import("react/jsx-runtime").JSX.Element;
65
+ type IconStackProps = {
66
+ colors?: ColorProp[];
67
+ icons: string[] | IconProp[];
68
+ sizes?: SizeProp[];
69
+ };
70
+ /**
71
+ * Stapel een x aantal icoontjes op elkaar, om ze visueel samen te voegen. Het 1e item is de onderste, de laatste de bovenste.
72
+ * @example <IconStack icons={[faHorseHead, faSlash]} />
73
+ * @example <IconStack icons={[faHorseHead, faSlash]} colors={['p', 'd']} />
74
+ * @example <IconStack icons={[faHorseHead, faSlash]} colors={['p', 'd']} sizes={['m', 'l']} />
75
+ * @param colors: array van kleuren voor de iconen. (default = ['p',...])
76
+ * @param sizes: array van grootte voor de iconen. (default = ['s',...])
77
+ * @param icons: array van iconen. (default = [faHorseHead, faSlash])
78
+ * @returns
79
+ */
80
+ declare function IconStack({ colors: clrs, icons, sizes: szs }: IconStackProps): import("react/jsx-runtime").JSX.Element;
81
+ export { Icon, IconText, IconStack };
82
+ export type { IconProps, IconTextProps, IconStackProps };
@@ -0,0 +1,28 @@
1
+ type ImageProps = {
2
+ /** De ratio (width x height) van de afbeelding */
3
+ ratio: '1by1' | '5by4' | '4by5' | '4by3' | '3by4' | '3by2' | '2by3' | '5by3' | '3by5' | '16by9' | '9by16' | '2by1' | '1by2' | '3by1' | '1by3' | 'square';
4
+ /** Geef een gewenste width op in geval van een ratio. Als er geen waarde is, wordt de parent gevuld
5
+ * voor ratio='square' MOETEN de string literal waarden worden gebruikt */
6
+ imgWidth?: '16' | '24' | '32' | '48' | '64' | '96' | '128' | string;
7
+ /** Wordt de afbeelding rond ? LET OP: Alleen voor ratio == 'square'! */
8
+ isRounded?: boolean;
9
+ /** `src`-Attribuut van image tag */
10
+ src: string;
11
+ /** `alt`-Attribuut van image tag */
12
+ alt: string;
13
+ /** Een optionele figcaption */
14
+ figCaption?: string;
15
+ /** extra classNames voor de omringende div */
16
+ className?: string;
17
+ };
18
+ /**
19
+ * Een afbeelding met een vastgestelde aspect ratio.
20
+ * Voor de ratio 'square' kan er een size worden opgegeven.
21
+ * De andere ratio's nemen de gehele width van de parent-container in.
22
+ * @param props
23
+ * @returns an image with a fixed aspect ratio
24
+ * @example <Image ratio="1by1" src="https://www.loon.be/images/logo.png" alt="Loon.be" />
25
+ */
26
+ declare function Image({ ratio, imgWidth, alt, figCaption, className, isRounded, src }: ImageProps): import("react/jsx-runtime").JSX.Element;
27
+ export { Image };
28
+ export type { ImageProps };
@@ -0,0 +1,25 @@
1
+ import { IndicatorPositionProp, ColorProp } from '@lib/types';
2
+ import React from 'react';
3
+ type IndicatorProps = {
4
+ /** Positie van de indicator (default = 'tr' (top-right)) */
5
+ position?: IndicatorPositionProp;
6
+ /** Het element waar de indicator op moet */
7
+ children: React.ReactNode;
8
+ /** Kleur van de indicator (default = 'l' ('link')) */
9
+ color?: ColorProp;
10
+ /** Title (tooltip) voor indicator (optioneel) */
11
+ title?: string;
12
+ };
13
+ /**
14
+ * Een indicator toont een badge op een ander element. Er zijn meerdere posities. De indicator moet als wrapper voor het gewenste element gebruikt worden.
15
+ * @param props Indicator Props
16
+ * @returns Een element met een indicator
17
+ * @example
18
+ * <Indicator position="tl" color="p" title="There are 5 new messages">
19
+ * <Button>Check messages</Button>
20
+ * 5
21
+ * </Indicator>
22
+ */
23
+ declare function Indicator({ position, color, title, children }: IndicatorProps): import("react/jsx-runtime").JSX.Element;
24
+ export { Indicator };
25
+ export type { IndicatorProps };
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ type KbdProps = {
3
+ /** Optionele extra class */
4
+ className?: string;
5
+ /** Content van de key */
6
+ children: React.ReactNode;
7
+ };
8
+ type KbdsProps = {
9
+ /** Weer te geven keys als string */
10
+ keys: string[];
11
+ /** De separator van de keys, default '+' */
12
+ separator?: string;
13
+ /** Optionele className */
14
+ className?: string;
15
+ };
16
+ /**
17
+ * Toon een Keyboard-Key als een 'key' op een keyboard.
18
+ * @param params
19
+ * @returns een element dat lijkt op een keyboard-key
20
+ * @example <Kbd>A</Kbd>
21
+ */
22
+ declare function Kbd({ children, className: cn }: KbdProps): import("react/jsx-runtime").JSX.Element;
23
+ /**
24
+ * Toont meerdere keyboard-keys, gescheiden door een teken (deafult = '+')
25
+ * @param props
26
+ * @returns een rijtje keyboard-keys
27
+ * @example <Kbds keys={['ctrl+S', 'shift+D']} />
28
+ */
29
+ declare function Kbds({ keys, separator, className }: KbdsProps): import("react/jsx-runtime").JSX.Element;
30
+ export { Kbd, Kbds };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ type ComponentProps = {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ };
7
+ /** Props voo de LabelComponent */
8
+ export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & ComponentProps;
9
+ /** Speciaal voor Menno: een Label Component */
10
+ export declare function Label({ children, className: cnProp, style, htmlFor, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,44 @@
1
+ import { ColorProp, AnchorTargetProp, AnchorRelProp } from '@lib/types';
2
+ import React from 'react';
3
+ type LinkButtonProps = {
4
+ fullwidth?: boolean;
5
+ /** De content van de button */
6
+ children?: React.ReactNode;
7
+ /** `onClick` voor de button */
8
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
9
+ color?: ColorProp;
10
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>;
11
+ /**
12
+ * Een button die er uit ziet als een link. Om een link te maken met een onClick() ipv een href.
13
+ * @param props
14
+ * @returns een button die er uit ziet als een link
15
+ * @example <LinkButton onClick={handleClick}>Click me!</LinkButton>
16
+ */
17
+ declare function LinkButton({ fullwidth, children, color, onClick, ...props }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
18
+ type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
19
+ color?: ColorProp;
20
+ /** link / URL */
21
+ href: string;
22
+ /** open target
23
+ * - `default`: _blank
24
+ * - `string`: naam van een <iframe>
25
+ */
26
+ target?: AnchorTargetProp;
27
+ /** Relatie tussen het huidige document en het gelinkte document */
28
+ rel?: AnchorRelProp;
29
+ /** MIME type van een evt download */
30
+ type?: string;
31
+ /** Is dit een downloadlink? */
32
+ download?: boolean;
33
+ /** De inhoud van de link: wat is er te lezen / zien */
34
+ children?: React.ReactNode;
35
+ };
36
+ /**
37
+ * Een link (duh) die er hetzelfde uit ziet als de linkbutton.
38
+ * @param props
39
+ * @returns een link
40
+ * @example <Link href="https://www.google.com">Google</Link>
41
+ */
42
+ declare function Link({ color, href, target, id, rel, children, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
43
+ export { Link, LinkButton };
44
+ export type { LinkProps, LinkButtonProps };
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ type MenuProps = {
3
+ /** Welk item is het initiële geselecteerde item */
4
+ initialItem?: string;
5
+ /** De content van het menu (<MenuItem>, <ExpandableMenuItem> or <MenuItemGroup>) */
6
+ children: React.ReactNode;
7
+ /** Callback voor menu-item selectie */
8
+ onMenuItemClicked: (item: string) => void;
9
+ style?: React.CSSProperties;
10
+ className?: string;
11
+ itemRef?: React.RefObject<any> | null;
12
+ };
13
+ type MenuItemProps = {
14
+ /** (optional) Naam voor menu-item dat geselecteert wordt. Als niet opgegevens, wordt de string-content van het item gebruikt */
15
+ name?: string;
16
+ /** Content van het item */
17
+ children: React.ReactNode;
18
+ onClick?: (label: string, e: React.MouseEvent) => void;
19
+ disabled?: boolean;
20
+ };
21
+ type MenuItemGroupProps = {
22
+ /** Label voor een groep MenuItems */
23
+ label: string | React.ReactNode;
24
+ /** Items in de ze groep (<MenuItem> or <ExpandableMenuItem>) */
25
+ children: React.ReactNode;
26
+ };
27
+ type ExpandableMenuItemProps = {
28
+ /** De content van het menu-item (MenuItem components) */
29
+ children: React.ReactNode;
30
+ /** Label voor exapnd/collapse */
31
+ label: string | React.ReactNode;
32
+ /** Begint de lijst expanded? */
33
+ startExpanded?: boolean;
34
+ /** Click handler */
35
+ onClick?: (label: string, e?: React.MouseEvent) => void;
36
+ disabled?: boolean;
37
+ };
38
+ /**
39
+ * Render een Menu met <Menu.ItemGroup>, <Menu.Item> en <Menu.ExpandableItem> children
40
+ * @param props
41
+ * @returns een Menu
42
+ * @example
43
+ * <Menu initialItem="1">
44
+ * <Menu.ItemGroup label="Groep 1">
45
+ * <Menu.Item name="1">Item 1</Menu.Item>
46
+ * <Menu.Item name="2">Item 2</Menu.Item>
47
+ * </Menu.ItemGroup>
48
+ * <Menu.ItemGroup label="Groep 2">
49
+ * ...
50
+ * </Menu.ItemGroup>
51
+ * </Menu>
52
+ */
53
+ declare const Menu: {
54
+ ({ initialItem, children, className: classes, style, onMenuItemClicked, itemRef }: MenuProps): import("react/jsx-runtime").JSX.Element;
55
+ Item({ name, children }: MenuItemProps & React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
56
+ ItemGroup({ label, children }: MenuItemGroupProps & React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
57
+ ExpandableGroup(props: ExpandableMenuItemProps): import("react/jsx-runtime").JSX.Element;
58
+ ExpandableItem(props: ExpandableMenuItemProps & React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
59
+ Label({ children }: {
60
+ children: React.ReactNode;
61
+ }): import("react/jsx-runtime").JSX.Element;
62
+ };
63
+ export { Menu };
64
+ export type { MenuProps, MenuItemProps, MenuItemGroupProps };