@oliasoft-open-source/react-ui-library 2.4.8 → 3.0.1

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 (320) hide show
  1. package/README.md +0 -1
  2. package/dist/global.css +21840 -0
  3. package/dist/index.js +43567 -0
  4. package/package.json +37 -55
  5. package/.eslintignore +0 -2
  6. package/.eslintrc.js +0 -125
  7. package/.gitlab-ci.yml +0 -76
  8. package/.husky/pre-commit +0 -4
  9. package/.prettierignore +0 -3
  10. package/.prettierrc +0 -4
  11. package/.storybook/main.js +0 -36
  12. package/.storybook/preview.js +0 -40
  13. package/.storybook/storybook.less +0 -8
  14. package/babel.config.js +0 -31
  15. package/index.js +0 -76
  16. package/jest.config.js +0 -9
  17. package/scripts/send-mattermost-message.sh +0 -21
  18. package/src/components/accordion/accordion.jsx +0 -132
  19. package/src/components/accordion/accordion.module.less +0 -66
  20. package/src/components/accordion/accordion.stories.jsx +0 -171
  21. package/src/components/accordion/chevron/chevron.jsx +0 -12
  22. package/src/components/accordion/chevron/chevron.module.less +0 -12
  23. package/src/components/accordion/helpers/accordion-with-default-toggle.jsx +0 -106
  24. package/src/components/accordion/helpers/accordion-with-default-toggle.module.less +0 -24
  25. package/src/components/actions/actions.jsx +0 -129
  26. package/src/components/actions/actions.module.less +0 -44
  27. package/src/components/actions/actions.shape.js +0 -32
  28. package/src/components/actions/actions.stories.jsx +0 -79
  29. package/src/components/badge/badge.jsx +0 -58
  30. package/src/components/badge/badge.module.less +0 -55
  31. package/src/components/badge/badge.stories.jsx +0 -31
  32. package/src/components/breadcrumb/breadcrumb.jsx +0 -49
  33. package/src/components/breadcrumb/breadcrumb.module.less +0 -39
  34. package/src/components/breadcrumb/breadcrumb.stories.jsx +0 -45
  35. package/src/components/breadcrumb/link.jsx +0 -31
  36. package/src/components/button/button.jsx +0 -156
  37. package/src/components/button/button.module.less +0 -300
  38. package/src/components/button/button.stories.jsx +0 -74
  39. package/src/components/button-group/button-group.jsx +0 -140
  40. package/src/components/button-group/button-group.module.less +0 -24
  41. package/src/components/button-group/button-group.stories-data.jsx +0 -67
  42. package/src/components/button-group/button-group.stories.jsx +0 -63
  43. package/src/components/buttons-and-links.stories.mdx +0 -55
  44. package/src/components/card/card.jsx +0 -51
  45. package/src/components/card/card.module.less +0 -48
  46. package/src/components/card/card.stories.jsx +0 -39
  47. package/src/components/check-box/check-box.jsx +0 -92
  48. package/src/components/check-box/check-box.module.less +0 -101
  49. package/src/components/check-box/check-box.stories.jsx +0 -27
  50. package/src/components/color/color.stories-data.jsx +0 -71
  51. package/src/components/color/color.stories.mdx +0 -37
  52. package/src/components/dialog/dialog.jsx +0 -77
  53. package/src/components/dialog/dialog.module.less +0 -76
  54. package/src/components/divider/divider.jsx +0 -40
  55. package/src/components/divider/divider.module.less +0 -28
  56. package/src/components/divider/divider.stories.jsx +0 -50
  57. package/src/components/drawer/drawer-resize-wrapper.jsx +0 -76
  58. package/src/components/drawer/drawer-tabs.jsx +0 -44
  59. package/src/components/drawer/drawer.jsx +0 -161
  60. package/src/components/drawer/drawer.module.less +0 -217
  61. package/src/components/drawer/drawer.stories.jsx +0 -296
  62. package/src/components/empty/empty.jsx +0 -52
  63. package/src/components/empty/empty.module.less +0 -17
  64. package/src/components/empty/empty.stories.jsx +0 -26
  65. package/src/components/file-input/file-input.jsx +0 -101
  66. package/src/components/file-input/file-input.module.less +0 -3
  67. package/src/components/file-input/file-input.stories.jsx +0 -109
  68. package/src/components/form/field.jsx +0 -96
  69. package/src/components/form/field.stories.jsx +0 -101
  70. package/src/components/form/form.module.less +0 -30
  71. package/src/components/form/form.stories.jsx +0 -191
  72. package/src/components/heading/heading.jsx +0 -105
  73. package/src/components/heading/heading.module.less +0 -59
  74. package/src/components/heading/heading.stories.jsx +0 -60
  75. package/src/components/icon/deprecated-icon.jsx +0 -97
  76. package/src/components/icon/icon.jsx +0 -71
  77. package/src/components/icon/icon.module.less +0 -33
  78. package/src/components/icon/icon.stories.jsx +0 -37
  79. package/src/components/icon/icons.example.module.less +0 -4
  80. package/src/components/input/input.jsx +0 -167
  81. package/src/components/input/input.module.less +0 -94
  82. package/src/components/input/input.stories.jsx +0 -28
  83. package/src/components/input-group/input-group-addon/input-group-addon.jsx +0 -36
  84. package/src/components/input-group/input-group-addon/input-group-addon.module.less +0 -31
  85. package/src/components/input-group/input-group.jsx +0 -51
  86. package/src/components/input-group/input-group.module.less +0 -10
  87. package/src/components/input-group/input-group.stories.jsx +0 -77
  88. package/src/components/input-validation.stories.mdx +0 -61
  89. package/src/components/inputs.stories.mdx +0 -201
  90. package/src/components/label/label.jsx +0 -115
  91. package/src/components/label/label.module.less +0 -43
  92. package/src/components/label/label.stories.jsx +0 -60
  93. package/src/components/layout/column/column.jsx +0 -85
  94. package/src/components/layout/column/styles.js +0 -45
  95. package/src/components/layout/column.stories.jsx +0 -60
  96. package/src/components/layout/examples/afe.stories.jsx +0 -180
  97. package/src/components/layout/examples/blowout.stories.jsx +0 -68
  98. package/src/components/layout/examples/casing-loads.stories.jsx +0 -297
  99. package/src/components/layout/examples/formation.stories.jsx +0 -110
  100. package/src/components/layout/examples/projects.stories.jsx +0 -108
  101. package/src/components/layout/examples/reservoirs.stories.jsx +0 -211
  102. package/src/components/layout/examples/site.stories.jsx +0 -263
  103. package/src/components/layout/flex/flex.jsx +0 -48
  104. package/src/components/layout/flex/flex.stories.jsx +0 -59
  105. package/src/components/layout/form-row/form-row.jsx +0 -15
  106. package/src/components/layout/form-row/form-row.module.less +0 -11
  107. package/src/components/layout/grid/grid.jsx +0 -62
  108. package/src/components/layout/grid/grid.stories.jsx +0 -67
  109. package/src/components/layout/page/page.jsx +0 -42
  110. package/src/components/layout/page/page.module.less +0 -27
  111. package/src/components/layout/page.stories.jsx +0 -93
  112. package/src/components/layout/placeholder.jsx +0 -2
  113. package/src/components/layout/print-header/print-header.jsx +0 -22
  114. package/src/components/layout/print-header/print-header.module.less +0 -9
  115. package/src/components/layout/row/row.jsx +0 -75
  116. package/src/components/layout/row/row.module.less +0 -7
  117. package/src/components/layout/spacer/spacer.jsx +0 -26
  118. package/src/components/layout/spacer/spacer.stories.jsx +0 -50
  119. package/src/components/layout-forms.stories.mdx +0 -104
  120. package/src/components/layout-general.stories.mdx +0 -215
  121. package/src/components/list/list-row/item-content.jsx +0 -15
  122. package/src/components/list/list-row/label.jsx +0 -11
  123. package/src/components/list/list-row/list-heading.jsx +0 -52
  124. package/src/components/list/list-row/list-row.jsx +0 -128
  125. package/src/components/list/list-row/list-subheading.jsx +0 -72
  126. package/src/components/list/list-row/meta-content.jsx +0 -24
  127. package/src/components/list/list-row/meta-count.jsx +0 -10
  128. package/src/components/list/list-row/name.jsx +0 -45
  129. package/src/components/list/list.jsx +0 -276
  130. package/src/components/list/list.module.less +0 -256
  131. package/src/components/list/list.stories-data.jsx +0 -287
  132. package/src/components/list/list.stories.jsx +0 -458
  133. package/src/components/list/toggle-narrow.jsx +0 -13
  134. package/src/components/loader/loader.jsx +0 -63
  135. package/src/components/loader/loader.module.less +0 -63
  136. package/src/components/loader/loader.stories.jsx +0 -155
  137. package/src/components/menu/index.js +0 -7
  138. package/src/components/menu/layer/divider.jsx +0 -4
  139. package/src/components/menu/layer/heading.jsx +0 -15
  140. package/src/components/menu/layer/layer.jsx +0 -82
  141. package/src/components/menu/layer/option.jsx +0 -77
  142. package/src/components/menu/layer/path.js +0 -44
  143. package/src/components/menu/layer/placementOptions.js +0 -6
  144. package/src/components/menu/layer/section.jsx +0 -66
  145. package/src/components/menu/menu.jsx +0 -359
  146. package/src/components/menu/menu.module.less +0 -241
  147. package/src/components/menu/menu.stories-data.jsx +0 -168
  148. package/src/components/menu/menu.stories.jsx +0 -126
  149. package/src/components/menu/menu.test.js +0 -58
  150. package/src/components/menu/trigger/button.jsx +0 -50
  151. package/src/components/menu/trigger/component.jsx +0 -14
  152. package/src/components/menu/trigger/text.jsx +0 -25
  153. package/src/components/menu/trigger/trigger.jsx +0 -86
  154. package/src/components/message/dismiss.jsx +0 -26
  155. package/src/components/message/message.jsx +0 -137
  156. package/src/components/message/message.module.less +0 -114
  157. package/src/components/message/message.stories.jsx +0 -84
  158. package/src/components/modal/modal.jsx +0 -50
  159. package/src/components/modal/modal.module.less +0 -39
  160. package/src/components/modal/modal.stories.jsx +0 -162
  161. package/src/components/option-dropdown/heading.jsx +0 -6
  162. package/src/components/option-dropdown/layer.jsx +0 -81
  163. package/src/components/option-dropdown/option-dropdown.jsx +0 -53
  164. package/src/components/option-dropdown/option-dropdown.module.less +0 -50
  165. package/src/components/option-dropdown/option-dropdown.stories.jsx +0 -35
  166. package/src/components/option-dropdown/option.jsx +0 -13
  167. package/src/components/pagination/pagination.jsx +0 -139
  168. package/src/components/pagination/pagination.module.less +0 -11
  169. package/src/components/pagination/pagination.stories.jsx +0 -78
  170. package/src/components/pagination/pagination.test.js +0 -92
  171. package/src/components/pagination/pagination.viewdata.js +0 -66
  172. package/src/components/pop-confirm/content.jsx +0 -25
  173. package/src/components/pop-confirm/pop-confirm.jsx +0 -61
  174. package/src/components/pop-confirm/pop-confirm.module.less +0 -18
  175. package/src/components/pop-confirm/pop-confirm.stories.jsx +0 -53
  176. package/src/components/popover/popover.jsx +0 -112
  177. package/src/components/popover/popover.module.less +0 -22
  178. package/src/components/popover/popover.stories.jsx +0 -59
  179. package/src/components/portal/portal.jsx +0 -16
  180. package/src/components/portal/portal.stories.jsx +0 -69
  181. package/src/components/progress-bar/progress-bar.jsx +0 -64
  182. package/src/components/progress-bar/progress-bar.module.less +0 -64
  183. package/src/components/progress-bar/progress-bar.stories.jsx +0 -23
  184. package/src/components/radio-button/radio-button.jsx +0 -139
  185. package/src/components/radio-button/radio-button.module.less +0 -135
  186. package/src/components/radio-button/radio-button.stories.jsx +0 -37
  187. package/src/components/radio-button/radio-input.jsx +0 -52
  188. package/src/components/select/custom-select/custom-select.jsx +0 -440
  189. package/src/components/select/custom-select/custom-select.module.less +0 -123
  190. package/src/components/select/custom-select/custom-select.reducer.js +0 -157
  191. package/src/components/select/custom-select/layer/heading.jsx +0 -13
  192. package/src/components/select/custom-select/layer/layer.jsx +0 -73
  193. package/src/components/select/custom-select/layer/option.jsx +0 -54
  194. package/src/components/select/custom-select/layer/placementOptions.js +0 -7
  195. package/src/components/select/custom-select/layer/section.jsx +0 -35
  196. package/src/components/select/custom-select/trigger/input.jsx +0 -100
  197. package/src/components/select/custom-select/trigger/trigger.jsx +0 -155
  198. package/src/components/select/custom-select/trigger/trigger.module.less +0 -289
  199. package/src/components/select/native-select/native-select.jsx +0 -198
  200. package/src/components/select/native-select/native-select.module.less +0 -107
  201. package/src/components/select/select.input.js +0 -146
  202. package/src/components/select/select.jsx +0 -207
  203. package/src/components/select/select.stories-data.jsx +0 -92
  204. package/src/components/select/select.stories.jsx +0 -135
  205. package/src/components/select/select.test.js +0 -519
  206. package/src/components/side-bar/container.module.less +0 -29
  207. package/src/components/side-bar/link.jsx +0 -83
  208. package/src/components/side-bar/sections.jsx +0 -23
  209. package/src/components/side-bar/side-bar.jsx +0 -102
  210. package/src/components/side-bar/side-bar.module.less +0 -137
  211. package/src/components/side-bar/side-bar.stories.jsx +0 -101
  212. package/src/components/slider/rc-slider.less +0 -47
  213. package/src/components/slider/slider-tooltip.jsx +0 -20
  214. package/src/components/slider/slider.jsx +0 -233
  215. package/src/components/slider/slider.module.less +0 -40
  216. package/src/components/slider/slider.stories.jsx +0 -110
  217. package/src/components/spinner/spinner.jsx +0 -37
  218. package/src/components/spinner/spinner.module.less +0 -115
  219. package/src/components/spinner/spinner.stories.jsx +0 -24
  220. package/src/components/table/cell/cell.jsx +0 -621
  221. package/src/components/table/cell/cell.module.less +0 -164
  222. package/src/components/table/footer/footer.jsx +0 -66
  223. package/src/components/table/footer/footer.module.less +0 -14
  224. package/src/components/table/helper.js +0 -64
  225. package/src/components/table/helper.test.js +0 -166
  226. package/src/components/table/icon/icon.module.less +0 -31
  227. package/src/components/table/row/expanded-content-row.jsx +0 -16
  228. package/src/components/table/row/row.jsx +0 -253
  229. package/src/components/table/row/row.module.less +0 -62
  230. package/src/components/table/table-scroll-wrapper.jsx +0 -49
  231. package/src/components/table/table.jsx +0 -234
  232. package/src/components/table/table.module.less +0 -146
  233. package/src/components/table/table.stories-data.jsx +0 -875
  234. package/src/components/table/table.stories.jsx +0 -759
  235. package/src/components/table/table.test.js +0 -30
  236. package/src/components/table/table.variables.less +0 -11
  237. package/src/components/table/table.viewdata.js +0 -26
  238. package/src/components/table/title/title.jsx +0 -30
  239. package/src/components/table/title/title.module.less +0 -11
  240. package/src/components/tabs/content.jsx +0 -14
  241. package/src/components/tabs/label.jsx +0 -50
  242. package/src/components/tabs/tabs.jsx +0 -191
  243. package/src/components/tabs/tabs.module.less +0 -73
  244. package/src/components/tabs/tabs.stories.jsx +0 -110
  245. package/src/components/text/text.jsx +0 -64
  246. package/src/components/text/text.module.less +0 -45
  247. package/src/components/text/text.stories.jsx +0 -31
  248. package/src/components/text-link/text-link.jsx +0 -23
  249. package/src/components/text-link/text-link.stories.jsx +0 -20
  250. package/src/components/textarea/textarea.jsx +0 -126
  251. package/src/components/textarea/textarea.module.less +0 -55
  252. package/src/components/textarea/textarea.stories.jsx +0 -26
  253. package/src/components/toaster/toaster.jsx +0 -39
  254. package/src/components/toaster/toaster.less +0 -17
  255. package/src/components/toaster/toaster.stories.jsx +0 -116
  256. package/src/components/toggle/toggle.jsx +0 -65
  257. package/src/components/toggle/toggle.module.less +0 -139
  258. package/src/components/toggle/toggle.stories.jsx +0 -26
  259. package/src/components/tooltip/tooltip-layer.jsx +0 -72
  260. package/src/components/tooltip/tooltip.jsx +0 -108
  261. package/src/components/tooltip/tooltip.module.less +0 -28
  262. package/src/components/tooltip/tooltip.stories.jsx +0 -71
  263. package/src/components/top-bar/element/element.jsx +0 -72
  264. package/src/components/top-bar/element/link.jsx +0 -29
  265. package/src/components/top-bar/title.jsx +0 -24
  266. package/src/components/top-bar/top-bar.jsx +0 -79
  267. package/src/components/top-bar/top-bar.module.less +0 -190
  268. package/src/components/top-bar/top-bar.stories.jsx +0 -137
  269. package/src/components/top-bar/warning.jsx +0 -6
  270. package/src/components/tree/tree-item.jsx +0 -79
  271. package/src/components/tree/tree-placeholder.jsx +0 -6
  272. package/src/components/tree/tree.jsx +0 -129
  273. package/src/components/tree/tree.module.less +0 -33
  274. package/src/components/tree/tree.stories-data.jsx +0 -89
  275. package/src/components/tree/tree.stories.jsx +0 -106
  276. package/src/docs/components/page/page.jsx +0 -16
  277. package/src/docs/config/config.js +0 -1
  278. package/src/docs/html/favicon.png +0 -0
  279. package/src/docs/html/index.html +0 -11
  280. package/src/docs/navigation/footer/footer.jsx +0 -48
  281. package/src/docs/navigation/header/header.jsx +0 -39
  282. package/src/docs/navigation/header/header.module.less +0 -32
  283. package/src/docs/navigation/routes/routes.jsx +0 -16
  284. package/src/docs/start.jsx +0 -12
  285. package/src/docs/views/main/main.jsx +0 -209
  286. package/src/docs/views/main/main.module.less +0 -14
  287. package/src/docs/views/not-found/not-found.jsx +0 -5
  288. package/src/helpers/disabled-context.js +0 -8
  289. package/src/helpers/styles.js +0 -68
  290. package/src/helpers/text.js +0 -6
  291. package/src/helpers/types.js +0 -5
  292. package/src/hooks/index.js +0 -3
  293. package/src/hooks/use-focus.js +0 -11
  294. package/src/hooks/use-keyboard-event.js +0 -16
  295. package/src/hooks/use-window-width.js +0 -20
  296. package/src/images/icons/icon-drop.png +0 -0
  297. package/src/images/icons/icon-share.png +0 -0
  298. package/src/images/icons/icons8-junction.svg +0 -4
  299. package/src/images/logo.png +0 -0
  300. package/src/images/logo.svg +0 -13
  301. package/src/images/oliasoft-logo.svg +0 -1
  302. package/src/style/colors.less +0 -26
  303. package/src/style/external.less +0 -10
  304. package/src/style/fonts/lato/Lato-Bold.woff2 +0 -0
  305. package/src/style/fonts/lato/Lato-BoldItalic.woff2 +0 -0
  306. package/src/style/fonts/lato/Lato-Italic.woff2 +0 -0
  307. package/src/style/fonts/lato/Lato-Regular.woff2 +0 -0
  308. package/src/style/fonts.less +0 -27
  309. package/src/style/global.less +0 -51
  310. package/src/style/mixins.less +0 -68
  311. package/src/style/reset/reset.less +0 -34
  312. package/src/style/shared.less +0 -25
  313. package/src/style/theme.dark.less +0 -37
  314. package/src/style/theme.default.less +0 -74
  315. package/src/style/variables.less +0 -49
  316. package/webpack/webpack.common.js +0 -39
  317. package/webpack/webpack.common.rules.js +0 -102
  318. package/webpack/webpack.dev.js +0 -22
  319. package/webpack/webpack.prod.js +0 -23
  320. package/webpack/webpack.resolve.js +0 -22
@@ -1,108 +0,0 @@
1
- import React from 'react';
2
- import { TopBar, List, Tabs, Page, Row, Column } from '../../../..';
3
-
4
- const tabs = [
5
- {
6
- label: 'Browse',
7
- value: 'Browse',
8
- },
9
- {
10
- label: 'Recent',
11
- value: 'Recent',
12
- },
13
- {
14
- label: 'My Projects',
15
- value: 'My Projects',
16
- },
17
- ];
18
-
19
- const items = [
20
- { id: 1, name: 'Lorem', active: true },
21
- { id: 2, name: 'Ipsum' },
22
- { id: 3, name: 'Dolor' },
23
- { id: 4, name: 'Long name goes here lorem ipsum' },
24
- { id: 5, name: 'Lorem' },
25
- { id: 6, name: 'Ipsum' },
26
- { id: 7, name: 'Dolor' },
27
- { id: 8, name: 'Long name goes here lorem ipsum' },
28
- { id: 9, name: 'Lorem' },
29
- { id: 10, name: 'Ipsum' },
30
- { id: 11, name: 'Dolor' },
31
- { id: 12, name: 'Long name goes here lorem ipsum' },
32
- { id: 13, name: 'Lorem' },
33
- { id: 14, name: 'Ipsum' },
34
- { id: 15, name: 'Dolor' },
35
- { id: 16, name: 'Long name goes here lorem ipsum' },
36
- ];
37
-
38
- export default {
39
- title: 'Layout/Layout Examples',
40
- parameters: {
41
- layout: 'fullscreen',
42
- docs: {
43
- inlineStories: false,
44
- iframeHeight: 800,
45
- },
46
- },
47
- };
48
-
49
- export const Projects = () => {
50
- return (
51
- <>
52
- <TopBar />
53
- <Page padding={false} left={0} scroll={false}>
54
- <Tabs margin={false} padding options={tabs} value={tabs[0]} />
55
- <Row spacing={0} flex height="100%">
56
- <Column borderRight scroll showScrollbar={false}>
57
- <List
58
- list={{
59
- name: 'Country',
60
- items,
61
- }}
62
- />
63
- </Column>
64
- <Column borderRight scroll showScrollbar={false}>
65
- <List
66
- list={{
67
- name: 'Field',
68
- items,
69
- }}
70
- />
71
- </Column>
72
- <Column borderRight scroll showScrollbar={false}>
73
- <List
74
- list={{
75
- name: 'Site',
76
- items,
77
- }}
78
- />
79
- </Column>
80
- <Column borderRight scroll showScrollbar={false}>
81
- <List
82
- list={{
83
- name: 'Well',
84
- items,
85
- }}
86
- />
87
- </Column>
88
- <Column borderRight scroll showScrollbar={false}>
89
- <List
90
- list={{
91
- name: 'Wellbore',
92
- items,
93
- }}
94
- />
95
- </Column>
96
- <Column scroll showScrollbar={false}>
97
- <List
98
- list={{
99
- name: 'Design',
100
- items,
101
- }}
102
- />
103
- </Column>
104
- </Row>
105
- </Page>
106
- </>
107
- );
108
- };
@@ -1,211 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { FaQuestion, FaChevronLeft } from 'react-icons/fa';
3
- import {
4
- TopBar,
5
- SideBar,
6
- Heading,
7
- Button,
8
- Card,
9
- Drawer,
10
- List,
11
- Field,
12
- Input,
13
- RadioButton,
14
- Select,
15
- CheckBox,
16
- Spacer,
17
- Page,
18
- Row,
19
- Column,
20
- FormRow,
21
- } from '../../../..';
22
-
23
- const ImagePlaceholder = ({ width, height }) => (
24
- <div style={{ background: '#ddd', width, height }}></div>
25
- );
26
-
27
- export default {
28
- title: 'Layout/Layout Examples',
29
- parameters: {
30
- layout: 'fullscreen',
31
- docs: {
32
- inlineStories: false,
33
- iframeHeight: 800,
34
- },
35
- },
36
- };
37
-
38
- export const Reservoirs = () => {
39
- const [open, setOpen] = useState(true);
40
- return (
41
- <>
42
- <TopBar />
43
- <SideBar options={{ title: '', sections: [] }} />
44
- <Page padding={false} scroll={false}>
45
- <Row spacing={0} height="100%">
46
- <Drawer
47
- button={
48
- <Button
49
- onClick={() => setOpen(!open)}
50
- round
51
- icon={<FaChevronLeft />}
52
- />
53
- }
54
- open={open}
55
- width={300}
56
- closedWidth={50}
57
- >
58
- <List
59
- drawer
60
- narrow={!open}
61
- list={{
62
- name: 'Reservoirs',
63
- items: [
64
- {
65
- id: 1,
66
- name: 'Lorem',
67
- active: true,
68
- },
69
- {
70
- id: 2,
71
- name: 'Ipsum',
72
- },
73
- ],
74
- }}
75
- />
76
- </Drawer>
77
- <Column scroll padding borderLeft>
78
- <Row>
79
- <Column>
80
- <Heading top>Reservoir name here</Heading>
81
- <FormRow>
82
- <Field label="Name">
83
- <Input value="Reservoir name here" width="200px" />
84
- </Field>
85
- <Field label="Lorem">
86
- <RadioButton
87
- name="example"
88
- options={[
89
- { label: 'Aardvarks', value: 'termites' },
90
- { label: 'Monkeys', value: 'bananas' },
91
- ]}
92
- value={{ label: 'Monkeys', value: 'bananas' }}
93
- inline
94
- />
95
- </Field>
96
- <Field label="Ipsum">
97
- <Select
98
- name="example"
99
- options={[
100
- { label: 'Monkeys', value: 'bananas' },
101
- { label: 'Possums', value: 'slugs' },
102
- ]}
103
- value={{ label: 'Monkeys', value: 'bananas' }}
104
- native
105
- />
106
- </Field>
107
- <Field>
108
- <CheckBox label="Dolor" />
109
- </Field>
110
- </FormRow>
111
- </Column>
112
- <Column flex={false}>
113
- <Button onClick={() => {}} round icon={<FaQuestion />} />
114
- </Column>
115
- </Row>
116
- <Spacer height={10} />
117
- <Row>
118
- <Column width="50%">
119
- <Card
120
- heading={
121
- <Heading onClickHelp={() => console.log('help!')}>
122
- Reservoir Zone
123
- </Heading>
124
- }
125
- >
126
- <Row>
127
- <Column width="50%">
128
- <Field label="Label" helpText="Lorem ipsum">
129
- <RadioButton
130
- options={[
131
- { label: 'Aardvarks', value: 'termites' },
132
- { label: 'Monkeys', value: 'bananas' },
133
- ]}
134
- value={{ label: 'Monkeys', value: 'bananas' }}
135
- inline
136
- />
137
- <Input width="100%" />
138
- </Field>
139
- <Field label="Label" helpText="Lorem ipsum">
140
- <CheckBox label="Lorem ipsum" />
141
- <Input width="100%" disabled />
142
- </Field>
143
-
144
- <Field label="Label" helpText="Lorem ipsum">
145
- <Input width="100%" />
146
- </Field>
147
- <Field label="Label" helpText="Lorem ipsum">
148
- <Input width="100%" />
149
- </Field>
150
- </Column>
151
- <Column width="50%">
152
- <Field label="Label" helpText="Lorem ipsum">
153
- <Input width="100%" />
154
- </Field>
155
- <Field label="Label" helpText="Lorem ipsum">
156
- <Input width="100%" />
157
- </Field>
158
- <Field label="Label" helpText="Lorem ipsum">
159
- <Input width="100%" />
160
- </Field>
161
- <Field label="Label" helpText="Lorem ipsum">
162
- <Input width="100%" />
163
- </Field>
164
- </Column>
165
- </Row>
166
- </Card>
167
- </Column>
168
- <Column width="50%">
169
- <Card heading={<Heading>Reservoir Size</Heading>}>
170
- <Row>
171
- <Column width="160px">
172
- <Field label="Length">
173
- <Input width="100%" />
174
- </Field>
175
- <Field label="Width">
176
- <Input width="100%" />
177
- </Field>
178
- </Column>
179
- <Column>
180
- <ImagePlaceholder width="100%" height="100%" />
181
- </Column>
182
- </Row>
183
- </Card>
184
- <Spacer />
185
- <Card heading={<Heading>Reservoir Properties</Heading>}>
186
- <Row>
187
- <Column>
188
- <Field label="Label">
189
- <Input width="100%" />
190
- </Field>
191
- </Column>
192
- <Column>
193
- <Field label="Label">
194
- <Input width="100%" />
195
- </Field>
196
- </Column>
197
- <Column>
198
- <Field label="Label">
199
- <Input width="100%" />
200
- </Field>
201
- </Column>
202
- </Row>
203
- </Card>
204
- </Column>
205
- </Row>
206
- </Column>
207
- </Row>
208
- </Page>
209
- </>
210
- );
211
- };
@@ -1,263 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { FaChevronLeft } from 'react-icons/fa';
3
- import {
4
- Accordion,
5
- TopBar,
6
- SideBar,
7
- Heading,
8
- Button,
9
- Drawer,
10
- List,
11
- Field,
12
- Input,
13
- CheckBox,
14
- Page,
15
- Row,
16
- Column,
17
- Spacer,
18
- Tabs,
19
- } from '../../../..';
20
-
21
- const options = [
22
- {
23
- label: 'Import',
24
- value: 'import',
25
- right: true,
26
- },
27
- {
28
- label: 'Settings',
29
- value: 'settings',
30
- right: true,
31
- },
32
- ];
33
-
34
- const MapPlaceholder = () => (
35
- <div
36
- style={{
37
- background: '#AAD3DF',
38
- borderLeft: '1px solid #8AB3BF',
39
- display: 'flex',
40
- alignItems: 'center',
41
- justifyContent: 'center',
42
- color: 'white',
43
- height: '100%',
44
- }}
45
- >
46
- MAP
47
- </div>
48
- );
49
-
50
- export default {
51
- title: 'Layout/Layout Examples',
52
- parameters: {
53
- layout: 'fullscreen',
54
- docs: {
55
- inlineStories: false,
56
- iframeHeight: 800,
57
- },
58
- },
59
- };
60
-
61
- export const Site = () => {
62
- const [open, setOpen] = useState(true);
63
- return (
64
- <>
65
- <TopBar />
66
- <SideBar options={{ title: '', sections: [] }} width="250px" />
67
- <Page padding={false} scroll={false}>
68
- <Row spacing={0} flex>
69
- <Drawer
70
- button={
71
- <Button
72
- onClick={() => setOpen(!open)}
73
- round
74
- icon={<FaChevronLeft />}
75
- />
76
- }
77
- open={open}
78
- width={300}
79
- closedWidth={50}
80
- >
81
- <List
82
- drawer
83
- narrow={!open}
84
- list={{
85
- name: 'Sites',
86
- items: [
87
- {
88
- id: 1,
89
- name: 'Main Site',
90
- type: 'Heading',
91
- },
92
- {
93
- id: 2,
94
- name: 'Site name here',
95
- active: true,
96
- label: {
97
- value: 1,
98
- color: '#69779b',
99
- },
100
- },
101
- {
102
- id: 3,
103
- name: 'Locations',
104
- type: 'Heading',
105
- },
106
- {
107
- id: 4,
108
- name: 'Ipsum',
109
- label: {
110
- value: 2,
111
- color: '#69779b',
112
- },
113
- },
114
- {
115
- id: 5,
116
- name: 'Dolor',
117
- label: {
118
- value: 3,
119
- color: '#69779b',
120
- },
121
- },
122
- ],
123
- }}
124
- />
125
- <List
126
- drawer
127
- narrow={!open}
128
- list={{
129
- name: 'Wells',
130
- items: [
131
- {
132
- id: 1,
133
- name: 'Main Wellbore',
134
- type: 'Heading',
135
- },
136
- {
137
- id: 2,
138
- name: 'Lorem',
139
- label: {
140
- value: 1,
141
- color: '#77699b',
142
- },
143
- },
144
- ],
145
- }}
146
- />
147
- <List
148
- drawer
149
- narrow={!open}
150
- list={{
151
- name: 'Targets',
152
- items: [
153
- {
154
- id: 1,
155
- name: 'Lorem',
156
- label: {
157
- value: 1,
158
- color: '#9b6977',
159
- },
160
- },
161
- ],
162
- }}
163
- />
164
- </Drawer>
165
- <Column borderLeft flexbox>
166
- <Tabs padding margin={false} options={options} />
167
- <Row spacing={0} flex>
168
- <Column scroll padding width={550}>
169
- <Heading top>Site name here</Heading>
170
- <Field label="Name">
171
- <Input value="Site name here" width="200px" />
172
- </Field>
173
- <Spacer />
174
- <Accordion
175
- heading={<Heading>Coordinate Reference System</Heading>}
176
- managed
177
- >
178
- <Field label="Label" labelLeft labelWidth="50px">
179
- <Input value="Value" width="100%" />
180
- </Field>
181
- <Field label="Label" labelLeft labelWidth="50px">
182
- <Input value="Value" width="100%" />
183
- </Field>
184
- <Field label="Label" labelLeft labelWidth="50px">
185
- <Input value="Value" width="100%" />
186
- </Field>
187
- <Field>
188
- <CheckBox label="Dolor" />
189
- </Field>
190
- </Accordion>
191
- <Spacer />
192
- <Heading marginBottom={10}>Location</Heading>
193
- <Row spacing={10}>
194
- <Column>
195
- <Field label="Label">
196
- <Input value="Value" width="100%" />
197
- </Field>
198
- </Column>
199
- <Column>
200
- <Field label="Label">
201
- <Input value="Value" width="100%" />
202
- </Field>
203
- </Column>
204
- <Column>
205
- <Field label="Label">
206
- <Input value="Value" width="100%" />
207
- </Field>
208
- </Column>
209
- <Column>
210
- <Field label="Label">
211
- <Input value="Value" width="100%" />
212
- </Field>
213
- </Column>
214
- </Row>
215
- <Spacer />
216
- <Heading marginBottom={10}>Model</Heading>
217
- <Row spacing={10}>
218
- <Column>
219
- <Field label="Label">
220
- <Input value="Value" width="100%" />
221
- </Field>
222
- </Column>
223
- <Column>
224
- <Field label="Label">
225
- <Input value="Value" width="100%" />
226
- </Field>
227
- </Column>
228
- </Row>
229
- <Spacer />
230
- <Accordion heading={<Heading>Settings</Heading>} managed>
231
- <Field>
232
- <CheckBox label="Dolor" />
233
- </Field>
234
- <Row spacing={10}>
235
- <Column>
236
- <Field label="Label">
237
- <Input value="Value" width="100%" />
238
- </Field>
239
- <Field label="Label">
240
- <Input value="Value" width="100%" />
241
- </Field>
242
- </Column>
243
- <Column>
244
- <Field label="Label">
245
- <Input value="Value" width="100%" />
246
- </Field>
247
- <Field label="Label">
248
- <Input value="Value" width="100%" />
249
- </Field>
250
- </Column>
251
- </Row>
252
- </Accordion>
253
- </Column>
254
- <Column>
255
- <MapPlaceholder />
256
- </Column>
257
- </Row>
258
- </Column>
259
- </Row>
260
- </Page>
261
- </>
262
- );
263
- };
@@ -1,48 +0,0 @@
1
- import React, { Fragment, isValidElement } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- export const Flex = ({
5
- alignItems,
6
- justifyContent,
7
- direction,
8
- height,
9
- children,
10
- wrap,
11
- gap,
12
- }) => {
13
- return (
14
- <div
15
- style={{
16
- display: 'flex',
17
- flexDirection: direction,
18
- alignItems,
19
- justifyContent,
20
- height,
21
- flexWrap: wrap ? 'wrap' : 'nowrap',
22
- gap: gap === false ? 0 : gap === true ? '20px' : gap,
23
- }}
24
- >
25
- {children}
26
- </div>
27
- );
28
- };
29
-
30
- Flex.defaultProps = {
31
- alignItems: 'initial',
32
- direction: 'initial',
33
- height: 'initial',
34
- justifyContent: 'initial',
35
- children: null,
36
- wrap: true,
37
- gap: false,
38
- };
39
-
40
- Flex.propTypes = {
41
- alignItems: PropTypes.string,
42
- direction: PropTypes.string,
43
- height: PropTypes.string,
44
- justifyContent: PropTypes.string,
45
- children: PropTypes.node,
46
- wrap: PropTypes.bool,
47
- gap: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
48
- };
@@ -1,59 +0,0 @@
1
- import React from 'react';
2
- import { Flex, Button, Text } from '../../../..';
3
-
4
- export default {
5
- title: 'Layout/Flex',
6
- component: Flex,
7
- argTypes: {
8
- alignItems: {
9
- control: {
10
- type: 'inline-radio',
11
- },
12
- options: ['flex-start', 'center', 'flex-end'],
13
- },
14
- justifyContent: {
15
- control: {
16
- type: 'inline-radio',
17
- },
18
- options: ['flex-start', 'center', 'flex-end', 'space-between'],
19
- },
20
- gap: { control: { type: 'boolean' } },
21
- },
22
- args: {
23
- alignItems: undefined,
24
- justifyContent: undefined,
25
- children: (
26
- <>
27
- <Button label="Button" />
28
- <Text>Text</Text>
29
- </>
30
- ),
31
- },
32
- };
33
-
34
- const Template = (args) => (
35
- <Flex
36
- // eslint-disable-next-line react/jsx-props-no-spreading
37
- {...args}
38
- />
39
- );
40
-
41
- export const Default = Template.bind({});
42
-
43
- export const DefaultGap = Template.bind({});
44
- DefaultGap.args = { gap: true };
45
-
46
- export const CustomGap = Template.bind({});
47
- CustomGap.args = { gap: '50px' };
48
-
49
- export const Center = Template.bind({});
50
- Center.args = {
51
- height: '200px',
52
- alignItems: 'center',
53
- justifyContent: 'center',
54
- };
55
-
56
- export const SpaceBetween = Template.bind({});
57
- SpaceBetween.args = {
58
- justifyContent: 'space-between',
59
- };
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import styles from './form-row.module.less';
4
-
5
- export const FormRow = ({ children }) => {
6
- return <div className={styles.formRow}>{children}</div>;
7
- };
8
-
9
- FormRow.defaultProps = {
10
- children: null,
11
- };
12
-
13
- FormRow.propTypes = {
14
- children: PropTypes.node,
15
- };