grommet 2.20.1 → 2.21.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/components/Button/Button.js +2 -3
- package/components/Chart/Chart.js +14 -6
- package/components/DataChart/DataChart.js +84 -21
- package/components/DataChart/Detail.js +8 -0
- package/components/DataChart/XAxis.js +19 -10
- package/components/DataChart/index.d.ts +10 -2
- package/components/DataChart/propTypes.js +2 -1
- package/components/DataChart/stories/Offset.js +82 -0
- package/components/DataChart/stories/StackedAreas.js +77 -0
- package/components/DataChart/stories/StackedLines.js +73 -0
- package/components/DateInput/DateInput.js +21 -9
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/propTypes.js +1 -0
- package/components/List/List.js +11 -2
- package/components/List/index.d.ts +1 -0
- package/components/List/propTypes.js +1 -0
- package/components/Markdown/Markdown.js +4 -2
- package/components/Menu/Menu.js +39 -12
- package/components/Notification/Notification.js +17 -6
- package/components/Notification/index.d.ts +7 -1
- package/components/Notification/propTypes.js +4 -1
- package/components/RangeInput/StyledRangeInput.js +1 -1
- package/components/RangeInput/stories/SimpleRange.js +2 -6
- package/components/Select/Select.js +44 -12
- package/components/Select/SelectContainer.js +22 -6
- package/components/Select/stories/ChildrenRender.js +37 -33
- package/components/Select/stories/Clear.js +7 -3
- package/components/Select/stories/Controlled.js +32 -28
- package/components/Select/stories/{CustomSearch.js → CustomThemed/CustomSearch.js} +2 -2
- package/components/Select/stories/Disabled.js +29 -25
- package/components/Select/stories/InsideFormField.js +29 -27
- package/components/Select/stories/LazyLoadingOptions.js +27 -25
- package/components/Select/stories/ManyOptions.js +47 -43
- package/components/Select/stories/Multiple.js +25 -21
- package/components/Select/stories/ObjectOptions.js +27 -25
- package/components/Select/stories/Search.js +62 -58
- package/components/Select/stories/Simple.js +26 -22
- package/components/Select/stories/Uncontrolled.js +24 -20
- package/components/Select/stories/ValueLabel.js +40 -36
- package/components/Select/stories/typescript/CreateOption.tsx +34 -30
- package/components/Sidebar/stories/Labels.js +25 -19
- package/components/Sidebar/stories/typescript/Simple.tsx +17 -12
- package/components/SkipLinks/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/components/SkipLinks/stories/Simple.js +82 -78
- package/components/Tab/Tab.js +6 -1
- package/components/Table/stories/Default.js +30 -28
- package/components/Table/stories/InfiniteScrollInTable.js +39 -35
- package/components/Table/stories/MeterInTable.js +26 -24
- package/components/Tag/Tag.js +17 -6
- package/components/Tag/index.d.ts +8 -0
- package/components/Tag/propTypes.js +2 -1
- package/components/Tag/stories/Size.js +45 -0
- package/components/TextArea/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/components/TextArea/stories/Fill.js +18 -16
- package/components/TextArea/stories/InsideFormField.js +43 -41
- package/components/TextArea/stories/NonResizable.js +13 -11
- package/components/TextArea/stories/Simple.js +13 -11
- package/components/TextInput/TextInput.js +5 -8
- package/{es6/components/TextInput/stories/typescript → components/TextInput/stories/CustomThemed}/CustomSuggestions.tsx +1 -1
- package/components/TextInput/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/components/TextInput/stories/DefaultSuggestion.js +20 -19
- package/components/TextInput/stories/Icon.js +22 -21
- package/components/TextInput/stories/InsideFormField.js +32 -30
- package/components/TextInput/stories/OnSelect.js +20 -19
- package/components/TextInput/stories/Password.js +30 -29
- package/components/TextInput/stories/Simple.js +17 -16
- package/components/TextInput/stories/StyledPlaceholder.js +10 -9
- package/components/TextInput/stories/Suggestions.js +19 -18
- package/components/TextInput/stories/Uncontrolled.js +18 -17
- package/components/TextInput/stories/WithTags.js +19 -18
- package/components/Tip/stories/Caret.js +37 -31
- package/components/Tip/stories/{ResponsiveTip.js → CustomThemed/ResponsiveTip.js} +1 -1
- package/components/Tip/stories/{SidebarTip.js → CustomThemed/SidebarTip.js} +1 -1
- package/components/Tip/stories/{typescript → CustomThemed}/Themed.tsx +1 -1
- package/components/Tip/stories/HeaderActions.js +66 -60
- package/components/Tip/stories/InfoTip.js +59 -56
- package/components/Tip/stories/typescript/Animated.tsx +26 -21
- package/components/Tip/stories/typescript/Children.tsx +52 -51
- package/components/Tip/stories/typescript/Simple.tsx +12 -7
- package/es6/components/Button/Button.js +2 -3
- package/es6/components/Chart/Chart.js +14 -6
- package/es6/components/DataChart/DataChart.js +84 -21
- package/es6/components/DataChart/Detail.js +7 -0
- package/es6/components/DataChart/XAxis.js +19 -10
- package/es6/components/DataChart/index.d.ts +10 -2
- package/es6/components/DataChart/propTypes.js +2 -1
- package/es6/components/DataChart/stories/Offset.js +70 -0
- package/es6/components/DataChart/stories/StackedAreas.js +65 -0
- package/es6/components/DataChart/stories/StackedLines.js +61 -0
- package/es6/components/DateInput/DateInput.js +21 -9
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/propTypes.js +1 -0
- package/es6/components/List/List.js +11 -2
- package/es6/components/List/index.d.ts +1 -0
- package/es6/components/List/propTypes.js +1 -0
- package/es6/components/Markdown/Markdown.js +4 -2
- package/es6/components/Menu/Menu.js +40 -13
- package/es6/components/Notification/Notification.js +18 -7
- package/es6/components/Notification/index.d.ts +7 -1
- package/es6/components/Notification/propTypes.js +4 -1
- package/es6/components/RangeInput/StyledRangeInput.js +1 -1
- package/es6/components/RangeInput/stories/SimpleRange.js +3 -6
- package/es6/components/Select/Select.js +44 -12
- package/es6/components/Select/SelectContainer.js +22 -6
- package/es6/components/Select/stories/ChildrenRender.js +38 -33
- package/es6/components/Select/stories/Clear.js +8 -4
- package/es6/components/Select/stories/Controlled.js +33 -28
- package/es6/components/Select/stories/{CustomSearch.js → CustomThemed/CustomSearch.js} +2 -2
- package/es6/components/Select/stories/Disabled.js +30 -25
- package/es6/components/Select/stories/InsideFormField.js +30 -27
- package/es6/components/Select/stories/LazyLoadingOptions.js +28 -25
- package/es6/components/Select/stories/ManyOptions.js +48 -43
- package/es6/components/Select/stories/Multiple.js +26 -21
- package/es6/components/Select/stories/ObjectOptions.js +28 -25
- package/es6/components/Select/stories/Search.js +63 -58
- package/es6/components/Select/stories/Simple.js +27 -22
- package/es6/components/Select/stories/Uncontrolled.js +25 -20
- package/es6/components/Select/stories/ValueLabel.js +41 -36
- package/es6/components/Select/stories/typescript/CreateOption.tsx +34 -30
- package/es6/components/Sidebar/stories/Labels.js +26 -20
- package/es6/components/Sidebar/stories/typescript/Simple.tsx +17 -12
- package/es6/components/SkipLinks/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/es6/components/SkipLinks/stories/Simple.js +83 -79
- package/es6/components/Tab/Tab.js +6 -1
- package/es6/components/Table/stories/Default.js +31 -28
- package/es6/components/Table/stories/InfiniteScrollInTable.js +40 -36
- package/es6/components/Table/stories/MeterInTable.js +27 -24
- package/es6/components/Tag/Tag.js +17 -6
- package/es6/components/Tag/index.d.ts +8 -0
- package/es6/components/Tag/propTypes.js +2 -1
- package/es6/components/Tag/stories/Size.js +33 -0
- package/es6/components/TextArea/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/es6/components/TextArea/stories/Fill.js +19 -16
- package/es6/components/TextArea/stories/InsideFormField.js +44 -41
- package/es6/components/TextArea/stories/NonResizable.js +14 -11
- package/es6/components/TextArea/stories/Simple.js +14 -11
- package/es6/components/TextInput/TextInput.js +5 -8
- package/{components/TextInput/stories/typescript → es6/components/TextInput/stories/CustomThemed}/CustomSuggestions.tsx +1 -1
- package/es6/components/TextInput/stories/{Themed.js → CustomThemed/Themed.js} +1 -1
- package/es6/components/TextInput/stories/DefaultSuggestion.js +21 -19
- package/es6/components/TextInput/stories/Icon.js +23 -21
- package/es6/components/TextInput/stories/InsideFormField.js +33 -30
- package/es6/components/TextInput/stories/OnSelect.js +21 -19
- package/es6/components/TextInput/stories/Password.js +31 -29
- package/es6/components/TextInput/stories/Simple.js +18 -16
- package/es6/components/TextInput/stories/StyledPlaceholder.js +11 -9
- package/es6/components/TextInput/stories/Suggestions.js +20 -18
- package/es6/components/TextInput/stories/Uncontrolled.js +19 -17
- package/es6/components/TextInput/stories/WithTags.js +20 -18
- package/es6/components/Tip/stories/Caret.js +38 -32
- package/es6/components/Tip/stories/{ResponsiveTip.js → CustomThemed/ResponsiveTip.js} +1 -1
- package/es6/components/Tip/stories/{SidebarTip.js → CustomThemed/SidebarTip.js} +1 -1
- package/es6/components/Tip/stories/{typescript → CustomThemed}/Themed.tsx +1 -1
- package/es6/components/Tip/stories/HeaderActions.js +67 -61
- package/es6/components/Tip/stories/InfoTip.js +60 -57
- package/es6/components/Tip/stories/typescript/Animated.tsx +26 -21
- package/es6/components/Tip/stories/typescript/Children.tsx +52 -51
- package/es6/components/Tip/stories/typescript/Simple.tsx +12 -7
- package/es6/languages/default.json +2 -1
- package/es6/themes/base.d.ts +34 -1
- package/es6/themes/base.js +39 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +2 -1
- package/package.json +4 -4
- package/themes/base.d.ts +34 -1
- package/themes/base.js +39 -0
|
@@ -7,8 +7,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _grommet = require("grommet");
|
|
9
9
|
|
|
10
|
-
var _themes = require("grommet/themes");
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
12
|
var allSuggestions = Array(100).fill().map(function (_, i) {
|
|
@@ -39,22 +37,25 @@ var Suggestions = function Suggestions() {
|
|
|
39
37
|
setValue(event.suggestion);
|
|
40
38
|
};
|
|
41
39
|
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
return (
|
|
41
|
+
/*#__PURE__*/
|
|
42
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
43
|
+
// <Grommet theme={...}>
|
|
44
|
+
_react["default"].createElement(_grommet.Box, {
|
|
45
|
+
fill: true,
|
|
46
|
+
align: "center",
|
|
47
|
+
justify: "start",
|
|
48
|
+
pad: "large"
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
50
|
+
width: "medium"
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, {
|
|
52
|
+
value: value,
|
|
53
|
+
onChange: onChange,
|
|
54
|
+
onSuggestionSelect: onSuggestionSelect,
|
|
55
|
+
suggestions: suggestions
|
|
56
|
+
}))) // </Grommet>
|
|
57
|
+
|
|
58
|
+
);
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
exports.Suggestions = Suggestions;
|
|
@@ -7,26 +7,27 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _grommet = require("grommet");
|
|
9
9
|
|
|
10
|
-
var _themes = require("grommet/themes");
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
12
|
var Uncontrolled = function Uncontrolled() {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
return (
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
16
|
+
// <Grommet theme={...}>
|
|
17
|
+
_react["default"].createElement(_grommet.Box, {
|
|
18
|
+
fill: true,
|
|
19
|
+
align: "center",
|
|
20
|
+
justify: "start",
|
|
21
|
+
pad: "large"
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
23
|
+
width: "medium"
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, {
|
|
25
|
+
onChange: function onChange(event) {
|
|
26
|
+
return console.log('Change', event.target.value);
|
|
27
|
+
}
|
|
28
|
+
}))) // </Grommet>
|
|
29
|
+
|
|
30
|
+
);
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
exports.Uncontrolled = Uncontrolled;
|
|
@@ -9,8 +9,6 @@ var _grommetIcons = require("grommet-icons");
|
|
|
9
9
|
|
|
10
10
|
var _grommet = require("grommet");
|
|
11
11
|
|
|
12
|
-
var _themes = require("grommet/themes");
|
|
13
|
-
|
|
14
12
|
var _excluded = ["children", "onRemove"],
|
|
15
13
|
_excluded2 = ["value", "onAdd", "onChange", "onRemove"];
|
|
16
14
|
|
|
@@ -164,22 +162,25 @@ var WithTags = function WithTags() {
|
|
|
164
162
|
}));
|
|
165
163
|
};
|
|
166
164
|
|
|
167
|
-
return
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
165
|
+
return (
|
|
166
|
+
/*#__PURE__*/
|
|
167
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
168
|
+
// <Grommet theme={...}>
|
|
169
|
+
_react["default"].createElement(_grommet.Box, {
|
|
170
|
+
pad: "small"
|
|
171
|
+
}, /*#__PURE__*/_react["default"].createElement(TagInput, {
|
|
172
|
+
placeholder: "Search for aliases...",
|
|
173
|
+
suggestions: suggestions,
|
|
174
|
+
value: selectedTags,
|
|
175
|
+
onRemove: onRemoveTag,
|
|
176
|
+
onAdd: onAddTag,
|
|
177
|
+
onChange: function onChange(_ref3) {
|
|
178
|
+
var value = _ref3.target.value;
|
|
179
|
+
return onFilterSuggestion(value);
|
|
180
|
+
}
|
|
181
|
+
})) // </Grommet>
|
|
182
|
+
|
|
183
|
+
);
|
|
183
184
|
};
|
|
184
185
|
|
|
185
186
|
exports.WithTags = WithTags;
|
|
@@ -36,40 +36,46 @@ var TipContent = function TipContent(_ref) {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
var Caret = function Caret() {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
return (
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
42
|
+
// <Grommet theme={...}>
|
|
43
|
+
_react["default"].createElement(_grommet.Box, {
|
|
44
|
+
align: "center",
|
|
45
|
+
justify: "center",
|
|
46
|
+
background: "dark-1",
|
|
47
|
+
fill: true,
|
|
48
|
+
gap: "large"
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Heading, {
|
|
50
|
+
textAlign: "center",
|
|
51
|
+
level: "1",
|
|
52
|
+
size: "xsmall"
|
|
53
|
+
}, "Tooltip is styled with a Caret"), /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
54
|
+
fill: true,
|
|
55
|
+
direction: "row",
|
|
56
|
+
justify: "between"
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
58
|
+
dropProps: {
|
|
59
|
+
align: {
|
|
60
|
+
left: 'right'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
content: /*#__PURE__*/_react["default"].createElement(TipContent, {
|
|
64
|
+
message: "Designed with an SVG of Caret"
|
|
65
|
+
}),
|
|
66
|
+
plain: true
|
|
67
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
68
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Trash, null),
|
|
69
|
+
plain: false
|
|
70
|
+
}))))) // </Grommet>
|
|
71
|
+
|
|
72
|
+
);
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
exports.Caret = Caret;
|
|
76
|
+
Caret.args = {
|
|
77
|
+
full: true
|
|
78
|
+
};
|
|
73
79
|
Caret.parameters = {
|
|
74
80
|
chromatic: {
|
|
75
81
|
disable: true
|
|
@@ -156,6 +156,6 @@ var SidebarTip = function SidebarTip() {
|
|
|
156
156
|
exports.SidebarTip = SidebarTip;
|
|
157
157
|
SidebarTip.storyName = 'Sidebar';
|
|
158
158
|
var _default = {
|
|
159
|
-
title: 'Controls/Tip/Sidebar'
|
|
159
|
+
title: 'Controls/Tip/Custom Themed/Sidebar'
|
|
160
160
|
};
|
|
161
161
|
exports["default"] = _default;
|
|
@@ -47,71 +47,77 @@ var HeaderActions = function HeaderActions() {
|
|
|
47
47
|
setSelected(undefined);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Paragraph, {
|
|
61
|
-
textAlign: "center"
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("b", null, "Follow"), " the Tips of the Trash & Reload icons for directions. Those Tooltips ", /*#__PURE__*/_react["default"].createElement("b", null, "change"), " according to the actions the user perform on the table. The Table meters are also using the Tip component."), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
63
|
-
gap: "small"
|
|
64
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
65
|
-
fill: true,
|
|
66
|
-
direction: "row",
|
|
67
|
-
justify: "between",
|
|
68
|
-
align: "center"
|
|
69
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Heading, {
|
|
70
|
-
level: 2
|
|
71
|
-
}, " Storage Pools with tooltips"), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
72
|
-
gap: "small",
|
|
73
|
-
direction: "row"
|
|
74
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
75
|
-
dropProps: {
|
|
76
|
-
align: {
|
|
77
|
-
bottom: 'top'
|
|
50
|
+
return (
|
|
51
|
+
/*#__PURE__*/
|
|
52
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
53
|
+
// <Grommet theme={...}>
|
|
54
|
+
_react["default"].createElement(_grommet.Box, {
|
|
55
|
+
align: "center",
|
|
56
|
+
background: "dark-1",
|
|
57
|
+
gap: "large",
|
|
58
|
+
height: {
|
|
59
|
+
min: '100%'
|
|
78
60
|
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
61
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Paragraph, {
|
|
62
|
+
textAlign: "center"
|
|
63
|
+
}, /*#__PURE__*/_react["default"].createElement("b", null, "Follow"), " the Tips of the Trash & Reload icons for directions. Those Tooltips ", /*#__PURE__*/_react["default"].createElement("b", null, "change"), " according to the actions the user perform on the table. The Table meters are also using the Tip component."), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
64
|
+
gap: "small"
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
66
|
+
fill: true,
|
|
67
|
+
direction: "row",
|
|
68
|
+
justify: "between",
|
|
69
|
+
align: "center"
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Heading, {
|
|
71
|
+
level: 2
|
|
72
|
+
}, " Storage Pools with tooltips"), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
73
|
+
gap: "small",
|
|
74
|
+
direction: "row"
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
76
|
+
dropProps: {
|
|
77
|
+
align: {
|
|
78
|
+
bottom: 'top'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
content: /*#__PURE__*/_react["default"].createElement(TipContent, {
|
|
82
|
+
message: !selected ? 'Select a table row to enable' : 'Delete table Row',
|
|
83
|
+
icon: !selected
|
|
84
|
+
})
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
86
|
+
disabled: !selected,
|
|
87
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Trash, null),
|
|
88
|
+
onClick: removeRow
|
|
89
|
+
})), /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
90
|
+
dropProps: {
|
|
91
|
+
align: {
|
|
92
|
+
bottom: 'top'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
content: /*#__PURE__*/_react["default"].createElement(TipContent, {
|
|
96
|
+
message: data.length < _data.storageData.length ? 'Reload Data' : 'Delete items before reload action is enabled',
|
|
97
|
+
icon: !selected
|
|
98
|
+
})
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
100
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Refresh, null),
|
|
101
|
+
onClick: function onClick() {
|
|
102
|
+
return setData(_data.storageData);
|
|
103
|
+
},
|
|
104
|
+
disabled: data.length === _data.storageData.length
|
|
105
|
+
})))), /*#__PURE__*/_react["default"].createElement(_grommet.DataTable, {
|
|
106
|
+
columns: _data.storageColumns,
|
|
107
|
+
data: data,
|
|
108
|
+
step: 10,
|
|
109
|
+
onClickRow: function onClickRow(event) {
|
|
110
|
+
return setSelected(event.datum);
|
|
92
111
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
icon: !selected
|
|
97
|
-
})
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Anchor, {
|
|
99
|
-
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Refresh, null),
|
|
100
|
-
onClick: function onClick() {
|
|
101
|
-
return setData(_data.storageData);
|
|
102
|
-
},
|
|
103
|
-
disabled: data.length === _data.storageData.length
|
|
104
|
-
})))), /*#__PURE__*/_react["default"].createElement(_grommet.DataTable, {
|
|
105
|
-
columns: _data.storageColumns,
|
|
106
|
-
data: data,
|
|
107
|
-
step: 10,
|
|
108
|
-
onClickRow: function onClickRow(event) {
|
|
109
|
-
return setSelected(event.datum);
|
|
110
|
-
}
|
|
111
|
-
}))));
|
|
112
|
+
}))) // </Grommet>
|
|
113
|
+
|
|
114
|
+
);
|
|
112
115
|
};
|
|
113
116
|
|
|
114
117
|
exports.HeaderActions = HeaderActions;
|
|
118
|
+
HeaderActions.args = {
|
|
119
|
+
full: true
|
|
120
|
+
};
|
|
115
121
|
HeaderActions.parameters = {
|
|
116
122
|
chromatic: {
|
|
117
123
|
disable: true
|
|
@@ -12,64 +12,67 @@ var _grommetIcons = require("grommet-icons");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
14
|
var Info = function Info() {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
return (
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
18
|
+
// <Grommet theme={...}>
|
|
19
|
+
_react["default"].createElement(_grommet.Box, {
|
|
20
|
+
fill: true,
|
|
21
|
+
background: "background-back",
|
|
22
|
+
gap: "large",
|
|
23
|
+
pad: "large",
|
|
24
|
+
align: "start"
|
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
26
|
+
content: /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
27
|
+
pad: "small",
|
|
28
|
+
gap: "small",
|
|
29
|
+
width: {
|
|
30
|
+
max: 'small'
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
33
|
+
weight: "bold"
|
|
34
|
+
}, "Information"), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
35
|
+
size: "small"
|
|
36
|
+
}, "A battle is won by him who is firmly resolved to win it."), /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
37
|
+
size: "small"
|
|
38
|
+
}, "-Leo Tolstoy"))),
|
|
39
|
+
dropProps: {
|
|
40
|
+
align: {
|
|
41
|
+
left: 'right'
|
|
42
|
+
}
|
|
30
43
|
}
|
|
31
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
45
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.CircleInformation, {
|
|
46
|
+
size: "large"
|
|
47
|
+
})
|
|
48
|
+
})), /*#__PURE__*/_react["default"].createElement(_grommet.Tip, {
|
|
49
|
+
plain: true,
|
|
50
|
+
content: /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
51
|
+
pad: "small",
|
|
52
|
+
gap: "small",
|
|
53
|
+
width: {
|
|
54
|
+
max: 'small'
|
|
55
|
+
},
|
|
56
|
+
round: "small",
|
|
57
|
+
background: "background-front",
|
|
58
|
+
responsive: false
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
60
|
+
weight: "bold"
|
|
61
|
+
}, "Help"), /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
62
|
+
size: "small"
|
|
63
|
+
}, "Help is on the way! Who are you going to call?")),
|
|
64
|
+
dropProps: {
|
|
65
|
+
align: {
|
|
66
|
+
left: 'right'
|
|
67
|
+
}
|
|
41
68
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
content: /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
50
|
-
pad: "small",
|
|
51
|
-
gap: "small",
|
|
52
|
-
width: {
|
|
53
|
-
max: 'small'
|
|
54
|
-
},
|
|
55
|
-
round: "small",
|
|
56
|
-
background: "background-front",
|
|
57
|
-
responsive: false
|
|
58
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
59
|
-
weight: "bold"
|
|
60
|
-
}, "Help"), /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
61
|
-
size: "small"
|
|
62
|
-
}, "Help is on the way! Who are you going to call?")),
|
|
63
|
-
dropProps: {
|
|
64
|
-
align: {
|
|
65
|
-
left: 'right'
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
69
|
-
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.HelpOption, {
|
|
70
|
-
size: "large"
|
|
71
|
-
})
|
|
72
|
-
}))));
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
70
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.HelpOption, {
|
|
71
|
+
size: "large"
|
|
72
|
+
})
|
|
73
|
+
}))) // </Grommet>
|
|
74
|
+
|
|
75
|
+
);
|
|
73
76
|
};
|
|
74
77
|
|
|
75
78
|
exports.Info = Info;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Box, Button, Tip } from 'grommet';
|
|
4
4
|
import { UserFemale, Info } from 'grommet-icons';
|
|
5
5
|
|
|
6
6
|
const Circle = ({ ...rest }) => (
|
|
@@ -13,32 +13,37 @@ const Circle = ({ ...rest }) => (
|
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
export const Animated = () => (
|
|
16
|
-
<Grommet
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</
|
|
16
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
17
|
+
// <Grommet theme={...}>
|
|
18
|
+
<Box align="center" justify="center" fill background="dark-1" gap="medium">
|
|
19
|
+
<Tip
|
|
20
|
+
plain
|
|
21
|
+
dropProps={{ align: { left: 'right' } }}
|
|
22
|
+
content={
|
|
23
|
+
<Box align="start" margin={{ bottom: 'xlarge' }} pad="xsmall">
|
|
24
|
+
<Circle margin={{ left: 'large' }} pad="small">
|
|
25
|
+
<Info color="accent-1" />
|
|
26
|
+
</Circle>
|
|
27
|
+
<Circle margin={{ left: 'medium' }} pad="small" />
|
|
28
|
+
<Circle pad="xsmall" />
|
|
29
|
+
</Box>
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
<Button icon={<UserFemale color="accent-1" size="large" />} />
|
|
33
|
+
</Tip>
|
|
34
|
+
Double animation of 'fadeIn' and 'pulse'
|
|
35
|
+
</Box>
|
|
36
|
+
// </Grommet>
|
|
36
37
|
);
|
|
37
38
|
|
|
38
39
|
Animated.parameters = {
|
|
39
40
|
chromatic: { disable: true },
|
|
40
41
|
};
|
|
41
42
|
|
|
43
|
+
Animated.args = {
|
|
44
|
+
full: true,
|
|
45
|
+
};
|
|
46
|
+
|
|
42
47
|
export default {
|
|
43
48
|
title: 'Controls/Tip/Animated',
|
|
44
49
|
};
|