@storybook/components 6.4.0-beta.32 → 6.4.0-beta.33

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 (82) hide show
  1. package/dist/cjs/ActionBar/ActionBar.stories.js +7 -7
  2. package/dist/cjs/ScrollArea/ScrollArea.stories.js +13 -13
  3. package/dist/cjs/Zoom/Zoom.stories.js +22 -22
  4. package/dist/cjs/bar/button.js +25 -2
  5. package/dist/cjs/bar/button.stories.js +10 -3
  6. package/dist/cjs/blocks/ArgsTable/ArgRow.js +18 -6
  7. package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +6 -1
  8. package/dist/cjs/blocks/ArgsTable/ArgsTable.js +125 -32
  9. package/dist/cjs/blocks/ArgsTable/ArgsTable.stories.js +6 -1
  10. package/dist/cjs/blocks/ColorPalette.stories.js +4 -4
  11. package/dist/cjs/blocks/DocsPage.stories.js +9 -2
  12. package/dist/cjs/blocks/EmptyBlock.stories.js +4 -4
  13. package/dist/cjs/blocks/IconGallery.stories.js +4 -4
  14. package/dist/cjs/blocks/Preview.js +13 -2
  15. package/dist/cjs/blocks/Preview.stories.js +8 -1
  16. package/dist/cjs/blocks/Source.js +57 -8
  17. package/dist/cjs/blocks/Source.stories.js +11 -1
  18. package/dist/cjs/blocks/Story.js +11 -2
  19. package/dist/cjs/blocks/Story.stories.js +11 -1
  20. package/dist/cjs/blocks/Typeset.stories.js +13 -13
  21. package/dist/cjs/brand/StorybookLogo.stories.js +4 -4
  22. package/dist/cjs/placeholder/placeholder.stories.js +7 -7
  23. package/dist/cjs/typography/DocumentWrapper.stories.js +7 -7
  24. package/dist/esm/ActionBar/ActionBar.stories.js +4 -4
  25. package/dist/esm/ScrollArea/ScrollArea.stories.js +8 -8
  26. package/dist/esm/Zoom/Zoom.stories.js +15 -15
  27. package/dist/esm/bar/button.js +19 -1
  28. package/dist/esm/bar/button.stories.js +7 -3
  29. package/dist/esm/blocks/ArgsTable/ArgRow.js +15 -5
  30. package/dist/esm/blocks/ArgsTable/ArgRow.stories.js +4 -0
  31. package/dist/esm/blocks/ArgsTable/ArgsTable.js +123 -32
  32. package/dist/esm/blocks/ArgsTable/ArgsTable.stories.js +4 -0
  33. package/dist/esm/blocks/ColorPalette.stories.js +2 -2
  34. package/dist/esm/blocks/DocsPage.stories.js +5 -1
  35. package/dist/esm/blocks/EmptyBlock.stories.js +2 -2
  36. package/dist/esm/blocks/IconGallery.stories.js +2 -2
  37. package/dist/esm/blocks/Preview.js +8 -3
  38. package/dist/esm/blocks/Preview.stories.js +5 -1
  39. package/dist/esm/blocks/Source.js +56 -8
  40. package/dist/esm/blocks/Source.stories.js +7 -0
  41. package/dist/esm/blocks/Story.js +7 -1
  42. package/dist/esm/blocks/Story.stories.js +8 -1
  43. package/dist/esm/blocks/Typeset.stories.js +8 -8
  44. package/dist/esm/brand/StorybookLogo.stories.js +2 -2
  45. package/dist/esm/placeholder/placeholder.stories.js +4 -4
  46. package/dist/esm/typography/DocumentWrapper.stories.js +4 -4
  47. package/dist/modern/ActionBar/ActionBar.stories.js +4 -4
  48. package/dist/modern/ScrollArea/ScrollArea.stories.js +8 -8
  49. package/dist/modern/Zoom/Zoom.stories.js +15 -15
  50. package/dist/modern/bar/button.js +14 -1
  51. package/dist/modern/bar/button.stories.js +5 -3
  52. package/dist/modern/blocks/ArgsTable/ArgRow.js +9 -1
  53. package/dist/modern/blocks/ArgsTable/ArgRow.stories.js +4 -0
  54. package/dist/modern/blocks/ArgsTable/ArgsTable.js +99 -12
  55. package/dist/modern/blocks/ArgsTable/ArgsTable.stories.js +4 -0
  56. package/dist/modern/blocks/ColorPalette.stories.js +2 -2
  57. package/dist/modern/blocks/DocsPage.stories.js +3 -1
  58. package/dist/modern/blocks/EmptyBlock.stories.js +2 -2
  59. package/dist/modern/blocks/IconGallery.stories.js +2 -2
  60. package/dist/modern/blocks/Preview.js +6 -3
  61. package/dist/modern/blocks/Preview.stories.js +3 -1
  62. package/dist/modern/blocks/Source.js +44 -0
  63. package/dist/modern/blocks/Source.stories.js +5 -0
  64. package/dist/modern/blocks/Story.js +5 -1
  65. package/dist/modern/blocks/Story.stories.js +6 -1
  66. package/dist/modern/blocks/Typeset.stories.js +8 -8
  67. package/dist/modern/brand/StorybookLogo.stories.js +2 -2
  68. package/dist/modern/placeholder/placeholder.stories.js +4 -4
  69. package/dist/modern/typography/DocumentWrapper.stories.js +4 -4
  70. package/dist/ts3.4/bar/button.d.ts +1 -0
  71. package/dist/ts3.4/blocks/ArgsTable/ArgRow.d.ts +7 -1
  72. package/dist/ts3.4/blocks/ArgsTable/ArgsTable.d.ts +8 -2
  73. package/dist/ts3.4/blocks/Preview.d.ts +2 -2
  74. package/dist/ts3.4/blocks/Source.d.ts +1 -0
  75. package/dist/ts3.4/blocks/Story.d.ts +4 -3
  76. package/dist/ts3.9/bar/button.d.ts +1 -0
  77. package/dist/ts3.9/blocks/ArgsTable/ArgRow.d.ts +7 -1
  78. package/dist/ts3.9/blocks/ArgsTable/ArgsTable.d.ts +8 -2
  79. package/dist/ts3.9/blocks/Preview.d.ts +2 -2
  80. package/dist/ts3.9/blocks/Source.d.ts +1 -0
  81. package/dist/ts3.9/blocks/Story.d.ts +4 -3
  82. package/package.json +4 -4
@@ -12,11 +12,11 @@ export default {
12
12
  }, storyFn());
13
13
  }]
14
14
  };
15
- export var withMarkdown = function withMarkdown() {
15
+ export var WithMarkdown = function WithMarkdown() {
16
16
  return /*#__PURE__*/React.createElement(DocumentWrapper, null, /*#__PURE__*/React.createElement(MarkdownSample, null));
17
17
  };
18
- withMarkdown.displayName = "withMarkdown";
19
- export var withDOM = function withDOM() {
18
+ WithMarkdown.displayName = "WithMarkdown";
19
+ export var WithDOM = function WithDOM() {
20
20
  return /*#__PURE__*/React.createElement(DocumentWrapper, null, /*#__PURE__*/React.createElement("h1", null, "h1 Heading"), /*#__PURE__*/React.createElement("h2", null, "h2 Heading"), /*#__PURE__*/React.createElement("h3", null, "h3 Heading"), /*#__PURE__*/React.createElement("h4", null, "h4 Heading"), /*#__PURE__*/React.createElement("h5", null, "h5 Heading"), /*#__PURE__*/React.createElement("h6", null, "h6 Heading"), /*#__PURE__*/React.createElement("h2", null, "Typographic replacements"), /*#__PURE__*/React.createElement("p", null, "Enable typographer option to see result."), /*#__PURE__*/React.createElement("p", null, "\xA9 \xA9 \xAE \xAE \u2122 \u2122 \xA7 \xA7 \xB1"), /*#__PURE__*/React.createElement("p", null, "test\u2026 test\u2026 test\u2026 test?.. test!.."), /*#__PURE__*/React.createElement("p", null, "!!! ??? , \u2013 \u2014"), /*#__PURE__*/React.createElement("p", null, "\u201CSmartypants, double quotes\u201D and \u2018single quotes\u2019"), /*#__PURE__*/React.createElement("h2", null, "Emphasis"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, "This is bold text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, "This is bold text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, "This is italic text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, "This is italic text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, /*#__PURE__*/React.createElement("strong", null, "This is bold italic text"))), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("s", null, "Strikethrough")), /*#__PURE__*/React.createElement("h2", null, "Blockquotes"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "Blockquotes can also be nested\u2026"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "\u2026by using additional greater-than signs right next to each other\u2026"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "\u2026or with spaces between arrows.")))), /*#__PURE__*/React.createElement("h2", null, "Lists"), /*#__PURE__*/React.createElement("p", null, "Unordered"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Create a list by starting a line with ", /*#__PURE__*/React.createElement("code", null, "+"), ", ", /*#__PURE__*/React.createElement("code", null, "-"), ", or ", /*#__PURE__*/React.createElement("code", null, "*")), /*#__PURE__*/React.createElement("li", null, "Sub-lists are made by indenting 2 spaces:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Marker character change forces new list start:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Ac tristique libero volutpat at")), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Facilisis in pretium nisl aliquet")), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Nulla volutpat aliquam velit"))))), /*#__PURE__*/React.createElement("li", null, "Very easy!")), /*#__PURE__*/React.createElement("p", null, "Ordered"), /*#__PURE__*/React.createElement("ol", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Lorem ipsum dolor sit amet")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Consectetur adipiscing elit")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Integer molestie lorem at massa")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "You can use sequential numbers\u2026")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "\u2026or keep all the numbers as ", /*#__PURE__*/React.createElement("code", null, "1.")))), /*#__PURE__*/React.createElement("p", null, "Start numbering with offset:"), /*#__PURE__*/React.createElement("ol", {
21
21
  start: 57
22
22
  }, /*#__PURE__*/React.createElement("li", null, "foo"), /*#__PURE__*/React.createElement("li", null, "bar")), /*#__PURE__*/React.createElement("h2", null, "Horizontal Rule"), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement("h2", null, "Tables"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Option"), /*#__PURE__*/React.createElement("th", null, "Description"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "data"), /*#__PURE__*/React.createElement("td", null, "path to data files to supply the data that will be passed into templates.")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "engine"), /*#__PURE__*/React.createElement("td", null, "engine to be used for processing templates. Handlebars is the default.")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "ext"), /*#__PURE__*/React.createElement("td", null, "extension to be used for dest files.")))), /*#__PURE__*/React.createElement("p", null, "Right aligned columns"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
@@ -67,4 +67,4 @@ export var withDOM = function withDOM() {
67
67
  title: "The Stormtroopocat"
68
68
  })));
69
69
  };
70
- withDOM.displayName = "withDOM";
70
+ WithDOM.displayName = "WithDOM";
@@ -18,14 +18,14 @@ export default {
18
18
  }
19
19
  }, storyFn())]
20
20
  };
21
- export const singleItem = () => /*#__PURE__*/React.createElement(ActionBar, {
21
+ export const SingleItem = () => /*#__PURE__*/React.createElement(ActionBar, {
22
22
  actionItems: [{
23
23
  title: 'Clear',
24
24
  onClick: action1
25
25
  }]
26
26
  });
27
- singleItem.displayName = "singleItem";
28
- export const manyItems = () => /*#__PURE__*/React.createElement(ActionBar, {
27
+ SingleItem.displayName = "SingleItem";
28
+ export const ManyItems = () => /*#__PURE__*/React.createElement(ActionBar, {
29
29
  actionItems: [{
30
30
  title: 'Action string',
31
31
  onClick: action1
@@ -38,4 +38,4 @@ export const manyItems = () => /*#__PURE__*/React.createElement(ActionBar, {
38
38
  onClick: action3
39
39
  }]
40
40
  });
41
- manyItems.displayName = "manyItems";
41
+ ManyItems.displayName = "ManyItems";
@@ -35,19 +35,19 @@ export default {
35
35
  title: 'Basics/ScrollArea',
36
36
  decorators: [storyFn => /*#__PURE__*/React.createElement(Wrapper, null, storyFn())]
37
37
  };
38
- export const vertical = () => /*#__PURE__*/React.createElement(ScrollArea, {
38
+ export const Vertical = () => /*#__PURE__*/React.createElement(ScrollArea, {
39
39
  vertical: true
40
40
  }, list(i => /*#__PURE__*/React.createElement(Fragment, {
41
41
  key: i
42
42
  }, /*#__PURE__*/React.createElement(Block, null, i), /*#__PURE__*/React.createElement("br", null))));
43
- vertical.displayName = "vertical";
44
- export const horizontal = () => /*#__PURE__*/React.createElement(ScrollArea, {
43
+ Vertical.displayName = "Vertical";
44
+ export const Horizontal = () => /*#__PURE__*/React.createElement(ScrollArea, {
45
45
  horizontal: true
46
46
  }, list(i => /*#__PURE__*/React.createElement(Block, {
47
47
  key: i
48
48
  }, i)));
49
- horizontal.displayName = "horizontal";
50
- export const both = () => /*#__PURE__*/React.createElement(ScrollArea, {
49
+ Horizontal.displayName = "Horizontal";
50
+ export const Both = () => /*#__PURE__*/React.createElement(ScrollArea, {
51
51
  horizontal: true,
52
52
  vertical: true
53
53
  }, list(i => /*#__PURE__*/React.createElement(Fragment, {
@@ -55,8 +55,8 @@ export const both = () => /*#__PURE__*/React.createElement(ScrollArea, {
55
55
  }, list(ii => /*#__PURE__*/React.createElement(Block, {
56
56
  key: ii
57
57
  }, ii * i)), /*#__PURE__*/React.createElement("br", null))));
58
- both.displayName = "both";
59
- export const withOuterBorder = () => /*#__PURE__*/React.createElement(ScrollArea, {
58
+ Both.displayName = "Both";
59
+ export const WithOuterBorder = () => /*#__PURE__*/React.createElement(ScrollArea, {
60
60
  horizontal: true,
61
61
  vertical: true
62
62
  }, /*#__PURE__*/React.createElement("div", {
@@ -67,4 +67,4 @@ export const withOuterBorder = () => /*#__PURE__*/React.createElement(ScrollArea
67
67
  background: `url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAM4klEQVR4Xu2d224ktxGGayTN6LTrOO//PMmlAfvOgIEkFwEcZ71a7ep8muBjd2k4re4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
68
  }
69
69
  }));
70
- withOuterBorder.displayName = "withOuterBorder";
70
+ WithOuterBorder.displayName = "WithOuterBorder";
@@ -32,18 +32,18 @@ const EXAMPLE_ELEMENT = /*#__PURE__*/React.createElement("div", {
32
32
  const TemplateElement = args => /*#__PURE__*/React.createElement(Zoom.Element, args);
33
33
 
34
34
  TemplateElement.displayName = "TemplateElement";
35
- export const elementActualSize = TemplateElement.bind({});
36
- elementActualSize.args = {
35
+ export const ElementActualSize = TemplateElement.bind({});
36
+ ElementActualSize.args = {
37
37
  scale: 1,
38
38
  children: EXAMPLE_ELEMENT
39
39
  };
40
- export const elementZoomedIn = TemplateElement.bind({});
41
- elementZoomedIn.args = {
40
+ export const ElementZoomedIn = TemplateElement.bind({});
41
+ ElementZoomedIn.args = {
42
42
  scale: 0.7,
43
43
  children: EXAMPLE_ELEMENT
44
44
  };
45
- export const elementZoomedOut = TemplateElement.bind({});
46
- elementZoomedOut.args = {
45
+ export const ElementZoomedOut = TemplateElement.bind({});
46
+ ElementZoomedOut.args = {
47
47
  scale: 3,
48
48
  children: EXAMPLE_ELEMENT
49
49
  };
@@ -79,34 +79,34 @@ const TemplateIFrame = args => {
79
79
  };
80
80
 
81
81
  TemplateIFrame.displayName = "TemplateIFrame";
82
- export const iFrameActualSize = TemplateIFrame.bind({});
83
- iFrameActualSize.args = {
82
+ export const IFrameActualSize = TemplateIFrame.bind({});
83
+ IFrameActualSize.args = {
84
84
  scale: 1,
85
85
  active: true
86
86
  }; // The iFrame stories are disabled because useGlobals works in practice
87
87
  // but, for some reason breaks in the stories for Zoom.iFrame
88
88
 
89
- iFrameActualSize.parameters = {
89
+ IFrameActualSize.parameters = {
90
90
  chromatic: {
91
91
  disableSnapshot: true
92
92
  }
93
93
  };
94
- export const iFrameZoomedIn = TemplateIFrame.bind({});
95
- iFrameZoomedIn.args = {
94
+ export const IFrameZoomedIn = TemplateIFrame.bind({});
95
+ IFrameZoomedIn.args = {
96
96
  scale: 0.7,
97
97
  active: true
98
98
  };
99
- iFrameZoomedIn.parameters = {
99
+ IFrameZoomedIn.parameters = {
100
100
  chromatic: {
101
101
  disableSnapshot: true
102
102
  }
103
103
  };
104
- export const iFrameZoomedOut = TemplateIFrame.bind({});
105
- iFrameZoomedOut.args = {
104
+ export const IFrameZoomedOut = TemplateIFrame.bind({});
105
+ IFrameZoomedOut.args = {
106
106
  scale: 3,
107
107
  active: true
108
108
  };
109
- iFrameZoomedOut.parameters = {
109
+ IFrameZoomedOut.parameters = {
110
110
  chromatic: {
111
111
  disableSnapshot: true
112
112
  }
@@ -106,4 +106,17 @@ export const IconButton = styled(ButtonOrLink, {
106
106
  outline: 'none'
107
107
  }
108
108
  });
109
- IconButton.displayName = 'IconButton';
109
+ IconButton.displayName = 'IconButton';
110
+ const IconPlaceholder = styled.div(({
111
+ theme
112
+ }) => ({
113
+ width: 14,
114
+ height: 14,
115
+ backgroundColor: theme.appBorderColor,
116
+ animation: `${theme.animation.glow} 1.5s ease-in-out infinite`
117
+ }));
118
+ const IconButtonSkeletonWrapper = styled.div(() => ({
119
+ padding: 5
120
+ }));
121
+ export const IconButtonSkeleton = () => /*#__PURE__*/React.createElement(IconButtonSkeletonWrapper, null, /*#__PURE__*/React.createElement(IconPlaceholder, null));
122
+ IconButtonSkeleton.displayName = "IconButtonSkeleton";
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
- import { IconButton } from './button';
2
+ import { IconButton, IconButtonSkeleton } from './button';
3
3
  import { Icons } from '../icon/icon';
4
4
  export default {
5
5
  component: IconButton,
6
6
  title: 'Basics/IconButton'
7
- }; // eslint-disable-next-line no-underscore-dangle
8
-
7
+ };
8
+ export const Loading = () => /*#__PURE__*/React.createElement(IconButtonSkeleton, null);
9
+ Loading.displayName = "Loading";
10
+ // eslint-disable-next-line no-underscore-dangle
9
11
  export const _IconButton = () => /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(Icons, {
10
12
  icon: "bookmark"
11
13
  }));
@@ -6,6 +6,13 @@ import { ArgJsDoc } from './ArgJsDoc';
6
6
  import { ArgValue } from './ArgValue';
7
7
  import { ArgControl } from './ArgControl';
8
8
  import { codeCommon } from '../../typography/shared';
9
+ export const argRowLoadingData = {
10
+ row: {
11
+ name: 'loading',
12
+ description: 'loading'
13
+ },
14
+ arg: 0
15
+ };
9
16
  const Name = styled.span({
10
17
  fontWeight: 'bold'
11
18
  });
@@ -65,13 +72,14 @@ const StyledTd = styled.td(({
65
72
  export const ArgRow = props => {
66
73
  var _row$type;
67
74
 
75
+ // const isLoading = 'isLoading' in props;
68
76
  const {
69
77
  row,
70
78
  updateArgs,
71
79
  compact,
72
80
  expandable,
73
81
  initialExpandedArgs
74
- } = props;
82
+ } = 'row' in props ? props : argRowLoadingData;
75
83
  const {
76
84
  name,
77
85
  description
@@ -15,6 +15,10 @@ Template.displayName = "Template";
15
15
  const baseArgs = {
16
16
  updateArgs: action('updateArgs')
17
17
  };
18
+ export const Loading = Template.bind({});
19
+ Loading.args = {
20
+ isLoading: true
21
+ };
18
22
  export const String = Template.bind({});
19
23
  String.args = Object.assign({}, baseArgs, {
20
24
  row: {
@@ -6,7 +6,7 @@ import pickBy from 'lodash/pickBy';
6
6
  import { styled, ignoreSsrWarning } from '@storybook/theming';
7
7
  import { opacify, transparentize, darken, lighten } from 'polished';
8
8
  import { Icons } from '../../icon/icon';
9
- import { ArgRow } from './ArgRow';
9
+ import { ArgRow, argRowLoadingData } from './ArgRow';
10
10
  import { SectionRow } from './SectionRow';
11
11
  import { EmptyBlock } from '../EmptyBlock';
12
12
  import { Link } from '../../typography/link/link';
@@ -184,6 +184,13 @@ const sortFns = {
184
184
  },
185
185
  none: undefined
186
186
  };
187
+ export const argTableLoadingData = {
188
+ rows: {
189
+ row1: argRowLoadingData.row,
190
+ row2: argRowLoadingData.row,
191
+ row3: argRowLoadingData.row
192
+ }
193
+ };
187
194
 
188
195
  const groupRows = (rows, sort) => {
189
196
  const sections = {
@@ -251,25 +258,100 @@ const groupRows = (rows, sort) => {
251
258
  };
252
259
  return sorted;
253
260
  };
261
+
262
+ const SkeletonHeader = styled.div(({
263
+ theme
264
+ }) => ({
265
+ alignContent: 'stretch',
266
+ display: 'flex',
267
+ gap: 16,
268
+ marginTop: 25,
269
+ padding: '10px 20px',
270
+ div: {
271
+ animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
272
+ background: theme.appBorderColor,
273
+ flexShrink: 0,
274
+ height: 20,
275
+ '&:first-child, &:nth-child(4)': {
276
+ width: '20%'
277
+ },
278
+ '&:nth-child(2)': {
279
+ width: '30%'
280
+ },
281
+ '&:nth-child(3)': {
282
+ flexGrow: 1
283
+ },
284
+ '&:last-child': {
285
+ width: 30
286
+ },
287
+ '@media ( max-width: 500px )': {
288
+ '&:nth-child( n + 4 )': {
289
+ display: 'none'
290
+ }
291
+ }
292
+ }
293
+ }));
294
+ const SkeletonBody = styled.div(({
295
+ theme
296
+ }) => ({
297
+ background: theme.background.content,
298
+ boxShadow: theme.base === 'light' ? `rgba(0, 0, 0, 0.10) 0 1px 3px 1px,
299
+ ${transparentize(0.035, theme.appBorderColor)} 0 0 0 1px` : `rgba(0, 0, 0, 0.20) 0 2px 5px 1px,
300
+ ${opacify(0.05, theme.appBorderColor)} 0 0 0 1px`,
301
+ borderRadius: theme.appBorderRadius,
302
+ '> div': {
303
+ alignContent: 'stretch',
304
+ borderTopColor: theme.base === 'light' ? darken(0.1, theme.background.content) : lighten(0.05, theme.background.content),
305
+ borderTopStyle: 'solid',
306
+ borderTopWidth: 1,
307
+ display: 'flex',
308
+ gap: 16,
309
+ padding: 20,
310
+ '&:first-child': {
311
+ borderTop: 0
312
+ }
313
+ },
314
+ '> div div': {
315
+ animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
316
+ background: theme.appBorderColor,
317
+ flexShrink: 0,
318
+ height: 20,
319
+ '&:first-child': {
320
+ width: '20%'
321
+ },
322
+ '&:nth-child(2)': {
323
+ width: '30%'
324
+ },
325
+ '&:nth-child(3)': {
326
+ flexGrow: 1
327
+ },
328
+ '&:last-child': {
329
+ width: 'calc(20% + 47px)',
330
+ '@media ( max-width: 500px )': {
331
+ display: 'none'
332
+ }
333
+ }
334
+ }
335
+ }));
336
+
337
+ const Skeleton = () => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SkeletonHeader, null, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null)), /*#__PURE__*/React.createElement(SkeletonBody, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null))));
338
+
339
+ Skeleton.displayName = "Skeleton";
340
+
254
341
  /**
255
342
  * Display the props for a component as a props table. Each row is a collection of
256
343
  * ArgDefs, usually derived from docgen info for the component.
257
344
  */
258
-
259
-
260
345
  export const ArgsTable = props => {
261
- const {
262
- error
263
- } = props;
264
-
265
- if (error) {
266
- return /*#__PURE__*/React.createElement(EmptyBlock, null, error, "\xA0", /*#__PURE__*/React.createElement(Link, {
346
+ if ('error' in props) {
347
+ return /*#__PURE__*/React.createElement(EmptyBlock, null, props.error, "\xA0", /*#__PURE__*/React.createElement(Link, {
267
348
  href: "http://storybook.js.org/docs/",
268
349
  target: "_blank",
269
350
  withArrow: true
270
351
  }, "Read the docs"));
271
352
  }
272
353
 
354
+ const isLoading = ('isLoading' in props);
273
355
  const {
274
356
  rows,
275
357
  args,
@@ -279,7 +361,12 @@ export const ArgsTable = props => {
279
361
  inAddonPanel,
280
362
  initialExpandedArgs,
281
363
  sort = 'none'
282
- } = props;
364
+ } = 'rows' in props ? props : argTableLoadingData;
365
+
366
+ if (isLoading) {
367
+ return /*#__PURE__*/React.createElement(Skeleton, null);
368
+ }
369
+
283
370
  const groups = groupRows(pickBy(rows, row => {
284
371
  var _row$table;
285
372
 
@@ -310,13 +397,13 @@ export const ArgsTable = props => {
310
397
  className: "docblock-argstable"
311
398
  }, /*#__PURE__*/React.createElement("thead", {
312
399
  className: "docblock-argstable-head"
313
- }, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Name"), compact ? null : /*#__PURE__*/React.createElement("th", null, "Description"), compact ? null : /*#__PURE__*/React.createElement("th", null, "Default"), updateArgs ? /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(ControlHeadingWrapper, null, "Control", ' ', resetArgs && /*#__PURE__*/React.createElement(ResetButton, {
400
+ }, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Name"), compact || /*#__PURE__*/React.createElement("th", null, "Description"), compact || /*#__PURE__*/React.createElement("th", null, "Default"), updateArgs && /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(ControlHeadingWrapper, null, "Control", ' ', resetArgs && /*#__PURE__*/React.createElement(ResetButton, {
314
401
  onClick: () => resetArgs(),
315
402
  title: "Reset controls"
316
403
  }, /*#__PURE__*/React.createElement(Icons, {
317
404
  icon: "undo",
318
405
  "aria-hidden": true
319
- })))) : null)), /*#__PURE__*/React.createElement("tbody", {
406
+ })))), null)), /*#__PURE__*/React.createElement("tbody", {
320
407
  className: "docblock-argstable-body"
321
408
  }, groups.ungrouped.map(row => /*#__PURE__*/React.createElement(ArgRow, _extends({
322
409
  key: row.key,
@@ -31,6 +31,10 @@ const longEnumType = ArgRow.LongEnum.args.row;
31
31
  const Template = args => /*#__PURE__*/React.createElement(ArgsTable, args);
32
32
 
33
33
  Template.displayName = "Template";
34
+ export const Loading = Template.bind({});
35
+ Loading.args = {
36
+ isLoading: true
37
+ };
34
38
  export const Normal = Template.bind({});
35
39
  Normal.args = {
36
40
  rows: {
@@ -4,7 +4,7 @@ export default {
4
4
  title: 'Docs/ColorPalette',
5
5
  component: ColorPalette
6
6
  };
7
- export const defaultStyle = () => /*#__PURE__*/React.createElement(ColorPalette, null, /*#__PURE__*/React.createElement(ColorItem, {
7
+ export const DefaultStyle = () => /*#__PURE__*/React.createElement(ColorPalette, null, /*#__PURE__*/React.createElement(ColorItem, {
8
8
  title: "theme.color.greyscale",
9
9
  subtitle: "Some of the greys",
10
10
  colors: ['#FFFFFF', '#F8F8F8', '#F3F3F3']
@@ -25,7 +25,7 @@ export const defaultStyle = () => /*#__PURE__*/React.createElement(ColorPalette,
25
25
  subtitle: "Grayscale",
26
26
  colors: ['linear-gradient(to right,white,black)']
27
27
  }));
28
- defaultStyle.displayName = "defaultStyle";
28
+ DefaultStyle.displayName = "DefaultStyle";
29
29
  export const NamedColors = () => /*#__PURE__*/React.createElement(ColorPalette, null, /*#__PURE__*/React.createElement(ColorItem, {
30
30
  title: "theme.color.greyscale",
31
31
  subtitle: "Some of the greys",
@@ -16,7 +16,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
16
16
  } : {
17
17
  name: "11oe0k1",
18
18
  styles: "ul,ol{list-style:none;}",
19
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ibG9ja3MvRG9jc1BhZ2Uuc3Rvcmllcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0JxQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvYmxvY2tzL0RvY3NQYWdlLnN0b3JpZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IEdsb2JhbCwgY3NzIH0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XG5leHBvcnQgY29uc3QgTWFya2Rvd24gPSAoKSA9PiAoXG4gIDxEb2NzUGFnZVdyYXBwZXI+XG4gICAgPFRpdGxlPm1hcmtkb3duPC9UaXRsZT5cbiAgICA8RGVzY3JpcHRpb24gey4uLmRlc2NyaXB0aW9uLk1hcmtkb3duLmFyZ3N9IC8+XG4gICAgPFByZXZpZXcuU2luZ2xlIC8+XG4gICAgPEFyZ3NUYWJsZSB7Li4uYXJnc1RhYmxlLk5vcm1hbC5hcmdzfSAvPlxuICAgIDxTb3VyY2Ugey4uLnNvdXJjZS5KU1guYXJnc30gLz5cbiAgPC9Eb2NzUGFnZVdyYXBwZXI+XG4pO1xuIl19 */",
20
20
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
21
  };
22
22
 
@@ -32,6 +32,8 @@ export default {
32
32
  layout: 'fullscreen'
33
33
  }
34
34
  };
35
+ export const Loading = () => /*#__PURE__*/React.createElement(DocsPageWrapper, null, /*#__PURE__*/React.createElement(Title, null, "DocsPage"), /*#__PURE__*/React.createElement(Subtitle, null, "What the DocsPage looks like. Meant to be QAed in Canvas tab not in Docs tab."), /*#__PURE__*/React.createElement(Description, description.Text.args), /*#__PURE__*/React.createElement(Preview.Loading, null), /*#__PURE__*/React.createElement(argsTable.Loading, null), /*#__PURE__*/React.createElement(Source, source.Loading.args));
36
+ Loading.displayName = "Loading";
35
37
  export const WithSubtitle = () => /*#__PURE__*/React.createElement(DocsPageWrapper, null, /*#__PURE__*/React.createElement(Title, null, "DocsPage"), /*#__PURE__*/React.createElement(Subtitle, null, "What the DocsPage looks like. Meant to be QAed in Canvas tab not in Docs tab."), /*#__PURE__*/React.createElement(Description, description.Text.args), /*#__PURE__*/React.createElement(Preview.Single, null), /*#__PURE__*/React.createElement(ArgsTable, argsTable.Normal.args), /*#__PURE__*/React.createElement(Source, source.JSX.args));
36
38
  WithSubtitle.displayName = "WithSubtitle";
37
39
  export const Empty = () => /*#__PURE__*/React.createElement(DocsPageWrapper, null, /*#__PURE__*/React.createElement(Story.Error, null), /*#__PURE__*/React.createElement(ArgsTable, argsTable.Error.args), /*#__PURE__*/React.createElement(Source, source.SourceUnavailable.args));
@@ -4,5 +4,5 @@ export default {
4
4
  title: 'Docs/EmptyBlock',
5
5
  component: EmptyBlock
6
6
  };
7
- export const error = () => /*#__PURE__*/React.createElement(EmptyBlock, null, "Generic error message");
8
- error.displayName = "error";
7
+ export const Error = () => /*#__PURE__*/React.createElement(EmptyBlock, null, "Generic error message");
8
+ Error.displayName = "Error";
@@ -5,7 +5,7 @@ export default {
5
5
  title: 'Docs/IconGallery',
6
6
  component: IconGallery
7
7
  };
8
- export const defaultStyle = () => /*#__PURE__*/React.createElement(IconGallery, null, /*#__PURE__*/React.createElement(IconItem, {
8
+ export const DefaultStyle = () => /*#__PURE__*/React.createElement(IconGallery, null, /*#__PURE__*/React.createElement(IconItem, {
9
9
  name: "add"
10
10
  }, /*#__PURE__*/React.createElement(ExampleIcon, {
11
11
  icon: "add"
@@ -32,4 +32,4 @@ export const defaultStyle = () => /*#__PURE__*/React.createElement(IconGallery,
32
32
  src: "https://place-hold.it/50x50",
33
33
  alt: "example"
34
34
  })));
35
- defaultStyle.displayName = "defaultStyle";
35
+ DefaultStyle.displayName = "DefaultStyle";
@@ -14,6 +14,7 @@ import { ActionBar } from '../ActionBar/ActionBar';
14
14
  import { Toolbar } from './Toolbar';
15
15
  import { ZoomContext } from './ZoomContext';
16
16
  import { Zoom } from '../Zoom/Zoom';
17
+ import { StorySkeleton } from '.';
17
18
  const ChildrenContainer = styled.div(({
18
19
  isColumn,
19
20
  columns,
@@ -177,7 +178,7 @@ const getLayout = children => {
177
178
  */
178
179
 
179
180
 
180
- const Preview = (_ref) => {
181
+ export const Preview = (_ref) => {
181
182
  let {
182
183
  isColumn,
183
184
  columns,
@@ -257,6 +258,8 @@ const Preview = (_ref) => {
257
258
  actionItems: actionItems
258
259
  }))), withSource && expanded && source);
259
260
  };
260
-
261
261
  Preview.displayName = "Preview";
262
- export { Preview };
262
+ export const PreviewSkeleton = () => /*#__PURE__*/React.createElement(Preview, {
263
+ withToolbar: true
264
+ }, /*#__PURE__*/React.createElement(StorySkeleton, null));
265
+ PreviewSkeleton.displayName = "PreviewSkeleton";
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { styled } from '@storybook/theming';
5
5
  import global from 'global';
6
6
  import { Spaced } from '../spaced/Spaced';
7
- import { Preview } from './Preview';
7
+ import { Preview, PreviewSkeleton } from './Preview';
8
8
  import { Story } from './Story';
9
9
  import { Button } from '../Button/Button';
10
10
  import * as Source from './Source.stories';
@@ -15,6 +15,8 @@ export default {
15
15
  title: 'Docs/Preview',
16
16
  component: Preview
17
17
  };
18
+ export const Loading = () => /*#__PURE__*/React.createElement(PreviewSkeleton, null);
19
+ Loading.displayName = "Loading";
18
20
  export const CodeCollapsed = () => /*#__PURE__*/React.createElement(Preview, {
19
21
  isExpanded: false,
20
22
  withSource: Source.JSX.args
@@ -27,14 +27,58 @@ export let SourceError;
27
27
  SourceError["SOURCE_UNAVAILABLE"] = "Oh no! The source is not available.";
28
28
  })(SourceError || (SourceError = {}));
29
29
 
30
+ const SourceSkeletonWrapper = styled.div(({
31
+ theme
32
+ }) => ({
33
+ background: theme.background.content,
34
+ borderRadius: theme.appBorderRadius,
35
+ border: `1px solid ${theme.appBorderColor}`,
36
+ boxShadow: theme.base === 'light' ? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' : 'rgba(0, 0, 0, 0.20) 0 2px 5px 0',
37
+ margin: '25px 0 40px',
38
+ padding: '20px 20px 20px 22px'
39
+ }));
40
+ const SourceSkeletonPlaceholder = styled.div(({
41
+ theme
42
+ }) => ({
43
+ animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
44
+ background: theme.appBorderColor,
45
+ height: 17,
46
+ marginTop: 1,
47
+ width: '60%',
48
+ '&:first-child': {
49
+ margin: 0
50
+ }
51
+ }));
52
+
53
+ const SourceSkeleton = () => /*#__PURE__*/React.createElement(SourceSkeletonWrapper, null, /*#__PURE__*/React.createElement(SourceSkeletonPlaceholder, null), /*#__PURE__*/React.createElement(SourceSkeletonPlaceholder, {
54
+ style: {
55
+ width: '80%'
56
+ }
57
+ }), /*#__PURE__*/React.createElement(SourceSkeletonPlaceholder, {
58
+ style: {
59
+ width: '30%'
60
+ }
61
+ }), /*#__PURE__*/React.createElement(SourceSkeletonPlaceholder, {
62
+ style: {
63
+ width: '80%'
64
+ }
65
+ }));
66
+
67
+ SourceSkeleton.displayName = "SourceSkeleton";
68
+
30
69
  /**
31
70
  * Syntax-highlighted source code for a component (or anything!)
32
71
  */
33
72
  const Source = props => {
34
73
  const {
74
+ isLoading,
35
75
  error
36
76
  } = props;
37
77
 
78
+ if (isLoading) {
79
+ return /*#__PURE__*/React.createElement(SourceSkeleton, null);
80
+ }
81
+
38
82
  if (error) {
39
83
  return /*#__PURE__*/React.createElement(EmptyBlock, null, error);
40
84
  }
@@ -4,6 +4,11 @@ export default {
4
4
  title: 'Docs/Source',
5
5
  component: Source
6
6
  };
7
+ export const Loading = args => /*#__PURE__*/React.createElement(Source, args);
8
+ Loading.displayName = "Loading";
9
+ Loading.args = {
10
+ isLoading: true
11
+ };
7
12
  const jsxCode = `
8
13
  <MyComponent boolProp scalarProp={1} complexProp={{ foo: 1, bar: '2' }}>
9
14
  <SomeOtherComponent funcProp={(a) => a.id} />
@@ -4,6 +4,7 @@ import React, { createElement, Fragment } from 'react';
4
4
  import { IFrame } from './IFrame';
5
5
  import { EmptyBlock } from './EmptyBlock';
6
6
  import { ZoomContext } from './ZoomContext';
7
+ import { Loader } from '..';
7
8
  const BASE_URL = 'iframe.html';
8
9
  export let StoryError;
9
10
  /** error message for Story with null storyFn
@@ -82,4 +83,7 @@ const Story = (_ref) => {
82
83
  });
83
84
  };
84
85
 
85
- export { Story };
86
+ const StorySkeleton = () => /*#__PURE__*/React.createElement(Loader, null);
87
+
88
+ StorySkeleton.displayName = "StorySkeleton";
89
+ export { Story, StorySkeleton };