@oliasoft-open-source/react-ui-library 3.12.0-beta-20 → 3.12.0-beta-21

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 (496) hide show
  1. package/dist/common-enum.d.ts +73 -0
  2. package/dist/common-enum.js +81 -0
  3. package/dist/components/accordion/accordion.d.ts +4 -0
  4. package/dist/components/accordion/accordion.interface.d.ts +17 -0
  5. package/dist/components/accordion/accordion.interface.js +1 -0
  6. package/dist/components/accordion/accordion.js +17 -0
  7. package/dist/components/accordion/accordion.stories.d.ts +11 -0
  8. package/dist/components/accordion/accordion.stories.js +140 -0
  9. package/dist/components/accordion/chevron/chevron.d.ts +5 -0
  10. package/dist/components/accordion/chevron/chevron.js +8 -0
  11. package/dist/components/accordion/enum.d.ts +4 -0
  12. package/dist/components/accordion/enum.js +5 -0
  13. package/dist/components/accordion/helpers/accordion-with-default-toggle.d.ts +12 -0
  14. package/dist/components/accordion/helpers/accordion-with-default-toggle.js +35 -0
  15. package/dist/components/actions/actions.d.ts +14 -0
  16. package/dist/components/actions/actions.interface.d.ts +25 -0
  17. package/dist/components/actions/actions.interface.js +1 -0
  18. package/dist/components/actions/actions.js +66 -0
  19. package/dist/components/actions/actions.stories.d.ts +25 -0
  20. package/dist/components/actions/actions.stories.js +67 -0
  21. package/dist/components/badge/badge.d.ts +10 -0
  22. package/dist/components/badge/badge.js +21 -0
  23. package/dist/components/badge/badge.stories.d.ts +7 -0
  24. package/dist/components/badge/badge.stories.js +21 -0
  25. package/dist/components/breadcrumb/breadcrumb.d.ts +6 -0
  26. package/dist/components/breadcrumb/breadcrumb.js +11 -0
  27. package/dist/components/breadcrumb/breadcrumb.stories.d.ts +5 -0
  28. package/dist/components/breadcrumb/breadcrumb.stories.js +36 -0
  29. package/dist/components/breadcrumb/enum.d.ts +5 -0
  30. package/dist/components/breadcrumb/enum.js +6 -0
  31. package/dist/components/breadcrumb/link.d.ts +12 -0
  32. package/dist/components/breadcrumb/link.js +12 -0
  33. package/dist/components/button/button.d.ts +31 -0
  34. package/dist/components/button/button.js +52 -0
  35. package/dist/components/button/button.stories.d.ts +13 -0
  36. package/dist/components/button/button.stories.js +63 -0
  37. package/dist/components/button/enum.d.ts +5 -0
  38. package/dist/components/button/enum.js +6 -0
  39. package/dist/components/button-group/button-group.d.ts +38 -0
  40. package/dist/components/button-group/button-group.js +83 -0
  41. package/dist/components/button-group/button-group.stories-data.d.ts +6 -0
  42. package/dist/components/button-group/button-group.stories-data.js +61 -0
  43. package/dist/components/button-group/button-group.stories.d.ts +9 -0
  44. package/dist/components/button-group/button-group.stories.js +51 -0
  45. package/dist/components/card/card.d.ts +10 -0
  46. package/dist/components/card/card.js +6 -0
  47. package/dist/components/card/card.stories.d.ts +8 -0
  48. package/dist/components/card/card.stories.js +27 -0
  49. package/dist/components/check-box/check-box.d.ts +19 -0
  50. package/dist/components/check-box/check-box.js +19 -0
  51. package/dist/components/check-box/check-box.stories.d.ts +6 -0
  52. package/dist/components/check-box/check-box.stories.js +29 -0
  53. package/dist/components/color/color.stories-data.d.ts +9 -0
  54. package/dist/components/color/color.stories-data.js +55 -0
  55. package/dist/components/dialog/dialog.d.ts +17 -0
  56. package/dist/components/dialog/dialog.js +18 -0
  57. package/dist/components/divider/divider.d.ts +9 -0
  58. package/dist/components/divider/divider.js +19 -0
  59. package/dist/components/divider/divider.stories.d.ts +7 -0
  60. package/dist/components/divider/divider.stories.js +41 -0
  61. package/dist/components/drawer/drawer-resize-wrapper.d.ts +2 -0
  62. package/dist/components/drawer/drawer-resize-wrapper.js +33 -0
  63. package/dist/components/drawer/drawer-tabs.d.ts +2 -0
  64. package/dist/components/drawer/drawer-tabs.js +15 -0
  65. package/dist/components/drawer/drawer.constants.d.ts +2 -0
  66. package/dist/components/drawer/drawer.constants.js +2 -0
  67. package/dist/components/drawer/drawer.d.ts +2 -0
  68. package/dist/components/drawer/drawer.interface.d.ts +55 -0
  69. package/dist/components/drawer/drawer.interface.js +1 -0
  70. package/dist/components/drawer/drawer.js +80 -0
  71. package/dist/components/drawer/drawer.stories.d.ts +40 -0
  72. package/dist/components/drawer/drawer.stories.js +176 -0
  73. package/dist/components/empty/empty.d.ts +8 -0
  74. package/dist/components/empty/empty.js +6 -0
  75. package/dist/components/empty/empty.stories.d.ts +5 -0
  76. package/dist/components/empty/empty.stories.js +19 -0
  77. package/dist/components/file-input/enum.d.ts +6 -0
  78. package/dist/components/file-input/enum.js +7 -0
  79. package/dist/components/file-input/file-input.d.ts +18 -0
  80. package/dist/components/file-input/file-input.js +47 -0
  81. package/dist/components/file-input/file-input.stories.d.ts +7 -0
  82. package/dist/components/file-input/file-input.stories.js +65 -0
  83. package/dist/components/form/field.d.ts +16 -0
  84. package/dist/components/form/field.js +13 -0
  85. package/dist/components/form/field.stories.d.ts +12 -0
  86. package/dist/components/form/field.stories.js +51 -0
  87. package/dist/components/form/form.stories.d.ts +27 -0
  88. package/dist/components/form/form.stories.js +76 -0
  89. package/dist/components/heading/heading.d.ts +19 -0
  90. package/dist/components/heading/heading.js +9 -0
  91. package/dist/components/heading/heading.stories.d.ts +10 -0
  92. package/dist/components/heading/heading.stories.js +46 -0
  93. package/dist/components/help-icon/help-icon.d.ts +10 -0
  94. package/dist/components/help-icon/help-icon.js +19 -0
  95. package/dist/components/help-icon/help-icon.stories.d.ts +10 -0
  96. package/dist/components/help-icon/help-icon.stories.js +37 -0
  97. package/dist/components/icon/icon.d.ts +16 -0
  98. package/dist/components/icon/icon.js +31 -0
  99. package/dist/components/icon/icon.stories.d.ts +25 -0
  100. package/dist/components/icon/icon.stories.js +37 -0
  101. package/dist/components/icon/named-icon.d.ts +6 -0
  102. package/dist/components/icon/named-icon.js +418 -0
  103. package/dist/components/input/input.d.ts +26 -0
  104. package/dist/components/input/input.js +40 -0
  105. package/dist/components/input/input.stories.d.ts +5 -0
  106. package/dist/components/input/input.stories.js +22 -0
  107. package/dist/components/input-group/input-group-addon/input-group-addon.d.ts +8 -0
  108. package/dist/components/input-group/input-group-addon/input-group-addon.js +20 -0
  109. package/dist/components/input-group/input-group.d.ts +7 -0
  110. package/dist/components/input-group/input-group.js +27 -0
  111. package/dist/components/input-group/input-group.stories.d.ts +8 -0
  112. package/dist/components/input-group/input-group.stories.js +65 -0
  113. package/dist/components/label/label.d.ts +24 -0
  114. package/dist/components/label/label.js +14 -0
  115. package/dist/components/label/label.stories.d.ts +10 -0
  116. package/dist/components/label/label.stories.js +42 -0
  117. package/dist/components/layout/column/column.d.ts +18 -0
  118. package/dist/components/layout/column/column.js +13 -0
  119. package/dist/components/layout/column/styles.d.ts +15 -0
  120. package/dist/components/layout/column/styles.js +41 -0
  121. package/dist/components/layout/column.stories.d.ts +20 -0
  122. package/dist/components/layout/column.stories.js +53 -0
  123. package/dist/components/layout/flex/flex.d.ts +11 -0
  124. package/dist/components/layout/flex/flex.js +18 -0
  125. package/dist/components/layout/flex/flex.stories.d.ts +10 -0
  126. package/dist/components/layout/flex/flex.stories.js +52 -0
  127. package/dist/components/layout/form-row/form-row.d.ts +5 -0
  128. package/dist/components/layout/form-row/form-row.js +5 -0
  129. package/dist/components/layout/grid/grid.d.ts +11 -0
  130. package/dist/components/layout/grid/grid.js +41 -0
  131. package/dist/components/layout/grid/grid.stories.d.ts +9 -0
  132. package/dist/components/layout/grid/grid.stories.js +48 -0
  133. package/dist/components/layout/page/page.d.ts +9 -0
  134. package/dist/components/layout/page/page.js +11 -0
  135. package/dist/components/layout/page.stories.d.ts +9 -0
  136. package/dist/components/layout/page.stories.js +32 -0
  137. package/dist/components/layout/placeholder.d.ts +1 -0
  138. package/dist/components/layout/placeholder.js +1 -0
  139. package/dist/components/layout/print-header/print-header.d.ts +7 -0
  140. package/dist/components/layout/print-header/print-header.js +3 -0
  141. package/dist/components/layout/row/row.d.ts +15 -0
  142. package/dist/components/layout/row/row.js +24 -0
  143. package/dist/components/layout/spacer/spacer.d.ts +6 -0
  144. package/dist/components/layout/spacer/spacer.js +8 -0
  145. package/dist/components/list/list-row/item-content.d.ts +2 -0
  146. package/dist/components/list/list-row/item-content.js +9 -0
  147. package/dist/components/list/list-row/label.d.ts +2 -0
  148. package/dist/components/list/list-row/label.js +6 -0
  149. package/dist/components/list/list-row/list-heading.d.ts +3 -0
  150. package/dist/components/list/list-row/list-heading.js +10 -0
  151. package/dist/components/list/list-row/list-row.d.ts +3 -0
  152. package/dist/components/list/list-row/list-row.interface.d.ts +105 -0
  153. package/dist/components/list/list-row/list-row.interface.js +1 -0
  154. package/dist/components/list/list-row/list-row.js +56 -0
  155. package/dist/components/list/list-row/list-subheading.d.ts +3 -0
  156. package/dist/components/list/list-row/list-subheading.js +27 -0
  157. package/dist/components/list/list-row/meta-content.d.ts +2 -0
  158. package/dist/components/list/list-row/meta-content.js +12 -0
  159. package/dist/components/list/list-row/meta-count.d.ts +2 -0
  160. package/dist/components/list/list-row/meta-count.js +5 -0
  161. package/dist/components/list/list-row/name.d.ts +3 -0
  162. package/dist/components/list/list-row/name.js +12 -0
  163. package/dist/components/list/list.d.ts +2 -0
  164. package/dist/components/list/list.interface.d.ts +55 -0
  165. package/dist/components/list/list.interface.js +1 -0
  166. package/dist/components/list/list.js +86 -0
  167. package/dist/components/list/list.stories-data.d.ts +310 -0
  168. package/dist/components/list/list.stories-data.js +270 -0
  169. package/dist/components/list/list.stories.d.ts +22 -0
  170. package/dist/components/list/list.stories.js +411 -0
  171. package/dist/components/list/toggle-narrow.d.ts +2 -0
  172. package/dist/components/list/toggle-narrow.js +7 -0
  173. package/dist/components/loader/loader.d.ts +14 -0
  174. package/dist/components/loader/loader.js +15 -0
  175. package/dist/components/loader/loader.stories.d.ts +32 -0
  176. package/dist/components/loader/loader.stories.js +92 -0
  177. package/dist/components/menu/enum.d.ts +11 -0
  178. package/dist/components/menu/enum.js +13 -0
  179. package/dist/components/menu/index.d.ts +4 -0
  180. package/dist/components/menu/index.js +8 -0
  181. package/dist/components/menu/layer/divider.d.ts +1 -0
  182. package/dist/components/menu/layer/divider.js +3 -0
  183. package/dist/components/menu/layer/heading.d.ts +8 -0
  184. package/dist/components/menu/layer/heading.js +3 -0
  185. package/dist/components/menu/layer/layer.d.ts +15 -0
  186. package/dist/components/menu/layer/layer.js +47 -0
  187. package/dist/components/menu/layer/option.d.ts +19 -0
  188. package/dist/components/menu/layer/option.js +22 -0
  189. package/dist/components/menu/layer/path.d.ts +5 -0
  190. package/dist/components/menu/layer/path.js +30 -0
  191. package/dist/components/menu/layer/placementOptions.d.ts +3 -0
  192. package/dist/components/menu/layer/placementOptions.js +6 -0
  193. package/dist/components/menu/layer/section.d.ts +10 -0
  194. package/dist/components/menu/layer/section.js +23 -0
  195. package/dist/components/menu/menu.d.ts +3 -0
  196. package/dist/components/menu/menu.interface.d.ts +82 -0
  197. package/dist/components/menu/menu.interface.js +1 -0
  198. package/dist/components/menu/menu.js +92 -0
  199. package/dist/components/menu/menu.stories-data.d.ts +101 -0
  200. package/dist/components/menu/menu.stories-data.js +182 -0
  201. package/dist/components/menu/menu.stories.d.ts +31 -0
  202. package/dist/components/menu/menu.stories.js +104 -0
  203. package/dist/components/menu/menu.test.d.ts +1 -0
  204. package/dist/components/menu/menu.test.js +46 -0
  205. package/dist/components/menu/trigger/button.d.ts +14 -0
  206. package/dist/components/menu/trigger/button.js +13 -0
  207. package/dist/components/menu/trigger/component.d.ts +8 -0
  208. package/dist/components/menu/trigger/component.js +6 -0
  209. package/dist/components/menu/trigger/text.d.ts +10 -0
  210. package/dist/components/menu/trigger/text.js +9 -0
  211. package/dist/components/menu/trigger/trigger.d.ts +27 -0
  212. package/dist/components/menu/trigger/trigger.js +35 -0
  213. package/dist/components/message/dismiss.d.ts +8 -0
  214. package/dist/components/message/dismiss.js +17 -0
  215. package/dist/components/message/enum.d.ts +9 -0
  216. package/dist/components/message/enum.js +11 -0
  217. package/dist/components/message/message.d.ts +19 -0
  218. package/dist/components/message/message.js +49 -0
  219. package/dist/components/message/message.stories.d.ts +11 -0
  220. package/dist/components/message/message.stories.js +82 -0
  221. package/dist/components/modal/modal.d.ts +8 -0
  222. package/dist/components/modal/modal.js +7 -0
  223. package/dist/components/modal/modal.stories.d.ts +12 -0
  224. package/dist/components/modal/modal.stories.js +107 -0
  225. package/dist/components/number-input/number-input.d.ts +26 -0
  226. package/dist/components/number-input/number-input.js +66 -0
  227. package/dist/components/number-input/number-input.stories.d.ts +13 -0
  228. package/dist/components/number-input/number-input.stories.js +43 -0
  229. package/dist/components/option-dropdown/enum.d.ts +5 -0
  230. package/dist/components/option-dropdown/enum.js +6 -0
  231. package/dist/components/option-dropdown/heading.d.ts +4 -0
  232. package/dist/components/option-dropdown/heading.js +3 -0
  233. package/dist/components/option-dropdown/layer.d.ts +16 -0
  234. package/dist/components/option-dropdown/layer.js +43 -0
  235. package/dist/components/option-dropdown/option-dropdown.d.ts +19 -0
  236. package/dist/components/option-dropdown/option-dropdown.js +17 -0
  237. package/dist/components/option-dropdown/option-dropdown.stories.d.ts +5 -0
  238. package/dist/components/option-dropdown/option-dropdown.stories.js +35 -0
  239. package/dist/components/option-dropdown/option.d.ts +10 -0
  240. package/dist/components/option-dropdown/option.js +7 -0
  241. package/dist/components/pagination/pagination.d.ts +13 -0
  242. package/dist/components/pagination/pagination.interface.d.ts +15 -0
  243. package/dist/components/pagination/pagination.interface.js +1 -0
  244. package/dist/components/pagination/pagination.js +33 -0
  245. package/dist/components/pagination/pagination.stories.d.ts +7 -0
  246. package/dist/components/pagination/pagination.stories.js +62 -0
  247. package/dist/components/pagination/pagination.test.d.ts +1 -0
  248. package/dist/components/pagination/pagination.test.js +84 -0
  249. package/dist/components/pagination/pagination.viewdata.d.ts +17 -0
  250. package/dist/components/pagination/pagination.viewdata.js +53 -0
  251. package/dist/components/pop-confirm/content.d.ts +9 -0
  252. package/dist/components/pop-confirm/content.js +5 -0
  253. package/dist/components/pop-confirm/pop-confirm.d.ts +14 -0
  254. package/dist/components/pop-confirm/pop-confirm.js +7 -0
  255. package/dist/components/pop-confirm/pop-confirm.stories.d.ts +4 -0
  256. package/dist/components/pop-confirm/pop-confirm.stories.js +43 -0
  257. package/dist/components/popover/popover.d.ts +14 -0
  258. package/dist/components/popover/popover.js +39 -0
  259. package/dist/components/popover/popover.stories.d.ts +7 -0
  260. package/dist/components/popover/popover.stories.js +43 -0
  261. package/dist/components/portal/portal.d.ts +6 -0
  262. package/dist/components/portal/portal.js +11 -0
  263. package/dist/components/portal/portal.stories.d.ts +7 -0
  264. package/dist/components/portal/portal.stories.js +51 -0
  265. package/dist/components/progress-bar/progress-bar.d.ts +9 -0
  266. package/dist/components/progress-bar/progress-bar.js +21 -0
  267. package/dist/components/progress-bar/progress-bar.stories.d.ts +4 -0
  268. package/dist/components/progress-bar/progress-bar.stories.js +16 -0
  269. package/dist/components/radio-button/radio-button.d.ts +27 -0
  270. package/dist/components/radio-button/radio-button.js +45 -0
  271. package/dist/components/radio-button/radio-button.stories.d.ts +5 -0
  272. package/dist/components/radio-button/radio-button.stories.js +45 -0
  273. package/dist/components/radio-button/radio-input.d.ts +16 -0
  274. package/dist/components/radio-button/radio-input.js +9 -0
  275. package/dist/components/rich-text-input/rich-text-input.d.ts +10 -0
  276. package/dist/components/rich-text-input/rich-text-input.js +35 -0
  277. package/dist/components/rich-text-input/rich-text-input.stories.d.ts +9 -0
  278. package/dist/components/rich-text-input/rich-text-input.stories.js +60 -0
  279. package/dist/components/rich-text-input/rich-text-toolbar/enum.d.ts +7 -0
  280. package/dist/components/rich-text-input/rich-text-toolbar/enum.js +8 -0
  281. package/dist/components/rich-text-input/rich-text-toolbar/rich-text-toolbar.d.ts +7 -0
  282. package/dist/components/rich-text-input/rich-text-toolbar/rich-text-toolbar.js +42 -0
  283. package/dist/components/select/custom-select/custom-select.d.ts +2 -0
  284. package/dist/components/select/custom-select/custom-select.interface.d.ts +47 -0
  285. package/dist/components/select/custom-select/custom-select.interface.js +1 -0
  286. package/dist/components/select/custom-select/custom-select.js +51 -0
  287. package/dist/components/select/custom-select/custom-select.reducer.d.ts +6 -0
  288. package/dist/components/select/custom-select/custom-select.reducer.js +140 -0
  289. package/dist/components/select/custom-select/enum.d.ts +11 -0
  290. package/dist/components/select/custom-select/enum.js +12 -0
  291. package/dist/components/select/custom-select/helper.d.ts +3 -0
  292. package/dist/components/select/custom-select/helper.js +55 -0
  293. package/dist/components/select/custom-select/hooks/enum.d.ts +20 -0
  294. package/dist/components/select/custom-select/hooks/enum.js +22 -0
  295. package/dist/components/select/custom-select/hooks/use-custom-select-logic.d.ts +39 -0
  296. package/dist/components/select/custom-select/hooks/use-custom-select-logic.js +222 -0
  297. package/dist/components/select/custom-select/layer/heading.d.ts +3 -0
  298. package/dist/components/select/custom-select/layer/heading.js +5 -0
  299. package/dist/components/select/custom-select/layer/layer.d.ts +17 -0
  300. package/dist/components/select/custom-select/layer/layer.js +25 -0
  301. package/dist/components/select/custom-select/layer/option.d.ts +15 -0
  302. package/dist/components/select/custom-select/layer/option.js +10 -0
  303. package/dist/components/select/custom-select/layer/placementOptions.d.ts +10 -0
  304. package/dist/components/select/custom-select/layer/placementOptions.js +7 -0
  305. package/dist/components/select/custom-select/layer/section.d.ts +15 -0
  306. package/dist/components/select/custom-select/layer/section.js +16 -0
  307. package/dist/components/select/custom-select/reducer.interface.d.ts +34 -0
  308. package/dist/components/select/custom-select/reducer.interface.js +1 -0
  309. package/dist/components/select/custom-select/trigger/input.d.ts +14 -0
  310. package/dist/components/select/custom-select/trigger/input.js +21 -0
  311. package/dist/components/select/custom-select/trigger/multi-selected-options.d.ts +8 -0
  312. package/dist/components/select/custom-select/trigger/multi-selected-options.js +41 -0
  313. package/dist/components/select/custom-select/trigger/trigger.d.ts +34 -0
  314. package/dist/components/select/custom-select/trigger/trigger.js +53 -0
  315. package/dist/components/select/native-select/native-select.d.ts +29 -0
  316. package/dist/components/select/native-select/native-select.js +61 -0
  317. package/dist/components/select/select.d.ts +2 -0
  318. package/dist/components/select/select.input.d.ts +21 -0
  319. package/dist/components/select/select.input.js +114 -0
  320. package/dist/components/select/select.interface.d.ts +39 -0
  321. package/dist/components/select/select.interface.js +1 -0
  322. package/dist/components/select/select.js +61 -0
  323. package/dist/components/select/select.stories-data.d.ts +25 -0
  324. package/dist/components/select/select.stories-data.js +113 -0
  325. package/dist/components/select/select.stories.d.ts +30 -0
  326. package/dist/components/select/select.stories.js +93 -0
  327. package/dist/components/select/select.test.d.ts +1 -0
  328. package/dist/components/select/select.test.js +303 -0
  329. package/dist/components/side-bar/link.d.ts +17 -0
  330. package/dist/components/side-bar/link.js +20 -0
  331. package/dist/components/side-bar/sections.d.ts +21 -0
  332. package/dist/components/side-bar/sections.js +7 -0
  333. package/dist/components/side-bar/side-bar.d.ts +26 -0
  334. package/dist/components/side-bar/side-bar.js +28 -0
  335. package/dist/components/side-bar/side-bar.stories.d.ts +5 -0
  336. package/dist/components/side-bar/side-bar.stories.js +90 -0
  337. package/dist/components/slider/slider-tooltip.d.ts +5 -0
  338. package/dist/components/slider/slider-tooltip.js +13 -0
  339. package/dist/components/slider/slider.d.ts +37 -0
  340. package/dist/components/slider/slider.js +57 -0
  341. package/dist/components/slider/slider.stories.d.ts +16 -0
  342. package/dist/components/slider/slider.stories.js +85 -0
  343. package/dist/components/spinner/spinner.d.ts +7 -0
  344. package/dist/components/spinner/spinner.js +6 -0
  345. package/dist/components/spinner/spinner.stories.d.ts +4 -0
  346. package/dist/components/spinner/spinner.stories.js +14 -0
  347. package/dist/components/table/cell/cell-types/action-cell.d.ts +5 -0
  348. package/dist/components/table/cell/cell-types/action-cell.js +5 -0
  349. package/dist/components/table/cell/cell-types/cell-help-icon.d.ts +5 -0
  350. package/dist/components/table/cell/cell-types/cell-help-icon.js +7 -0
  351. package/dist/components/table/cell/cell-types/cell-library-icon.d.ts +5 -0
  352. package/dist/components/table/cell/cell-types/cell-library-icon.js +8 -0
  353. package/dist/components/table/cell/cell-types/cell-types.interface.d.ts +150 -0
  354. package/dist/components/table/cell/cell-types/cell-types.interface.js +1 -0
  355. package/dist/components/table/cell/cell-types/check-box-cell.d.ts +7 -0
  356. package/dist/components/table/cell/cell-types/check-box-cell.js +5 -0
  357. package/dist/components/table/cell/cell-types/icon-cell.d.ts +5 -0
  358. package/dist/components/table/cell/cell-types/icon-cell.js +9 -0
  359. package/dist/components/table/cell/cell-types/input-cell.d.ts +8 -0
  360. package/dist/components/table/cell/cell-types/input-cell.js +6 -0
  361. package/dist/components/table/cell/cell-types/link-cell.d.ts +7 -0
  362. package/dist/components/table/cell/cell-types/link-cell.js +23 -0
  363. package/dist/components/table/cell/cell-types/number-input-cell.d.ts +7 -0
  364. package/dist/components/table/cell/cell-types/number-input-cell.js +5 -0
  365. package/dist/components/table/cell/cell-types/popover-cell.d.ts +6 -0
  366. package/dist/components/table/cell/cell-types/popover-cell.js +8 -0
  367. package/dist/components/table/cell/cell-types/select-cell.d.ts +8 -0
  368. package/dist/components/table/cell/cell-types/select-cell.js +6 -0
  369. package/dist/components/table/cell/cell-types/slider-cell.d.ts +6 -0
  370. package/dist/components/table/cell/cell-types/slider-cell.js +6 -0
  371. package/dist/components/table/cell/cell-types/sort-cell.d.ts +5 -0
  372. package/dist/components/table/cell/cell-types/sort-cell.js +9 -0
  373. package/dist/components/table/cell/cell-types/static-cell.d.ts +7 -0
  374. package/dist/components/table/cell/cell-types/static-cell.js +16 -0
  375. package/dist/components/table/cell/cell-wrapper.d.ts +8 -0
  376. package/dist/components/table/cell/cell-wrapper.js +33 -0
  377. package/dist/components/table/cell/cell.d.ts +12 -0
  378. package/dist/components/table/cell/cell.js +45 -0
  379. package/dist/components/table/cell/cell.stories.d.ts +21 -0
  380. package/dist/components/table/cell/cell.stories.js +209 -0
  381. package/dist/components/table/cell/input-cell-wrapper.d.ts +7 -0
  382. package/dist/components/table/cell/input-cell-wrapper.js +8 -0
  383. package/dist/components/table/enum.d.ts +9 -0
  384. package/dist/components/table/enum.js +10 -0
  385. package/dist/components/table/footer/footer.d.ts +10 -0
  386. package/dist/components/table/footer/footer.js +18 -0
  387. package/dist/components/table/footer/footer.stories.d.ts +3 -0
  388. package/dist/components/table/footer/footer.stories.js +19 -0
  389. package/dist/components/table/helper.d.ts +22 -0
  390. package/dist/components/table/helper.js +49 -0
  391. package/dist/components/table/helper.test.d.ts +1 -0
  392. package/dist/components/table/helper.test.js +127 -0
  393. package/dist/components/table/row/expanded-content-row.d.ts +7 -0
  394. package/dist/components/table/row/expanded-content-row.js +6 -0
  395. package/dist/components/table/row/row.d.ts +37 -0
  396. package/dist/components/table/row/row.js +46 -0
  397. package/dist/components/table/row/row.stories.d.ts +9 -0
  398. package/dist/components/table/row/row.stories.js +132 -0
  399. package/dist/components/table/table-scroll-wrapper.d.ts +13 -0
  400. package/dist/components/table/table-scroll-wrapper.js +24 -0
  401. package/dist/components/table/table.d.ts +34 -0
  402. package/dist/components/table/table.js +91 -0
  403. package/dist/components/table/table.stories-data.d.ts +1970 -0
  404. package/dist/components/table/table.stories-data.js +996 -0
  405. package/dist/components/table/table.stories.d.ts +17 -0
  406. package/dist/components/table/table.stories.js +521 -0
  407. package/dist/components/table/table.test.d.ts +1 -0
  408. package/dist/components/table/table.test.js +27 -0
  409. package/dist/components/table/table.viewdata.d.ts +16 -0
  410. package/dist/components/table/table.viewdata.js +17 -0
  411. package/dist/components/table/title/title.d.ts +8 -0
  412. package/dist/components/table/title/title.js +22 -0
  413. package/dist/components/table/title/title.stories.d.ts +11 -0
  414. package/dist/components/table/title/title.stories.js +53 -0
  415. package/dist/components/tabs/content.d.ts +7 -0
  416. package/dist/components/tabs/content.js +6 -0
  417. package/dist/components/tabs/label.d.ts +14 -0
  418. package/dist/components/tabs/label.js +8 -0
  419. package/dist/components/tabs/tabs.d.ts +33 -0
  420. package/dist/components/tabs/tabs.js +64 -0
  421. package/dist/components/tabs/tabs.stories.d.ts +10 -0
  422. package/dist/components/tabs/tabs.stories.js +86 -0
  423. package/dist/components/text/text.d.ts +15 -0
  424. package/dist/components/text/text.js +6 -0
  425. package/dist/components/text/text.stories.d.ts +6 -0
  426. package/dist/components/text/text.stories.js +22 -0
  427. package/dist/components/text-link/text-link.d.ts +9 -0
  428. package/dist/components/text-link/text-link.js +5 -0
  429. package/dist/components/text-link/text-link.stories.d.ts +5 -0
  430. package/dist/components/text-link/text-link.stories.js +17 -0
  431. package/dist/components/textarea/textarea.d.ts +22 -0
  432. package/dist/components/textarea/textarea.js +15 -0
  433. package/dist/components/textarea/textarea.stories.d.ts +4 -0
  434. package/dist/components/textarea/textarea.stories.js +18 -0
  435. package/dist/components/toaster/toaster.d.ts +19 -0
  436. package/dist/components/toaster/toaster.js +51 -0
  437. package/dist/components/toaster/toaster.stories.d.ts +15 -0
  438. package/dist/components/toaster/toaster.stories.js +84 -0
  439. package/dist/components/toggle/toggle.d.ts +14 -0
  440. package/dist/components/toggle/toggle.js +17 -0
  441. package/dist/components/toggle/toggle.stories.d.ts +10 -0
  442. package/dist/components/toggle/toggle.stories.js +41 -0
  443. package/dist/components/tooltip/tooltip-layer.d.ts +16 -0
  444. package/dist/components/tooltip/tooltip-layer.js +19 -0
  445. package/dist/components/tooltip/tooltip.d.ts +19 -0
  446. package/dist/components/tooltip/tooltip.js +31 -0
  447. package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
  448. package/dist/components/tooltip/tooltip.stories.js +50 -0
  449. package/dist/components/tooltip/tooltip.test-case.stories.d.ts +4 -0
  450. package/dist/components/tooltip/tooltip.test-case.stories.js +20 -0
  451. package/dist/components/top-bar/element/element.d.ts +32 -0
  452. package/dist/components/top-bar/element/element.js +28 -0
  453. package/dist/components/top-bar/element/enum.d.ts +6 -0
  454. package/dist/components/top-bar/element/enum.js +7 -0
  455. package/dist/components/top-bar/element/link.d.ts +11 -0
  456. package/dist/components/top-bar/element/link.js +15 -0
  457. package/dist/components/top-bar/title.d.ts +9 -0
  458. package/dist/components/top-bar/title.js +7 -0
  459. package/dist/components/top-bar/top-bar.d.ts +11 -0
  460. package/dist/components/top-bar/top-bar.js +19 -0
  461. package/dist/components/top-bar/top-bar.stories.d.ts +6 -0
  462. package/dist/components/top-bar/top-bar.stories.js +124 -0
  463. package/dist/components/top-bar/top-bar.testcase.stories.d.ts +5 -0
  464. package/dist/components/top-bar/top-bar.testcase.stories.js +53 -0
  465. package/dist/components/top-bar/warning.d.ts +5 -0
  466. package/dist/components/top-bar/warning.js +5 -0
  467. package/dist/components/tree/tree-item.d.ts +10 -0
  468. package/dist/components/tree/tree-item.js +27 -0
  469. package/dist/components/tree/tree-placeholder.d.ts +4 -0
  470. package/dist/components/tree/tree-placeholder.js +3 -0
  471. package/dist/components/tree/tree.d.ts +42 -0
  472. package/dist/components/tree/tree.js +50 -0
  473. package/dist/components/tree/tree.stories-data.d.ts +126 -0
  474. package/dist/components/tree/tree.stories-data.js +83 -0
  475. package/dist/components/tree/tree.stories.d.ts +11 -0
  476. package/dist/components/tree/tree.stories.js +98 -0
  477. package/dist/helpers/disabled-context.d.ts +2 -0
  478. package/dist/helpers/disabled-context.js +2 -0
  479. package/dist/helpers/text.d.ts +1 -0
  480. package/dist/helpers/text.js +9 -0
  481. package/dist/helpers/types.d.ts +3 -0
  482. package/dist/helpers/types.js +8 -0
  483. package/dist/hooks/index.d.ts +4 -0
  484. package/dist/hooks/index.js +4 -0
  485. package/dist/hooks/use-focus.d.ts +4 -0
  486. package/dist/hooks/use-focus.js +10 -0
  487. package/dist/hooks/use-fonts-ready.d.ts +1 -0
  488. package/dist/hooks/use-fonts-ready.js +13 -0
  489. package/dist/hooks/use-keyboard-event.d.ts +2 -0
  490. package/dist/hooks/use-keyboard-event.js +14 -0
  491. package/dist/hooks/use-window-width.d.ts +1 -0
  492. package/dist/hooks/use-window-width.js +16 -0
  493. package/dist/index.d.ts +79 -1467
  494. package/dist/index.js +86 -72363
  495. package/dist/my-dummy.js +1 -0
  496. package/package.json +1 -1
@@ -0,0 +1,996 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Flex } from '../layout/flex/flex';
3
+ import { Menu } from '../menu/menu';
4
+ import { Text } from '../text/text';
5
+ import { Icon } from '../icon/icon';
6
+ import { IconType, TriggerType } from "../../common-enum";
7
+ import { MenuType } from "../menu/enum";
8
+ export const table = {
9
+ headers: [
10
+ {
11
+ cells: [
12
+ { value: 'Name' },
13
+ { value: 'Weight' },
14
+ { value: 'Energy' },
15
+ { value: 'Origin' },
16
+ ],
17
+ },
18
+ ],
19
+ rows: [
20
+ {
21
+ cells: [
22
+ { value: 'Brown rice', testId: 'table-tbody-cell-brown-rice' },
23
+ { value: 100, testId: 'table-tbody-cell-100' },
24
+ { value: 361, testId: 'table-tbody-cell-361' },
25
+ { value: 'Vietnam', testId: 'table-tbody-cell-vietnam' },
26
+ ],
27
+ },
28
+ {
29
+ cells: [
30
+ { value: 'Buckwheat', testId: 'table-tbody-cell-buckwheat' },
31
+ { value: 50, testId: 'table-tbody-cell-50' },
32
+ { value: 358, testId: 'table-tbody-cell-358' },
33
+ { value: 'Poland', testId: 'table-tbody-cell-poland' },
34
+ ],
35
+ },
36
+ {
37
+ cells: [
38
+ { value: 'Couscous', testId: 'table-tbody-cell-couscous' },
39
+ { value: 10, testId: 'table-tbody-cell-10' },
40
+ { value: 368, testId: 'table-tbody-cell-368' },
41
+ { value: 'France', testId: 'table-tbody-cell-france' },
42
+ ],
43
+ },
44
+ ],
45
+ };
46
+ export const tableColumnWidths = {
47
+ ...table,
48
+ columnWidths: ['200px', '20%', '100px', 'auto'],
49
+ };
50
+ export const tableStaticTooltips = {
51
+ ...table,
52
+ rows: table.rows.map((row) => ({
53
+ ...row,
54
+ cells: row.cells.map((cell) => ({ ...cell, tooltip: 'Tooltip' })),
55
+ })),
56
+ };
57
+ export const tableCellWidths = {
58
+ ...table,
59
+ rows: table.rows.map((row) => ({
60
+ ...row,
61
+ cells: row.cells.map((cell) => ({ ...cell, width: '200px' })),
62
+ })),
63
+ };
64
+ export const tableCellStyleProp = {
65
+ ...table,
66
+ rows: table.rows.map((row) => ({
67
+ ...row,
68
+ cells: row.cells.map((cell) => ({
69
+ ...cell,
70
+ style: {
71
+ width: '200px',
72
+ background: 'var(--color-background-table-header)',
73
+ fontWeight: 'bold',
74
+ },
75
+ })),
76
+ })),
77
+ };
78
+ export const tableBreakLongContent = {
79
+ ...table,
80
+ rows: [
81
+ {
82
+ cells: [
83
+ {
84
+ breakWord: true,
85
+ value: 'LoremipsumdolorsitametconsecteturadipiscingelitseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliquaUtenimadminimveniamquisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequatDuisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeullamcolaborisnisiutaliquipexeacommodoconsequatDuisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariaturufugiatnullapariatur',
86
+ },
87
+ { value: 100 },
88
+ { value: 361 },
89
+ { value: 'Vietnam' },
90
+ ],
91
+ },
92
+ ...table.rows,
93
+ ],
94
+ };
95
+ export const tableUnits = {
96
+ ...table,
97
+ headers: [
98
+ ...table.headers,
99
+ {
100
+ cells: [
101
+ {},
102
+ {
103
+ options: [
104
+ { label: 'kg', value: 'kg' },
105
+ { label: 'tonnes', value: 'tonnes' },
106
+ ],
107
+ type: 'Select',
108
+ searchable: false,
109
+ value: { label: 'kg', value: 'kg' },
110
+ onChange: () => { },
111
+ },
112
+ { type: 'Unit', value: 'kcal / 100g' },
113
+ {},
114
+ ],
115
+ },
116
+ ],
117
+ };
118
+ export const tableActiveRow = {
119
+ ...table,
120
+ rows: table.rows.map((row, index) => ({
121
+ ...row,
122
+ active: index === 0,
123
+ onRowClick: () => { },
124
+ })),
125
+ };
126
+ export const tableTitle = {
127
+ ...table,
128
+ name: 'Food',
129
+ };
130
+ export const tableTitleJsx = {
131
+ ...table,
132
+ name: (_jsxs(Flex, { gap: "8px", alignItems: "center", children: ["Food", _jsx(Icon, { icon: IconType.STAR })] })),
133
+ };
134
+ const actions = [
135
+ {
136
+ childComponent: (_jsx(Menu, { menu: {
137
+ label: 'Import food',
138
+ trigger: TriggerType.DROP_DOWN_BUTTON,
139
+ sections: [
140
+ { type: MenuType.HEADING, label: 'Import options' },
141
+ { type: MenuType.OPTION, label: 'Import from csv' },
142
+ { type: MenuType.OPTION, label: 'Import from library' },
143
+ ],
144
+ small: true,
145
+ } })),
146
+ },
147
+ ];
148
+ export const tableChildComponent = {
149
+ ...table,
150
+ name: 'Food',
151
+ actions,
152
+ testId: 'table-child-component',
153
+ };
154
+ export const tableWithActionHeaderAndNoLabel = {
155
+ ...table,
156
+ actions,
157
+ actionsRight: true,
158
+ };
159
+ export const tableInfiniteScroll = {
160
+ ...table,
161
+ headers: [
162
+ ...table.headers,
163
+ {
164
+ cells: [
165
+ {},
166
+ {
167
+ options: [
168
+ { label: 'kg', value: 'kg' },
169
+ { label: 'tonnes', value: 'tonnes' },
170
+ ],
171
+ type: 'Select',
172
+ native: true,
173
+ value: { label: 'kg', value: 'kg' },
174
+ onChange: () => { },
175
+ },
176
+ { type: 'Unit', value: 'kcal / 100g' },
177
+ {},
178
+ ],
179
+ },
180
+ ],
181
+ bordered: true,
182
+ infiniteScroll: true,
183
+ maxHeight: '500px',
184
+ stickyHeaders: true,
185
+ rows: Array.from({ length: 100 }, (_, index) => ({
186
+ cells: [
187
+ { type: 'Input', value: `Strawberry Letter ${index + 1}` },
188
+ { type: 'Input', value: 100 },
189
+ { type: 'Input', value: 361 },
190
+ { type: 'Input', value: 'Vietnam' },
191
+ ],
192
+ })),
193
+ footer: {
194
+ content: (_jsxs(_Fragment, { children: [_jsx("strong", { children: "Footer content:" }), " goes here"] })),
195
+ },
196
+ };
197
+ export const tableInfiniteScrollFullHeight = {
198
+ ...tableInfiniteScroll,
199
+ maxHeight: '100%',
200
+ };
201
+ export const tableInfiniteScrollShort = {
202
+ ...tableInfiniteScroll,
203
+ rows: Array.from({ length: 1 }, (_, index) => ({
204
+ cells: [
205
+ { type: 'Input', value: `Strawberry Letter ${index + 1}` },
206
+ { type: 'Input', value: 100 },
207
+ { type: 'Input', value: 361 },
208
+ { type: 'Input', value: 'Vietnam' },
209
+ ],
210
+ })),
211
+ };
212
+ export const tableInfiniteScrollDnD = {
213
+ ...tableInfiniteScroll,
214
+ draggable: true,
215
+ };
216
+ export const tableRowFocus = {
217
+ ...table,
218
+ rows: table.rows.map((row, index) => ({
219
+ ...row,
220
+ onRowFocus: () => { },
221
+ })),
222
+ };
223
+ const subComponent = () => {
224
+ return (_jsxs("ul", { children: [_jsx("li", { children: "Carrots" }), _jsx("li", { children: "Chocolate" }), _jsx("li", { children: "Chorizo" })] }));
225
+ };
226
+ export const tableJsxContent = {
227
+ headers: [
228
+ {
229
+ cells: [{ value: 'Name' }, { value: 'Content' }],
230
+ },
231
+ ],
232
+ rows: [
233
+ {
234
+ cells: [{ value: 'Sub-component' }, { value: subComponent() }],
235
+ },
236
+ {
237
+ cells: [
238
+ { value: 'JSX' },
239
+ {
240
+ value: (_jsxs("div", { children: ["Some ", _jsx(Text, { bold: true, children: "bold content" })] })),
241
+ },
242
+ ],
243
+ },
244
+ ],
245
+ };
246
+ export const tableColspan = {
247
+ ...table,
248
+ headers: [
249
+ {
250
+ cells: [{ value: '' }, { value: 'Stats', colSpan: 2 }, { value: '' }],
251
+ },
252
+ ...table.headers,
253
+ ],
254
+ rows: [
255
+ ...table.rows,
256
+ {
257
+ cells: [{ value: 'Total', colSpan: 4 }],
258
+ },
259
+ ],
260
+ };
261
+ export const tableRowspan = {
262
+ ...table,
263
+ headers: [
264
+ {
265
+ cells: [
266
+ { value: 'Name', colSpan: 2 },
267
+ { value: 'Origin', rowSpan: 2 },
268
+ ],
269
+ },
270
+ {
271
+ cells: [{ value: 'English' }, { value: 'Chinese' }],
272
+ },
273
+ ],
274
+ rows: [
275
+ {
276
+ cells: [
277
+ { type: 'Input', value: 'Brown rice' },
278
+ { type: 'Input', value: '糙米' },
279
+ {
280
+ type: 'Select',
281
+ options: [
282
+ { label: 'China', value: 'China' },
283
+ { label: 'France', value: 'France' },
284
+ { label: 'Poland', value: 'Poland' },
285
+ ],
286
+ value: { label: 'China', value: 'China' },
287
+ rowSpan: 2,
288
+ },
289
+ ],
290
+ },
291
+ {
292
+ cells: [
293
+ { type: 'Input', value: 'White rice' },
294
+ { type: 'Input', value: '白米' },
295
+ ],
296
+ },
297
+ ],
298
+ };
299
+ export const tableColspanWidths = {
300
+ ...table,
301
+ columnWidths: ['auto', '120px', '120px', 'auto'],
302
+ headers: [
303
+ {
304
+ cells: [
305
+ { value: 'Header' },
306
+ { value: 'Header', colSpan: 2 },
307
+ { value: 'Header' },
308
+ ],
309
+ },
310
+ ],
311
+ };
312
+ export const tableAlignment = {
313
+ ...table,
314
+ columnAlignment: ['left', 'right', 'right', 'left'],
315
+ };
316
+ export const tableHeaderAlignment = {
317
+ ...tableColspan,
318
+ columnAlignment: ['left', 'right', 'right', 'left', 'right'],
319
+ columnHeaderAlignments: [
320
+ ['', 'center', ''],
321
+ ['', 'right', 'right', ''],
322
+ ],
323
+ };
324
+ export const tableEditable = {
325
+ fixedWidth: 'auto',
326
+ headers: [
327
+ {
328
+ cells: [
329
+ {
330
+ value: 'Input',
331
+ testId: 'with-editable-cells-cell-name',
332
+ width: '140px',
333
+ },
334
+ { value: 'Select (native)', width: '140px' },
335
+ { value: 'Number Input', width: '140px' },
336
+ { value: 'Select (custom)', width: '140px' },
337
+ { value: 'Slider', width: '140px' },
338
+ { value: 'Static' },
339
+ ],
340
+ },
341
+ ],
342
+ rows: [
343
+ {
344
+ cells: [
345
+ {
346
+ value: 'Buckwheat',
347
+ type: 'Input',
348
+ onChange: () => { },
349
+ testId: 'table-tbody-cell-buckwheat',
350
+ },
351
+ {
352
+ type: 'Select',
353
+ native: true,
354
+ options: [
355
+ { label: 50, value: 50 },
356
+ { label: 100, value: 100 },
357
+ ],
358
+ value: { label: 100, value: 100 },
359
+ onChange: () => { },
360
+ },
361
+ { value: 361, type: 'NumberInput', onChange: () => { } },
362
+ {
363
+ type: 'Select',
364
+ options: [
365
+ { label: 'France', value: 'France' },
366
+ { label: 'Poland', value: 'Poland' },
367
+ { label: 'Vietnam', value: 'Vietnam' },
368
+ ],
369
+ value: { label: 'Poland', value: 'Poland' },
370
+ onChange: () => { },
371
+ },
372
+ { type: 'Slider', value: 50, min: 0, max: 100, onChange: () => { } },
373
+ { value: 361 },
374
+ ],
375
+ },
376
+ {
377
+ cells: [
378
+ {
379
+ value: 'Arborio rice',
380
+ type: 'Input',
381
+ onChange: () => { },
382
+ testId: 'table-tbody-cell-arborio',
383
+ error: 'Error',
384
+ },
385
+ {
386
+ type: 'Select',
387
+ native: true,
388
+ options: [
389
+ { label: 50, value: 50 },
390
+ { label: 100, value: 100 },
391
+ ],
392
+ value: { label: 100, value: 100 },
393
+ onChange: () => { },
394
+ error: 'Error',
395
+ },
396
+ { value: 361, type: 'NumberInput', onChange: () => { }, error: 'Error' },
397
+ {
398
+ type: 'Select',
399
+ options: [
400
+ { label: 'France', value: 'France' },
401
+ { label: 'Italy', value: 'Italy' },
402
+ { label: 'Vietnam', value: 'Vietnam' },
403
+ ],
404
+ value: { label: 'Italy', value: 'Italy' },
405
+ onChange: () => { },
406
+ error: 'Error',
407
+ },
408
+ {
409
+ type: 'Slider',
410
+ value: 50,
411
+ min: 0,
412
+ max: 100,
413
+ onChange: () => { },
414
+ error: 'Error',
415
+ },
416
+ { value: 361, error: 'Error' },
417
+ ],
418
+ },
419
+ {
420
+ cells: [
421
+ {
422
+ value: 'Couscous',
423
+ type: 'Input',
424
+ onChange: () => { },
425
+ testId: 'table-tbody-cell-couscous',
426
+ warning: 'Warning',
427
+ },
428
+ {
429
+ type: 'Select',
430
+ native: true,
431
+ options: [
432
+ { label: 50, value: 50 },
433
+ { label: 100, value: 100 },
434
+ ],
435
+ value: { label: 100, value: 100 },
436
+ onChange: () => { },
437
+ warning: 'Warning',
438
+ },
439
+ {
440
+ value: 361,
441
+ type: 'NumberInput',
442
+ onChange: () => { },
443
+ warning: 'Warning',
444
+ },
445
+ {
446
+ type: 'Select',
447
+ options: [
448
+ { label: 'France', value: 'France' },
449
+ { label: 'Poland', value: 'Poland' },
450
+ { label: 'Vietnam', value: 'Vietnam' },
451
+ ],
452
+ value: { label: 'France', value: 'France' },
453
+ onChange: () => { },
454
+ warning: 'Warning',
455
+ },
456
+ {
457
+ type: 'Slider',
458
+ value: 50,
459
+ min: 0,
460
+ max: 100,
461
+ onChange: () => { },
462
+ warning: 'Warning',
463
+ },
464
+ { value: 361, warning: 'Warning' },
465
+ ],
466
+ },
467
+ ],
468
+ };
469
+ export const tableCheckboxes = {
470
+ ...table,
471
+ headers: table.headers.map((row) => ({
472
+ ...row,
473
+ cells: [
474
+ {
475
+ type: 'CheckBox',
476
+ onChange: () => { },
477
+ },
478
+ ...row.cells,
479
+ ],
480
+ })),
481
+ rows: table.rows.map((row) => ({
482
+ ...row,
483
+ cells: [
484
+ {
485
+ type: 'CheckBox',
486
+ onChange: () => { },
487
+ },
488
+ ...row.cells,
489
+ ],
490
+ })),
491
+ };
492
+ export const tableDisabled = {
493
+ ...tableEditable,
494
+ rows: tableEditable.rows.map((row) => ({
495
+ ...row,
496
+ cells: row.cells.map((cell) => ({ ...cell, disabled: true })),
497
+ })),
498
+ };
499
+ export const tableFilters = {
500
+ ...table,
501
+ headers: [
502
+ ...table.headers,
503
+ {
504
+ cells: [
505
+ {
506
+ value: '',
507
+ type: 'Input',
508
+ placeholder: 'Search',
509
+ onChange: () => { },
510
+ },
511
+ {
512
+ value: '',
513
+ type: 'Input',
514
+ placeholder: 'Search',
515
+ onChange: () => { },
516
+ },
517
+ {
518
+ value: '',
519
+ type: 'Input',
520
+ placeholder: 'Search',
521
+ onChange: () => { },
522
+ },
523
+ {
524
+ value: '',
525
+ type: 'Input',
526
+ placeholder: 'Search',
527
+ onChange: () => { },
528
+ },
529
+ ],
530
+ },
531
+ ],
532
+ };
533
+ export const tableSort = {
534
+ headers: [
535
+ {
536
+ cells: [
537
+ { value: 'Name' },
538
+ {
539
+ value: 'Weight (kg)',
540
+ hasSort: true,
541
+ sort: 'up',
542
+ sortPriority: 1,
543
+ onSort: () => { },
544
+ },
545
+ {
546
+ value: 'Energy (kcal / 100g)',
547
+ hasSort: true,
548
+ sort: 'down',
549
+ sortPriority: 2,
550
+ onSort: () => { },
551
+ },
552
+ {
553
+ value: 'Origin',
554
+ hasSort: true,
555
+ sort: '',
556
+ sortPriority: 1,
557
+ onSort: () => { },
558
+ },
559
+ ],
560
+ },
561
+ ],
562
+ rows: [
563
+ {
564
+ cells: [
565
+ { value: 'Brown rice' },
566
+ { value: 100 },
567
+ { value: 361 },
568
+ { value: 'Vietnam' },
569
+ ],
570
+ },
571
+ {
572
+ cells: [
573
+ { value: 'Buckwheat' },
574
+ { value: 50 },
575
+ { value: 358 },
576
+ { value: 'Poland' },
577
+ ],
578
+ },
579
+ {
580
+ cells: [
581
+ { value: 'Couscous' },
582
+ { value: 10 },
583
+ { value: 368 },
584
+ { value: 'France' },
585
+ ],
586
+ },
587
+ ],
588
+ };
589
+ export const tableIcons = {
590
+ headers: [
591
+ {
592
+ cells: [
593
+ {},
594
+ { value: 'Name' },
595
+ { value: 'Weight (kg)' },
596
+ { value: 'Energy (kcal / 100g)' },
597
+ { value: 'Origin' },
598
+ ],
599
+ },
600
+ ],
601
+ rows: [
602
+ {
603
+ cells: [
604
+ {
605
+ type: 'Icon',
606
+ icon: _jsx(Icon, { icon: IconType.SUCCESS, color: "var(--color-text-success)" }),
607
+ tooltip: 'Success tooltip here',
608
+ width: 'var(--size)',
609
+ },
610
+ { value: 'Brown rice' },
611
+ { value: 100 },
612
+ { value: 361 },
613
+ { value: 'Vietnam' },
614
+ ],
615
+ },
616
+ {
617
+ cells: [
618
+ {
619
+ type: 'Icon',
620
+ icon: _jsx(Icon, { icon: IconType.WARNING, color: "var(--color-text-warning)" }),
621
+ tooltip: 'Warning tooltip here',
622
+ width: 'var(--size)',
623
+ },
624
+ { value: 'Buckwheat' },
625
+ { value: 50 },
626
+ { value: 358 },
627
+ { value: 'Poland' },
628
+ ],
629
+ },
630
+ {
631
+ cells: [
632
+ {
633
+ type: 'Icon',
634
+ icon: _jsx(Icon, { icon: IconType.ERROR, color: "var(--color-text-error)" }),
635
+ tooltip: 'Error tooltip here',
636
+ width: 'var(--size)',
637
+ },
638
+ { value: 'Couscous' },
639
+ { value: 10 },
640
+ { value: 368 },
641
+ { value: 'France' },
642
+ ],
643
+ },
644
+ ],
645
+ };
646
+ export const tableLinks = {
647
+ headers: [
648
+ {
649
+ cells: [{ value: 'Lorem' }, { value: 'Ipsum' }],
650
+ },
651
+ ],
652
+ rows: [
653
+ {
654
+ cells: [
655
+ {
656
+ type: 'Link',
657
+ value: 'Link text',
658
+ onClick: () => console.log('Link clicked'),
659
+ },
660
+ {
661
+ type: 'Link',
662
+ value: 'Disabled link text',
663
+ disabled: true,
664
+ onClick: () => console.log('Link clicked'),
665
+ },
666
+ ],
667
+ },
668
+ {
669
+ cells: [
670
+ {
671
+ type: 'Link',
672
+ value: 'Static warning link',
673
+ warning: 'Warning message',
674
+ onClick: () => console.log('Link clicked'),
675
+ },
676
+ {
677
+ type: 'Link',
678
+ value: 'Static error link',
679
+ error: 'Error message',
680
+ onClick: () => console.log('Link clicked'),
681
+ },
682
+ ],
683
+ },
684
+ ],
685
+ };
686
+ export const tableActions = {
687
+ headers: [
688
+ {
689
+ cells: [
690
+ { value: 'Name' },
691
+ { value: 'Weight (kg)' },
692
+ { value: 'Energy (kcal / 100g)' },
693
+ { value: 'Origin' },
694
+ { value: 'Lorem' },
695
+ { value: 'Ipsum' },
696
+ { value: 'Dolor' },
697
+ ],
698
+ actions: [
699
+ {
700
+ primary: true,
701
+ label: 'Add',
702
+ icon: 'add',
703
+ onClick: () => { },
704
+ },
705
+ ],
706
+ },
707
+ ],
708
+ rows: [
709
+ {
710
+ cells: [
711
+ { value: 'Brown rice' },
712
+ { value: 100 },
713
+ { value: 361 },
714
+ { value: 'Vietnam' },
715
+ { value: 'Lorem' },
716
+ { value: 'Ipsum' },
717
+ { value: 'Dolor' },
718
+ ],
719
+ actions: [{ label: 'Delete', icon: 'minus', onClick: () => { } }],
720
+ },
721
+ {
722
+ cells: [
723
+ { value: 'Buckwheat' },
724
+ { value: 50 },
725
+ { value: 358 },
726
+ { value: 'Poland' },
727
+ { value: 'Lorem' },
728
+ { value: 'Ipsum' },
729
+ { value: 'Dolor' },
730
+ ],
731
+ actions: [{ label: 'Delete', icon: 'minus', onClick: () => { } }],
732
+ },
733
+ {
734
+ cells: [
735
+ { value: 'Couscous' },
736
+ { value: 10 },
737
+ { value: 368 },
738
+ { value: 'France' },
739
+ { value: 'Lorem' },
740
+ { value: 'Ipsum' },
741
+ { value: 'Dolor' },
742
+ ],
743
+ actions: [
744
+ {
745
+ label: 'test',
746
+ icon: 'minus',
747
+ onClick: () => { },
748
+ hidden: true,
749
+ },
750
+ ],
751
+ },
752
+ ],
753
+ };
754
+ export const tableWithSubActions = {
755
+ headers: [
756
+ {
757
+ cells: [
758
+ { value: 'Name' },
759
+ { value: 'Weight (kg)' },
760
+ { value: 'Energy (kcal / 100g)' },
761
+ { value: 'Origin' },
762
+ ],
763
+ actions: [
764
+ {
765
+ primary: true,
766
+ label: 'Add',
767
+ icon: 'add',
768
+ onClick: () => { },
769
+ },
770
+ ],
771
+ },
772
+ ],
773
+ rows: [
774
+ {
775
+ cells: [
776
+ { value: 'Brown rice' },
777
+ { value: 100 },
778
+ { value: 361 },
779
+ { value: 'Vietnam' },
780
+ ],
781
+ actions: [
782
+ {
783
+ label: 'More',
784
+ subActions: [
785
+ {
786
+ label: 'Move Up',
787
+ icon: 'up',
788
+ onClick: () => { },
789
+ },
790
+ {
791
+ label: 'Move Down',
792
+ icon: 'down',
793
+ onClick: () => { },
794
+ },
795
+ ],
796
+ },
797
+ { label: 'Delete', icon: 'minus', onClick: () => { } },
798
+ ],
799
+ },
800
+ {
801
+ cells: [
802
+ { value: 'Buckwheat' },
803
+ { value: 50 },
804
+ { value: 358 },
805
+ { value: 'Poland' },
806
+ ],
807
+ actions: [
808
+ {
809
+ label: 'More',
810
+ subActions: [
811
+ {
812
+ label: 'Move Up',
813
+ icon: 'up',
814
+ onClick: () => { },
815
+ },
816
+ {
817
+ label: 'Move Down',
818
+ icon: 'down',
819
+ onClick: () => { },
820
+ },
821
+ ],
822
+ },
823
+ { label: 'Delete', icon: 'minus', onClick: () => { } },
824
+ ],
825
+ },
826
+ {
827
+ cells: [
828
+ { value: 'Couscous' },
829
+ { value: 10 },
830
+ { value: 368 },
831
+ { value: 'France' },
832
+ ],
833
+ actions: [
834
+ {
835
+ label: 'More',
836
+ subActions: [
837
+ {
838
+ label: 'Move Up',
839
+ icon: 'up',
840
+ onClick: () => { },
841
+ },
842
+ {
843
+ label: 'Move Down',
844
+ icon: 'down',
845
+ onClick: () => { },
846
+ },
847
+ ],
848
+ },
849
+ { label: 'Delete', icon: 'minus', onClick: () => { } },
850
+ ],
851
+ },
852
+ ],
853
+ };
854
+ export const tableFooter = {
855
+ ...table,
856
+ footer: {
857
+ content: (_jsxs(_Fragment, { children: [_jsx("strong", { children: "Footer content:" }), " goes here"] })),
858
+ pagination: {
859
+ rowCount: 500,
860
+ selectedPage: 10,
861
+ rowsPerPage: {
862
+ onChange: () => { },
863
+ options: [
864
+ { label: '10 / page', value: 10 },
865
+ { label: '20 / page', value: 20 },
866
+ { label: '50 / page', value: 50 },
867
+ { label: 'Show all', value: 0 },
868
+ ],
869
+ value: 20,
870
+ },
871
+ goTo: { onChange: () => { } },
872
+ onSelectPage: () => { },
873
+ small: true,
874
+ },
875
+ actions: [{ label: 'Star', icon: 'star', onClick: () => { } }],
876
+ },
877
+ };
878
+ export const tableHelpLibraryIcons = {
879
+ ...table,
880
+ headers: table.headers.map((header) => ({
881
+ ...header,
882
+ cells: header.cells.map((cell) => ({
883
+ ...cell,
884
+ helpIcon: {
885
+ onClick: () => console.log('Help clicked'),
886
+ tooltip: 'Help text goes here',
887
+ },
888
+ libraryIcon: {
889
+ onClick: () => console.log('Library clicked'),
890
+ tooltip: 'Edit in library',
891
+ },
892
+ })),
893
+ })),
894
+ };
895
+ export const tableOverflowing = {
896
+ columnWidths: [undefined, '100px', '100px', '100px', undefined],
897
+ columnAlignment: ['left', 'right', 'left', 'left', 'left', 'right'],
898
+ columnHeaderAlignments: [['left', 'right', 'left', 'left', 'left', 'right']],
899
+ headers: [
900
+ {
901
+ cells: [
902
+ {
903
+ value: 'Lorem ipsum dolor sit amet consectetur adipiscing elit sed doeius mod tempor incididunt laboreet dolore magna aliqua',
904
+ },
905
+ { value: 'Weight (kg)' },
906
+ { value: 'Energy (kcal / 100g)' },
907
+ { value: 'Origin' },
908
+ { value: 'Static' },
909
+ { value: 'Static Right' },
910
+ ],
911
+ },
912
+ ],
913
+ rows: [
914
+ {
915
+ cells: [
916
+ {
917
+ breakWord: true,
918
+ value: 'LoremipsumdolorsitametconsecteturadipiscingelitseddoeiusmodtemporincididuntutlaboreetdoloremagnaaliquaUtenimadminimveniamquisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequatDuisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeullamcolaborisnisiutaliquipexeacommodoconsequatDuisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariaturufugiatnullapariatur',
919
+ },
920
+ {
921
+ type: 'Select',
922
+ native: true,
923
+ options: [
924
+ { label: 50, value: 50 },
925
+ { label: 100, value: 100 },
926
+ ],
927
+ value: { label: 100, value: 100 },
928
+ onChange: () => { },
929
+ disabled: true,
930
+ },
931
+ {
932
+ type: 'Select',
933
+ options: [
934
+ { label: 'Vietnam', value: 'Vietnam' },
935
+ { label: 'Other', value: 'Other' },
936
+ ],
937
+ value: { label: 'Vietnam', value: 'Vietnam' },
938
+ onChange: () => { },
939
+ error: 'Error',
940
+ },
941
+ {
942
+ value: 'Brown rice',
943
+ type: 'Input',
944
+ onChange: () => { },
945
+ testId: 'table-tbody-cell-brown-rice',
946
+ warning: 'Warning message',
947
+ },
948
+ {
949
+ value: 'Static warning',
950
+ warning: 'Warning message',
951
+ },
952
+ {
953
+ value: '100',
954
+ },
955
+ ],
956
+ },
957
+ {
958
+ cells: [
959
+ { value: 'Buckwheat' },
960
+ {
961
+ type: 'Select',
962
+ native: true,
963
+ options: [
964
+ { label: 50, value: 50 },
965
+ { label: 100, value: 100 },
966
+ ],
967
+ value: { label: 100, value: 100 },
968
+ onChange: () => { },
969
+ },
970
+ {
971
+ type: 'Select',
972
+ options: [
973
+ { label: 'Vietnam', value: 'Vietnam' },
974
+ { label: 'Other', value: 'Other' },
975
+ ],
976
+ value: { label: 'Vietnam', value: 'Vietnam' },
977
+ onChange: () => { },
978
+ },
979
+ {
980
+ value: 'Brown rice',
981
+ type: 'Input',
982
+ onChange: () => { },
983
+ testId: 'table-tbody-cell-brown-rice',
984
+ },
985
+ {
986
+ type: 'Link',
987
+ value: 'Static error link',
988
+ error: 'Error message',
989
+ },
990
+ {
991
+ value: '100',
992
+ },
993
+ ],
994
+ },
995
+ ],
996
+ };