@oliasoft-open-source/react-ui-library 2.4.8 → 3.0.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.
- package/README.md +0 -1
- package/dist/global.css +21840 -0
- package/dist/index.js +43567 -0
- package/package.json +37 -55
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -125
- package/.gitlab-ci.yml +0 -76
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -3
- package/.prettierrc +0 -4
- package/.storybook/main.js +0 -36
- package/.storybook/preview.js +0 -40
- package/.storybook/storybook.less +0 -8
- package/babel.config.js +0 -31
- package/index.js +0 -76
- package/jest.config.js +0 -9
- package/scripts/send-mattermost-message.sh +0 -21
- package/src/components/accordion/accordion.jsx +0 -132
- package/src/components/accordion/accordion.module.less +0 -66
- package/src/components/accordion/accordion.stories.jsx +0 -171
- package/src/components/accordion/chevron/chevron.jsx +0 -12
- package/src/components/accordion/chevron/chevron.module.less +0 -12
- package/src/components/accordion/helpers/accordion-with-default-toggle.jsx +0 -106
- package/src/components/accordion/helpers/accordion-with-default-toggle.module.less +0 -24
- package/src/components/actions/actions.jsx +0 -129
- package/src/components/actions/actions.module.less +0 -44
- package/src/components/actions/actions.shape.js +0 -32
- package/src/components/actions/actions.stories.jsx +0 -79
- package/src/components/badge/badge.jsx +0 -58
- package/src/components/badge/badge.module.less +0 -55
- package/src/components/badge/badge.stories.jsx +0 -31
- package/src/components/breadcrumb/breadcrumb.jsx +0 -49
- package/src/components/breadcrumb/breadcrumb.module.less +0 -39
- package/src/components/breadcrumb/breadcrumb.stories.jsx +0 -45
- package/src/components/breadcrumb/link.jsx +0 -31
- package/src/components/button/button.jsx +0 -156
- package/src/components/button/button.module.less +0 -300
- package/src/components/button/button.stories.jsx +0 -74
- package/src/components/button-group/button-group.jsx +0 -140
- package/src/components/button-group/button-group.module.less +0 -24
- package/src/components/button-group/button-group.stories-data.jsx +0 -67
- package/src/components/button-group/button-group.stories.jsx +0 -63
- package/src/components/buttons-and-links.stories.mdx +0 -55
- package/src/components/card/card.jsx +0 -51
- package/src/components/card/card.module.less +0 -48
- package/src/components/card/card.stories.jsx +0 -39
- package/src/components/check-box/check-box.jsx +0 -92
- package/src/components/check-box/check-box.module.less +0 -101
- package/src/components/check-box/check-box.stories.jsx +0 -27
- package/src/components/color/color.stories-data.jsx +0 -71
- package/src/components/color/color.stories.mdx +0 -37
- package/src/components/dialog/dialog.jsx +0 -77
- package/src/components/dialog/dialog.module.less +0 -76
- package/src/components/divider/divider.jsx +0 -40
- package/src/components/divider/divider.module.less +0 -28
- package/src/components/divider/divider.stories.jsx +0 -50
- package/src/components/drawer/drawer-resize-wrapper.jsx +0 -76
- package/src/components/drawer/drawer-tabs.jsx +0 -44
- package/src/components/drawer/drawer.jsx +0 -161
- package/src/components/drawer/drawer.module.less +0 -217
- package/src/components/drawer/drawer.stories.jsx +0 -296
- package/src/components/empty/empty.jsx +0 -52
- package/src/components/empty/empty.module.less +0 -17
- package/src/components/empty/empty.stories.jsx +0 -26
- package/src/components/file-input/file-input.jsx +0 -101
- package/src/components/file-input/file-input.module.less +0 -3
- package/src/components/file-input/file-input.stories.jsx +0 -109
- package/src/components/form/field.jsx +0 -96
- package/src/components/form/field.stories.jsx +0 -101
- package/src/components/form/form.module.less +0 -30
- package/src/components/form/form.stories.jsx +0 -191
- package/src/components/heading/heading.jsx +0 -105
- package/src/components/heading/heading.module.less +0 -59
- package/src/components/heading/heading.stories.jsx +0 -60
- package/src/components/icon/deprecated-icon.jsx +0 -97
- package/src/components/icon/icon.jsx +0 -71
- package/src/components/icon/icon.module.less +0 -33
- package/src/components/icon/icon.stories.jsx +0 -37
- package/src/components/icon/icons.example.module.less +0 -4
- package/src/components/input/input.jsx +0 -167
- package/src/components/input/input.module.less +0 -94
- package/src/components/input/input.stories.jsx +0 -28
- package/src/components/input-group/input-group-addon/input-group-addon.jsx +0 -36
- package/src/components/input-group/input-group-addon/input-group-addon.module.less +0 -31
- package/src/components/input-group/input-group.jsx +0 -51
- package/src/components/input-group/input-group.module.less +0 -10
- package/src/components/input-group/input-group.stories.jsx +0 -77
- package/src/components/input-validation.stories.mdx +0 -61
- package/src/components/inputs.stories.mdx +0 -201
- package/src/components/label/label.jsx +0 -115
- package/src/components/label/label.module.less +0 -43
- package/src/components/label/label.stories.jsx +0 -60
- package/src/components/layout/column/column.jsx +0 -85
- package/src/components/layout/column/styles.js +0 -45
- package/src/components/layout/column.stories.jsx +0 -60
- package/src/components/layout/examples/afe.stories.jsx +0 -180
- package/src/components/layout/examples/blowout.stories.jsx +0 -68
- package/src/components/layout/examples/casing-loads.stories.jsx +0 -297
- package/src/components/layout/examples/formation.stories.jsx +0 -110
- package/src/components/layout/examples/projects.stories.jsx +0 -108
- package/src/components/layout/examples/reservoirs.stories.jsx +0 -211
- package/src/components/layout/examples/site.stories.jsx +0 -263
- package/src/components/layout/flex/flex.jsx +0 -48
- package/src/components/layout/flex/flex.stories.jsx +0 -59
- package/src/components/layout/form-row/form-row.jsx +0 -15
- package/src/components/layout/form-row/form-row.module.less +0 -11
- package/src/components/layout/grid/grid.jsx +0 -62
- package/src/components/layout/grid/grid.stories.jsx +0 -67
- package/src/components/layout/page/page.jsx +0 -42
- package/src/components/layout/page/page.module.less +0 -27
- package/src/components/layout/page.stories.jsx +0 -93
- package/src/components/layout/placeholder.jsx +0 -2
- package/src/components/layout/print-header/print-header.jsx +0 -22
- package/src/components/layout/print-header/print-header.module.less +0 -9
- package/src/components/layout/row/row.jsx +0 -75
- package/src/components/layout/row/row.module.less +0 -7
- package/src/components/layout/spacer/spacer.jsx +0 -26
- package/src/components/layout/spacer/spacer.stories.jsx +0 -50
- package/src/components/layout-forms.stories.mdx +0 -104
- package/src/components/layout-general.stories.mdx +0 -215
- package/src/components/list/list-row/item-content.jsx +0 -15
- package/src/components/list/list-row/label.jsx +0 -11
- package/src/components/list/list-row/list-heading.jsx +0 -52
- package/src/components/list/list-row/list-row.jsx +0 -128
- package/src/components/list/list-row/list-subheading.jsx +0 -72
- package/src/components/list/list-row/meta-content.jsx +0 -24
- package/src/components/list/list-row/meta-count.jsx +0 -10
- package/src/components/list/list-row/name.jsx +0 -45
- package/src/components/list/list.jsx +0 -276
- package/src/components/list/list.module.less +0 -256
- package/src/components/list/list.stories-data.jsx +0 -287
- package/src/components/list/list.stories.jsx +0 -458
- package/src/components/list/toggle-narrow.jsx +0 -13
- package/src/components/loader/loader.jsx +0 -63
- package/src/components/loader/loader.module.less +0 -63
- package/src/components/loader/loader.stories.jsx +0 -155
- package/src/components/menu/index.js +0 -7
- package/src/components/menu/layer/divider.jsx +0 -4
- package/src/components/menu/layer/heading.jsx +0 -15
- package/src/components/menu/layer/layer.jsx +0 -82
- package/src/components/menu/layer/option.jsx +0 -77
- package/src/components/menu/layer/path.js +0 -44
- package/src/components/menu/layer/placementOptions.js +0 -6
- package/src/components/menu/layer/section.jsx +0 -66
- package/src/components/menu/menu.jsx +0 -359
- package/src/components/menu/menu.module.less +0 -241
- package/src/components/menu/menu.stories-data.jsx +0 -168
- package/src/components/menu/menu.stories.jsx +0 -126
- package/src/components/menu/menu.test.js +0 -58
- package/src/components/menu/trigger/button.jsx +0 -50
- package/src/components/menu/trigger/component.jsx +0 -14
- package/src/components/menu/trigger/text.jsx +0 -25
- package/src/components/menu/trigger/trigger.jsx +0 -86
- package/src/components/message/dismiss.jsx +0 -26
- package/src/components/message/message.jsx +0 -137
- package/src/components/message/message.module.less +0 -114
- package/src/components/message/message.stories.jsx +0 -84
- package/src/components/modal/modal.jsx +0 -50
- package/src/components/modal/modal.module.less +0 -39
- package/src/components/modal/modal.stories.jsx +0 -162
- package/src/components/option-dropdown/heading.jsx +0 -6
- package/src/components/option-dropdown/layer.jsx +0 -81
- package/src/components/option-dropdown/option-dropdown.jsx +0 -53
- package/src/components/option-dropdown/option-dropdown.module.less +0 -50
- package/src/components/option-dropdown/option-dropdown.stories.jsx +0 -35
- package/src/components/option-dropdown/option.jsx +0 -13
- package/src/components/pagination/pagination.jsx +0 -139
- package/src/components/pagination/pagination.module.less +0 -11
- package/src/components/pagination/pagination.stories.jsx +0 -78
- package/src/components/pagination/pagination.test.js +0 -92
- package/src/components/pagination/pagination.viewdata.js +0 -66
- package/src/components/pop-confirm/content.jsx +0 -25
- package/src/components/pop-confirm/pop-confirm.jsx +0 -61
- package/src/components/pop-confirm/pop-confirm.module.less +0 -18
- package/src/components/pop-confirm/pop-confirm.stories.jsx +0 -53
- package/src/components/popover/popover.jsx +0 -112
- package/src/components/popover/popover.module.less +0 -22
- package/src/components/popover/popover.stories.jsx +0 -59
- package/src/components/portal/portal.jsx +0 -16
- package/src/components/portal/portal.stories.jsx +0 -69
- package/src/components/progress-bar/progress-bar.jsx +0 -64
- package/src/components/progress-bar/progress-bar.module.less +0 -64
- package/src/components/progress-bar/progress-bar.stories.jsx +0 -23
- package/src/components/radio-button/radio-button.jsx +0 -139
- package/src/components/radio-button/radio-button.module.less +0 -135
- package/src/components/radio-button/radio-button.stories.jsx +0 -37
- package/src/components/radio-button/radio-input.jsx +0 -52
- package/src/components/select/custom-select/custom-select.jsx +0 -440
- package/src/components/select/custom-select/custom-select.module.less +0 -123
- package/src/components/select/custom-select/custom-select.reducer.js +0 -157
- package/src/components/select/custom-select/layer/heading.jsx +0 -13
- package/src/components/select/custom-select/layer/layer.jsx +0 -73
- package/src/components/select/custom-select/layer/option.jsx +0 -54
- package/src/components/select/custom-select/layer/placementOptions.js +0 -7
- package/src/components/select/custom-select/layer/section.jsx +0 -35
- package/src/components/select/custom-select/trigger/input.jsx +0 -100
- package/src/components/select/custom-select/trigger/trigger.jsx +0 -155
- package/src/components/select/custom-select/trigger/trigger.module.less +0 -289
- package/src/components/select/native-select/native-select.jsx +0 -198
- package/src/components/select/native-select/native-select.module.less +0 -107
- package/src/components/select/select.input.js +0 -146
- package/src/components/select/select.jsx +0 -207
- package/src/components/select/select.stories-data.jsx +0 -92
- package/src/components/select/select.stories.jsx +0 -135
- package/src/components/select/select.test.js +0 -519
- package/src/components/side-bar/container.module.less +0 -29
- package/src/components/side-bar/link.jsx +0 -83
- package/src/components/side-bar/sections.jsx +0 -23
- package/src/components/side-bar/side-bar.jsx +0 -102
- package/src/components/side-bar/side-bar.module.less +0 -137
- package/src/components/side-bar/side-bar.stories.jsx +0 -101
- package/src/components/slider/rc-slider.less +0 -47
- package/src/components/slider/slider-tooltip.jsx +0 -20
- package/src/components/slider/slider.jsx +0 -233
- package/src/components/slider/slider.module.less +0 -40
- package/src/components/slider/slider.stories.jsx +0 -110
- package/src/components/spinner/spinner.jsx +0 -37
- package/src/components/spinner/spinner.module.less +0 -115
- package/src/components/spinner/spinner.stories.jsx +0 -24
- package/src/components/table/cell/cell.jsx +0 -621
- package/src/components/table/cell/cell.module.less +0 -164
- package/src/components/table/footer/footer.jsx +0 -66
- package/src/components/table/footer/footer.module.less +0 -14
- package/src/components/table/helper.js +0 -64
- package/src/components/table/helper.test.js +0 -166
- package/src/components/table/icon/icon.module.less +0 -31
- package/src/components/table/row/expanded-content-row.jsx +0 -16
- package/src/components/table/row/row.jsx +0 -253
- package/src/components/table/row/row.module.less +0 -62
- package/src/components/table/table-scroll-wrapper.jsx +0 -49
- package/src/components/table/table.jsx +0 -234
- package/src/components/table/table.module.less +0 -146
- package/src/components/table/table.stories-data.jsx +0 -875
- package/src/components/table/table.stories.jsx +0 -759
- package/src/components/table/table.test.js +0 -30
- package/src/components/table/table.variables.less +0 -11
- package/src/components/table/table.viewdata.js +0 -26
- package/src/components/table/title/title.jsx +0 -30
- package/src/components/table/title/title.module.less +0 -11
- package/src/components/tabs/content.jsx +0 -14
- package/src/components/tabs/label.jsx +0 -50
- package/src/components/tabs/tabs.jsx +0 -191
- package/src/components/tabs/tabs.module.less +0 -73
- package/src/components/tabs/tabs.stories.jsx +0 -110
- package/src/components/text/text.jsx +0 -64
- package/src/components/text/text.module.less +0 -45
- package/src/components/text/text.stories.jsx +0 -31
- package/src/components/text-link/text-link.jsx +0 -23
- package/src/components/text-link/text-link.stories.jsx +0 -20
- package/src/components/textarea/textarea.jsx +0 -126
- package/src/components/textarea/textarea.module.less +0 -55
- package/src/components/textarea/textarea.stories.jsx +0 -26
- package/src/components/toaster/toaster.jsx +0 -39
- package/src/components/toaster/toaster.less +0 -17
- package/src/components/toaster/toaster.stories.jsx +0 -116
- package/src/components/toggle/toggle.jsx +0 -65
- package/src/components/toggle/toggle.module.less +0 -139
- package/src/components/toggle/toggle.stories.jsx +0 -26
- package/src/components/tooltip/tooltip-layer.jsx +0 -72
- package/src/components/tooltip/tooltip.jsx +0 -108
- package/src/components/tooltip/tooltip.module.less +0 -28
- package/src/components/tooltip/tooltip.stories.jsx +0 -71
- package/src/components/top-bar/element/element.jsx +0 -72
- package/src/components/top-bar/element/link.jsx +0 -29
- package/src/components/top-bar/title.jsx +0 -24
- package/src/components/top-bar/top-bar.jsx +0 -79
- package/src/components/top-bar/top-bar.module.less +0 -190
- package/src/components/top-bar/top-bar.stories.jsx +0 -137
- package/src/components/top-bar/warning.jsx +0 -6
- package/src/components/tree/tree-item.jsx +0 -79
- package/src/components/tree/tree-placeholder.jsx +0 -6
- package/src/components/tree/tree.jsx +0 -129
- package/src/components/tree/tree.module.less +0 -33
- package/src/components/tree/tree.stories-data.jsx +0 -89
- package/src/components/tree/tree.stories.jsx +0 -106
- package/src/docs/components/page/page.jsx +0 -16
- package/src/docs/config/config.js +0 -1
- package/src/docs/html/favicon.png +0 -0
- package/src/docs/html/index.html +0 -11
- package/src/docs/navigation/footer/footer.jsx +0 -48
- package/src/docs/navigation/header/header.jsx +0 -39
- package/src/docs/navigation/header/header.module.less +0 -32
- package/src/docs/navigation/routes/routes.jsx +0 -16
- package/src/docs/start.jsx +0 -12
- package/src/docs/views/main/main.jsx +0 -209
- package/src/docs/views/main/main.module.less +0 -14
- package/src/docs/views/not-found/not-found.jsx +0 -5
- package/src/helpers/disabled-context.js +0 -8
- package/src/helpers/styles.js +0 -68
- package/src/helpers/text.js +0 -6
- package/src/helpers/types.js +0 -5
- package/src/hooks/index.js +0 -3
- package/src/hooks/use-focus.js +0 -11
- package/src/hooks/use-keyboard-event.js +0 -16
- package/src/hooks/use-window-width.js +0 -20
- package/src/images/icons/icon-drop.png +0 -0
- package/src/images/icons/icon-share.png +0 -0
- package/src/images/icons/icons8-junction.svg +0 -4
- package/src/images/logo.png +0 -0
- package/src/images/logo.svg +0 -13
- package/src/images/oliasoft-logo.svg +0 -1
- package/src/style/colors.less +0 -26
- package/src/style/external.less +0 -10
- package/src/style/fonts/lato/Lato-Bold.woff2 +0 -0
- package/src/style/fonts/lato/Lato-BoldItalic.woff2 +0 -0
- package/src/style/fonts/lato/Lato-Italic.woff2 +0 -0
- package/src/style/fonts/lato/Lato-Regular.woff2 +0 -0
- package/src/style/fonts.less +0 -27
- package/src/style/global.less +0 -51
- package/src/style/mixins.less +0 -68
- package/src/style/reset/reset.less +0 -34
- package/src/style/shared.less +0 -25
- package/src/style/theme.dark.less +0 -37
- package/src/style/theme.default.less +0 -74
- package/src/style/variables.less +0 -49
- package/webpack/webpack.common.js +0 -39
- package/webpack/webpack.common.rules.js +0 -102
- package/webpack/webpack.dev.js +0 -22
- package/webpack/webpack.prod.js +0 -23
- package/webpack/webpack.resolve.js +0 -22
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
@import '../../../style/variables.less';
|
|
2
|
-
@import '../../../style/mixins.less';
|
|
3
|
-
@import '../table.variables.less';
|
|
4
|
-
|
|
5
|
-
.cellWrapper {
|
|
6
|
-
.cellWrapperPadding();
|
|
7
|
-
|
|
8
|
-
a {
|
|
9
|
-
color: var(--color-text-primary) !important;
|
|
10
|
-
&:hover {
|
|
11
|
-
color: var(--color-text-primary-hover) !important;
|
|
12
|
-
}
|
|
13
|
-
&:active {
|
|
14
|
-
color: var(--color-text-primary-active) !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.disabledLink {
|
|
18
|
-
color: var(--color-text-faint) !important;
|
|
19
|
-
cursor: default !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.inputWrapper {
|
|
25
|
-
margin: -1px;
|
|
26
|
-
height: calc(100% + 2px);
|
|
27
|
-
border-radius: inherit;
|
|
28
|
-
|
|
29
|
-
// Fix for full height custom Select
|
|
30
|
-
> span,
|
|
31
|
-
> span > span,
|
|
32
|
-
> span > span > div {
|
|
33
|
-
height: 100%;
|
|
34
|
-
border-radius: inherit;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Fix for full height Input
|
|
38
|
-
> div,
|
|
39
|
-
> div > span {
|
|
40
|
-
height: 100%;
|
|
41
|
-
border-radius: inherit;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.breakWord {
|
|
46
|
-
word-break: break-word;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.inputCell {
|
|
50
|
-
padding: 0 !important;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.sliderCell {
|
|
54
|
-
padding-top: 0 !important;
|
|
55
|
-
padding-bottom: 0 !important;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.staticCell {
|
|
59
|
-
padding: 0 !important;
|
|
60
|
-
|
|
61
|
-
.staticCellContent {
|
|
62
|
-
min-height: 100%;
|
|
63
|
-
.cellWrapperPadding();
|
|
64
|
-
line-height: 17px;
|
|
65
|
-
position: relative;
|
|
66
|
-
border-radius: inherit;
|
|
67
|
-
|
|
68
|
-
&.error,
|
|
69
|
-
&.warning {
|
|
70
|
-
border: 1px solid transparent;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&.error {
|
|
74
|
-
.inputError();
|
|
75
|
-
}
|
|
76
|
-
&.warning {
|
|
77
|
-
.inputWarning();
|
|
78
|
-
}
|
|
79
|
-
&.unit {
|
|
80
|
-
font-weight: normal;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.sortingCell {
|
|
86
|
-
.staticCellContent {
|
|
87
|
-
position: relative;
|
|
88
|
-
padding-right: 45px !important;
|
|
89
|
-
cursor: pointer !important;
|
|
90
|
-
|
|
91
|
-
&:hover {
|
|
92
|
-
background-color: rgba(0, 0, 0, 0.05) !important;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.sortingCellIcon {
|
|
97
|
-
font-size: 20px;
|
|
98
|
-
position: absolute;
|
|
99
|
-
right: @input_padding_x - 4px;
|
|
100
|
-
top: 50%;
|
|
101
|
-
transform: translateY(-50%);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.icon {
|
|
106
|
-
display: inline-block;
|
|
107
|
-
margin-left: 8px;
|
|
108
|
-
position: relative;
|
|
109
|
-
top: 1px;
|
|
110
|
-
font-size: 13px;
|
|
111
|
-
color: var(--color-text-faint);
|
|
112
|
-
|
|
113
|
-
&:hover {
|
|
114
|
-
color: var(--color-text-muted);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&.clickable {
|
|
118
|
-
&:hover {
|
|
119
|
-
cursor: pointer;
|
|
120
|
-
color: var(--color-text-primary-hover);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.checkBoxCell {
|
|
126
|
-
padding-top: 0 !important;
|
|
127
|
-
padding-bottom: 0 !important;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.iconCell {
|
|
131
|
-
width: 37px;
|
|
132
|
-
text-align: center;
|
|
133
|
-
padding: 0 !important;
|
|
134
|
-
|
|
135
|
-
.iconWrapper {
|
|
136
|
-
display: flex;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.actionsCell {
|
|
142
|
-
width: 24px;
|
|
143
|
-
padding: 0 6px !important;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.rightAligned {
|
|
147
|
-
text-align: right !important;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.centerAligned {
|
|
151
|
-
text-align: center !important;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.leftAligned {
|
|
155
|
-
text-align: left !important;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.popover {
|
|
159
|
-
padding: @input_padding_y @input_padding_x;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.disabledPointerEvents {
|
|
163
|
-
pointer-events: none;
|
|
164
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import styles from './footer.module.less';
|
|
4
|
-
import { Pagination, paginationShape } from '../../pagination/pagination';
|
|
5
|
-
import { Actions } from '../../actions/actions';
|
|
6
|
-
import { actionsShape } from '../../actions/actions.shape';
|
|
7
|
-
|
|
8
|
-
export const Footer = (props) => {
|
|
9
|
-
const { colSpan, pagination, actions, content } = props;
|
|
10
|
-
const hasActions = actions && actions.length;
|
|
11
|
-
const hasContent = content != null;
|
|
12
|
-
|
|
13
|
-
const hasPagination = () => {
|
|
14
|
-
if (pagination) {
|
|
15
|
-
const { rowCount, rowsPerPage } = pagination;
|
|
16
|
-
const minRows = rowsPerPage.options[0].value;
|
|
17
|
-
return rowCount > minRows;
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const showFooter = hasActions || hasContent || hasPagination();
|
|
23
|
-
|
|
24
|
-
return showFooter ? (
|
|
25
|
-
<tfoot>
|
|
26
|
-
{hasContent ? (
|
|
27
|
-
<tr>
|
|
28
|
-
<td colSpan={colSpan}>
|
|
29
|
-
<div className={styles.footer}>
|
|
30
|
-
<div>{content}</div>
|
|
31
|
-
</div>
|
|
32
|
-
</td>
|
|
33
|
-
</tr>
|
|
34
|
-
) : null}
|
|
35
|
-
{hasActions || hasPagination() ? (
|
|
36
|
-
<tr>
|
|
37
|
-
<td colSpan={colSpan}>
|
|
38
|
-
<div className={styles.footer}>
|
|
39
|
-
{hasPagination() ? (
|
|
40
|
-
<Pagination pagination={pagination} />
|
|
41
|
-
) : (
|
|
42
|
-
<div />
|
|
43
|
-
)}
|
|
44
|
-
<div>
|
|
45
|
-
<Actions actions={actions} isBlockElement />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</td>
|
|
49
|
-
</tr>
|
|
50
|
-
) : null}
|
|
51
|
-
</tfoot>
|
|
52
|
-
) : null;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
Footer.defaultProps = {
|
|
56
|
-
actions: [],
|
|
57
|
-
pagination: null,
|
|
58
|
-
content: null,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
Footer.propTypes = {
|
|
62
|
-
actions: actionsShape,
|
|
63
|
-
colSpan: PropTypes.number.isRequired,
|
|
64
|
-
pagination: paginationShape,
|
|
65
|
-
content: PropTypes.object,
|
|
66
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { isArray } from 'lodash';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* getCellAlignment - returns string or class name
|
|
5
|
-
* @param {{
|
|
6
|
-
* bodyAlignment: {string|undefined},
|
|
7
|
-
* headerAlignment: {string|undefined},
|
|
8
|
-
* isHeader: {boolean},
|
|
9
|
-
* }} alignment - body cell alignment
|
|
10
|
-
* @param {boolean} isGetText - get text for example ('left', 'right' or 'center') or class name. Default value false.
|
|
11
|
-
* @returns {string|null}
|
|
12
|
-
*/
|
|
13
|
-
export const getCellAlignment = (alignment, styles, isGetText = false) => {
|
|
14
|
-
if (!alignment) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const { bodyAlignment, headerAlignment, isHeader } = alignment;
|
|
19
|
-
const left = 'left';
|
|
20
|
-
const right = 'right';
|
|
21
|
-
const center = 'center';
|
|
22
|
-
const cellAlignment = isHeader ? headerAlignment : bodyAlignment;
|
|
23
|
-
|
|
24
|
-
switch (cellAlignment) {
|
|
25
|
-
case left: {
|
|
26
|
-
return isGetText ? left : styles.leftAligned;
|
|
27
|
-
}
|
|
28
|
-
case right: {
|
|
29
|
-
return isGetText ? right : styles.rightAligned;
|
|
30
|
-
}
|
|
31
|
-
case center: {
|
|
32
|
-
return isGetText ? center : styles.centerAligned;
|
|
33
|
-
}
|
|
34
|
-
default: {
|
|
35
|
-
return isGetText ? left : styles.leftAligned;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Returns alignments or empty array
|
|
42
|
-
* @param {array} alignments can be array of arrays or array of strings
|
|
43
|
-
* @param {isHeader} isHeader
|
|
44
|
-
* @param {number} rowIndex
|
|
45
|
-
* @returns {array}
|
|
46
|
-
*/
|
|
47
|
-
export const getHeaderAlignment = (alignments, isHeader, rowIndex) => {
|
|
48
|
-
if (!alignments) {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const isArrays = alignments.every((alignment) => isArray(alignment));
|
|
53
|
-
const isStrings = alignments.every(
|
|
54
|
-
(alignment) => typeof alignment === 'string',
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
if (isArrays) {
|
|
58
|
-
return isHeader ? alignments[rowIndex] || [] : [];
|
|
59
|
-
} else if (isStrings) {
|
|
60
|
-
return alignments;
|
|
61
|
-
} else {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
};
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { getCellAlignment, getHeaderAlignment } from './helper';
|
|
2
|
-
|
|
3
|
-
const styles = {
|
|
4
|
-
leftAligned: 'cell-module-leftAligned-eBFS4',
|
|
5
|
-
rightAligned: 'cell-module-rightAligned-ahWpT',
|
|
6
|
-
centerAligned: 'cell-module-centerAligned-_ktBT',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
describe('helper', () => {
|
|
10
|
-
describe('getCellAlignment', () => {
|
|
11
|
-
test('should return style alignment for header row', () => {
|
|
12
|
-
const alignment = {
|
|
13
|
-
bodyAlignment: undefined,
|
|
14
|
-
headerAlignment: 'right',
|
|
15
|
-
isHeader: true,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const result = getCellAlignment(alignment, styles);
|
|
19
|
-
|
|
20
|
-
expect(result).toBe('cell-module-rightAligned-ahWpT');
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
test('should return text alignment for header row', () => {
|
|
24
|
-
const alignment = {
|
|
25
|
-
bodyAlignment: undefined,
|
|
26
|
-
headerAlignment: 'right',
|
|
27
|
-
isHeader: true,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const result = getCellAlignment(alignment, styles, true);
|
|
31
|
-
|
|
32
|
-
expect(result).toBe('right');
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
test('should return default text alignment', () => {
|
|
36
|
-
const alignment = {
|
|
37
|
-
bodyAlignment: undefined,
|
|
38
|
-
headerAlignment: undefined,
|
|
39
|
-
isHeader: false,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const result = getCellAlignment(alignment, styles, true);
|
|
43
|
-
|
|
44
|
-
expect(result).toBe('left');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
test('should return default style alignment', () => {
|
|
48
|
-
const alignment = {
|
|
49
|
-
bodyAlignment: undefined,
|
|
50
|
-
headerAlignment: undefined,
|
|
51
|
-
isHeader: false,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const result = getCellAlignment(alignment, styles);
|
|
55
|
-
|
|
56
|
-
expect(result).toBe('cell-module-leftAligned-eBFS4');
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
test('should return style alignment for body row', () => {
|
|
60
|
-
const alignment = {
|
|
61
|
-
bodyAlignment: 'center',
|
|
62
|
-
headerAlignment: undefined,
|
|
63
|
-
isHeader: false,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const result = getCellAlignment(alignment, styles);
|
|
67
|
-
|
|
68
|
-
expect(result).toBe('cell-module-centerAligned-_ktBT');
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('should return default style alignment for header row', () => {
|
|
72
|
-
const alignment = {
|
|
73
|
-
bodyAlignment: undefined,
|
|
74
|
-
headerAlignment: undefined,
|
|
75
|
-
isHeader: true,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const result = getCellAlignment(alignment, styles);
|
|
79
|
-
|
|
80
|
-
expect(result).toBe('cell-module-leftAligned-eBFS4');
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
test('should return null when set no arguments', () => {
|
|
84
|
-
const result = getCellAlignment();
|
|
85
|
-
|
|
86
|
-
expect(result).toBe(null);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
describe('getHeaderAlignment', () => {
|
|
91
|
-
test('should return array of alignments when was set array of arrays', () => {
|
|
92
|
-
const aligments = [
|
|
93
|
-
['right', 'center', 'right'],
|
|
94
|
-
['right', 'center', 'left', 'left', 'left', 'left', 'left', 'left'],
|
|
95
|
-
['right', 'center', 'left', 'left', 'right', 'left', 'left', 'left'],
|
|
96
|
-
];
|
|
97
|
-
|
|
98
|
-
const result = getHeaderAlignment(aligments, true, 2);
|
|
99
|
-
|
|
100
|
-
expect(result).toEqual([
|
|
101
|
-
'right',
|
|
102
|
-
'center',
|
|
103
|
-
'left',
|
|
104
|
-
'left',
|
|
105
|
-
'right',
|
|
106
|
-
'left',
|
|
107
|
-
'left',
|
|
108
|
-
'left',
|
|
109
|
-
]);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
test('should return array of alignments when was set array of strings', () => {
|
|
113
|
-
const aligments = [
|
|
114
|
-
'center',
|
|
115
|
-
'center',
|
|
116
|
-
'center',
|
|
117
|
-
'left',
|
|
118
|
-
'left',
|
|
119
|
-
'left',
|
|
120
|
-
'right',
|
|
121
|
-
'left',
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
const result = getHeaderAlignment(aligments);
|
|
125
|
-
|
|
126
|
-
expect(result).toEqual([
|
|
127
|
-
'center',
|
|
128
|
-
'center',
|
|
129
|
-
'center',
|
|
130
|
-
'left',
|
|
131
|
-
'left',
|
|
132
|
-
'left',
|
|
133
|
-
'right',
|
|
134
|
-
'left',
|
|
135
|
-
]);
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
test('should return empty array when was set empty array', () => {
|
|
139
|
-
const result = getHeaderAlignment([]);
|
|
140
|
-
|
|
141
|
-
expect(result).toEqual([]);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
test('should return empty array when set falsy values or set no arguments', () => {
|
|
145
|
-
const result1 = getHeaderAlignment(null);
|
|
146
|
-
|
|
147
|
-
expect(result1).toEqual([]);
|
|
148
|
-
|
|
149
|
-
const result2 = getHeaderAlignment(undefined);
|
|
150
|
-
|
|
151
|
-
expect(result2).toEqual([]);
|
|
152
|
-
|
|
153
|
-
const result3 = getHeaderAlignment(false);
|
|
154
|
-
|
|
155
|
-
expect(result3).toEqual([]);
|
|
156
|
-
|
|
157
|
-
const result4 = getHeaderAlignment('');
|
|
158
|
-
|
|
159
|
-
expect(result4).toEqual([]);
|
|
160
|
-
|
|
161
|
-
const result5 = getHeaderAlignment();
|
|
162
|
-
|
|
163
|
-
expect(result5).toEqual([]);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@import '../../../style/variables.less';
|
|
2
|
-
|
|
3
|
-
.icon {
|
|
4
|
-
color: var(--color-text-faint);
|
|
5
|
-
margin: 0;
|
|
6
|
-
transition: color 0.2s;
|
|
7
|
-
|
|
8
|
-
&:hover {
|
|
9
|
-
color: var(--color-text-primary-hover);
|
|
10
|
-
}
|
|
11
|
-
&:active {
|
|
12
|
-
color: var(--color-text-primary-active);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.disabled {
|
|
17
|
-
&:hover,
|
|
18
|
-
&:active {
|
|
19
|
-
color: var(--color-text-faint);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.noHighlight {
|
|
24
|
-
i {
|
|
25
|
-
&:hover {
|
|
26
|
-
cursor: default !important;
|
|
27
|
-
background-color: inherit !important;
|
|
28
|
-
color: var(--color-text-faint) !important;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import styles from './row.module.less';
|
|
4
|
-
|
|
5
|
-
export const ExpandedContentRow = ({ colSpan, children, flush }) => {
|
|
6
|
-
return (
|
|
7
|
-
<tr>
|
|
8
|
-
<td
|
|
9
|
-
colSpan={colSpan}
|
|
10
|
-
className={cx(styles.expandableRow, flush ? styles.flush : '')}
|
|
11
|
-
>
|
|
12
|
-
{children}
|
|
13
|
-
</td>
|
|
14
|
-
</tr>
|
|
15
|
-
);
|
|
16
|
-
};
|