@storybook/components 5.3.13 → 5.3.18
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/blocks/PropsTable/PropRow.js +6 -0
- package/dist/form/index.d.ts +2 -2
- package/dist/form/input/input.d.ts +2 -2
- package/dist/html.d.ts +2 -1
- package/dist/html.js +10 -79
- package/dist/syntaxhighlighter/syntaxhighlighter.js +6 -6
- package/dist/typography/DocumentFormatting.d.ts +24 -0
- package/dist/typography/DocumentFormatting.js +88 -2
- package/package.json +16 -8
- package/ts3.5/dist/ActionBar/ActionBar.d.ts +13 -0
- package/ts3.5/dist/Badge/Badge.d.ts +5 -0
- package/ts3.5/dist/Button/Button.d.ts +17 -0
- package/ts3.5/dist/ScrollArea/ScrollArea.d.ts +12 -0
- package/ts3.5/dist/ScrollArea/ScrollAreaStyles.d.ts +2 -0
- package/ts3.5/dist/addon-panel/addon-panel.d.ts +6 -0
- package/ts3.5/dist/bar/bar.d.ts +12 -0
- package/ts3.5/dist/bar/button.d.ts +10 -0
- package/ts3.5/dist/bar/separator.d.ts +6 -0
- package/ts3.5/dist/blocks/BlockBackgroundStyles.d.ts +2 -0
- package/ts3.5/dist/blocks/ColorPalette.d.ts +17 -0
- package/ts3.5/dist/blocks/Description.d.ts +9 -0
- package/ts3.5/dist/blocks/DocsPage.d.ts +11 -0
- package/ts3.5/dist/blocks/EmptyBlock.d.ts +1 -0
- package/ts3.5/dist/blocks/IFrame.d.ts +24 -0
- package/ts3.5/dist/blocks/IconGallery.d.ts +13 -0
- package/ts3.5/dist/blocks/Preview.d.ts +17 -0
- package/ts3.5/dist/blocks/PropsTable/PropDef.d.ts +25 -0
- package/ts3.5/dist/blocks/PropsTable/PropJsDoc.d.ts +8 -0
- package/ts3.5/dist/blocks/PropsTable/PropRow.d.ts +6 -0
- package/ts3.5/dist/blocks/PropsTable/PropValue.d.ts +7 -0
- package/ts3.5/dist/blocks/PropsTable/PropsTable.d.ts +23 -0
- package/ts3.5/dist/blocks/PropsTable/SectionRow.d.ts +5 -0
- package/ts3.5/dist/blocks/Source.d.ts +20 -0
- package/ts3.5/dist/blocks/Story.d.ts +25 -0
- package/ts3.5/dist/blocks/Toolbar.d.ts +15 -0
- package/ts3.5/dist/blocks/Typeset.d.ts +12 -0
- package/ts3.5/dist/blocks/ZoomContext.d.ts +4 -0
- package/ts3.5/dist/blocks/index.d.ts +10 -0
- package/ts3.5/dist/brand/StorybookIcon.d.ts +2 -0
- package/ts3.5/dist/brand/StorybookLogo.d.ts +5 -0
- package/ts3.5/dist/form/field/field.d.ts +5 -0
- package/ts3.5/dist/form/index.d.ts +16 -0
- package/ts3.5/dist/form/input/input.d.ts +25 -0
- package/ts3.5/dist/html.d.ts +3 -0
- package/ts3.5/dist/icon/icon.d.ts +6 -0
- package/ts3.5/dist/icon/icons.d.ts +155 -0
- package/ts3.5/dist/icon/svg.d.ts +6 -0
- package/ts3.5/dist/index.d.ts +23 -0
- package/ts3.5/dist/placeholder/placeholder.d.ts +2 -0
- package/ts3.5/dist/spaced/Spaced.d.ts +12 -0
- package/ts3.5/dist/syntaxhighlighter/formatter.d.ts +1 -0
- package/ts3.5/dist/syntaxhighlighter/syntaxhighlighter.d.ts +24 -0
- package/ts3.5/dist/tabs/tabs.d.ts +51 -0
- package/ts3.5/dist/tooltip/ListItem.d.ts +34 -0
- package/ts3.5/dist/tooltip/Tooltip.d.ts +21 -0
- package/ts3.5/dist/tooltip/TooltipLinkList.d.ts +11 -0
- package/ts3.5/dist/tooltip/TooltipMessage.d.ts +11 -0
- package/ts3.5/dist/tooltip/TooltipNote.d.ts +5 -0
- package/ts3.5/dist/tooltip/WithTooltip.d.ts +23 -0
- package/ts3.5/dist/typography/DocumentFormatting.d.ts +54 -0
- package/ts3.5/dist/typography/DocumentWrapper.d.ts +2 -0
- package/ts3.5/dist/typography/link/link.d.ts +22 -0
- package/ts3.5/dist/typography/link/link.test.d.ts +1 -0
- package/ts3.5/dist/typography/shared.d.ts +11 -0
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.symbol");
|
|
4
4
|
|
|
5
|
+
require("core-js/modules/es.array.concat");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.array.filter");
|
|
8
|
+
|
|
5
9
|
require("core-js/modules/es.array.index-of");
|
|
6
10
|
|
|
11
|
+
require("core-js/modules/es.array.join");
|
|
12
|
+
|
|
7
13
|
require("core-js/modules/es.object.assign");
|
|
8
14
|
|
|
9
15
|
require("core-js/modules/es.object.keys");
|
|
@@ -11,7 +17,7 @@ require("core-js/modules/es.object.keys");
|
|
|
11
17
|
Object.defineProperty(exports, "__esModule", {
|
|
12
18
|
value: true
|
|
13
19
|
});
|
|
14
|
-
exports.ResetWrapper = exports.TT = exports.Code = exports.P = exports.OL = exports.UL = exports.LI = exports.Span = exports.Div = exports.Img = exports.Table = exports.Blockquote = exports.DL = exports.HR = exports.A = exports.Pre = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = void 0;
|
|
20
|
+
exports.components = exports.ResetWrapper = exports.TT = exports.Code = exports.P = exports.OL = exports.UL = exports.LI = exports.Span = exports.Div = exports.Img = exports.Table = exports.Blockquote = exports.DL = exports.HR = exports.A = exports.Pre = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = void 0;
|
|
15
21
|
|
|
16
22
|
var _react = _interopRequireDefault(require("react"));
|
|
17
23
|
|
|
@@ -444,4 +450,84 @@ exports.TT = TT;
|
|
|
444
450
|
|
|
445
451
|
var ResetWrapper = _theming.styled.div(_shared.withReset);
|
|
446
452
|
|
|
447
|
-
exports.ResetWrapper = ResetWrapper;
|
|
453
|
+
exports.ResetWrapper = ResetWrapper;
|
|
454
|
+
|
|
455
|
+
var nameSpaceClassNames = function nameSpaceClassNames(_ref17, key) {
|
|
456
|
+
var props = Object.assign({}, _ref17);
|
|
457
|
+
var classes = [props["class"], props.className]; // eslint-disable-next-line no-param-reassign
|
|
458
|
+
|
|
459
|
+
delete props["class"]; // eslint-disable-next-line no-param-reassign
|
|
460
|
+
|
|
461
|
+
props.className = ['sbdocs', "sbdocs-".concat(key)].concat(classes).filter(Boolean).join(' ');
|
|
462
|
+
return props;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
var components = {
|
|
466
|
+
h1: function (props) {
|
|
467
|
+
return _react["default"].createElement(H1, nameSpaceClassNames(props, 'h1'));
|
|
468
|
+
},
|
|
469
|
+
h2: function (props) {
|
|
470
|
+
return _react["default"].createElement(H2, nameSpaceClassNames(props, 'h2'));
|
|
471
|
+
},
|
|
472
|
+
h3: function (props) {
|
|
473
|
+
return _react["default"].createElement(H3, nameSpaceClassNames(props, 'h3'));
|
|
474
|
+
},
|
|
475
|
+
h4: function (props) {
|
|
476
|
+
return _react["default"].createElement(H4, nameSpaceClassNames(props, 'h4'));
|
|
477
|
+
},
|
|
478
|
+
h5: function (props) {
|
|
479
|
+
return _react["default"].createElement(H5, nameSpaceClassNames(props, 'h5'));
|
|
480
|
+
},
|
|
481
|
+
h6: function (props) {
|
|
482
|
+
return _react["default"].createElement(H6, nameSpaceClassNames(props, 'h6'));
|
|
483
|
+
},
|
|
484
|
+
pre: function (props) {
|
|
485
|
+
return _react["default"].createElement(Pre, nameSpaceClassNames(props, 'pre'));
|
|
486
|
+
},
|
|
487
|
+
a: function (props) {
|
|
488
|
+
return _react["default"].createElement(A, nameSpaceClassNames(props, 'a'));
|
|
489
|
+
},
|
|
490
|
+
hr: function (props) {
|
|
491
|
+
return _react["default"].createElement(HR, nameSpaceClassNames(props, 'hr'));
|
|
492
|
+
},
|
|
493
|
+
dl: function (props) {
|
|
494
|
+
return _react["default"].createElement(DL, nameSpaceClassNames(props, 'dl'));
|
|
495
|
+
},
|
|
496
|
+
blockquote: function (props) {
|
|
497
|
+
return _react["default"].createElement(Blockquote, nameSpaceClassNames(props, 'blockquote'));
|
|
498
|
+
},
|
|
499
|
+
table: function (props) {
|
|
500
|
+
return _react["default"].createElement(Table, nameSpaceClassNames(props, 'table'));
|
|
501
|
+
},
|
|
502
|
+
img: function (props) {
|
|
503
|
+
return _react["default"].createElement(Img, nameSpaceClassNames(props, 'img'));
|
|
504
|
+
},
|
|
505
|
+
div: function (props) {
|
|
506
|
+
return _react["default"].createElement(Div, nameSpaceClassNames(props, 'div'));
|
|
507
|
+
},
|
|
508
|
+
span: function (props) {
|
|
509
|
+
return _react["default"].createElement(Span, nameSpaceClassNames(props, 'span'));
|
|
510
|
+
},
|
|
511
|
+
li: function (props) {
|
|
512
|
+
return _react["default"].createElement(LI, nameSpaceClassNames(props, 'li'));
|
|
513
|
+
},
|
|
514
|
+
ul: function (props) {
|
|
515
|
+
return _react["default"].createElement(UL, nameSpaceClassNames(props, 'ul'));
|
|
516
|
+
},
|
|
517
|
+
ol: function (props) {
|
|
518
|
+
return _react["default"].createElement(OL, nameSpaceClassNames(props, 'ol'));
|
|
519
|
+
},
|
|
520
|
+
p: function (props) {
|
|
521
|
+
return _react["default"].createElement(P, nameSpaceClassNames(props, 'p'));
|
|
522
|
+
},
|
|
523
|
+
code: function (props) {
|
|
524
|
+
return _react["default"].createElement(Code, nameSpaceClassNames(props, 'code'));
|
|
525
|
+
},
|
|
526
|
+
tt: function (props) {
|
|
527
|
+
return _react["default"].createElement(TT, nameSpaceClassNames(props, 'tt'));
|
|
528
|
+
},
|
|
529
|
+
resetwrapper: function (props) {
|
|
530
|
+
return _react["default"].createElement(ResetWrapper, nameSpaceClassNames(props, 'resetwrapper'));
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
exports.components = components;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/components",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.18",
|
|
4
4
|
"description": "Core Storybook Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -15,21 +15,22 @@
|
|
|
15
15
|
"directory": "lib/components"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
18
20
|
"files": [
|
|
19
21
|
"dist/**/*",
|
|
20
22
|
"README.md",
|
|
21
23
|
"*.js",
|
|
22
|
-
"*.d.ts"
|
|
24
|
+
"*.d.ts",
|
|
25
|
+
"ts3.5/**/*"
|
|
23
26
|
],
|
|
24
|
-
"main": "dist/index.js",
|
|
25
|
-
"types": "dist/index.d.ts",
|
|
26
27
|
"scripts": {
|
|
27
28
|
"prepare": "node ../../scripts/prepare.js"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@storybook/client-logger": "5.3.
|
|
31
|
-
"@storybook/theming": "5.3.
|
|
32
|
-
"@types/react-syntax-highlighter": "11.0.
|
|
31
|
+
"@storybook/client-logger": "5.3.18",
|
|
32
|
+
"@storybook/theming": "5.3.18",
|
|
33
|
+
"@types/react-syntax-highlighter": "11.0.4",
|
|
33
34
|
"@types/react-textarea-autosize": "^4.3.3",
|
|
34
35
|
"core-js": "^3.0.1",
|
|
35
36
|
"global": "^4.3.2",
|
|
@@ -61,5 +62,12 @@
|
|
|
61
62
|
"publishConfig": {
|
|
62
63
|
"access": "public"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ff445da08f82a7b0931647754394b4de0a2a34f9",
|
|
66
|
+
"typesVersions": {
|
|
67
|
+
"<=3.5": {
|
|
68
|
+
"*": [
|
|
69
|
+
"ts3.5/*"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
65
73
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
|
+
export declare const ActionButton: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
}, import("@storybook/theming").Theme>;
|
|
5
|
+
export interface ActionItem {
|
|
6
|
+
title: string | JSX.Element;
|
|
7
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ActionBarProps {
|
|
11
|
+
actionItems: ActionItem[];
|
|
12
|
+
}
|
|
13
|
+
export declare const ActionBar: FunctionComponent<ActionBarProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
isLink?: boolean;
|
|
4
|
+
primary?: boolean;
|
|
5
|
+
secondary?: boolean;
|
|
6
|
+
tertiary?: boolean;
|
|
7
|
+
inForm?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
small?: boolean;
|
|
10
|
+
outline?: boolean;
|
|
11
|
+
containsIcon?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<any>> & {
|
|
14
|
+
defaultProps: {
|
|
15
|
+
isLink: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export interface ScrollProps {
|
|
3
|
+
horizontal?: boolean;
|
|
4
|
+
vertical?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface ScrollAreaProps {
|
|
8
|
+
horizontal?: boolean;
|
|
9
|
+
vertical?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ScrollArea: FunctionComponent<ScrollAreaProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export interface SideProps {
|
|
3
|
+
left?: boolean;
|
|
4
|
+
right?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Bar: import("@emotion/styled-base").StyledComponent<any, Pick<any, string | number | symbol>, import("@storybook/theming").Theme>;
|
|
7
|
+
export interface FlexBarProps {
|
|
8
|
+
border?: boolean;
|
|
9
|
+
children?: any;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const FlexBar: FunctionComponent<FlexBarProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="@emotion/core" />
|
|
2
|
+
export interface TabButtonProps {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TabButton: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, TabButtonProps, import("@storybook/theming").Theme>;
|
|
7
|
+
export interface IconButtonProps {
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const IconButton: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, IconButtonProps, import("@storybook/theming").Theme>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Separator: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, SeparatorProps, import("@storybook/theming").Theme>;
|
|
3
|
+
export declare const interleaveSeparators: (list: any[]) => any;
|
|
4
|
+
export interface SeparatorProps {
|
|
5
|
+
force?: boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
interface ColorProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
colors: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A single color row your styleguide showing title, subtitle and one or more colors, used
|
|
9
|
+
* as a child of `ColorPalette`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ColorItem: FunctionComponent<ColorProps>;
|
|
12
|
+
/**
|
|
13
|
+
* Styleguide documentation for colors, including names, captions, and color swatches,
|
|
14
|
+
* all specified as `ColorItem` children of this wrapper component.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ColorPalette: FunctionComponent;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export interface DescriptionProps {
|
|
3
|
+
markdown: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A markdown description for a component, typically used to show the
|
|
7
|
+
* components docgen docs.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Description: FunctionComponent<DescriptionProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { Theme } from '@storybook/theming';
|
|
3
|
+
export interface DocsPageProps {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Title: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}, Theme>;
|
|
8
|
+
export declare const Subtitle: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}, Theme>;
|
|
9
|
+
export declare const DocsContent: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color" | "translate" | "hidden" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, Theme>;
|
|
10
|
+
export declare const DocsWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}, Theme>;
|
|
11
|
+
export declare const DocsPageWrapper: FunctionComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyBlock: (props: any) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
interface IFrameProps {
|
|
3
|
+
id: string;
|
|
4
|
+
key?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
src: string;
|
|
7
|
+
allowFullScreen: boolean;
|
|
8
|
+
scale: number;
|
|
9
|
+
style?: any;
|
|
10
|
+
}
|
|
11
|
+
interface BodyStyle {
|
|
12
|
+
width: string;
|
|
13
|
+
height: string;
|
|
14
|
+
transform: string;
|
|
15
|
+
transformOrigin: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class IFrame extends Component<IFrameProps> {
|
|
18
|
+
iframe: any;
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
shouldComponentUpdate(nextProps: IFrameProps): boolean;
|
|
21
|
+
setIframeBodyStyle(style: BodyStyle): any;
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
interface IconItemProps {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* An individual icon with a caption and an example (passed as `children`).
|
|
7
|
+
*/
|
|
8
|
+
export declare const IconItem: FunctionComponent<IconItemProps>;
|
|
9
|
+
/**
|
|
10
|
+
* Show a grid of icons, as specified by `IconItem`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const IconGallery: FunctionComponent;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { SourceProps } from './Source';
|
|
3
|
+
export interface PreviewProps {
|
|
4
|
+
isColumn?: boolean;
|
|
5
|
+
columns?: number;
|
|
6
|
+
withSource?: SourceProps;
|
|
7
|
+
isExpanded?: boolean;
|
|
8
|
+
withToolbar?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A preview component for showing one or more component `Story`
|
|
13
|
+
* items. The preview also shows the source for the component
|
|
14
|
+
* as a drop-down.
|
|
15
|
+
*/
|
|
16
|
+
declare const Preview: FunctionComponent<PreviewProps>;
|
|
17
|
+
export { Preview };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface JsDocParam {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface JsDocReturns {
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface JsDocTags {
|
|
9
|
+
params?: JsDocParam[];
|
|
10
|
+
returns?: JsDocReturns;
|
|
11
|
+
}
|
|
12
|
+
export interface PropSummaryValue {
|
|
13
|
+
summary: string;
|
|
14
|
+
detail?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare type PropType = PropSummaryValue;
|
|
17
|
+
export declare type PropDefaultValue = PropSummaryValue;
|
|
18
|
+
export interface PropDef {
|
|
19
|
+
name: string;
|
|
20
|
+
type: PropType;
|
|
21
|
+
required: boolean;
|
|
22
|
+
description?: string;
|
|
23
|
+
defaultValue?: PropDefaultValue;
|
|
24
|
+
jsDocTags?: JsDocTags;
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { JsDocTags } from './PropDef';
|
|
3
|
+
interface PropJsDocProps {
|
|
4
|
+
tags: JsDocTags;
|
|
5
|
+
}
|
|
6
|
+
export declare const Table: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, Pick<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "color" | "translate" | "hidden" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "summary" | "cellPadding" | "cellSpacing">, import("@storybook/theming").Theme>;
|
|
7
|
+
export declare const PropJsDoc: FC<PropJsDocProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { PropDef, PropType, PropDefaultValue, PropSummaryValue } from './PropDef';
|
|
3
|
+
export declare const Table: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}, import("@storybook/theming").Theme>;
|
|
4
|
+
export declare enum PropsTableError {
|
|
5
|
+
NO_COMPONENT = "No component found",
|
|
6
|
+
PROPS_UNSUPPORTED = "Props unsupported. See Props documentation for your framework."
|
|
7
|
+
}
|
|
8
|
+
export interface PropsTableRowsProps {
|
|
9
|
+
rows: PropDef[];
|
|
10
|
+
}
|
|
11
|
+
export interface PropsTableSectionsProps {
|
|
12
|
+
sections?: Record<string, PropDef[]>;
|
|
13
|
+
}
|
|
14
|
+
export interface PropsTableErrorProps {
|
|
15
|
+
error: PropsTableError;
|
|
16
|
+
}
|
|
17
|
+
export declare type PropsTableProps = PropsTableRowsProps | PropsTableSectionsProps | PropsTableErrorProps;
|
|
18
|
+
/**
|
|
19
|
+
* Display the props for a component as a props table. Each row is a collection of
|
|
20
|
+
* PropDefs, usually derived from docgen info for the component.
|
|
21
|
+
*/
|
|
22
|
+
declare const PropsTable: FC<PropsTableProps>;
|
|
23
|
+
export { PropsTable, PropDef, PropType, PropDefaultValue, PropSummaryValue };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export declare enum SourceError {
|
|
3
|
+
NO_STORY = "There\u2019s no story here.",
|
|
4
|
+
SOURCE_UNAVAILABLE = "Oh no! The source is not available."
|
|
5
|
+
}
|
|
6
|
+
interface SourceErrorProps {
|
|
7
|
+
error?: SourceError;
|
|
8
|
+
}
|
|
9
|
+
interface SourceCodeProps {
|
|
10
|
+
language?: string;
|
|
11
|
+
code?: string;
|
|
12
|
+
format?: boolean;
|
|
13
|
+
dark?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare type SourceProps = SourceErrorProps & SourceCodeProps;
|
|
16
|
+
/**
|
|
17
|
+
* Syntax-highlighted source code for a component (or anything!)
|
|
18
|
+
*/
|
|
19
|
+
declare const Source: FunctionComponent<SourceProps>;
|
|
20
|
+
export { Source };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ElementType, FunctionComponent } from 'react';
|
|
2
|
+
export declare enum StoryError {
|
|
3
|
+
NO_STORY = "No component or story to display"
|
|
4
|
+
}
|
|
5
|
+
interface CommonProps {
|
|
6
|
+
title: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
declare type InlineStoryProps = {
|
|
11
|
+
storyFn: ElementType;
|
|
12
|
+
} & CommonProps;
|
|
13
|
+
declare type IFrameStoryProps = CommonProps;
|
|
14
|
+
declare type ErrorProps = {
|
|
15
|
+
error?: StoryError;
|
|
16
|
+
} & CommonProps;
|
|
17
|
+
export declare type StoryProps = (InlineStoryProps | IFrameStoryProps | ErrorProps) & {
|
|
18
|
+
inline: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A story element, either renderend inline or in an iframe,
|
|
22
|
+
* with configurable height.
|
|
23
|
+
*/
|
|
24
|
+
declare const Story: FunctionComponent<StoryProps>;
|
|
25
|
+
export { Story };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
interface ZoomProps {
|
|
3
|
+
zoom: (val: number) => void;
|
|
4
|
+
resetZoom: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface EjectProps {
|
|
7
|
+
storyId?: string;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
interface BarProps {
|
|
11
|
+
border?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare type ToolbarProps = BarProps & ZoomProps & EjectProps;
|
|
14
|
+
export declare const Toolbar: FunctionComponent<ToolbarProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export interface TypesetProps {
|
|
3
|
+
fontFamily?: string;
|
|
4
|
+
fontSizes: string[];
|
|
5
|
+
fontWeight?: number;
|
|
6
|
+
sampleText?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Convenient styleguide documentation showing examples of type
|
|
10
|
+
* with different sizes and weights and configurable sample text.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Typeset: FunctionComponent<TypesetProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Description';
|
|
2
|
+
export * from './DocsPage';
|
|
3
|
+
export * from './Preview';
|
|
4
|
+
export * from './PropsTable/PropsTable';
|
|
5
|
+
export * from './Source';
|
|
6
|
+
export * from './Story';
|
|
7
|
+
export * from './IFrame';
|
|
8
|
+
export * from './Typeset';
|
|
9
|
+
export * from './ColorPalette';
|
|
10
|
+
export * from './IconGallery';
|