@storybook/components 6.5.0-alpha.2 → 6.5.0-alpha.23

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 (245) hide show
  1. package/dist/cjs/ActionBar/ActionBar.js +4 -2
  2. package/dist/cjs/ActionBar/ActionBar.stories.js +1 -1
  3. package/dist/cjs/Button/Button.js +8 -6
  4. package/dist/cjs/Loader/Loader.js +12 -8
  5. package/dist/cjs/Loader/Loader.stories.js +1 -1
  6. package/dist/cjs/ScrollArea/GlobalScrollAreaStyles.js +1 -1
  7. package/dist/cjs/ScrollArea/OverlayScrollbars.js +7 -3
  8. package/dist/cjs/ScrollArea/ScrollArea.js +10 -8
  9. package/dist/cjs/ScrollArea/ScrollArea.stories.js +6 -6
  10. package/dist/cjs/Zoom/Zoom.js +1 -1
  11. package/dist/cjs/Zoom/Zoom.stories.js +9 -7
  12. package/dist/cjs/Zoom/ZoomElement.js +8 -6
  13. package/dist/cjs/Zoom/ZoomIFrame.js +8 -8
  14. package/dist/cjs/addon-panel/addon-panel.js +5 -5
  15. package/dist/cjs/bar/bar.js +16 -10
  16. package/dist/cjs/bar/button.js +6 -4
  17. package/dist/cjs/bar/button.stories.js +1 -1
  18. package/dist/cjs/bar/separator.js +7 -7
  19. package/dist/cjs/blocks/ArgsTable/ArgControl.js +8 -6
  20. package/dist/cjs/blocks/ArgsTable/ArgJsDoc.js +3 -1
  21. package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +1 -1
  22. package/dist/cjs/blocks/ArgsTable/ArgValue.js +9 -9
  23. package/dist/cjs/blocks/ArgsTable/ArgsTable.js +10 -6
  24. package/dist/cjs/blocks/ArgsTable/ArgsTable.stories.js +6 -6
  25. package/dist/cjs/blocks/ArgsTable/SectionRow.js +8 -6
  26. package/dist/cjs/blocks/ArgsTable/SectionRow.stories.js +1 -1
  27. package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.js +10 -6
  28. package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.stories.js +1 -1
  29. package/dist/cjs/blocks/ArgsTable/index.js +2 -0
  30. package/dist/cjs/blocks/ColorPalette.js +3 -1
  31. package/dist/cjs/blocks/ColorPalette.stories.js +1 -1
  32. package/dist/cjs/blocks/Description.stories.js +1 -1
  33. package/dist/cjs/blocks/DocsPage.js +1 -1
  34. package/dist/cjs/blocks/DocsPage.stories.js +6 -6
  35. package/dist/cjs/blocks/EmptyBlock.stories.js +1 -1
  36. package/dist/cjs/blocks/IFrame.js +13 -11
  37. package/dist/cjs/blocks/IconGallery.js +4 -2
  38. package/dist/cjs/blocks/IconGallery.stories.js +1 -1
  39. package/dist/cjs/blocks/Preview.js +14 -10
  40. package/dist/cjs/blocks/Preview.stories.js +6 -6
  41. package/dist/cjs/blocks/Source.js +6 -4
  42. package/dist/cjs/blocks/Source.stories.js +1 -1
  43. package/dist/cjs/blocks/Story.js +20 -9
  44. package/dist/cjs/blocks/Story.stories.js +9 -7
  45. package/dist/cjs/blocks/Toolbar.js +11 -9
  46. package/dist/cjs/blocks/Typeset.js +3 -1
  47. package/dist/cjs/blocks/Typeset.stories.js +1 -1
  48. package/dist/cjs/blocks/index.js +2 -0
  49. package/dist/cjs/brand/StorybookLogo.js +5 -3
  50. package/dist/cjs/brand/StorybookLogo.stories.js +1 -1
  51. package/dist/cjs/controls/Boolean.js +5 -5
  52. package/dist/cjs/controls/Boolean.stories.js +9 -7
  53. package/dist/cjs/controls/Color.js +13 -11
  54. package/dist/cjs/controls/Color.stories.js +9 -7
  55. package/dist/cjs/controls/Date.js +8 -8
  56. package/dist/cjs/controls/Date.stories.js +9 -7
  57. package/dist/cjs/controls/Files.js +7 -5
  58. package/dist/cjs/controls/Number.js +17 -8
  59. package/dist/cjs/controls/Number.stories.js +9 -7
  60. package/dist/cjs/controls/Object.js +8 -6
  61. package/dist/cjs/controls/Object.stories.js +9 -7
  62. package/dist/cjs/controls/Range.js +7 -7
  63. package/dist/cjs/controls/Range.stories.js +9 -7
  64. package/dist/cjs/controls/Text.js +8 -6
  65. package/dist/cjs/controls/Text.stories.js +9 -7
  66. package/dist/cjs/controls/helpers.js +2 -2
  67. package/dist/cjs/controls/index.js +7 -7
  68. package/dist/cjs/controls/options/Checkbox.js +9 -7
  69. package/dist/cjs/controls/options/Options.js +2 -0
  70. package/dist/cjs/controls/options/Options.stories.js +9 -7
  71. package/dist/cjs/controls/options/Select.js +2 -0
  72. package/dist/cjs/controls/options/helpers.js +7 -5
  73. package/dist/cjs/controls/options/index.js +2 -0
  74. package/dist/cjs/controls/react-editable-json-tree/components/JsonAddValue.js +10 -10
  75. package/dist/cjs/controls/react-editable-json-tree/components/JsonArray.js +13 -11
  76. package/dist/cjs/controls/react-editable-json-tree/components/JsonFunctionValue.js +13 -11
  77. package/dist/cjs/controls/react-editable-json-tree/components/JsonNode.js +8 -8
  78. package/dist/cjs/controls/react-editable-json-tree/components/JsonObject.js +13 -11
  79. package/dist/cjs/controls/react-editable-json-tree/components/JsonValue.js +13 -11
  80. package/dist/cjs/controls/react-editable-json-tree/index.js +21 -21
  81. package/dist/cjs/controls/react-editable-json-tree/utils/objectTypes.js +3 -3
  82. package/dist/cjs/controls/react-editable-json-tree/utils/styles.js +1 -1
  83. package/dist/cjs/controls/types.js +5 -1
  84. package/dist/cjs/form/field/field.js +3 -1
  85. package/dist/cjs/form/form.stories.js +5 -3
  86. package/dist/cjs/form/input/input.js +15 -10
  87. package/dist/cjs/html.js +2 -0
  88. package/dist/cjs/icon/icon.js +3 -1
  89. package/dist/cjs/icon/icon.stories.js +2 -0
  90. package/dist/cjs/icon/icons.js +1 -1
  91. package/dist/cjs/index.js +75 -63
  92. package/dist/cjs/placeholder/placeholder.js +15 -9
  93. package/dist/cjs/placeholder/placeholder.stories.js +6 -6
  94. package/dist/cjs/spaced/Spaced.js +3 -1
  95. package/dist/cjs/syntaxhighlighter/lazy-syntaxhighlighter.js +7 -7
  96. package/dist/cjs/syntaxhighlighter/syntaxhighlighter-types.js +5 -1
  97. package/dist/cjs/syntaxhighlighter/syntaxhighlighter.js +15 -10
  98. package/dist/cjs/syntaxhighlighter/syntaxhighlighter.stories.js +5 -5
  99. package/dist/cjs/tabs/tabs.js +13 -11
  100. package/dist/cjs/tabs/tabs.stories.js +6 -4
  101. package/dist/cjs/tooltip/ListItem.js +7 -4
  102. package/dist/cjs/tooltip/Tooltip.js +5 -3
  103. package/dist/cjs/tooltip/TooltipLinkList.js +12 -9
  104. package/dist/cjs/tooltip/TooltipLinkList.stories.js +5 -5
  105. package/dist/cjs/tooltip/TooltipMessage.js +3 -1
  106. package/dist/cjs/tooltip/TooltipNote.js +3 -1
  107. package/dist/cjs/tooltip/WithTooltip.js +14 -9
  108. package/dist/cjs/tooltip/lazy-WithTooltip.js +7 -7
  109. package/dist/cjs/typings.d.ts +4 -0
  110. package/dist/cjs/typography/DocumentFormatting.js +13 -6
  111. package/dist/cjs/typography/DocumentWrapper.stories.js +1 -1
  112. package/dist/cjs/typography/link/link.js +5 -3
  113. package/dist/cjs/typography/shared.js +1 -1
  114. package/dist/cjs/utils/getStoryHref.js +71 -0
  115. package/dist/esm/ActionBar/ActionBar.js +5 -3
  116. package/dist/esm/Button/Button.js +3 -1
  117. package/dist/esm/Loader/Loader.js +5 -3
  118. package/dist/esm/ScrollArea/OverlayScrollbars.js +6 -4
  119. package/dist/esm/ScrollArea/ScrollArea.js +4 -2
  120. package/dist/esm/Zoom/Zoom.stories.js +3 -2
  121. package/dist/esm/Zoom/ZoomElement.js +3 -2
  122. package/dist/esm/Zoom/ZoomIFrame.js +6 -6
  123. package/dist/esm/bar/bar.js +7 -4
  124. package/dist/esm/bar/button.js +2 -1
  125. package/dist/esm/bar/separator.js +1 -0
  126. package/dist/esm/blocks/ArgsTable/ArgControl.js +3 -2
  127. package/dist/esm/blocks/ArgsTable/ArgJsDoc.js +1 -0
  128. package/dist/esm/blocks/ArgsTable/ArgValue.js +4 -4
  129. package/dist/esm/blocks/ArgsTable/ArgsTable.js +5 -3
  130. package/dist/esm/blocks/ArgsTable/SectionRow.js +3 -2
  131. package/dist/esm/blocks/ArgsTable/TabbedArgsTable.js +17 -14
  132. package/dist/esm/blocks/ColorPalette.js +3 -1
  133. package/dist/esm/blocks/IFrame.js +16 -14
  134. package/dist/esm/blocks/IconGallery.js +3 -1
  135. package/dist/esm/blocks/Preview.js +16 -14
  136. package/dist/esm/blocks/Source.js +2 -1
  137. package/dist/esm/blocks/Story.js +12 -5
  138. package/dist/esm/blocks/Story.stories.js +3 -2
  139. package/dist/esm/blocks/Toolbar.js +8 -6
  140. package/dist/esm/blocks/Typeset.js +5 -3
  141. package/dist/esm/brand/StorybookLogo.js +2 -1
  142. package/dist/esm/controls/Boolean.stories.js +3 -2
  143. package/dist/esm/controls/Color.js +7 -5
  144. package/dist/esm/controls/Color.stories.js +3 -2
  145. package/dist/esm/controls/Date.js +3 -3
  146. package/dist/esm/controls/Date.stories.js +3 -2
  147. package/dist/esm/controls/Files.js +4 -3
  148. package/dist/esm/controls/Number.js +11 -3
  149. package/dist/esm/controls/Number.stories.js +3 -2
  150. package/dist/esm/controls/Object.js +3 -2
  151. package/dist/esm/controls/Object.stories.js +3 -2
  152. package/dist/esm/controls/Range.js +1 -1
  153. package/dist/esm/controls/Range.stories.js +3 -2
  154. package/dist/esm/controls/Text.js +3 -2
  155. package/dist/esm/controls/Text.stories.js +3 -2
  156. package/dist/esm/controls/helpers.js +1 -1
  157. package/dist/esm/controls/index.js +1 -1
  158. package/dist/esm/controls/options/Checkbox.js +4 -3
  159. package/dist/esm/controls/options/Options.js +1 -0
  160. package/dist/esm/controls/options/Options.stories.js +3 -2
  161. package/dist/esm/controls/options/Select.js +1 -0
  162. package/dist/esm/controls/options/helpers.js +4 -3
  163. package/dist/esm/controls/react-editable-json-tree/components/JsonAddValue.js +6 -6
  164. package/dist/esm/controls/react-editable-json-tree/components/JsonArray.js +8 -7
  165. package/dist/esm/controls/react-editable-json-tree/components/JsonFunctionValue.js +8 -7
  166. package/dist/esm/controls/react-editable-json-tree/components/JsonNode.js +5 -5
  167. package/dist/esm/controls/react-editable-json-tree/components/JsonObject.js +8 -7
  168. package/dist/esm/controls/react-editable-json-tree/components/JsonValue.js +8 -7
  169. package/dist/esm/controls/react-editable-json-tree/index.js +6 -6
  170. package/dist/esm/controls/react-editable-json-tree/utils/objectTypes.js +2 -2
  171. package/dist/esm/controls/types.js +1 -0
  172. package/dist/esm/form/field/field.js +5 -3
  173. package/dist/esm/form/form.stories.js +3 -2
  174. package/dist/esm/form/input/input.js +11 -6
  175. package/dist/esm/icon/icon.js +4 -3
  176. package/dist/esm/icon/icon.stories.js +1 -0
  177. package/dist/esm/index.js +4 -1
  178. package/dist/esm/placeholder/placeholder.js +16 -12
  179. package/dist/esm/spaced/Spaced.js +6 -4
  180. package/dist/esm/syntaxhighlighter/lazy-syntaxhighlighter.js +1 -1
  181. package/dist/esm/syntaxhighlighter/syntaxhighlighter-types.js +1 -0
  182. package/dist/esm/syntaxhighlighter/syntaxhighlighter.js +17 -14
  183. package/dist/esm/tabs/tabs.js +7 -6
  184. package/dist/esm/tabs/tabs.stories.js +2 -1
  185. package/dist/esm/tooltip/ListItem.js +7 -4
  186. package/dist/esm/tooltip/Tooltip.js +4 -2
  187. package/dist/esm/tooltip/TooltipLinkList.js +5 -3
  188. package/dist/esm/tooltip/TooltipMessage.js +6 -4
  189. package/dist/esm/tooltip/TooltipNote.js +5 -3
  190. package/dist/esm/tooltip/WithTooltip.js +7 -4
  191. package/dist/esm/tooltip/lazy-WithTooltip.js +1 -1
  192. package/dist/esm/typings.d.ts +4 -0
  193. package/dist/esm/typography/DocumentFormatting.js +12 -7
  194. package/dist/esm/typography/link/link.js +2 -1
  195. package/dist/esm/utils/getStoryHref.js +46 -0
  196. package/dist/modern/ActionBar/ActionBar.js +4 -2
  197. package/dist/modern/Badge/Badge.js +1 -1
  198. package/dist/modern/Button/Button.js +3 -1
  199. package/dist/modern/Loader/Loader.js +4 -2
  200. package/dist/modern/ScrollArea/OverlayScrollbars.js +4 -2
  201. package/dist/modern/ScrollArea/ScrollArea.js +4 -2
  202. package/dist/modern/bar/bar.js +4 -2
  203. package/dist/modern/bar/button.js +4 -2
  204. package/dist/modern/blocks/ArgsTable/TabbedArgsTable.js +4 -2
  205. package/dist/modern/blocks/ColorPalette.js +4 -2
  206. package/dist/modern/blocks/IFrame.js +3 -1
  207. package/dist/modern/blocks/IconGallery.js +4 -2
  208. package/dist/modern/blocks/Preview.js +4 -2
  209. package/dist/modern/blocks/Source.js +3 -1
  210. package/dist/modern/blocks/Story.js +13 -4
  211. package/dist/modern/blocks/Toolbar.js +6 -3
  212. package/dist/modern/blocks/Typeset.js +4 -2
  213. package/dist/modern/brand/StorybookIcon.js +1 -1
  214. package/dist/modern/brand/StorybookLogo.js +4 -2
  215. package/dist/modern/controls/Color.js +4 -2
  216. package/dist/modern/controls/Number.js +7 -0
  217. package/dist/modern/controls/types.js +1 -0
  218. package/dist/modern/form/field/field.js +4 -2
  219. package/dist/modern/form/input/input.js +9 -4
  220. package/dist/modern/icon/icon.js +4 -2
  221. package/dist/modern/index.js +3 -1
  222. package/dist/modern/placeholder/placeholder.js +4 -2
  223. package/dist/modern/spaced/Spaced.js +4 -2
  224. package/dist/modern/syntaxhighlighter/syntaxhighlighter-types.js +1 -0
  225. package/dist/modern/syntaxhighlighter/syntaxhighlighter.js +4 -2
  226. package/dist/modern/tooltip/ListItem.js +7 -4
  227. package/dist/modern/tooltip/Tooltip.js +4 -2
  228. package/dist/modern/tooltip/TooltipLinkList.js +6 -3
  229. package/dist/modern/tooltip/TooltipMessage.js +4 -2
  230. package/dist/modern/tooltip/TooltipNote.js +4 -2
  231. package/dist/modern/tooltip/WithTooltip.js +7 -4
  232. package/dist/modern/typings.d.ts +4 -0
  233. package/dist/modern/typography/DocumentFormatting.js +7 -4
  234. package/dist/modern/typography/link/link.js +4 -2
  235. package/dist/modern/utils/getStoryHref.js +13 -0
  236. package/dist/ts3.4/Zoom/ZoomIFrame.d.ts +1 -1
  237. package/dist/ts3.4/index.d.ts +1 -0
  238. package/dist/ts3.4/utils/getStoryHref.d.ts +1 -0
  239. package/dist/ts3.9/Zoom/ZoomIFrame.d.ts +1 -1
  240. package/dist/ts3.9/index.d.ts +1 -0
  241. package/dist/ts3.9/utils/getStoryHref.d.ts +1 -0
  242. package/package.json +6 -5
  243. package/dist/cjs/typings.d.js +0 -1
  244. package/dist/esm/typings.d.js +0 -0
  245. package/dist/modern/typings.d.js +0 -0
@@ -43,6 +43,13 @@ export const NumberControl = ({
43
43
  useEffect(() => {
44
44
  if (forceVisible && htmlElRef.current) htmlElRef.current.select();
45
45
  }, [forceVisible]);
46
+ useEffect(() => {
47
+ const newInputValue = typeof value === 'number' ? value : '';
48
+
49
+ if (inputValue !== newInputValue) {
50
+ setInputValue(value);
51
+ }
52
+ }, [value]);
46
53
 
47
54
  if (!forceVisible && value === undefined) {
48
55
  return /*#__PURE__*/React.createElement(Form.Button, {
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,5 @@
1
+ const _excluded = ["label", "children"];
2
+
1
3
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
4
 
3
5
  import React from 'react';
@@ -24,12 +26,12 @@ const Label = styled.span(({
24
26
  alignItems: 'center',
25
27
  lineHeight: '16px'
26
28
  }));
27
- export const Field = (_ref) => {
29
+ export const Field = _ref => {
28
30
  let {
29
31
  label,
30
32
  children
31
33
  } = _ref,
32
- props = _objectWithoutPropertiesLoose(_ref, ["label", "children"]);
34
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
33
35
 
34
36
  return /*#__PURE__*/React.createElement(Wrapper, props, label ? /*#__PURE__*/React.createElement(Label, null, /*#__PURE__*/React.createElement("span", null, label)) : null, children);
35
37
  };
@@ -1,3 +1,8 @@
1
+ const _excluded = ["size", "valid", "align"],
2
+ _excluded2 = ["size", "valid", "align"],
3
+ _excluded3 = ["size", "valid", "align"],
4
+ _excluded4 = ["size", "valid", "align"];
5
+
1
6
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
7
 
3
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -139,7 +144,7 @@ const validation = ({
139
144
  };
140
145
 
141
146
  export const Input = Object.assign(styled( /*#__PURE__*/forwardRef((_ref, ref) => {
142
- let props = _objectWithoutPropertiesLoose(_ref, ["size", "valid", "align"]);
147
+ let props = _objectWithoutPropertiesLoose(_ref, _excluded);
143
148
 
144
149
  return /*#__PURE__*/React.createElement("input", _extends({}, props, {
145
150
  ref: ref
@@ -150,7 +155,7 @@ export const Input = Object.assign(styled( /*#__PURE__*/forwardRef((_ref, ref) =
150
155
  displayName: 'Input'
151
156
  });
152
157
  export const Select = Object.assign(styled( /*#__PURE__*/forwardRef((_ref2, ref) => {
153
- let props = _objectWithoutPropertiesLoose(_ref2, ["size", "valid", "align"]);
158
+ let props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
154
159
 
155
160
  return /*#__PURE__*/React.createElement("select", _extends({}, props, {
156
161
  ref: ref
@@ -164,7 +169,7 @@ export const Select = Object.assign(styled( /*#__PURE__*/forwardRef((_ref2, ref)
164
169
  displayName: 'Select'
165
170
  });
166
171
  export const Textarea = Object.assign(styled( /*#__PURE__*/forwardRef((_ref3, ref) => {
167
- let props = _objectWithoutPropertiesLoose(_ref3, ["size", "valid", "align"]);
172
+ let props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
168
173
 
169
174
  return /*#__PURE__*/React.createElement(TextareaAutoResize, _extends({}, props, {
170
175
  ref: ref
@@ -178,7 +183,7 @@ export const Textarea = Object.assign(styled( /*#__PURE__*/forwardRef((_ref3, re
178
183
  displayName: 'Textarea'
179
184
  });
180
185
  const ButtonStyled = styled( /*#__PURE__*/forwardRef((_ref4, ref) => {
181
- let props = _objectWithoutPropertiesLoose(_ref4, ["size", "valid", "align"]);
186
+ let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
182
187
 
183
188
  return /*#__PURE__*/React.createElement(StyledButton, _extends({}, props, {
184
189
  ref: ref
@@ -1,3 +1,5 @@
1
+ const _excluded = ["icon", "symbol"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -10,12 +12,12 @@ const Path = styled.path({
10
12
  fill: 'currentColor'
11
13
  });
12
14
  // TODO: if we can resize the 1024 to 20, we can remove the size attributes
13
- export const Icons = /*#__PURE__*/React.memo((_ref) => {
15
+ export const Icons = /*#__PURE__*/React.memo(_ref => {
14
16
  let {
15
17
  icon,
16
18
  symbol
17
19
  } = _ref,
18
- props = _objectWithoutPropertiesLoose(_ref, ["icon", "symbol"]);
20
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
19
21
 
20
22
  return /*#__PURE__*/React.createElement(Svg, _extends({
21
23
  viewBox: "0 0 1024 1024"
@@ -33,7 +33,9 @@ export { StorybookIcon } from './brand/StorybookIcon'; // Doc blocks
33
33
  export * from './blocks';
34
34
  export * from './controls'; // Loader
35
35
 
36
- export { Loader } from './Loader/Loader';
36
+ export { Loader } from './Loader/Loader'; // Utils
37
+
38
+ export { getStoryHref } from './utils/getStoryHref';
37
39
  export * from './typography/DocumentFormatting';
38
40
  export { rawComponents as components };
39
41
  const resetComponents = {};
@@ -1,3 +1,5 @@
1
+ const _excluded = ["children"];
2
+
1
3
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
4
 
3
5
  import React, { Children } from 'react';
@@ -16,11 +18,11 @@ const Message = styled.div(({
16
18
  color: theme.color.defaultText,
17
19
  fontSize: theme.typography.size.s2 - 1
18
20
  }));
19
- export const Placeholder = (_ref) => {
21
+ export const Placeholder = _ref => {
20
22
  let {
21
23
  children
22
24
  } = _ref,
23
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
25
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
24
26
 
25
27
  const [title, desc] = Children.toArray(children);
26
28
  return /*#__PURE__*/React.createElement(Message, props, /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc));
@@ -1,3 +1,5 @@
1
+ const _excluded = ["col", "row", "outer", "children"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -57,14 +59,14 @@ const Container = styled.div(({
57
59
  }
58
60
  }
59
61
  });
60
- export const Spaced = (_ref) => {
62
+ export const Spaced = _ref => {
61
63
  let {
62
64
  col,
63
65
  row,
64
66
  outer,
65
67
  children
66
68
  } = _ref,
67
- rest = _objectWithoutPropertiesLoose(_ref, ["col", "row", "outer", "children"]);
69
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
68
70
 
69
71
  const outerAmount = toNumber(typeof outer === 'number' || !outer ? outer : col || row);
70
72
  return /*#__PURE__*/React.createElement(Container, _extends({
@@ -1,3 +1,5 @@
1
+ const _excluded = ["children", "language", "copyable", "bordered", "padded", "format", "className", "showLineNumbers"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -117,7 +119,7 @@ const Code = styled.code({
117
119
  paddingRight: 0,
118
120
  opacity: 1
119
121
  });
120
- export const SyntaxHighlighter = (_ref) => {
122
+ export const SyntaxHighlighter = _ref => {
121
123
  let {
122
124
  children,
123
125
  language = 'jsx',
@@ -128,7 +130,7 @@ export const SyntaxHighlighter = (_ref) => {
128
130
  className = null,
129
131
  showLineNumbers = false
130
132
  } = _ref,
131
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "language", "copyable", "bordered", "padded", "format", "className", "showLineNumbers"]);
133
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
132
134
 
133
135
  if (typeof children !== 'string' || !children.trim()) {
134
136
  return null;
@@ -1,3 +1,6 @@
1
+ const _excluded = ["active", "loading", "disabled"],
2
+ _excluded2 = ["loading", "left", "title", "center", "right", "active", "disabled", "href", "onClick", "LinkWrapper"];
3
+
1
4
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
5
 
3
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -6,8 +9,8 @@ import React from 'react';
6
9
  import { styled } from '@storybook/theming';
7
10
  import memoize from 'memoizerific';
8
11
  import { transparentize } from 'polished';
9
- const Title = styled((_ref) => {
10
- let rest = _objectWithoutPropertiesLoose(_ref, ["active", "loading", "disabled"]);
12
+ const Title = styled(_ref => {
13
+ let rest = _objectWithoutPropertiesLoose(_ref, _excluded);
11
14
 
12
15
  return /*#__PURE__*/React.createElement("span", rest);
13
16
  })(({
@@ -142,7 +145,7 @@ const getItemProps = memoize(100)((onClick, href, LinkWrapper) => {
142
145
  return result;
143
146
  });
144
147
 
145
- const ListItem = (_ref2) => {
148
+ const ListItem = _ref2 => {
146
149
  let {
147
150
  loading,
148
151
  left,
@@ -155,7 +158,7 @@ const ListItem = (_ref2) => {
155
158
  onClick,
156
159
  LinkWrapper
157
160
  } = _ref2,
158
- rest = _objectWithoutPropertiesLoose(_ref2, ["loading", "left", "title", "center", "right", "active", "disabled", "href", "onClick", "LinkWrapper"]);
161
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
159
162
 
160
163
  const itemProps = getItemProps(onClick, href, LinkWrapper);
161
164
  const commonProps = {
@@ -1,3 +1,5 @@
1
+ const _excluded = ["placement", "hasChrome", "children", "arrowProps", "tooltipRef", "arrowRef", "color"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -74,7 +76,7 @@ const Wrapper = styled.div(({
74
76
  borderRadius: theme.appBorderRadius * 2,
75
77
  fontSize: theme.typography.size.s1
76
78
  } : {});
77
- export const Tooltip = (_ref) => {
79
+ export const Tooltip = _ref => {
78
80
  let {
79
81
  placement,
80
82
  hasChrome,
@@ -84,7 +86,7 @@ export const Tooltip = (_ref) => {
84
86
  arrowRef,
85
87
  color
86
88
  } = _ref,
87
- props = _objectWithoutPropertiesLoose(_ref, ["placement", "hasChrome", "children", "arrowProps", "tooltipRef", "arrowRef", "color"]);
89
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
88
90
 
89
91
  return /*#__PURE__*/React.createElement(Wrapper, _extends({
90
92
  hasChrome: hasChrome,
@@ -1,3 +1,6 @@
1
+ const _excluded = ["LinkWrapper", "onClick"],
2
+ _excluded2 = ["isGatsby"];
3
+
1
4
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
5
 
3
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -22,7 +25,7 @@ const Item = props => {
22
25
  LinkWrapper,
23
26
  onClick: onClickFromProps
24
27
  } = props,
25
- rest = _objectWithoutPropertiesLoose(props, ["LinkWrapper", "onClick"]);
28
+ rest = _objectWithoutPropertiesLoose(props, _excluded);
26
29
 
27
30
  const {
28
31
  title,
@@ -47,11 +50,11 @@ Item.displayName = "Item";
47
50
  export const TooltipLinkList = ({
48
51
  links,
49
52
  LinkWrapper
50
- }) => /*#__PURE__*/React.createElement(List, null, links.map((_ref) => {
53
+ }) => /*#__PURE__*/React.createElement(List, null, links.map(_ref => {
51
54
  let {
52
55
  isGatsby
53
56
  } = _ref,
54
- p = _objectWithoutPropertiesLoose(_ref, ["isGatsby"]);
57
+ p = _objectWithoutPropertiesLoose(_ref, _excluded2);
55
58
 
56
59
  return /*#__PURE__*/React.createElement(Item, _extends({
57
60
  key: p.id,
@@ -1,3 +1,5 @@
1
+ const _excluded = ["title"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -37,11 +39,11 @@ export const TooltipMessage = ({
37
39
  desc,
38
40
  links
39
41
  }) => {
40
- return /*#__PURE__*/React.createElement(MessageWrapper, null, /*#__PURE__*/React.createElement(Message, null, title && /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc)), links && /*#__PURE__*/React.createElement(Links, null, links.map((_ref) => {
42
+ return /*#__PURE__*/React.createElement(MessageWrapper, null, /*#__PURE__*/React.createElement(Message, null, title && /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc)), links && /*#__PURE__*/React.createElement(Links, null, links.map(_ref => {
41
43
  let {
42
44
  title: linkTitle
43
45
  } = _ref,
44
- other = _objectWithoutPropertiesLoose(_ref, ["title"]);
46
+ other = _objectWithoutPropertiesLoose(_ref, _excluded);
45
47
 
46
48
  return /*#__PURE__*/React.createElement(Link, _extends({}, other, {
47
49
  key: linkTitle
@@ -1,3 +1,5 @@
1
+ const _excluded = ["note"];
2
+
1
3
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
4
 
3
5
  import React from 'react';
@@ -18,11 +20,11 @@ const Note = styled.div(({
18
20
  background: theme.base === 'light' ? 'rgba(60, 60, 60, 0.9)' : 'rgba(20, 20, 20, 0.85)',
19
21
  margin: 6
20
22
  }));
21
- export const TooltipNote = (_ref) => {
23
+ export const TooltipNote = _ref => {
22
24
  let {
23
25
  note
24
26
  } = _ref,
25
- props = _objectWithoutPropertiesLoose(_ref, ["note"]);
27
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
26
28
 
27
29
  return /*#__PURE__*/React.createElement(Note, props, note);
28
30
  };
@@ -1,3 +1,6 @@
1
+ const _excluded = ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"],
2
+ _excluded2 = ["startOpen", "onVisibilityChange"];
3
+
1
4
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
5
 
3
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -20,7 +23,7 @@ const TargetSvgContainer = styled.g`
20
23
  `;
21
24
 
22
25
  // Pure, does not bind to the body
23
- const WithTooltipPure = (_ref) => {
26
+ const WithTooltipPure = _ref => {
24
27
  let {
25
28
  svg,
26
29
  trigger,
@@ -32,7 +35,7 @@ const WithTooltipPure = (_ref) => {
32
35
  tooltipShown,
33
36
  onVisibilityChange
34
37
  } = _ref,
35
- props = _objectWithoutPropertiesLoose(_ref, ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"]);
38
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
36
39
 
37
40
  const Container = svg ? TargetSvgContainer : TargetContainer;
38
41
  return /*#__PURE__*/React.createElement(TooltipTrigger, {
@@ -93,12 +96,12 @@ WithTooltipPure.defaultProps = {
93
96
  tooltipShown: false
94
97
  };
95
98
 
96
- const WithToolTipState = (_ref2) => {
99
+ const WithToolTipState = _ref2 => {
97
100
  let {
98
101
  startOpen,
99
102
  onVisibilityChange: onChange
100
103
  } = _ref2,
101
- rest = _objectWithoutPropertiesLoose(_ref2, ["startOpen", "onVisibilityChange"]);
104
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
102
105
 
103
106
  const [tooltipShown, setTooltipShown] = useState(startOpen || false);
104
107
  const onVisibilityChange = useCallback(visibility => {
@@ -0,0 +1,4 @@
1
+ declare module 'global';
2
+ declare module 'markdown-to-jsx';
3
+ declare module '*.md';
4
+ declare module '@storybook/semver';
@@ -1,3 +1,6 @@
1
+ const _excluded = ["href", "children"],
2
+ _excluded2 = ["className", "children"];
3
+
1
4
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
5
 
3
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -80,12 +83,12 @@ export const Pre = styled.pre(withReset, withMargin, ({
80
83
  }
81
84
  }));
82
85
 
83
- const Link = (_ref) => {
86
+ const Link = _ref => {
84
87
  let {
85
88
  href: input,
86
89
  children
87
90
  } = _ref,
88
- props = _objectWithoutPropertiesLoose(_ref, ["href", "children"]);
91
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
89
92
 
90
93
  const isStorybookPath = /^\//.test(input);
91
94
  const isAnchorUrl = /^#.*/.test(input);
@@ -346,14 +349,14 @@ const isInlineCodeRegex = /[\n\r]/g;
346
349
 
347
350
  const isReactChildString = child => typeof child === 'string';
348
351
 
349
- export const Code = (_ref2) => {
352
+ export const Code = _ref2 => {
350
353
  var _language$;
351
354
 
352
355
  let {
353
356
  className,
354
357
  children
355
358
  } = _ref2,
356
- props = _objectWithoutPropertiesLoose(_ref2, ["className", "children"]);
359
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
357
360
 
358
361
  const language = (className || '').match(/lang-(\S+)/);
359
362
  const childrenArray = React.Children.toArray(children);
@@ -1,3 +1,5 @@
1
+ const _excluded = ["cancel", "children", "onClick", "withArrow", "containsIcon", "className"];
2
+
1
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
4
 
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -143,7 +145,7 @@ const A = styled.a(({
143
145
  padding: 0,
144
146
  fontSize: 'inherit'
145
147
  } : {});
146
- export const Link = (_ref) => {
148
+ export const Link = _ref => {
147
149
  let {
148
150
  cancel,
149
151
  children,
@@ -152,7 +154,7 @@ export const Link = (_ref) => {
152
154
  containsIcon,
153
155
  className
154
156
  } = _ref,
155
- rest = _objectWithoutPropertiesLoose(_ref, ["cancel", "children", "onClick", "withArrow", "containsIcon", "className"]);
157
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
156
158
 
157
159
  return /*#__PURE__*/React.createElement(A, _extends({}, rest, {
158
160
  onClick: onClick && cancel ? e => cancelled(e, onClick) : onClick,
@@ -0,0 +1,13 @@
1
+ import qs from 'qs';
2
+ export const getStoryHref = (baseUrl, storyId, additionalParams = {}) => {
3
+ const [url, paramsStr] = baseUrl.split('?');
4
+ const params = paramsStr ? Object.assign({}, qs.parse(paramsStr), additionalParams, {
5
+ id: storyId
6
+ }) : Object.assign({}, additionalParams, {
7
+ id: storyId
8
+ });
9
+ return `${url}${qs.stringify(params, {
10
+ addQueryPrefix: true,
11
+ encode: false
12
+ })}`;
13
+ };
@@ -11,5 +11,5 @@ export declare class ZoomIFrame extends Component<IZoomIFrameProps> {
11
11
  shouldComponentUpdate(nextProps: IZoomIFrameProps): boolean;
12
12
  setIframeInnerZoom(scale: number): void;
13
13
  setIframeZoom(scale: number): void;
14
- render(): ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & string) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & number) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & false) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & true) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & ReactElement<any, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactNodeArray) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactPortal);
14
+ render(): ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & string) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & number) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & false) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & true) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & ReactElement<any, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)>) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactNodeArray) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactPortal);
15
15
  }
@@ -28,6 +28,7 @@ export { StorybookIcon } from './brand/StorybookIcon';
28
28
  export * from './blocks';
29
29
  export * from './controls';
30
30
  export { Loader } from './Loader/Loader';
31
+ export { getStoryHref } from './utils/getStoryHref';
31
32
  export * from './typography/DocumentFormatting';
32
33
  export { rawComponents as components };
33
34
  declare const resetComponents: Record<string, ElementType>;
@@ -0,0 +1 @@
1
+ export declare const getStoryHref: (baseUrl: string, storyId: string, additionalParams?: Record<string, string>) => string;
@@ -11,5 +11,5 @@ export declare class ZoomIFrame extends Component<IZoomIFrameProps> {
11
11
  shouldComponentUpdate(nextProps: IZoomIFrameProps): boolean;
12
12
  setIframeInnerZoom(scale: number): void;
13
13
  setIframeZoom(scale: number): void;
14
- render(): ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & string) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & number) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & false) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & true) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & ReactElement<any, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactNodeArray) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactPortal);
14
+ render(): ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & string) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & number) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & false) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & true) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & ReactElement<any, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)>) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactNodeArray) | (ReactElement<HTMLIFrameElement, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)> & import("react").ReactPortal);
15
15
  }
@@ -28,6 +28,7 @@ export { StorybookIcon } from './brand/StorybookIcon';
28
28
  export * from './blocks';
29
29
  export * from './controls';
30
30
  export { Loader } from './Loader/Loader';
31
+ export { getStoryHref } from './utils/getStoryHref';
31
32
  export * from './typography/DocumentFormatting';
32
33
  export { rawComponents as components };
33
34
  declare const resetComponents: Record<string, ElementType>;
@@ -0,0 +1 @@
1
+ export declare const getStoryHref: (baseUrl: string, storyId: string, additionalParams?: Record<string, string>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/components",
3
- "version": "6.5.0-alpha.2",
3
+ "version": "6.5.0-alpha.23",
4
4
  "description": "Core Storybook Components",
5
5
  "keywords": [
6
6
  "storybook"
@@ -41,9 +41,9 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@popperjs/core": "^2.6.0",
44
- "@storybook/client-logger": "6.5.0-alpha.2",
44
+ "@storybook/client-logger": "6.5.0-alpha.23",
45
45
  "@storybook/csf": "0.0.2--canary.87bc651.0",
46
- "@storybook/theming": "6.5.0-alpha.2",
46
+ "@storybook/theming": "6.5.0-alpha.23",
47
47
  "@types/color-convert": "^2.0.0",
48
48
  "@types/overlayscrollbars": "^1.12.0",
49
49
  "@types/react-syntax-highlighter": "11.0.5",
@@ -57,9 +57,10 @@
57
57
  "overlayscrollbars": "^1.13.1",
58
58
  "polished": "^4.0.5",
59
59
  "prop-types": "^15.7.2",
60
+ "qs": "^6.10.0",
60
61
  "react-colorful": "^5.1.2",
61
62
  "react-popper-tooltip": "^3.1.1",
62
- "react-syntax-highlighter": "^13.5.3",
63
+ "react-syntax-highlighter": "^15.4.5",
63
64
  "react-textarea-autosize": "^8.3.0",
64
65
  "regenerator-runtime": "^0.13.7",
65
66
  "ts-dedent": "^2.0.0",
@@ -76,6 +77,6 @@
76
77
  "publishConfig": {
77
78
  "access": "public"
78
79
  },
79
- "gitHead": "ca9d89393f36d156e34819fe120eb7e6819245f4",
80
+ "gitHead": "0006ec45ff04e42229dbee92cc49764699477e1b",
80
81
  "sbmodern": "dist/modern/index.js"
81
82
  }
@@ -1 +0,0 @@
1
- "use strict";
File without changes
File without changes