@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.
- package/dist/cjs/ActionBar/ActionBar.js +4 -2
- package/dist/cjs/ActionBar/ActionBar.stories.js +1 -1
- package/dist/cjs/Button/Button.js +8 -6
- package/dist/cjs/Loader/Loader.js +12 -8
- package/dist/cjs/Loader/Loader.stories.js +1 -1
- package/dist/cjs/ScrollArea/GlobalScrollAreaStyles.js +1 -1
- package/dist/cjs/ScrollArea/OverlayScrollbars.js +7 -3
- package/dist/cjs/ScrollArea/ScrollArea.js +10 -8
- package/dist/cjs/ScrollArea/ScrollArea.stories.js +6 -6
- package/dist/cjs/Zoom/Zoom.js +1 -1
- package/dist/cjs/Zoom/Zoom.stories.js +9 -7
- package/dist/cjs/Zoom/ZoomElement.js +8 -6
- package/dist/cjs/Zoom/ZoomIFrame.js +8 -8
- package/dist/cjs/addon-panel/addon-panel.js +5 -5
- package/dist/cjs/bar/bar.js +16 -10
- package/dist/cjs/bar/button.js +6 -4
- package/dist/cjs/bar/button.stories.js +1 -1
- package/dist/cjs/bar/separator.js +7 -7
- package/dist/cjs/blocks/ArgsTable/ArgControl.js +8 -6
- package/dist/cjs/blocks/ArgsTable/ArgJsDoc.js +3 -1
- package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +1 -1
- package/dist/cjs/blocks/ArgsTable/ArgValue.js +9 -9
- package/dist/cjs/blocks/ArgsTable/ArgsTable.js +10 -6
- package/dist/cjs/blocks/ArgsTable/ArgsTable.stories.js +6 -6
- package/dist/cjs/blocks/ArgsTable/SectionRow.js +8 -6
- package/dist/cjs/blocks/ArgsTable/SectionRow.stories.js +1 -1
- package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.js +10 -6
- package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.stories.js +1 -1
- package/dist/cjs/blocks/ArgsTable/index.js +2 -0
- package/dist/cjs/blocks/ColorPalette.js +3 -1
- package/dist/cjs/blocks/ColorPalette.stories.js +1 -1
- package/dist/cjs/blocks/Description.stories.js +1 -1
- package/dist/cjs/blocks/DocsPage.js +1 -1
- package/dist/cjs/blocks/DocsPage.stories.js +6 -6
- package/dist/cjs/blocks/EmptyBlock.stories.js +1 -1
- package/dist/cjs/blocks/IFrame.js +13 -11
- package/dist/cjs/blocks/IconGallery.js +4 -2
- package/dist/cjs/blocks/IconGallery.stories.js +1 -1
- package/dist/cjs/blocks/Preview.js +14 -10
- package/dist/cjs/blocks/Preview.stories.js +6 -6
- package/dist/cjs/blocks/Source.js +6 -4
- package/dist/cjs/blocks/Source.stories.js +1 -1
- package/dist/cjs/blocks/Story.js +20 -9
- package/dist/cjs/blocks/Story.stories.js +9 -7
- package/dist/cjs/blocks/Toolbar.js +11 -9
- package/dist/cjs/blocks/Typeset.js +3 -1
- package/dist/cjs/blocks/Typeset.stories.js +1 -1
- package/dist/cjs/blocks/index.js +2 -0
- package/dist/cjs/brand/StorybookLogo.js +5 -3
- package/dist/cjs/brand/StorybookLogo.stories.js +1 -1
- package/dist/cjs/controls/Boolean.js +5 -5
- package/dist/cjs/controls/Boolean.stories.js +9 -7
- package/dist/cjs/controls/Color.js +13 -11
- package/dist/cjs/controls/Color.stories.js +9 -7
- package/dist/cjs/controls/Date.js +8 -8
- package/dist/cjs/controls/Date.stories.js +9 -7
- package/dist/cjs/controls/Files.js +7 -5
- package/dist/cjs/controls/Number.js +17 -8
- package/dist/cjs/controls/Number.stories.js +9 -7
- package/dist/cjs/controls/Object.js +8 -6
- package/dist/cjs/controls/Object.stories.js +9 -7
- package/dist/cjs/controls/Range.js +7 -7
- package/dist/cjs/controls/Range.stories.js +9 -7
- package/dist/cjs/controls/Text.js +8 -6
- package/dist/cjs/controls/Text.stories.js +9 -7
- package/dist/cjs/controls/helpers.js +2 -2
- package/dist/cjs/controls/index.js +7 -7
- package/dist/cjs/controls/options/Checkbox.js +9 -7
- package/dist/cjs/controls/options/Options.js +2 -0
- package/dist/cjs/controls/options/Options.stories.js +9 -7
- package/dist/cjs/controls/options/Select.js +2 -0
- package/dist/cjs/controls/options/helpers.js +7 -5
- package/dist/cjs/controls/options/index.js +2 -0
- package/dist/cjs/controls/react-editable-json-tree/components/JsonAddValue.js +10 -10
- package/dist/cjs/controls/react-editable-json-tree/components/JsonArray.js +13 -11
- package/dist/cjs/controls/react-editable-json-tree/components/JsonFunctionValue.js +13 -11
- package/dist/cjs/controls/react-editable-json-tree/components/JsonNode.js +8 -8
- package/dist/cjs/controls/react-editable-json-tree/components/JsonObject.js +13 -11
- package/dist/cjs/controls/react-editable-json-tree/components/JsonValue.js +13 -11
- package/dist/cjs/controls/react-editable-json-tree/index.js +21 -21
- package/dist/cjs/controls/react-editable-json-tree/utils/objectTypes.js +3 -3
- package/dist/cjs/controls/react-editable-json-tree/utils/styles.js +1 -1
- package/dist/cjs/controls/types.js +5 -1
- package/dist/cjs/form/field/field.js +3 -1
- package/dist/cjs/form/form.stories.js +5 -3
- package/dist/cjs/form/input/input.js +15 -10
- package/dist/cjs/html.js +2 -0
- package/dist/cjs/icon/icon.js +3 -1
- package/dist/cjs/icon/icon.stories.js +2 -0
- package/dist/cjs/icon/icons.js +1 -1
- package/dist/cjs/index.js +75 -63
- package/dist/cjs/placeholder/placeholder.js +15 -9
- package/dist/cjs/placeholder/placeholder.stories.js +6 -6
- package/dist/cjs/spaced/Spaced.js +3 -1
- package/dist/cjs/syntaxhighlighter/lazy-syntaxhighlighter.js +7 -7
- package/dist/cjs/syntaxhighlighter/syntaxhighlighter-types.js +5 -1
- package/dist/cjs/syntaxhighlighter/syntaxhighlighter.js +15 -10
- package/dist/cjs/syntaxhighlighter/syntaxhighlighter.stories.js +5 -5
- package/dist/cjs/tabs/tabs.js +13 -11
- package/dist/cjs/tabs/tabs.stories.js +6 -4
- package/dist/cjs/tooltip/ListItem.js +7 -4
- package/dist/cjs/tooltip/Tooltip.js +5 -3
- package/dist/cjs/tooltip/TooltipLinkList.js +12 -9
- package/dist/cjs/tooltip/TooltipLinkList.stories.js +5 -5
- package/dist/cjs/tooltip/TooltipMessage.js +3 -1
- package/dist/cjs/tooltip/TooltipNote.js +3 -1
- package/dist/cjs/tooltip/WithTooltip.js +14 -9
- package/dist/cjs/tooltip/lazy-WithTooltip.js +7 -7
- package/dist/cjs/typings.d.ts +4 -0
- package/dist/cjs/typography/DocumentFormatting.js +13 -6
- package/dist/cjs/typography/DocumentWrapper.stories.js +1 -1
- package/dist/cjs/typography/link/link.js +5 -3
- package/dist/cjs/typography/shared.js +1 -1
- package/dist/cjs/utils/getStoryHref.js +71 -0
- package/dist/esm/ActionBar/ActionBar.js +5 -3
- package/dist/esm/Button/Button.js +3 -1
- package/dist/esm/Loader/Loader.js +5 -3
- package/dist/esm/ScrollArea/OverlayScrollbars.js +6 -4
- package/dist/esm/ScrollArea/ScrollArea.js +4 -2
- package/dist/esm/Zoom/Zoom.stories.js +3 -2
- package/dist/esm/Zoom/ZoomElement.js +3 -2
- package/dist/esm/Zoom/ZoomIFrame.js +6 -6
- package/dist/esm/bar/bar.js +7 -4
- package/dist/esm/bar/button.js +2 -1
- package/dist/esm/bar/separator.js +1 -0
- package/dist/esm/blocks/ArgsTable/ArgControl.js +3 -2
- package/dist/esm/blocks/ArgsTable/ArgJsDoc.js +1 -0
- package/dist/esm/blocks/ArgsTable/ArgValue.js +4 -4
- package/dist/esm/blocks/ArgsTable/ArgsTable.js +5 -3
- package/dist/esm/blocks/ArgsTable/SectionRow.js +3 -2
- package/dist/esm/blocks/ArgsTable/TabbedArgsTable.js +17 -14
- package/dist/esm/blocks/ColorPalette.js +3 -1
- package/dist/esm/blocks/IFrame.js +16 -14
- package/dist/esm/blocks/IconGallery.js +3 -1
- package/dist/esm/blocks/Preview.js +16 -14
- package/dist/esm/blocks/Source.js +2 -1
- package/dist/esm/blocks/Story.js +12 -5
- package/dist/esm/blocks/Story.stories.js +3 -2
- package/dist/esm/blocks/Toolbar.js +8 -6
- package/dist/esm/blocks/Typeset.js +5 -3
- package/dist/esm/brand/StorybookLogo.js +2 -1
- package/dist/esm/controls/Boolean.stories.js +3 -2
- package/dist/esm/controls/Color.js +7 -5
- package/dist/esm/controls/Color.stories.js +3 -2
- package/dist/esm/controls/Date.js +3 -3
- package/dist/esm/controls/Date.stories.js +3 -2
- package/dist/esm/controls/Files.js +4 -3
- package/dist/esm/controls/Number.js +11 -3
- package/dist/esm/controls/Number.stories.js +3 -2
- package/dist/esm/controls/Object.js +3 -2
- package/dist/esm/controls/Object.stories.js +3 -2
- package/dist/esm/controls/Range.js +1 -1
- package/dist/esm/controls/Range.stories.js +3 -2
- package/dist/esm/controls/Text.js +3 -2
- package/dist/esm/controls/Text.stories.js +3 -2
- package/dist/esm/controls/helpers.js +1 -1
- package/dist/esm/controls/index.js +1 -1
- package/dist/esm/controls/options/Checkbox.js +4 -3
- package/dist/esm/controls/options/Options.js +1 -0
- package/dist/esm/controls/options/Options.stories.js +3 -2
- package/dist/esm/controls/options/Select.js +1 -0
- package/dist/esm/controls/options/helpers.js +4 -3
- package/dist/esm/controls/react-editable-json-tree/components/JsonAddValue.js +6 -6
- package/dist/esm/controls/react-editable-json-tree/components/JsonArray.js +8 -7
- package/dist/esm/controls/react-editable-json-tree/components/JsonFunctionValue.js +8 -7
- package/dist/esm/controls/react-editable-json-tree/components/JsonNode.js +5 -5
- package/dist/esm/controls/react-editable-json-tree/components/JsonObject.js +8 -7
- package/dist/esm/controls/react-editable-json-tree/components/JsonValue.js +8 -7
- package/dist/esm/controls/react-editable-json-tree/index.js +6 -6
- package/dist/esm/controls/react-editable-json-tree/utils/objectTypes.js +2 -2
- package/dist/esm/controls/types.js +1 -0
- package/dist/esm/form/field/field.js +5 -3
- package/dist/esm/form/form.stories.js +3 -2
- package/dist/esm/form/input/input.js +11 -6
- package/dist/esm/icon/icon.js +4 -3
- package/dist/esm/icon/icon.stories.js +1 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/placeholder/placeholder.js +16 -12
- package/dist/esm/spaced/Spaced.js +6 -4
- package/dist/esm/syntaxhighlighter/lazy-syntaxhighlighter.js +1 -1
- package/dist/esm/syntaxhighlighter/syntaxhighlighter-types.js +1 -0
- package/dist/esm/syntaxhighlighter/syntaxhighlighter.js +17 -14
- package/dist/esm/tabs/tabs.js +7 -6
- package/dist/esm/tabs/tabs.stories.js +2 -1
- package/dist/esm/tooltip/ListItem.js +7 -4
- package/dist/esm/tooltip/Tooltip.js +4 -2
- package/dist/esm/tooltip/TooltipLinkList.js +5 -3
- package/dist/esm/tooltip/TooltipMessage.js +6 -4
- package/dist/esm/tooltip/TooltipNote.js +5 -3
- package/dist/esm/tooltip/WithTooltip.js +7 -4
- package/dist/esm/tooltip/lazy-WithTooltip.js +1 -1
- package/dist/esm/typings.d.ts +4 -0
- package/dist/esm/typography/DocumentFormatting.js +12 -7
- package/dist/esm/typography/link/link.js +2 -1
- package/dist/esm/utils/getStoryHref.js +46 -0
- package/dist/modern/ActionBar/ActionBar.js +4 -2
- package/dist/modern/Badge/Badge.js +1 -1
- package/dist/modern/Button/Button.js +3 -1
- package/dist/modern/Loader/Loader.js +4 -2
- package/dist/modern/ScrollArea/OverlayScrollbars.js +4 -2
- package/dist/modern/ScrollArea/ScrollArea.js +4 -2
- package/dist/modern/bar/bar.js +4 -2
- package/dist/modern/bar/button.js +4 -2
- package/dist/modern/blocks/ArgsTable/TabbedArgsTable.js +4 -2
- package/dist/modern/blocks/ColorPalette.js +4 -2
- package/dist/modern/blocks/IFrame.js +3 -1
- package/dist/modern/blocks/IconGallery.js +4 -2
- package/dist/modern/blocks/Preview.js +4 -2
- package/dist/modern/blocks/Source.js +3 -1
- package/dist/modern/blocks/Story.js +13 -4
- package/dist/modern/blocks/Toolbar.js +6 -3
- package/dist/modern/blocks/Typeset.js +4 -2
- package/dist/modern/brand/StorybookIcon.js +1 -1
- package/dist/modern/brand/StorybookLogo.js +4 -2
- package/dist/modern/controls/Color.js +4 -2
- package/dist/modern/controls/Number.js +7 -0
- package/dist/modern/controls/types.js +1 -0
- package/dist/modern/form/field/field.js +4 -2
- package/dist/modern/form/input/input.js +9 -4
- package/dist/modern/icon/icon.js +4 -2
- package/dist/modern/index.js +3 -1
- package/dist/modern/placeholder/placeholder.js +4 -2
- package/dist/modern/spaced/Spaced.js +4 -2
- package/dist/modern/syntaxhighlighter/syntaxhighlighter-types.js +1 -0
- package/dist/modern/syntaxhighlighter/syntaxhighlighter.js +4 -2
- package/dist/modern/tooltip/ListItem.js +7 -4
- package/dist/modern/tooltip/Tooltip.js +4 -2
- package/dist/modern/tooltip/TooltipLinkList.js +6 -3
- package/dist/modern/tooltip/TooltipMessage.js +4 -2
- package/dist/modern/tooltip/TooltipNote.js +4 -2
- package/dist/modern/tooltip/WithTooltip.js +7 -4
- package/dist/modern/typings.d.ts +4 -0
- package/dist/modern/typography/DocumentFormatting.js +7 -4
- package/dist/modern/typography/link/link.js +4 -2
- package/dist/modern/utils/getStoryHref.js +13 -0
- package/dist/ts3.4/Zoom/ZoomIFrame.d.ts +1 -1
- package/dist/ts3.4/index.d.ts +1 -0
- package/dist/ts3.4/utils/getStoryHref.d.ts +1 -0
- package/dist/ts3.9/Zoom/ZoomIFrame.d.ts +1 -1
- package/dist/ts3.9/index.d.ts +1 -0
- package/dist/ts3.9/utils/getStoryHref.d.ts +1 -0
- package/package.json +6 -5
- package/dist/cjs/typings.d.js +0 -1
- package/dist/esm/typings.d.js +0 -0
- package/dist/modern/typings.d.js +0 -0
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.object.assign.js";
|
|
4
|
+
import "core-js/modules/es.symbol.description.js";
|
|
5
|
+
import "core-js/modules/es.object.to-string.js";
|
|
6
|
+
import "core-js/modules/es.symbol.iterator.js";
|
|
7
|
+
import "core-js/modules/es.array.iterator.js";
|
|
8
|
+
import "core-js/modules/es.string.iterator.js";
|
|
9
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
10
|
+
import "core-js/modules/es.array.slice.js";
|
|
11
|
+
import "core-js/modules/es.function.name.js";
|
|
12
|
+
import "core-js/modules/es.array.from.js";
|
|
13
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
14
|
+
var _excluded = ["tabs"];
|
|
15
|
+
|
|
1
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
17
|
|
|
3
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."); }
|
|
@@ -6,7 +21,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
6
21
|
|
|
7
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; }
|
|
8
23
|
|
|
9
|
-
function _iterableToArrayLimit(arr, i) {
|
|
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; }
|
|
10
25
|
|
|
11
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
27
|
|
|
@@ -14,18 +29,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
14
29
|
|
|
15
30
|
import "core-js/modules/es.object.entries.js";
|
|
16
31
|
import "core-js/modules/es.array.map.js";
|
|
17
|
-
import "core-js/modules/es.object.keys.js";
|
|
18
|
-
import "core-js/modules/es.symbol.js";
|
|
19
|
-
import "core-js/modules/es.object.assign.js";
|
|
20
|
-
import "core-js/modules/es.symbol.description.js";
|
|
21
|
-
import "core-js/modules/es.object.to-string.js";
|
|
22
|
-
import "core-js/modules/es.symbol.iterator.js";
|
|
23
|
-
import "core-js/modules/es.string.iterator.js";
|
|
24
|
-
import "core-js/modules/es.array.iterator.js";
|
|
25
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
26
|
-
import "core-js/modules/es.array.slice.js";
|
|
27
|
-
import "core-js/modules/es.function.name.js";
|
|
28
|
-
import "core-js/modules/es.array.from.js";
|
|
29
32
|
|
|
30
33
|
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; }
|
|
31
34
|
|
|
@@ -36,7 +39,7 @@ import { ArgsTable } from './ArgsTable';
|
|
|
36
39
|
import { TabsState } from '../../tabs/tabs';
|
|
37
40
|
export var TabbedArgsTable = function TabbedArgsTable(_ref) {
|
|
38
41
|
var tabs = _ref.tabs,
|
|
39
|
-
props = _objectWithoutProperties(_ref,
|
|
42
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
43
|
|
|
41
44
|
var entries = Object.entries(tabs);
|
|
42
45
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _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 _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; }
|
|
@@ -187,7 +189,7 @@ ColorItem.displayName = "ColorItem";
|
|
|
187
189
|
*/
|
|
188
190
|
export var ColorPalette = function ColorPalette(_ref9) {
|
|
189
191
|
var children = _ref9.children,
|
|
190
|
-
props = _objectWithoutProperties(_ref9,
|
|
192
|
+
props = _objectWithoutProperties(_ref9, _excluded);
|
|
191
193
|
|
|
192
194
|
return /*#__PURE__*/React.createElement(ResetWrapper, null, /*#__PURE__*/React.createElement(List, _extends({}, props, {
|
|
193
195
|
className: "docblock-colorpalette"
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
import "core-js/modules/es.object.to-string.js";
|
|
4
|
+
import "core-js/modules/es.reflect.construct.js";
|
|
5
|
+
import "core-js/modules/es.object.keys.js";
|
|
6
|
+
import "core-js/modules/es.symbol.js";
|
|
7
|
+
import "core-js/modules/es.symbol.description.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
|
+
var _excluded = ["id", "title", "src", "allowFullScreen", "scale"];
|
|
2
13
|
|
|
3
14
|
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); }
|
|
4
15
|
|
|
@@ -9,29 +20,20 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
9
20
|
import "core-js/modules/es.array.concat.js";
|
|
10
21
|
import "core-js/modules/es.object.assign.js";
|
|
11
22
|
import "core-js/modules/es.object.get-prototype-of.js";
|
|
12
|
-
import "core-js/modules/es.reflect.construct.js";
|
|
13
|
-
import "core-js/modules/es.object.keys.js";
|
|
14
|
-
import "core-js/modules/es.symbol.js";
|
|
15
|
-
import "core-js/modules/es.symbol.description.js";
|
|
16
|
-
import "core-js/modules/es.object.to-string.js";
|
|
17
|
-
import "core-js/modules/es.symbol.iterator.js";
|
|
18
|
-
import "core-js/modules/es.string.iterator.js";
|
|
19
|
-
import "core-js/modules/es.array.iterator.js";
|
|
20
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
21
23
|
|
|
22
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
25
|
|
|
24
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
27
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
29
|
|
|
28
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
31
|
|
|
30
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
33
|
|
|
32
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
35
|
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
37
|
|
|
36
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
39
|
|
|
@@ -97,7 +99,7 @@ export var IFrame = /*#__PURE__*/function (_Component) {
|
|
|
97
99
|
src = _this$props.src,
|
|
98
100
|
allowFullScreen = _this$props.allowFullScreen,
|
|
99
101
|
scale = _this$props.scale,
|
|
100
|
-
rest = _objectWithoutProperties(_this$props,
|
|
102
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
101
103
|
|
|
102
104
|
return /*#__PURE__*/React.createElement("iframe", _extends({
|
|
103
105
|
id: id,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _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 _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; }
|
|
@@ -66,7 +68,7 @@ IconItem.displayName = "IconItem";
|
|
|
66
68
|
*/
|
|
67
69
|
export var IconGallery = function IconGallery(_ref4) {
|
|
68
70
|
var children = _ref4.children,
|
|
69
|
-
props = _objectWithoutProperties(_ref4,
|
|
71
|
+
props = _objectWithoutProperties(_ref4, _excluded);
|
|
70
72
|
|
|
71
73
|
return /*#__PURE__*/React.createElement(ResetWrapper, null, /*#__PURE__*/React.createElement(List, _extends({}, props, {
|
|
72
74
|
className: "docblock-icongallery"
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.symbol.description.js";
|
|
4
|
+
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
+
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
|
+
import "core-js/modules/es.array.slice.js";
|
|
9
|
+
import "core-js/modules/es.function.name.js";
|
|
10
|
+
import "core-js/modules/es.array.from.js";
|
|
11
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
12
|
+
var _excluded = ["isLoading", "isColumn", "columns", "children", "withSource", "withToolbar", "isExpanded", "additionalActions", "className"];
|
|
1
13
|
import "regenerator-runtime/runtime.js";
|
|
2
14
|
|
|
3
15
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -8,7 +20,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
8
20
|
|
|
9
21
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
22
|
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator
|
|
23
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
24
|
|
|
13
25
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
26
|
|
|
@@ -20,7 +32,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
20
32
|
|
|
21
33
|
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; }
|
|
22
34
|
|
|
23
|
-
function _iterableToArrayLimit(arr, i) {
|
|
35
|
+
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; }
|
|
24
36
|
|
|
25
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
38
|
|
|
@@ -31,22 +43,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
31
43
|
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); }
|
|
32
44
|
|
|
33
45
|
import "core-js/modules/es.object.assign.js";
|
|
46
|
+
import "core-js/modules/es.object.to-string.js";
|
|
34
47
|
import "core-js/modules/es.array.concat.js";
|
|
35
48
|
import "core-js/modules/es.promise.js";
|
|
36
|
-
import "core-js/modules/es.object.to-string.js";
|
|
37
49
|
import "core-js/modules/es.array.filter.js";
|
|
38
50
|
import "core-js/modules/es.array.join.js";
|
|
39
51
|
import "core-js/modules/es.array.map.js";
|
|
40
|
-
import "core-js/modules/es.object.keys.js";
|
|
41
|
-
import "core-js/modules/es.symbol.js";
|
|
42
|
-
import "core-js/modules/es.symbol.description.js";
|
|
43
|
-
import "core-js/modules/es.symbol.iterator.js";
|
|
44
|
-
import "core-js/modules/es.string.iterator.js";
|
|
45
|
-
import "core-js/modules/es.array.iterator.js";
|
|
46
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
47
|
-
import "core-js/modules/es.array.slice.js";
|
|
48
|
-
import "core-js/modules/es.function.name.js";
|
|
49
|
-
import "core-js/modules/es.array.from.js";
|
|
50
52
|
import React, { Children, useCallback, useState } from 'react';
|
|
51
53
|
import { darken } from 'polished';
|
|
52
54
|
import { styled } from '@storybook/theming';
|
|
@@ -248,7 +250,7 @@ export var Preview = function Preview(_ref8) {
|
|
|
248
250
|
isExpanded = _ref8$isExpanded === void 0 ? false : _ref8$isExpanded,
|
|
249
251
|
additionalActions = _ref8.additionalActions,
|
|
250
252
|
className = _ref8.className,
|
|
251
|
-
props = _objectWithoutProperties(_ref8,
|
|
253
|
+
props = _objectWithoutProperties(_ref8, _excluded);
|
|
252
254
|
|
|
253
255
|
var _useState = useState(isExpanded),
|
|
254
256
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -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 = ["language", "code", "dark", "format"];
|
|
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
|
|
|
@@ -98,7 +99,7 @@ var Source = function Source(props) {
|
|
|
98
99
|
code = _ref5.code,
|
|
99
100
|
dark = _ref5.dark,
|
|
100
101
|
format = _ref5.format,
|
|
101
|
-
rest = _objectWithoutProperties(_ref5,
|
|
102
|
+
rest = _objectWithoutProperties(_ref5, _excluded);
|
|
102
103
|
|
|
103
104
|
var syntaxHighlighter = /*#__PURE__*/React.createElement(StyledSyntaxHighlighter, _extends({
|
|
104
105
|
bordered: true,
|
package/dist/esm/blocks/Story.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
var _excluded = ["children", "error", "inline"];
|
|
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.array.concat.js";
|
|
6
|
-
import
|
|
7
|
-
import "core-js/modules/es.symbol.js";
|
|
10
|
+
import global from 'global';
|
|
8
11
|
import React, { createElement, Fragment } from 'react';
|
|
9
12
|
import { IFrame } from './IFrame';
|
|
10
13
|
import { EmptyBlock } from './EmptyBlock';
|
|
11
14
|
import { ZoomContext } from './ZoomContext';
|
|
12
15
|
import { Loader } from '..';
|
|
13
|
-
|
|
16
|
+
import { getStoryHref } from '../utils/getStoryHref';
|
|
17
|
+
var PREVIEW_URL = global.PREVIEW_URL;
|
|
18
|
+
var BASE_URL = PREVIEW_URL || 'iframe.html';
|
|
14
19
|
export var StoryError;
|
|
15
20
|
/** error message for Story with null storyFn
|
|
16
21
|
* if the story id exists, it must be pointing to a non-existing story
|
|
@@ -50,7 +55,9 @@ var IFrameStory = function IFrameStory(_ref2) {
|
|
|
50
55
|
key: "iframe",
|
|
51
56
|
id: "iframe--".concat(id),
|
|
52
57
|
title: title,
|
|
53
|
-
src:
|
|
58
|
+
src: getStoryHref(BASE_URL, id, {
|
|
59
|
+
viewMode: 'story'
|
|
60
|
+
}),
|
|
54
61
|
allowFullScreen: true,
|
|
55
62
|
scale: scale,
|
|
56
63
|
style: {
|
|
@@ -72,7 +79,7 @@ var Story = function Story(_ref4) {
|
|
|
72
79
|
var children = _ref4.children,
|
|
73
80
|
error = _ref4.error,
|
|
74
81
|
inline = _ref4.inline,
|
|
75
|
-
props = _objectWithoutProperties(_ref4,
|
|
82
|
+
props = _objectWithoutProperties(_ref4, _excluded);
|
|
76
83
|
|
|
77
84
|
var id = props.id,
|
|
78
85
|
title = props.title,
|
|
@@ -2,12 +2,13 @@ import "core-js/modules/es.symbol.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.description.js";
|
|
3
3
|
import "core-js/modules/es.object.to-string.js";
|
|
4
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
|
9
9
|
import "core-js/modules/es.function.name.js";
|
|
10
10
|
import "core-js/modules/es.array.from.js";
|
|
11
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
11
12
|
|
|
12
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
18
|
|
|
18
19
|
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; }
|
|
19
20
|
|
|
20
|
-
function _iterableToArrayLimit(arr, i) {
|
|
21
|
+
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; }
|
|
21
22
|
|
|
22
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
24
|
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
var _excluded = ["isLoading", "storyId", "baseUrl", "zoom", "resetZoom"];
|
|
4
|
+
import "core-js/modules/es.array.map.js";
|
|
5
|
+
|
|
1
6
|
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
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; }
|
|
4
9
|
|
|
5
|
-
import "core-js/modules/es.array.concat.js";
|
|
6
|
-
import "core-js/modules/es.array.map.js";
|
|
7
|
-
import "core-js/modules/es.object.keys.js";
|
|
8
|
-
import "core-js/modules/es.symbol.js";
|
|
9
10
|
import React, { Fragment } from 'react';
|
|
10
11
|
import { styled } from '@storybook/theming';
|
|
11
12
|
import { FlexBar } from '../bar/bar';
|
|
12
13
|
import { Icons } from '../icon/icon';
|
|
13
14
|
import { IconButton, IconButtonSkeleton } from '../bar/button';
|
|
15
|
+
import { getStoryHref } from '../utils/getStoryHref';
|
|
14
16
|
|
|
15
17
|
var Zoom = function Zoom(_ref) {
|
|
16
18
|
var zoom = _ref.zoom,
|
|
@@ -50,7 +52,7 @@ var Eject = function Eject(_ref2) {
|
|
|
50
52
|
storyId = _ref2.storyId;
|
|
51
53
|
return /*#__PURE__*/React.createElement(IconButton, {
|
|
52
54
|
key: "opener",
|
|
53
|
-
href:
|
|
55
|
+
href: getStoryHref(baseUrl, storyId),
|
|
54
56
|
target: "_blank",
|
|
55
57
|
title: "Open canvas in new tab"
|
|
56
58
|
}, /*#__PURE__*/React.createElement(Icons, {
|
|
@@ -72,7 +74,7 @@ export var Toolbar = function Toolbar(_ref3) {
|
|
|
72
74
|
baseUrl = _ref3.baseUrl,
|
|
73
75
|
zoom = _ref3.zoom,
|
|
74
76
|
resetZoom = _ref3.resetZoom,
|
|
75
|
-
rest = _objectWithoutProperties(_ref3,
|
|
77
|
+
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
76
78
|
|
|
77
79
|
return /*#__PURE__*/React.createElement(Bar, rest, /*#__PURE__*/React.createElement(Fragment, {
|
|
78
80
|
key: "left"
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
var _excluded = ["fontFamily", "fontSizes", "fontWeight", "sampleText"];
|
|
4
|
+
|
|
1
5
|
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
6
|
|
|
3
7
|
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; }
|
|
@@ -6,8 +10,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
6
10
|
|
|
7
11
|
import "core-js/modules/es.object.assign.js";
|
|
8
12
|
import "core-js/modules/es.array.map.js";
|
|
9
|
-
import "core-js/modules/es.object.keys.js";
|
|
10
|
-
import "core-js/modules/es.symbol.js";
|
|
11
13
|
import React from 'react';
|
|
12
14
|
import { styled } from '@storybook/theming';
|
|
13
15
|
import { transparentize } from 'polished';
|
|
@@ -51,7 +53,7 @@ export var Typeset = function Typeset(_ref3) {
|
|
|
51
53
|
fontSizes = _ref3.fontSizes,
|
|
52
54
|
fontWeight = _ref3.fontWeight,
|
|
53
55
|
sampleText = _ref3.sampleText,
|
|
54
|
-
props = _objectWithoutProperties(_ref3,
|
|
56
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
55
57
|
|
|
56
58
|
return /*#__PURE__*/React.createElement(Wrapper, _extends({}, props, {
|
|
57
59
|
className: "docblock-typeset"
|
|
@@ -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 = ["alt"];
|
|
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
|
|
|
@@ -11,7 +12,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
11
12
|
import React from 'react';
|
|
12
13
|
export var StorybookLogo = function StorybookLogo(_ref) {
|
|
13
14
|
var alt = _ref.alt,
|
|
14
|
-
props = _objectWithoutProperties(_ref,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
16
|
|
|
16
17
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
17
18
|
width: "200px",
|
|
@@ -2,12 +2,13 @@ import "core-js/modules/es.symbol.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.description.js";
|
|
3
3
|
import "core-js/modules/es.object.to-string.js";
|
|
4
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
|
9
9
|
import "core-js/modules/es.function.name.js";
|
|
10
10
|
import "core-js/modules/es.array.from.js";
|
|
11
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
11
12
|
|
|
12
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
18
|
|
|
18
19
|
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; }
|
|
19
20
|
|
|
20
|
-
function _iterableToArrayLimit(arr, i) {
|
|
21
|
+
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; }
|
|
21
22
|
|
|
22
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
24
|
|
|
@@ -1,15 +1,16 @@
|
|
|
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.symbol.description.js";
|
|
4
|
-
import "core-js/modules/es.object.to-string.js";
|
|
5
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
6
|
-
import "core-js/modules/es.string.iterator.js";
|
|
7
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
8
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
9
8
|
import "core-js/modules/es.array.from.js";
|
|
10
9
|
|
|
11
10
|
var _ColorPicker, _fallbackColor;
|
|
12
11
|
|
|
12
|
+
var _excluded = ["value", "active", "onClick", "style"];
|
|
13
|
+
|
|
13
14
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
15
|
|
|
15
16
|
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."); }
|
|
@@ -18,7 +19,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
18
19
|
|
|
19
20
|
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; }
|
|
20
21
|
|
|
21
|
-
function _iterableToArrayLimit(arr, i) {
|
|
22
|
+
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; }
|
|
22
23
|
|
|
23
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
25
|
|
|
@@ -33,8 +34,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
33
34
|
import "core-js/modules/es.array.concat.js";
|
|
34
35
|
import "core-js/modules/es.object.assign.js";
|
|
35
36
|
import "core-js/modules/es.object.values.js";
|
|
36
|
-
import "core-js/modules/es.string.match.js";
|
|
37
37
|
import "core-js/modules/es.regexp.exec.js";
|
|
38
|
+
import "core-js/modules/es.string.match.js";
|
|
38
39
|
import "core-js/modules/es.array.map.js";
|
|
39
40
|
import "core-js/modules/es.number.constructor.js";
|
|
40
41
|
import "core-js/modules/es.string.replace.js";
|
|
@@ -42,6 +43,7 @@ import "core-js/modules/es.string.starts-with.js";
|
|
|
42
43
|
import "core-js/modules/es.string.split.js";
|
|
43
44
|
import "core-js/modules/es.array.slice.js";
|
|
44
45
|
import "core-js/modules/es.array.filter.js";
|
|
46
|
+
import "core-js/modules/es.object.to-string.js";
|
|
45
47
|
import "core-js/modules/es.function.name.js";
|
|
46
48
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
47
49
|
import { HexColorPicker, HslaStringColorPicker, RgbaStringColorPicker } from 'react-colorful';
|
|
@@ -107,7 +109,7 @@ var Swatch = function Swatch(_ref3) {
|
|
|
107
109
|
active = _ref3.active,
|
|
108
110
|
onClick = _ref3.onClick,
|
|
109
111
|
style = _ref3.style,
|
|
110
|
-
props = _objectWithoutProperties(_ref3,
|
|
112
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
111
113
|
|
|
112
114
|
var backgroundImage = "linear-gradient(".concat(value, ", ").concat(value, "), ").concat(swatchBackground, ", linear-gradient(#fff, #fff)");
|
|
113
115
|
return /*#__PURE__*/React.createElement(SwatchColor, _extends({}, props, {
|
|
@@ -2,12 +2,13 @@ import "core-js/modules/es.symbol.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.description.js";
|
|
3
3
|
import "core-js/modules/es.object.to-string.js";
|
|
4
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
|
9
9
|
import "core-js/modules/es.function.name.js";
|
|
10
10
|
import "core-js/modules/es.array.from.js";
|
|
11
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
11
12
|
|
|
12
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
18
|
|
|
18
19
|
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; }
|
|
19
20
|
|
|
20
|
-
function _iterableToArrayLimit(arr, i) {
|
|
21
|
+
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; }
|
|
21
22
|
|
|
22
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/es.string.split.js";
|
|
2
1
|
import "core-js/modules/es.regexp.exec.js";
|
|
2
|
+
import "core-js/modules/es.string.split.js";
|
|
3
3
|
import "core-js/modules/es.array.slice.js";
|
|
4
4
|
import "core-js/modules/es.array.concat.js";
|
|
5
5
|
import "core-js/modules/es.function.name.js";
|
|
@@ -7,8 +7,8 @@ import "core-js/modules/es.symbol.js";
|
|
|
7
7
|
import "core-js/modules/es.symbol.description.js";
|
|
8
8
|
import "core-js/modules/es.object.to-string.js";
|
|
9
9
|
import "core-js/modules/es.symbol.iterator.js";
|
|
10
|
-
import "core-js/modules/es.string.iterator.js";
|
|
11
10
|
import "core-js/modules/es.array.iterator.js";
|
|
11
|
+
import "core-js/modules/es.string.iterator.js";
|
|
12
12
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
13
13
|
import "core-js/modules/es.array.from.js";
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
20
20
|
|
|
21
21
|
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; }
|
|
22
22
|
|
|
23
|
-
function _iterableToArrayLimit(arr, i) {
|
|
23
|
+
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; }
|
|
24
24
|
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
|
|
@@ -2,12 +2,13 @@ import "core-js/modules/es.symbol.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.description.js";
|
|
3
3
|
import "core-js/modules/es.object.to-string.js";
|
|
4
4
|
import "core-js/modules/es.symbol.iterator.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
5
|
import "core-js/modules/es.array.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
7
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
8
8
|
import "core-js/modules/es.array.slice.js";
|
|
9
9
|
import "core-js/modules/es.function.name.js";
|
|
10
10
|
import "core-js/modules/es.array.from.js";
|
|
11
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
11
12
|
|
|
12
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
17
18
|
|
|
18
19
|
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; }
|
|
19
20
|
|
|
20
|
-
function _iterableToArrayLimit(arr, i) {
|
|
21
|
+
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; }
|
|
21
22
|
|
|
22
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
24
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import "core-js/modules/es.object.to-string.js";
|
|
1
2
|
import "core-js/modules/web.dom-collections.for-each.js";
|
|
2
3
|
import "core-js/modules/es.string.starts-with.js";
|
|
3
|
-
import "core-js/modules/web.url.js";
|
|
4
|
-
import "core-js/modules/es.object.to-string.js";
|
|
5
|
-
import "core-js/modules/es.string.iterator.js";
|
|
6
4
|
import "core-js/modules/es.array.iterator.js";
|
|
5
|
+
import "core-js/modules/es.string.iterator.js";
|
|
7
6
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
7
|
+
import "core-js/modules/web.url.js";
|
|
8
|
+
import "core-js/modules/web.url-search-params.js";
|
|
8
9
|
import "core-js/modules/es.function.name.js";
|
|
9
10
|
import "core-js/modules/es.array.map.js";
|
|
10
11
|
import "core-js/modules/es.array.from.js";
|
|
@@ -6,22 +6,23 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
6
6
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
9
|
-
function _iterableToArrayLimit(arr, i) {
|
|
9
|
+
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; }
|
|
10
10
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
|
-
import "core-js/modules/es.number.is-
|
|
13
|
+
import "core-js/modules/es.number.is-nan.js";
|
|
14
14
|
import "core-js/modules/es.number.constructor.js";
|
|
15
15
|
import "core-js/modules/es.function.name.js";
|
|
16
16
|
import "core-js/modules/es.symbol.js";
|
|
17
17
|
import "core-js/modules/es.symbol.description.js";
|
|
18
18
|
import "core-js/modules/es.object.to-string.js";
|
|
19
19
|
import "core-js/modules/es.symbol.iterator.js";
|
|
20
|
-
import "core-js/modules/es.string.iterator.js";
|
|
21
20
|
import "core-js/modules/es.array.iterator.js";
|
|
21
|
+
import "core-js/modules/es.string.iterator.js";
|
|
22
22
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
23
23
|
import "core-js/modules/es.array.slice.js";
|
|
24
24
|
import "core-js/modules/es.array.from.js";
|
|
25
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
25
26
|
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
|
26
27
|
import { styled } from '@storybook/theming';
|
|
27
28
|
import { Form } from '../form';
|
|
@@ -81,6 +82,13 @@ export var NumberControl = function NumberControl(_ref) {
|
|
|
81
82
|
useEffect(function () {
|
|
82
83
|
if (forceVisible && htmlElRef.current) htmlElRef.current.select();
|
|
83
84
|
}, [forceVisible]);
|
|
85
|
+
useEffect(function () {
|
|
86
|
+
var newInputValue = typeof value === 'number' ? value : '';
|
|
87
|
+
|
|
88
|
+
if (inputValue !== newInputValue) {
|
|
89
|
+
setInputValue(value);
|
|
90
|
+
}
|
|
91
|
+
}, [value]);
|
|
84
92
|
|
|
85
93
|
if (!forceVisible && value === undefined) {
|
|
86
94
|
return /*#__PURE__*/React.createElement(Form.Button, {
|