@oliasoft-open-source/react-ui-library 2.4.7 → 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 -617
- 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 -874
- 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,168 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FaChessKing, FaPencilAlt, FaTrash } from 'react-icons/fa';
|
|
3
|
-
|
|
4
|
-
const onFileChange = async (selectedFiles) => {
|
|
5
|
-
await console.log('onFileChange', selectedFiles);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const menu = {
|
|
9
|
-
label: 'Select',
|
|
10
|
-
trigger: 'DropDownButton',
|
|
11
|
-
sections: [
|
|
12
|
-
{ type: 'Heading', label: 'Heading' },
|
|
13
|
-
{
|
|
14
|
-
type: 'Option',
|
|
15
|
-
label: 'King',
|
|
16
|
-
onClick: () => {},
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
type: 'Option',
|
|
20
|
-
label: 'Queen',
|
|
21
|
-
selected: true,
|
|
22
|
-
onClick: () => {},
|
|
23
|
-
},
|
|
24
|
-
{ type: 'Divider' },
|
|
25
|
-
{
|
|
26
|
-
type: 'Option',
|
|
27
|
-
label: 'Knight',
|
|
28
|
-
disabled: true,
|
|
29
|
-
onClick: () => {},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: 'Option',
|
|
33
|
-
label: 'Bishop',
|
|
34
|
-
onClick: () => {},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const menuFileUpload = {
|
|
40
|
-
...menu,
|
|
41
|
-
sections: menu.sections.map((section) =>
|
|
42
|
-
section.type === 'Option'
|
|
43
|
-
? {
|
|
44
|
-
...section,
|
|
45
|
-
onClick: undefined,
|
|
46
|
-
onChange: onFileChange,
|
|
47
|
-
upload: true,
|
|
48
|
-
}
|
|
49
|
-
: section,
|
|
50
|
-
),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const menuDescriptionOnRight = {
|
|
54
|
-
label: '123 m',
|
|
55
|
-
trigger: 'DropDownButton',
|
|
56
|
-
sections: [
|
|
57
|
-
{
|
|
58
|
-
type: 'Option',
|
|
59
|
-
label: '403.5433',
|
|
60
|
-
description: 'ft',
|
|
61
|
-
inline: true,
|
|
62
|
-
onClick: () => {},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: 'Option',
|
|
66
|
-
label: '123',
|
|
67
|
-
description: 'm',
|
|
68
|
-
inline: true,
|
|
69
|
-
onClick: () => {},
|
|
70
|
-
selected: true,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: 'Option',
|
|
74
|
-
label: '0.123',
|
|
75
|
-
description: 'km',
|
|
76
|
-
inline: true,
|
|
77
|
-
onClick: () => {},
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const actions = [
|
|
83
|
-
{
|
|
84
|
-
label: 'Delete',
|
|
85
|
-
icon: <FaTrash />,
|
|
86
|
-
onClick: () => {},
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: 'Rename',
|
|
90
|
-
icon: <FaPencilAlt />,
|
|
91
|
-
onClick: () => {},
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
export const menuActions = {
|
|
96
|
-
...menu,
|
|
97
|
-
sections: menu.sections.map((section) =>
|
|
98
|
-
section.type === 'Option'
|
|
99
|
-
? {
|
|
100
|
-
...section,
|
|
101
|
-
inline: true,
|
|
102
|
-
actions,
|
|
103
|
-
}
|
|
104
|
-
: section,
|
|
105
|
-
),
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export const menuIcons = {
|
|
109
|
-
...menu,
|
|
110
|
-
sections: menu.sections.map((section) =>
|
|
111
|
-
section.type === 'Option' || section.type === 'Heading'
|
|
112
|
-
? {
|
|
113
|
-
...section,
|
|
114
|
-
icon: <FaChessKing />,
|
|
115
|
-
onClick: () => {},
|
|
116
|
-
}
|
|
117
|
-
: section,
|
|
118
|
-
),
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const menuSubmenus = {
|
|
122
|
-
...menu,
|
|
123
|
-
sections: Array(3).fill({
|
|
124
|
-
type: 'Menu',
|
|
125
|
-
trigger: 'Text',
|
|
126
|
-
menu: {
|
|
127
|
-
trigger: 'Text',
|
|
128
|
-
placement: 'right-start',
|
|
129
|
-
label: 'Parent',
|
|
130
|
-
sections: Array(3).fill({
|
|
131
|
-
type: 'Option',
|
|
132
|
-
label: 'Child',
|
|
133
|
-
onClick: () => {},
|
|
134
|
-
}),
|
|
135
|
-
},
|
|
136
|
-
}),
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export const menuEmpty = {
|
|
140
|
-
label: 'No sections',
|
|
141
|
-
trigger: 'DropDownButton',
|
|
142
|
-
sections: [],
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export const menuShowAll = {
|
|
146
|
-
label: 'Select',
|
|
147
|
-
trigger: 'DropDownButton',
|
|
148
|
-
showAllButton: {
|
|
149
|
-
visible: true,
|
|
150
|
-
showAllTitle: 'Show all...',
|
|
151
|
-
showLessTitle: 'Show less...',
|
|
152
|
-
additionalSections: [
|
|
153
|
-
{
|
|
154
|
-
type: 'Divider',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
type: 'Option',
|
|
158
|
-
label: 'This item is always shown',
|
|
159
|
-
onClick: () => {},
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
},
|
|
163
|
-
sections: Array(8).fill({
|
|
164
|
-
type: 'Option',
|
|
165
|
-
label: 'Item',
|
|
166
|
-
onClick: () => {},
|
|
167
|
-
}),
|
|
168
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { FaCog } from 'react-icons/fa';
|
|
3
|
-
import { Menu, Button, Flex } from '../../..';
|
|
4
|
-
import * as storyData from './menu.stories-data';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Basic/Menu',
|
|
8
|
-
component: Menu,
|
|
9
|
-
args: {
|
|
10
|
-
menu: storyData.menu,
|
|
11
|
-
maxHeight: '300px',
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const Template = (args) => (
|
|
16
|
-
<Menu
|
|
17
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
18
|
-
{...args}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
export const Default = Template.bind({});
|
|
22
|
-
|
|
23
|
-
export const PrimaryTrigger = Template.bind({});
|
|
24
|
-
PrimaryTrigger.args = { menu: { ...storyData.menu, colored: true } };
|
|
25
|
-
|
|
26
|
-
export const ErrorTrigger = Template.bind({});
|
|
27
|
-
ErrorTrigger.args = { menu: { ...storyData.menu, colored: 'danger' } };
|
|
28
|
-
|
|
29
|
-
export const TextTrigger = Template.bind({});
|
|
30
|
-
TextTrigger.args = { menu: { ...storyData.menu, trigger: 'Text' } };
|
|
31
|
-
|
|
32
|
-
export const CustomTrigger = Template.bind({});
|
|
33
|
-
CustomTrigger.args = {
|
|
34
|
-
menu: {
|
|
35
|
-
...storyData.menu,
|
|
36
|
-
trigger: 'Component',
|
|
37
|
-
component: (
|
|
38
|
-
<div>
|
|
39
|
-
<FaCog />
|
|
40
|
-
</div>
|
|
41
|
-
),
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const FileUpload = Template.bind({});
|
|
46
|
-
FileUpload.args = { menu: storyData.menuFileUpload };
|
|
47
|
-
|
|
48
|
-
export const DescriptionOnRight = Template.bind({});
|
|
49
|
-
DescriptionOnRight.args = { menu: storyData.menuDescriptionOnRight };
|
|
50
|
-
|
|
51
|
-
export const Actions = Template.bind({});
|
|
52
|
-
Actions.args = { menu: storyData.menuActions };
|
|
53
|
-
|
|
54
|
-
export const Icons = Template.bind({});
|
|
55
|
-
Icons.args = { menu: storyData.menuIcons };
|
|
56
|
-
|
|
57
|
-
export const Disabled = Template.bind({});
|
|
58
|
-
Disabled.args = {
|
|
59
|
-
disabled: true,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Loading = Template.bind({});
|
|
63
|
-
Loading.args = {
|
|
64
|
-
loading: true,
|
|
65
|
-
disabled: true,
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const Badge = Template.bind({});
|
|
69
|
-
Badge.args = {
|
|
70
|
-
badgeTitle: '3',
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const Dot = Template.bind({});
|
|
74
|
-
Dot.args = {
|
|
75
|
-
badgeDot: true,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export const Empty = Template.bind({});
|
|
79
|
-
Empty.args = { menu: storyData.menuEmpty };
|
|
80
|
-
|
|
81
|
-
export const Submenus = Template.bind({});
|
|
82
|
-
Submenus.args = { menu: storyData.menuSubmenus };
|
|
83
|
-
|
|
84
|
-
export const WithoutCloseOnOptionClick = Template.bind({});
|
|
85
|
-
WithoutCloseOnOptionClick.args = { closeOnOptionClick: false };
|
|
86
|
-
|
|
87
|
-
export const RightClickContextMenu = Template.bind({});
|
|
88
|
-
RightClickContextMenu.args = {
|
|
89
|
-
contextMenu: true,
|
|
90
|
-
menu: { ...storyData.menu, trigger: 'Text', label: 'Right-click me' },
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const FullWidth = Template.bind({});
|
|
94
|
-
FullWidth.args = {
|
|
95
|
-
width: '100%',
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const Small = Template.bind({});
|
|
99
|
-
Small.args = {
|
|
100
|
-
menu: { ...storyData.menu, small: true },
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export const JSXContent = Template.bind({});
|
|
104
|
-
JSXContent.args = {
|
|
105
|
-
menu: {
|
|
106
|
-
...storyData.menu,
|
|
107
|
-
sections: <div>Testing</div>,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const ShowAll = Template.bind({});
|
|
112
|
-
ShowAll.args = {
|
|
113
|
-
menu: storyData.menuShowAll,
|
|
114
|
-
maxHeight: undefined,
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const ControlOpenStateFromParent = () => {
|
|
118
|
-
const [open, setOpen] = useState(false);
|
|
119
|
-
return (
|
|
120
|
-
<Flex gap>
|
|
121
|
-
<Menu menu={storyData.menu} open={open} setOpen={setOpen} />
|
|
122
|
-
<Button label="Open" onClick={() => setOpen(true)} disabled={open} />
|
|
123
|
-
<Button label="Close" onClick={() => setOpen(false)} disabled={!open} />
|
|
124
|
-
</Flex>
|
|
125
|
-
);
|
|
126
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
childPath,
|
|
3
|
-
parentPath,
|
|
4
|
-
closePath,
|
|
5
|
-
siblings,
|
|
6
|
-
registerClose,
|
|
7
|
-
} from './layer/path';
|
|
8
|
-
|
|
9
|
-
const tree = {
|
|
10
|
-
close: () => {},
|
|
11
|
-
sections: [
|
|
12
|
-
null,
|
|
13
|
-
null,
|
|
14
|
-
{
|
|
15
|
-
close: () => {},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
close: () => {},
|
|
19
|
-
sections: [
|
|
20
|
-
null,
|
|
21
|
-
null,
|
|
22
|
-
null,
|
|
23
|
-
{
|
|
24
|
-
close: () => {},
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
describe('menu paths', () => {
|
|
32
|
-
test('parentPath', () => {
|
|
33
|
-
expect(parentPath('')).toBe('');
|
|
34
|
-
expect(parentPath('foo.bar.baz')).toBe('foo.bar.baz');
|
|
35
|
-
expect(parentPath('foo.bar[45]')).toBe('foo.bar');
|
|
36
|
-
});
|
|
37
|
-
test('childPath', () => {
|
|
38
|
-
expect(childPath('', 6)).toBe('sections[6]');
|
|
39
|
-
expect(childPath('foo', 2)).toBe('foo.sections[2]');
|
|
40
|
-
});
|
|
41
|
-
test('closePath', () => {
|
|
42
|
-
expect(closePath('')).toBe('close');
|
|
43
|
-
expect(closePath('foo.bar.baz')).toBe('foo.bar.baz.close');
|
|
44
|
-
});
|
|
45
|
-
test('siblings', () => {
|
|
46
|
-
expect(siblings(tree, 'sections[3].sections[3]')).toStrictEqual(
|
|
47
|
-
tree.sections[3].sections,
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
test('registerClose', () => {
|
|
51
|
-
expect(registerClose(tree, 'sections[3]', 'monkeys')).toStrictEqual({
|
|
52
|
-
...tree,
|
|
53
|
-
sections: tree.sections.map((s, i) =>
|
|
54
|
-
i === 3 ? { ...s, close: 'monkeys' } : s,
|
|
55
|
-
),
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import { FaAngleDown } from 'react-icons/fa';
|
|
4
|
-
import styles from '../menu.module.less';
|
|
5
|
-
import { Button as BasicButton } from '../../button/button';
|
|
6
|
-
import { DisabledContext } from '../../../helpers/disabled-context';
|
|
7
|
-
|
|
8
|
-
export const Button = ({
|
|
9
|
-
trigger,
|
|
10
|
-
label,
|
|
11
|
-
colored,
|
|
12
|
-
small,
|
|
13
|
-
width,
|
|
14
|
-
disabled,
|
|
15
|
-
groupOrder,
|
|
16
|
-
loading,
|
|
17
|
-
}) => {
|
|
18
|
-
const disabledContext = useContext(DisabledContext);
|
|
19
|
-
|
|
20
|
-
const buttonLabel =
|
|
21
|
-
trigger === 'Button' ? (
|
|
22
|
-
label
|
|
23
|
-
) : trigger === 'DropDownButton' ? (
|
|
24
|
-
<span className={styles.middleAlignedInline}>
|
|
25
|
-
<span className={styles.buttonLabel}>{label}</span>
|
|
26
|
-
<FaAngleDown className={styles.buttonCaret} />
|
|
27
|
-
</span>
|
|
28
|
-
) : null;
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div
|
|
32
|
-
className={cx(
|
|
33
|
-
styles.trigger,
|
|
34
|
-
disabled || disabledContext ? styles.disabled : null,
|
|
35
|
-
)}
|
|
36
|
-
style={{ width }}
|
|
37
|
-
>
|
|
38
|
-
<BasicButton
|
|
39
|
-
label={buttonLabel}
|
|
40
|
-
colored={colored}
|
|
41
|
-
small={small}
|
|
42
|
-
width={width}
|
|
43
|
-
groupOrder={groupOrder}
|
|
44
|
-
onClick={() => {} /*handled in parent*/}
|
|
45
|
-
loading={loading}
|
|
46
|
-
disabled={disabled}
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import styles from '../menu.module.less';
|
|
4
|
-
|
|
5
|
-
export const Component = ({ component, disabled, testId }) => {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
className={cx(styles.component, disabled ? styles.disabled : null)}
|
|
9
|
-
data-testid={testId}
|
|
10
|
-
>
|
|
11
|
-
{component}
|
|
12
|
-
</div>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import { FaAngleDown, FaAngleRight } from 'react-icons/fa';
|
|
4
|
-
import styles from '../menu.module.less';
|
|
5
|
-
|
|
6
|
-
export const Text = ({ label, carat, disabled, isOpen }) => {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cx(
|
|
10
|
-
styles.trigger,
|
|
11
|
-
disabled ? styles.disabled : null,
|
|
12
|
-
isOpen ? styles.active : null,
|
|
13
|
-
)}
|
|
14
|
-
>
|
|
15
|
-
<span className={styles.label} title={label}>
|
|
16
|
-
{label}
|
|
17
|
-
</span>
|
|
18
|
-
{carat && carat === 'right' ? (
|
|
19
|
-
<FaAngleRight className={styles.arrow} />
|
|
20
|
-
) : carat && carat === 'down' ? (
|
|
21
|
-
<FaAngleDown className={styles.arrow} />
|
|
22
|
-
) : null}
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Badge } from '../../badge/badge';
|
|
3
|
-
import { Button } from './button';
|
|
4
|
-
import { Text } from './text';
|
|
5
|
-
import { Component } from './component';
|
|
6
|
-
import styles from '../menu.module.less';
|
|
7
|
-
|
|
8
|
-
export const Trigger = React.forwardRef(
|
|
9
|
-
(
|
|
10
|
-
{
|
|
11
|
-
isDisabled,
|
|
12
|
-
badgeTitle,
|
|
13
|
-
badgeDot,
|
|
14
|
-
loading,
|
|
15
|
-
width,
|
|
16
|
-
trigger,
|
|
17
|
-
label,
|
|
18
|
-
onClickTrigger,
|
|
19
|
-
colored,
|
|
20
|
-
small,
|
|
21
|
-
isNested,
|
|
22
|
-
contextMenu,
|
|
23
|
-
component,
|
|
24
|
-
groupOrder,
|
|
25
|
-
fullHeight,
|
|
26
|
-
isOpen,
|
|
27
|
-
testId,
|
|
28
|
-
},
|
|
29
|
-
ref,
|
|
30
|
-
) => {
|
|
31
|
-
const triggerElement =
|
|
32
|
-
trigger === 'Button' || trigger === 'DropDownButton' ? (
|
|
33
|
-
<Button
|
|
34
|
-
trigger={trigger}
|
|
35
|
-
label={label}
|
|
36
|
-
colored={colored}
|
|
37
|
-
small={small}
|
|
38
|
-
width={width}
|
|
39
|
-
disabled={isDisabled}
|
|
40
|
-
groupOrder={groupOrder}
|
|
41
|
-
loading={loading}
|
|
42
|
-
/>
|
|
43
|
-
) : trigger === 'Text' ? (
|
|
44
|
-
<Text
|
|
45
|
-
label={label}
|
|
46
|
-
disabled={isDisabled}
|
|
47
|
-
carat={!contextMenu && (isNested ? 'right' : 'down')}
|
|
48
|
-
isOpen={isOpen}
|
|
49
|
-
/>
|
|
50
|
-
) : trigger === 'Component' ? (
|
|
51
|
-
<Component component={component} disabled={isDisabled} />
|
|
52
|
-
) : null;
|
|
53
|
-
const wrappedTrigger =
|
|
54
|
-
!isNested && (badgeTitle || badgeDot) ? (
|
|
55
|
-
<Badge title={badgeTitle} dot={badgeDot} small={!badgeDot}>
|
|
56
|
-
{triggerElement}
|
|
57
|
-
</Badge>
|
|
58
|
-
) : (
|
|
59
|
-
triggerElement
|
|
60
|
-
);
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
ref={ref}
|
|
64
|
-
className={styles.wrapper}
|
|
65
|
-
style={
|
|
66
|
-
width
|
|
67
|
-
? { width }
|
|
68
|
-
: {
|
|
69
|
-
...(fullHeight && {
|
|
70
|
-
height: '100%',
|
|
71
|
-
display: 'flex',
|
|
72
|
-
}),
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
onClick={(evt) => {
|
|
76
|
-
evt.stopPropagation();
|
|
77
|
-
evt.preventDefault();
|
|
78
|
-
onClickTrigger();
|
|
79
|
-
}}
|
|
80
|
-
data-testid={testId}
|
|
81
|
-
>
|
|
82
|
-
{wrappedTrigger}
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import { FaTimes } from 'react-icons/fa';
|
|
4
|
-
import styles from './message.module.less';
|
|
5
|
-
|
|
6
|
-
export const Dismiss = ({ type, onClose, isInToast }) => {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cx(
|
|
10
|
-
styles.dismiss,
|
|
11
|
-
isInToast ? styles.absolute : '',
|
|
12
|
-
type === 'Info'
|
|
13
|
-
? styles.info
|
|
14
|
-
: type === 'Success'
|
|
15
|
-
? styles.success
|
|
16
|
-
: type === 'Warning'
|
|
17
|
-
? styles.warning
|
|
18
|
-
: type === 'Error'
|
|
19
|
-
? styles.error
|
|
20
|
-
: null,
|
|
21
|
-
)}
|
|
22
|
-
>
|
|
23
|
-
<FaTimes onClick={onClose} />
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import React, { useReducer } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
FaInfoCircle,
|
|
5
|
-
FaCheckCircle,
|
|
6
|
-
FaExclamationCircle,
|
|
7
|
-
FaExclamationTriangle,
|
|
8
|
-
} from 'react-icons/fa';
|
|
9
|
-
import cx from 'classnames';
|
|
10
|
-
import { Dismiss } from './dismiss';
|
|
11
|
-
import styles from './message.module.less';
|
|
12
|
-
|
|
13
|
-
const initialState = {
|
|
14
|
-
detailsVisible: false,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const reducer = (state, action) => {
|
|
18
|
-
switch (action.type) {
|
|
19
|
-
case 'TOGGLE_DETAILS': {
|
|
20
|
-
return {
|
|
21
|
-
...state,
|
|
22
|
-
detailsVisible: !state.detailsVisible,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
default:
|
|
26
|
-
return state;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const Details = ({ details, visible, dispatch }) => {
|
|
31
|
-
return (
|
|
32
|
-
<div>
|
|
33
|
-
<div
|
|
34
|
-
className={cx(styles.legendToggle)}
|
|
35
|
-
onClick={() => dispatch({ type: 'TOGGLE_DETAILS' })}
|
|
36
|
-
>
|
|
37
|
-
{visible ? 'Hide details' : 'Show details'}
|
|
38
|
-
</div>
|
|
39
|
-
{visible ? <div className={styles.detailsText}>{details}</div> : null}
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const DialogIcon = ({ type }) => {
|
|
45
|
-
const size = 16;
|
|
46
|
-
switch (type) {
|
|
47
|
-
case 'Success':
|
|
48
|
-
return <FaCheckCircle size={size} />;
|
|
49
|
-
case 'Warning':
|
|
50
|
-
return <FaExclamationCircle size={size} />;
|
|
51
|
-
case 'Error':
|
|
52
|
-
return <FaExclamationTriangle size={size} />;
|
|
53
|
-
default:
|
|
54
|
-
return <FaInfoCircle size={size} />;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const Message = ({ message }) => {
|
|
59
|
-
const {
|
|
60
|
-
visible,
|
|
61
|
-
type,
|
|
62
|
-
icon,
|
|
63
|
-
heading,
|
|
64
|
-
content,
|
|
65
|
-
details,
|
|
66
|
-
withDismiss,
|
|
67
|
-
onClose,
|
|
68
|
-
width,
|
|
69
|
-
maxHeight,
|
|
70
|
-
} = message;
|
|
71
|
-
const [state, dispatch] = useReducer(reducer, initialState);
|
|
72
|
-
return (
|
|
73
|
-
<>
|
|
74
|
-
{visible ? (
|
|
75
|
-
<div
|
|
76
|
-
className={cx(
|
|
77
|
-
styles.container,
|
|
78
|
-
width ? styles.block : null,
|
|
79
|
-
type === 'Success'
|
|
80
|
-
? styles.success
|
|
81
|
-
: type === 'Warning'
|
|
82
|
-
? styles.warning
|
|
83
|
-
: type === 'Error'
|
|
84
|
-
? styles.error
|
|
85
|
-
: styles.info,
|
|
86
|
-
)}
|
|
87
|
-
style={{ width, maxHeight }}
|
|
88
|
-
>
|
|
89
|
-
<div>
|
|
90
|
-
{icon ? (
|
|
91
|
-
<div className={styles.icon}>
|
|
92
|
-
<DialogIcon type={type} />
|
|
93
|
-
</div>
|
|
94
|
-
) : null}
|
|
95
|
-
</div>
|
|
96
|
-
<div className={styles.content}>
|
|
97
|
-
{heading ? <div className={styles.heading}>{heading}</div> : null}
|
|
98
|
-
<div>{content}</div>
|
|
99
|
-
{details ? (
|
|
100
|
-
<Details
|
|
101
|
-
details={details}
|
|
102
|
-
visible={state.detailsVisible}
|
|
103
|
-
dispatch={() => dispatch({ type: 'TOGGLE_DETAILS' })}
|
|
104
|
-
/>
|
|
105
|
-
) : null}
|
|
106
|
-
</div>
|
|
107
|
-
{withDismiss ? <Dismiss type={type} onClose={onClose} /> : null}
|
|
108
|
-
</div>
|
|
109
|
-
) : null}
|
|
110
|
-
</>
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const messageShape = PropTypes.shape({
|
|
115
|
-
visible: PropTypes.bool,
|
|
116
|
-
type: PropTypes.oneOf(['Info', 'Success', 'Warning', 'Error']),
|
|
117
|
-
icon: PropTypes.bool,
|
|
118
|
-
heading: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
119
|
-
content: PropTypes.oneOfType([
|
|
120
|
-
PropTypes.string,
|
|
121
|
-
PropTypes.number,
|
|
122
|
-
PropTypes.node,
|
|
123
|
-
]),
|
|
124
|
-
details: PropTypes.oneOfType([
|
|
125
|
-
PropTypes.string,
|
|
126
|
-
PropTypes.number,
|
|
127
|
-
PropTypes.node,
|
|
128
|
-
]),
|
|
129
|
-
withDismiss: PropTypes.bool,
|
|
130
|
-
onClose: PropTypes.func,
|
|
131
|
-
width: PropTypes.string,
|
|
132
|
-
maxHeight: PropTypes.string,
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
Message.propTypes = {
|
|
136
|
-
message: messageShape.isRequired,
|
|
137
|
-
};
|