@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
@@ -1,10 +1,12 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ var _excluded = ["note"];
4
+
1
5
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
2
6
 
3
7
  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; }
4
8
 
5
9
  import "core-js/modules/es.string.bold.js";
6
- import "core-js/modules/es.object.keys.js";
7
- import "core-js/modules/es.symbol.js";
8
10
  import React from 'react';
9
11
  import { styled } from '@storybook/theming';
10
12
  var Note = styled.div(function (_ref) {
@@ -26,7 +28,7 @@ var Note = styled.div(function (_ref) {
26
28
  });
27
29
  export var TooltipNote = function TooltipNote(_ref2) {
28
30
  var note = _ref2.note,
29
- props = _objectWithoutProperties(_ref2, ["note"]);
31
+ props = _objectWithoutProperties(_ref2, _excluded);
30
32
 
31
33
  return /*#__PURE__*/React.createElement(Note, props, note);
32
34
  };
@@ -4,16 +4,19 @@ import "core-js/modules/es.object.keys.js";
4
4
  import "core-js/modules/es.symbol.js";
5
5
  import "core-js/modules/es.object.assign.js";
6
6
  import "core-js/modules/es.symbol.description.js";
7
- import "core-js/modules/es.object.to-string.js";
8
7
  import "core-js/modules/es.symbol.iterator.js";
9
8
  import "core-js/modules/es.array.iterator.js";
10
9
  import "core-js/modules/web.dom-collections.iterator.js";
11
10
  import "core-js/modules/es.function.name.js";
11
+ import "core-js/modules/es.regexp.exec.js";
12
+ var _excluded = ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"],
13
+ _excluded2 = ["startOpen", "onVisibilityChange"];
12
14
 
13
15
  var _templateObject, _templateObject2;
14
16
 
15
17
  import "core-js/modules/es.array.from.js";
16
18
  import "core-js/modules/es.string.iterator.js";
19
+ import "core-js/modules/es.object.to-string.js";
17
20
  import "core-js/modules/web.dom-collections.for-each.js";
18
21
 
19
22
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -24,7 +27,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
24
27
 
25
28
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
26
29
 
27
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
30
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
28
31
 
29
32
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
33
 
@@ -62,7 +65,7 @@ var WithTooltipPure = function WithTooltipPure(_ref) {
62
65
  children = _ref.children,
63
66
  tooltipShown = _ref.tooltipShown,
64
67
  onVisibilityChange = _ref.onVisibilityChange,
65
- props = _objectWithoutProperties(_ref, ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"]);
68
+ props = _objectWithoutProperties(_ref, _excluded);
66
69
 
67
70
  var Container = svg ? TargetSvgContainer : TargetContainer;
68
71
  return /*#__PURE__*/React.createElement(TooltipTrigger, {
@@ -131,7 +134,7 @@ WithTooltipPure.defaultProps = {
131
134
  var WithToolTipState = function WithToolTipState(_ref4) {
132
135
  var startOpen = _ref4.startOpen,
133
136
  onChange = _ref4.onVisibilityChange,
134
- rest = _objectWithoutProperties(_ref4, ["startOpen", "onVisibilityChange"]);
137
+ rest = _objectWithoutProperties(_ref4, _excluded2);
135
138
 
136
139
  var _useState = useState(startOpen || false),
137
140
  _useState2 = _slicedToArray(_useState, 2),
@@ -1,5 +1,5 @@
1
- import "core-js/modules/es.promise.js";
2
1
  import "core-js/modules/es.object.to-string.js";
2
+ import "core-js/modules/es.promise.js";
3
3
  import React, { Suspense } from 'react';
4
4
  var LazyWithTooltip = /*#__PURE__*/React.lazy(function () {
5
5
  return import('./WithTooltip').then(function (mod) {
@@ -0,0 +1,4 @@
1
+ declare module 'global';
2
+ declare module 'markdown-to-jsx';
3
+ declare module '*.md';
4
+ declare module '@storybook/semver';
@@ -1,13 +1,18 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ var _excluded = ["href", "children"],
4
+ _excluded2 = ["className", "children"];
5
+
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); }
7
+
8
+ import "core-js/modules/es.regexp.exec.js";
1
9
  import "core-js/modules/es.object.assign.js";
2
10
  import "core-js/modules/es.string.match.js";
3
- import "core-js/modules/es.regexp.exec.js";
11
+ import "core-js/modules/es.object.to-string.js";
12
+ import "core-js/modules/es.promise.js";
4
13
  import "core-js/modules/es.array.filter.js";
5
14
  import "core-js/modules/es.array.join.js";
6
15
  import "core-js/modules/es.array.concat.js";
7
- import "core-js/modules/es.object.keys.js";
8
- import "core-js/modules/es.symbol.js";
9
-
10
- 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); }
11
16
 
12
17
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
13
18
 
@@ -101,7 +106,7 @@ export var Pre = styled.pre(withReset, withMargin, function (_ref7) {
101
106
  var Link = function Link(_ref8) {
102
107
  var input = _ref8.href,
103
108
  children = _ref8.children,
104
- props = _objectWithoutProperties(_ref8, ["href", "children"]);
109
+ props = _objectWithoutProperties(_ref8, _excluded);
105
110
 
106
111
  var isStorybookPath = /^\//.test(input);
107
112
  var isAnchorUrl = /^#.*/.test(input);
@@ -377,7 +382,7 @@ export var Code = function Code(_ref17) {
377
382
 
378
383
  var className = _ref17.className,
379
384
  children = _ref17.children,
380
- props = _objectWithoutProperties(_ref17, ["className", "children"]);
385
+ props = _objectWithoutProperties(_ref17, _excluded2);
381
386
 
382
387
  var language = (className || '').match(/lang-(\S+)/);
383
388
  var childrenArray = React.Children.toArray(children);
@@ -1,6 +1,7 @@
1
1
  import "core-js/modules/es.object.keys.js";
2
2
  import "core-js/modules/es.symbol.js";
3
3
  import "core-js/modules/es.object.assign.js";
4
+ var _excluded = ["cancel", "children", "onClick", "withArrow", "containsIcon", "className"];
4
5
 
5
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); }
6
7
 
@@ -163,7 +164,7 @@ export var Link = function Link(_ref8) {
163
164
  withArrow = _ref8.withArrow,
164
165
  containsIcon = _ref8.containsIcon,
165
166
  className = _ref8.className,
166
- rest = _objectWithoutProperties(_ref8, ["cancel", "children", "onClick", "withArrow", "containsIcon", "className"]);
167
+ rest = _objectWithoutProperties(_ref8, _excluded);
167
168
 
168
169
  return /*#__PURE__*/React.createElement(A, _extends({}, rest, {
169
170
  onClick: onClick && cancel ? function (e) {
@@ -0,0 +1,46 @@
1
+ import "core-js/modules/es.regexp.exec.js";
2
+ import "core-js/modules/es.string.split.js";
3
+ import "core-js/modules/es.object.assign.js";
4
+ import "core-js/modules/es.array.concat.js";
5
+ import "core-js/modules/es.symbol.js";
6
+ import "core-js/modules/es.symbol.description.js";
7
+ import "core-js/modules/es.object.to-string.js";
8
+ import "core-js/modules/es.symbol.iterator.js";
9
+ import "core-js/modules/es.array.iterator.js";
10
+ import "core-js/modules/es.string.iterator.js";
11
+ import "core-js/modules/web.dom-collections.iterator.js";
12
+ import "core-js/modules/es.array.slice.js";
13
+ import "core-js/modules/es.function.name.js";
14
+ import "core-js/modules/es.array.from.js";
15
+
16
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
+
18
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
+
20
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
+
22
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23
+
24
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
25
+
26
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
+
28
+ import qs from 'qs';
29
+ export var getStoryHref = function getStoryHref(baseUrl, storyId) {
30
+ var additionalParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
31
+
32
+ var _baseUrl$split = baseUrl.split('?'),
33
+ _baseUrl$split2 = _slicedToArray(_baseUrl$split, 2),
34
+ url = _baseUrl$split2[0],
35
+ paramsStr = _baseUrl$split2[1];
36
+
37
+ var params = paramsStr ? Object.assign({}, qs.parse(paramsStr), additionalParams, {
38
+ id: storyId
39
+ }) : Object.assign({}, additionalParams, {
40
+ id: storyId
41
+ });
42
+ return "".concat(url).concat(qs.stringify(params, {
43
+ addQueryPrefix: true,
44
+ encode: false
45
+ }));
46
+ };
@@ -1,3 +1,5 @@
1
+ const _excluded = ["actionItems"];
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';
@@ -50,11 +52,11 @@ export const ActionButton = styled.button(({
50
52
  opacity: 0.5
51
53
  });
52
54
  ActionButton.displayName = 'ActionButton';
53
- export const ActionBar = (_ref) => {
55
+ export const ActionBar = _ref => {
54
56
  let {
55
57
  actionItems
56
58
  } = _ref,
57
- props = _objectWithoutPropertiesLoose(_ref, ["actionItems"]);
59
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
58
60
 
59
61
  return /*#__PURE__*/React.createElement(Container, props, actionItems.map(({
60
62
  title,
@@ -71,7 +71,7 @@ const BadgeWrapper = styled.div(({
71
71
  }
72
72
  }
73
73
  });
74
- export const Badge = (_ref) => {
74
+ export const Badge = _ref => {
75
75
  let props = Object.assign({}, _ref);
76
76
  return /*#__PURE__*/React.createElement(BadgeWrapper, props);
77
77
  };
@@ -1,3 +1,5 @@
1
+ const _excluded = ["isLink", "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; }
@@ -213,7 +215,7 @@ export const Button = Object.assign( /*#__PURE__*/forwardRef((_ref, ref) => {
213
215
  isLink,
214
216
  children
215
217
  } = _ref,
216
- props = _objectWithoutPropertiesLoose(_ref, ["isLink", "children"]);
218
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
217
219
 
218
220
  if (isLink) {
219
221
  return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, props, {
@@ -1,3 +1,5 @@
1
+ const _excluded = ["progress", "error", "size"];
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; }
@@ -98,13 +100,13 @@ const Ellipsis = styled.span({
98
100
  height: 'auto'
99
101
  }
100
102
  });
101
- export const PureLoader = (_ref) => {
103
+ export const PureLoader = _ref => {
102
104
  let {
103
105
  progress,
104
106
  error,
105
107
  size
106
108
  } = _ref,
107
- props = _objectWithoutPropertiesLoose(_ref, ["progress", "error", "size"]);
109
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
108
110
 
109
111
  if (error) {
110
112
  return /*#__PURE__*/React.createElement(ProgressWrapper, _extends({
@@ -1,3 +1,5 @@
1
+ const _excluded = ["options", "extensions", "className", "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; }
@@ -11,14 +13,14 @@ import OverlayScrollbars from 'overlayscrollbars';
11
13
  * A PR is submitted that may fix this:
12
14
  * https://github.com/KingSora/OverlayScrollbars/pull/218
13
15
  * */
14
- export const OverlayScrollbarsComponent = (_ref) => {
16
+ export const OverlayScrollbarsComponent = _ref => {
15
17
  let {
16
18
  options = {},
17
19
  extensions,
18
20
  className,
19
21
  children
20
22
  } = _ref,
21
- rest = _objectWithoutPropertiesLoose(_ref, ["options", "extensions", "className", "children"]);
23
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
22
24
 
23
25
  const osTargetRef = React.useRef();
24
26
  const osInstance = React.useRef();
@@ -1,3 +1,5 @@
1
+ const _excluded = ["horizontal", "vertical"];
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; }
@@ -7,8 +9,8 @@ import { styled } from '@storybook/theming';
7
9
  const GlobalScrollAreaStyles = /*#__PURE__*/React.lazy(() => import('./GlobalScrollAreaStyles'));
8
10
  const OverlayScrollbars = /*#__PURE__*/React.lazy(() => import('./OverlayScrollbars'));
9
11
 
10
- const Scroller = (_ref) => {
11
- let props = _objectWithoutPropertiesLoose(_ref, ["horizontal", "vertical"]);
12
+ const Scroller = _ref => {
13
+ let props = _objectWithoutPropertiesLoose(_ref, _excluded);
12
14
 
13
15
  return /*#__PURE__*/React.createElement(Suspense, {
14
16
  fallback: /*#__PURE__*/React.createElement("div", props)
@@ -1,3 +1,5 @@
1
+ const _excluded = ["children", "backgroundColor"];
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';
@@ -60,12 +62,12 @@ const BarInner = styled.div(({
60
62
  height: 40,
61
63
  backgroundColor: bgColor || ''
62
64
  }));
63
- export const FlexBar = (_ref) => {
65
+ export const FlexBar = _ref => {
64
66
  let {
65
67
  children,
66
68
  backgroundColor
67
69
  } = _ref,
68
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "backgroundColor"]);
70
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
69
71
 
70
72
  const [left, right] = Children.toArray(children);
71
73
  return /*#__PURE__*/React.createElement(Bar, rest, /*#__PURE__*/React.createElement(BarInner, {
@@ -1,3 +1,5 @@
1
+ const _excluded = ["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; }
@@ -7,11 +9,11 @@ import { styled, isPropValid } from '@storybook/theming';
7
9
  import { transparentize } from 'polished';
8
10
  import { auto } from '@popperjs/core';
9
11
 
10
- const ButtonOrLink = (_ref) => {
12
+ const ButtonOrLink = _ref => {
11
13
  let {
12
14
  children
13
15
  } = _ref,
14
- restProps = _objectWithoutPropertiesLoose(_ref, ["children"]);
16
+ restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
15
17
 
16
18
  return restProps.href != null ? /*#__PURE__*/React.createElement("a", restProps, children) : /*#__PURE__*/React.createElement("button", _extends({
17
19
  type: "button"
@@ -1,3 +1,5 @@
1
+ const _excluded = ["tabs"];
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; }
@@ -5,11 +7,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
5
7
  import React from 'react';
6
8
  import { ArgsTable } from './ArgsTable';
7
9
  import { TabsState } from '../../tabs/tabs';
8
- export const TabbedArgsTable = (_ref) => {
10
+ export const TabbedArgsTable = _ref => {
9
11
  let {
10
12
  tabs
11
13
  } = _ref,
12
- props = _objectWithoutPropertiesLoose(_ref, ["tabs"]);
14
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
13
15
 
14
16
  const entries = Object.entries(tabs);
15
17
 
@@ -1,3 +1,5 @@
1
+ const _excluded = ["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; }
@@ -162,11 +164,11 @@ ColorItem.displayName = "ColorItem";
162
164
  * Styleguide documentation for colors, including names, captions, and color swatches,
163
165
  * all specified as `ColorItem` children of this wrapper component.
164
166
  */
165
- export const ColorPalette = (_ref) => {
167
+ export const ColorPalette = _ref => {
166
168
  let {
167
169
  children
168
170
  } = _ref,
169
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
171
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
170
172
 
171
173
  return /*#__PURE__*/React.createElement(ResetWrapper, null, /*#__PURE__*/React.createElement(List, _extends({}, props, {
172
174
  className: "docblock-colorpalette"
@@ -1,3 +1,5 @@
1
+ const _excluded = ["id", "title", "src", "allowFullScreen", "scale"];
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; }
@@ -49,7 +51,7 @@ export class IFrame extends Component {
49
51
  src,
50
52
  allowFullScreen
51
53
  } = _this$props,
52
- rest = _objectWithoutPropertiesLoose(_this$props, ["id", "title", "src", "allowFullScreen", "scale"]);
54
+ rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
53
55
 
54
56
  return /*#__PURE__*/React.createElement("iframe", _extends({
55
57
  id: id,
@@ -1,3 +1,5 @@
1
+ const _excluded = ["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; }
@@ -55,11 +57,11 @@ IconItem.displayName = "IconItem";
55
57
  /**
56
58
  * Show a grid of icons, as specified by `IconItem`.
57
59
  */
58
- export const IconGallery = (_ref) => {
60
+ export const IconGallery = _ref => {
59
61
  let {
60
62
  children
61
63
  } = _ref,
62
- props = _objectWithoutPropertiesLoose(_ref, ["children"]);
64
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
63
65
 
64
66
  return /*#__PURE__*/React.createElement(ResetWrapper, null, /*#__PURE__*/React.createElement(List, _extends({}, props, {
65
67
  className: "docblock-icongallery"
@@ -1,3 +1,5 @@
1
+ const _excluded = ["isLoading", "isColumn", "columns", "children", "withSource", "withToolbar", "isExpanded", "additionalActions", "className"];
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 "core-js/modules/es.array.reduce.js";
@@ -178,7 +180,7 @@ const getLayout = children => {
178
180
  */
179
181
 
180
182
 
181
- export const Preview = (_ref) => {
183
+ export const Preview = _ref => {
182
184
  let {
183
185
  isLoading,
184
186
  isColumn,
@@ -190,7 +192,7 @@ export const Preview = (_ref) => {
190
192
  additionalActions,
191
193
  className
192
194
  } = _ref,
193
- props = _objectWithoutPropertiesLoose(_ref, ["isLoading", "isColumn", "columns", "children", "withSource", "withToolbar", "isExpanded", "additionalActions", "className"]);
195
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
194
196
 
195
197
  const [expanded, setExpanded] = useState(isExpanded);
196
198
  const {
@@ -1,3 +1,5 @@
1
+ const _excluded = ["language", "code", "dark", "format"];
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; }
@@ -90,7 +92,7 @@ const Source = props => {
90
92
  dark,
91
93
  format
92
94
  } = _ref,
93
- rest = _objectWithoutPropertiesLoose(_ref, ["language", "code", "dark", "format"]);
95
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
94
96
 
95
97
  const syntaxHighlighter = /*#__PURE__*/React.createElement(StyledSyntaxHighlighter, _extends({
96
98
  bordered: true,
@@ -1,11 +1,18 @@
1
+ const _excluded = ["children", "error", "inline"];
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
 
5
+ import global from 'global';
3
6
  import React, { createElement, Fragment } from 'react';
4
7
  import { IFrame } from './IFrame';
5
8
  import { EmptyBlock } from './EmptyBlock';
6
9
  import { ZoomContext } from './ZoomContext';
7
10
  import { Loader } from '..';
8
- const BASE_URL = 'iframe.html';
11
+ import { getStoryHref } from '../utils/getStoryHref';
12
+ const {
13
+ PREVIEW_URL
14
+ } = global;
15
+ const BASE_URL = PREVIEW_URL || 'iframe.html';
9
16
  export let StoryError;
10
17
  /** error message for Story with null storyFn
11
18
  * if the story id exists, it must be pointing to a non-existing story
@@ -42,7 +49,9 @@ const IFrameStory = ({
42
49
  key: "iframe",
43
50
  id: `iframe--${id}`,
44
51
  title: title,
45
- src: `${BASE_URL}?id=${id}&viewMode=story`,
52
+ src: getStoryHref(BASE_URL, id, {
53
+ viewMode: 'story'
54
+ }),
46
55
  allowFullScreen: true,
47
56
  scale: scale,
48
57
  style: {
@@ -59,12 +68,12 @@ IFrameStory.displayName = "IFrameStory";
59
68
  * A story element, either rendered inline or in an iframe,
60
69
  * with configurable height.
61
70
  */
62
- const Story = (_ref) => {
71
+ const Story = _ref => {
63
72
  let {
64
73
  error,
65
74
  inline
66
75
  } = _ref,
67
- props = _objectWithoutPropertiesLoose(_ref, ["children", "error", "inline"]);
76
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
68
77
 
69
78
  const {
70
79
  id,
@@ -1,3 +1,5 @@
1
+ const _excluded = ["isLoading", "storyId", "baseUrl", "zoom", "resetZoom"];
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, { Fragment } from 'react';
@@ -5,6 +7,7 @@ import { styled } from '@storybook/theming';
5
7
  import { FlexBar } from '../bar/bar';
6
8
  import { Icons } from '../icon/icon';
7
9
  import { IconButton, IconButtonSkeleton } from '../bar/button';
10
+ import { getStoryHref } from '../utils/getStoryHref';
8
11
 
9
12
  const Zoom = ({
10
13
  zoom,
@@ -43,7 +46,7 @@ const Eject = ({
43
46
  storyId
44
47
  }) => /*#__PURE__*/React.createElement(IconButton, {
45
48
  key: "opener",
46
- href: `${baseUrl}?id=${storyId}`,
49
+ href: getStoryHref(baseUrl, storyId),
47
50
  target: "_blank",
48
51
  title: "Open canvas in new tab"
49
52
  }, /*#__PURE__*/React.createElement(Icons, {
@@ -58,7 +61,7 @@ const Bar = styled(FlexBar)({
58
61
  top: 0,
59
62
  transition: 'transform .2s linear'
60
63
  });
61
- export const Toolbar = (_ref) => {
64
+ export const Toolbar = _ref => {
62
65
  let {
63
66
  isLoading,
64
67
  storyId,
@@ -66,7 +69,7 @@ export const Toolbar = (_ref) => {
66
69
  zoom,
67
70
  resetZoom
68
71
  } = _ref,
69
- rest = _objectWithoutPropertiesLoose(_ref, ["isLoading", "storyId", "baseUrl", "zoom", "resetZoom"]);
72
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
70
73
 
71
74
  return /*#__PURE__*/React.createElement(Bar, rest, /*#__PURE__*/React.createElement(Fragment, {
72
75
  key: "left"
@@ -1,3 +1,5 @@
1
+ const _excluded = ["fontFamily", "fontSizes", "fontWeight", "sampleText"];
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; }
@@ -38,14 +40,14 @@ const Wrapper = styled.div(withReset, ({
38
40
  * Convenient styleguide documentation showing examples of type
39
41
  * with different sizes and weights and configurable sample text.
40
42
  */
41
- export const Typeset = (_ref) => {
43
+ export const Typeset = _ref => {
42
44
  let {
43
45
  fontFamily,
44
46
  fontSizes,
45
47
  fontWeight,
46
48
  sampleText
47
49
  } = _ref,
48
- props = _objectWithoutPropertiesLoose(_ref, ["fontFamily", "fontSizes", "fontWeight", "sampleText"]);
50
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
49
51
 
50
52
  return /*#__PURE__*/React.createElement(Wrapper, _extends({}, props, {
51
53
  className: "docblock-typeset"
@@ -1,7 +1,7 @@
1
1
  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
2
 
3
3
  import React from 'react';
4
- export const StorybookIcon = (_ref) => {
4
+ export const StorybookIcon = _ref => {
5
5
  let props = Object.assign({}, _ref);
6
6
  return /*#__PURE__*/React.createElement("svg", _extends({
7
7
  viewBox: "0 0 64 64"
@@ -1,13 +1,15 @@
1
+ const _excluded = ["alt"];
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; }
4
6
 
5
7
  import React from 'react';
6
- export const StorybookLogo = (_ref) => {
8
+ export const StorybookLogo = _ref => {
7
9
  let {
8
10
  alt
9
11
  } = _ref,
10
- props = _objectWithoutPropertiesLoose(_ref, ["alt"]);
12
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
11
13
 
12
14
  return /*#__PURE__*/React.createElement("svg", _extends({
13
15
  width: "200px",
@@ -1,3 +1,5 @@
1
+ const _excluded = ["value", "active", "onClick", "style"];
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; }
@@ -59,14 +61,14 @@ const SwatchColor = styled.div(({
59
61
  }));
60
62
  const swatchBackground = `url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`;
61
63
 
62
- const Swatch = (_ref) => {
64
+ const Swatch = _ref => {
63
65
  let {
64
66
  value,
65
67
  active,
66
68
  onClick,
67
69
  style
68
70
  } = _ref,
69
- props = _objectWithoutPropertiesLoose(_ref, ["value", "active", "onClick", "style"]);
71
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
70
72
 
71
73
  const backgroundImage = `linear-gradient(${value}, ${value}), ${swatchBackground}, linear-gradient(#fff, #fff)`;
72
74
  return /*#__PURE__*/React.createElement(SwatchColor, _extends({}, props, {