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