@storybook/components 6.4.0-beta.3 → 6.4.0-beta.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ActionBar/ActionBar.stories.js +7 -7
- package/dist/cjs/ScrollArea/GlobalScrollAreaStyles.js +1 -1
- package/dist/cjs/ScrollArea/ScrollArea.stories.js +13 -13
- package/dist/cjs/Zoom/Zoom.stories.js +22 -22
- package/dist/cjs/bar/bar.js +5 -3
- package/dist/cjs/bar/button.js +64 -26
- package/dist/cjs/bar/button.stories.js +90 -0
- package/dist/cjs/bar/separator.js +4 -2
- package/dist/cjs/blocks/ArgsTable/ArgRow.js +18 -6
- package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +6 -1
- package/dist/cjs/blocks/ArgsTable/ArgsTable.js +125 -32
- package/dist/cjs/blocks/ArgsTable/ArgsTable.stories.js +6 -1
- package/dist/cjs/blocks/ColorPalette.stories.js +4 -4
- package/dist/cjs/blocks/DocsPage.stories.js +9 -2
- package/dist/cjs/blocks/EmptyBlock.stories.js +4 -4
- package/dist/cjs/blocks/IconGallery.stories.js +4 -4
- package/dist/cjs/blocks/Preview.js +13 -2
- package/dist/cjs/blocks/Preview.stories.js +8 -1
- package/dist/cjs/blocks/Source.js +57 -8
- package/dist/cjs/blocks/Source.stories.js +11 -1
- package/dist/cjs/blocks/Story.js +11 -2
- package/dist/cjs/blocks/Story.stories.js +11 -1
- package/dist/cjs/blocks/Typeset.stories.js +13 -13
- package/dist/cjs/brand/StorybookLogo.stories.js +4 -4
- package/dist/cjs/icon/icons.js +2 -0
- package/dist/cjs/placeholder/placeholder.stories.js +7 -7
- package/dist/cjs/tabs/tabs.js +1 -1
- package/dist/cjs/tooltip/TooltipNote.js +1 -1
- package/dist/cjs/typography/DocumentFormatting.js +15 -4
- package/dist/cjs/typography/DocumentWrapper.stories.js +7 -7
- package/dist/cjs/typography/link/link.js +2 -2
- package/dist/cjs/typography/typography.stories.mdx +75 -0
- package/dist/esm/ActionBar/ActionBar.stories.js +4 -4
- package/dist/esm/ScrollArea/GlobalScrollAreaStyles.js +1 -1
- package/dist/esm/ScrollArea/ScrollArea.stories.js +8 -8
- package/dist/esm/Zoom/Zoom.stories.js +15 -15
- package/dist/esm/bar/bar.js +5 -3
- package/dist/esm/bar/button.js +56 -25
- package/dist/esm/bar/button.stories.js +56 -0
- package/dist/esm/bar/separator.js +4 -2
- package/dist/esm/blocks/ArgsTable/ArgRow.js +15 -5
- package/dist/esm/blocks/ArgsTable/ArgRow.stories.js +4 -0
- package/dist/esm/blocks/ArgsTable/ArgsTable.js +123 -32
- package/dist/esm/blocks/ArgsTable/ArgsTable.stories.js +4 -0
- package/dist/esm/blocks/ColorPalette.stories.js +2 -2
- package/dist/esm/blocks/DocsPage.stories.js +5 -1
- package/dist/esm/blocks/EmptyBlock.stories.js +2 -2
- package/dist/esm/blocks/IconGallery.stories.js +2 -2
- package/dist/esm/blocks/Preview.js +8 -3
- package/dist/esm/blocks/Preview.stories.js +5 -1
- package/dist/esm/blocks/Source.js +56 -8
- package/dist/esm/blocks/Source.stories.js +7 -0
- package/dist/esm/blocks/Story.js +7 -1
- package/dist/esm/blocks/Story.stories.js +8 -1
- package/dist/esm/blocks/Typeset.stories.js +8 -8
- package/dist/esm/brand/StorybookLogo.stories.js +2 -2
- package/dist/esm/icon/icons.js +2 -0
- package/dist/esm/placeholder/placeholder.stories.js +4 -4
- package/dist/esm/tabs/tabs.js +1 -1
- package/dist/esm/tooltip/TooltipNote.js +1 -1
- package/dist/esm/typography/DocumentFormatting.js +12 -3
- package/dist/esm/typography/DocumentWrapper.stories.js +4 -4
- package/dist/esm/typography/link/link.js +2 -2
- package/dist/esm/typography/typography.stories.mdx +75 -0
- package/dist/modern/ActionBar/ActionBar.stories.js +4 -4
- package/dist/modern/ScrollArea/GlobalScrollAreaStyles.js +1 -1
- package/dist/modern/ScrollArea/ScrollArea.stories.js +8 -8
- package/dist/modern/Zoom/Zoom.stories.js +15 -15
- package/dist/modern/bar/bar.js +5 -3
- package/dist/modern/bar/button.js +48 -24
- package/dist/modern/bar/button.stories.js +42 -0
- package/dist/modern/bar/separator.js +4 -2
- package/dist/modern/blocks/ArgsTable/ArgRow.js +9 -1
- package/dist/modern/blocks/ArgsTable/ArgRow.stories.js +4 -0
- package/dist/modern/blocks/ArgsTable/ArgsTable.js +99 -12
- package/dist/modern/blocks/ArgsTable/ArgsTable.stories.js +4 -0
- package/dist/modern/blocks/ColorPalette.stories.js +2 -2
- package/dist/modern/blocks/DocsPage.stories.js +3 -1
- package/dist/modern/blocks/EmptyBlock.stories.js +2 -2
- package/dist/modern/blocks/IconGallery.stories.js +2 -2
- package/dist/modern/blocks/Preview.js +6 -3
- package/dist/modern/blocks/Preview.stories.js +3 -1
- package/dist/modern/blocks/Source.js +44 -0
- package/dist/modern/blocks/Source.stories.js +5 -0
- package/dist/modern/blocks/Story.js +5 -1
- package/dist/modern/blocks/Story.stories.js +6 -1
- package/dist/modern/blocks/Typeset.stories.js +8 -8
- package/dist/modern/brand/StorybookLogo.stories.js +2 -2
- package/dist/modern/icon/icons.js +2 -0
- package/dist/modern/placeholder/placeholder.stories.js +4 -4
- package/dist/modern/tabs/tabs.js +1 -1
- package/dist/modern/tooltip/TooltipNote.js +1 -1
- package/dist/modern/typography/DocumentFormatting.js +7 -2
- package/dist/modern/typography/DocumentWrapper.stories.js +4 -4
- package/dist/modern/typography/link/link.js +2 -2
- package/dist/modern/typography/typography.stories.mdx +75 -0
- package/dist/ts3.4/ScrollArea/GlobalScrollAreaStyles.d.ts +1 -0
- package/dist/ts3.4/bar/button.d.ts +2 -0
- package/dist/ts3.4/blocks/ArgsTable/ArgRow.d.ts +7 -1
- package/dist/ts3.4/blocks/ArgsTable/ArgsTable.d.ts +8 -2
- package/dist/ts3.4/blocks/ArgsTable/NoControlsWarning.d.ts +1 -0
- package/dist/ts3.4/blocks/EmptyBlock.d.ts +1 -0
- package/dist/ts3.4/blocks/Preview.d.ts +2 -2
- package/dist/ts3.4/blocks/Source.d.ts +1 -0
- package/dist/ts3.4/blocks/Story.d.ts +4 -3
- package/dist/ts3.4/icon/icons.d.ts +2 -0
- package/dist/ts3.9/ScrollArea/GlobalScrollAreaStyles.d.ts +1 -0
- package/dist/ts3.9/bar/button.d.ts +2 -0
- package/dist/ts3.9/blocks/ArgsTable/ArgRow.d.ts +7 -1
- package/dist/ts3.9/blocks/ArgsTable/ArgsTable.d.ts +8 -2
- package/dist/ts3.9/blocks/ArgsTable/NoControlsWarning.d.ts +1 -0
- package/dist/ts3.9/blocks/EmptyBlock.d.ts +1 -0
- package/dist/ts3.9/blocks/Preview.d.ts +2 -2
- package/dist/ts3.9/blocks/Source.d.ts +1 -0
- package/dist/ts3.9/blocks/Story.d.ts +4 -3
- package/dist/ts3.9/icon/icons.d.ts +2 -0
- package/package.json +5 -5
- package/dist/cjs/typography/typography.stories.js +0 -130
- package/dist/esm/typography/typography.stories.js +0 -106
- package/dist/modern/typography/typography.stories.js +0 -91
|
@@ -7,31 +7,31 @@ export default {
|
|
|
7
7
|
var fontSizes = ['12px', '14px', '16px', '20px', '24px', '32px', '40px', '48px'];
|
|
8
8
|
var fontWeight = 900;
|
|
9
9
|
var fontFamily = 'monospace';
|
|
10
|
-
export var
|
|
10
|
+
export var WithFontSizes = function WithFontSizes() {
|
|
11
11
|
return /*#__PURE__*/React.createElement(Typeset, {
|
|
12
12
|
fontSizes: fontSizes
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export var
|
|
15
|
+
WithFontSizes.displayName = "WithFontSizes";
|
|
16
|
+
export var WithFontWeight = function WithFontWeight() {
|
|
17
17
|
return /*#__PURE__*/React.createElement(Typeset, {
|
|
18
18
|
fontSizes: fontSizes,
|
|
19
19
|
fontWeight: fontWeight
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
export var
|
|
22
|
+
WithFontWeight.displayName = "WithFontWeight";
|
|
23
|
+
export var WithFontFamily = function WithFontFamily() {
|
|
24
24
|
return /*#__PURE__*/React.createElement(Typeset, {
|
|
25
25
|
fontSizes: fontSizes,
|
|
26
26
|
fontFamily: fontFamily
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
export var
|
|
29
|
+
WithFontFamily.displayName = "WithFontFamily";
|
|
30
|
+
export var WithWeightText = function WithWeightText() {
|
|
31
31
|
return /*#__PURE__*/React.createElement(Typeset, {
|
|
32
32
|
fontSizes: fontSizes,
|
|
33
33
|
fontWeight: fontWeight,
|
|
34
34
|
sampleText: "Heading"
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
WithWeightText.displayName = "WithWeightText";
|
|
@@ -4,9 +4,9 @@ export default {
|
|
|
4
4
|
component: StorybookLogo,
|
|
5
5
|
title: 'Basics/Brand/StorybookLogo'
|
|
6
6
|
};
|
|
7
|
-
export var
|
|
7
|
+
export var Normal = function Normal() {
|
|
8
8
|
return /*#__PURE__*/React.createElement(StorybookLogo, {
|
|
9
9
|
alt: "Storybook logo"
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
Normal.displayName = "Normal";
|
package/dist/esm/icon/icons.js
CHANGED
|
@@ -111,6 +111,8 @@ export var icons = {
|
|
|
111
111
|
playback: 'M823 136L311 478l-12 10V192a64 64 0 00-128 0v640a64 64 0 10128 0V536l12 10 512 342c8 5 16 8 23 8 17 0 29-16 29-42V170c0-26-12-42-29-42-7 0-15 3-23 8z',
|
|
112
112
|
stop: 'M1024 512A512 512 0 100 512a512 512 0 001024 0zM215 809a418 418 0 010-594 418 418 0 01594 0 418 418 0 010 594 418 418 0 01-594 0zm471-78H338c-25 0-45-20-45-45V338c0-25 20-45 45-45h348c25 0 45 20 45 45v348c0 25-20 45-45 45z',
|
|
113
113
|
stopalt: 'M894 85H130c-25 0-45 20-45 45v764c0 25 20 45 45 45h764c25 0 45-20 45-45V130c0-25-20-45-45-45z',
|
|
114
|
+
rewind: 'm631.8 642.6 345 245.4c7.7 5.4 15 8 21.4 8 15.9 0 26.8-15.5 26.8-42.3V170.3c0-26.8-11-42.3-26.8-42.3-6.4 0-13.7 2.6-21.4 8l-345 245.4v-211c0-26.9-10.9-42.4-26.8-42.4-6.4 0-13.7 2.6-21.4 8L129 459.4V192a64 64 0 0 0-128 0v640a64 64 0 0 0 128 0V564.6L583.6 888c7.7 5.4 15 8 21.4 8 15.9 0 26.8-15.5 26.8-42.3v-211Z',
|
|
115
|
+
fastforward: 'M398.2 386.4 53.2 141c-7.7-5.4-15-8-21.4-8C15.9 133 5 148.5 5 175.3v683.4C5 885.5 16 901 31.8 901c6.4 0 13.7-2.6 21.4-8l345-245.4v211c0 26.9 11 42.4 26.8 42.4 6.4 0 13.7-2.6 21.4-8L901 569.6V837a64 64 0 0 0 128 0V197a64 64 0 0 0-128 0v267.4L446.4 141c-7.7-5.4-15-8-21.4-8-15.9 0-26.8 15.5-26.8 42.3v211Z',
|
|
114
116
|
email: 'M960.032 268.004c0.748-10.040-2.246-20.364-9.226-28.684-5.984-7.132-13.938-11.62-22.394-13.394-0.13-0.026-0.268-0.066-0.396-0.092-1.082-0.22-2.172-0.376-3.272-0.5-0.25-0.032-0.492-0.080-0.742-0.102-1.028-0.096-2.052-0.136-3.090-0.156-0.292-0.002-0.582-0.042-0.876-0.042h-816.008c-21.416 0-38.848 16.844-39.898 38-0.034 0.628-0.092 1.256-0.096 1.89 0 0.034-0.006 0.074-0.006 0.114 0 0.050 0.008 0.102 0.008 0.152v495.692c0 0.054-0.008 0.106-0.008 0.156 0 22.090 17.91 40 40 40h816.004c13.808 0 25.98-6.996 33.17-17.636 0.1-0.148 0.182-0.312 0.28-0.458 0.606-0.93 1.196-1.868 1.722-2.84 0.046-0.082 0.080-0.172 0.124-0.258 2.992-5.604 4.704-12.008 4.704-18.804v0 0-493.038zM144.032 350.156l339.946 281.188c6.568 6.434 14.918 10.168 23.564 11.122 0.16 0.024 0.32 0.050 0.48 0.066 0.838 0.082 1.676 0.114 2.518 0.14 0.496 0.020 0.994 0.058 1.492 0.058s0.996-0.042 1.492-0.058c0.842-0.028 1.68-0.058 2.518-0.14 0.16-0.016 0.32-0.042 0.48-0.066 8.646-0.958 16.996-4.688 23.564-11.122l339.946-281.206v370.894h-736v-370.876zM215.066 305.030h593.91l-296.946 245.422-296.964-245.422z',
|
|
115
117
|
link: 'M743.52 529.234c5.616-5.616 83.048-83.046 88.462-88.46 30.944-32.778 47.97-75.636 47.97-120.792 0-47.048-18.304-91.26-51.542-124.484-33.228-33.22-77.43-51.516-124.458-51.516-45.024 0-87.792 16.94-120.536 47.72l-104.458 104.456c-30.792 32.738-47.734 75.512-47.734 120.548 0 41.916 14.576 81.544 41.248 113.196 3.264 3.876 6.666 7.664 10.292 11.29 4.258 4.258 8.704 8.262 13.304 12.022 0.054 0.080 0.096 0.152 0.148 0.232 9.572 7.308 15.778 18.804 15.778 31.776 0 22.094-17.914 40-40.004 40-8.542 0-16.442-2.696-22.938-7.26-2.746-1.93-20.622-17.43-30.35-28.050-0.008-0.010-0.018-0.018-0.026-0.028-4.992-5.432-13.234-15.23-18.552-22.65s-16.556-25.872-17.036-26.736c-0.7-1.262-2.974-5.526-3.422-6.39-0.69-1.334-6.118-12.67-6.114-12.67-14.342-31.96-22.332-67.4-22.332-104.728 0-60.826 21.198-116.648 56.58-160.544 0.252-0.314 4.61-5.594 6.594-7.866 0.304-0.35 5.038-5.636 7.16-7.874 0.252-0.268 105.86-105.874 106.128-106.126 45.902-43.584 107.958-70.314 176.264-70.314 141.382 0 255.998 114.5 255.998 256 0 68.516-26.882 130.688-70.652 176.61-0.144 0.148-109.854 109.546-112.090 111.528-0.958 0.848-5.072 4.352-5.072 4.352-6.448 5.434-13.132 10.592-20.1 15.378 0.412-6.836 0.644-13.702 0.644-20.6 0-26.46-3.108-52.206-8.918-76.918l-0.236-1.102zM616.144 767.82c35.382-43.896 56.58-99.718 56.58-160.544 0-37.328-7.99-72.768-22.332-104.728 0.004 0 0.006-0.002 0.010-0.004-0.258-0.576-0.538-1.14-0.8-1.714-0.686-1.498-2.894-6.112-3.296-6.93-0.668-1.344-2.952-5.732-3.386-6.604-3.48-6.982-8.708-15.126-9.49-16.366-0.498-0.792-0.996-1.58-1.502-2.364-0.834-1.29-15.364-22.066-26.656-34.466-0.008-0.010-0.018-0.018-0.026-0.028-7.056-8.448-24.932-24.198-30.35-28.050-6.47-4.602-14.396-7.26-22.938-7.26-22.090 0-40.004 17.906-40.004 40 0 12.97 6.206 24.466 15.778 31.776 0.052 0.080 0.094 0.152 0.148 0.232 4.602 3.76 20.334 19.434 23.598 23.31 26.672 31.65 41.248 71.28 41.248 113.196 0 45.038-16.944 87.81-47.734 120.548l-104.458 104.456c-32.742 30.782-75.512 47.72-120.536 47.72-47.028 0-91.228-18.294-124.458-51.516-33.236-33.224-51.542-77.436-51.542-124.484 0-45.154 17.028-88.014 47.97-120.792 5.414-5.414 40.812-40.812 68.958-68.958 7.176-7.176 13.888-13.886 19.504-19.502v-0.002c-0.356-1.562-0.246-1.096-0.246-1.096-5.81-24.712-8.918-50.458-8.918-76.918 0-6.898 0.232-13.764 0.644-20.6-6.966 4.788-20.1 15.33-20.1 15.33-0.734 0.62-9.518 8.388-11.68 10.45-0.16 0.154-105.338 105.33-105.482 105.478-43.77 45.922-70.652 108.094-70.652 176.61 0 141.5 114.616 256 255.998 256 68.306 0 130.362-26.73 176.264-70.314 0.27-0.254 105.876-105.86 106.128-106.126 0.004-0.002 13.506-15.426 13.758-15.74z',
|
|
116
118
|
paperclip: 'M824.25 369.354c68.146-70.452 67.478-182.784-2.094-252.354-70.296-70.296-184.266-70.296-254.558 0-0.014 0.012-0.028 0.026-0.042 0.042-0.004 0.002-0.006 0.004-0.010 0.008l-433.144 433.142c-0.036 0.036-0.074 0.068-0.11 0.106-0.054 0.052-0.106 0.11-0.16 0.162l-2.668 2.67c-0.286 0.286-0.528 0.596-0.8 0.888-43.028 44.88-66.664 103.616-66.664 165.986 0 64.106 24.962 124.376 70.292 169.704 45.328 45.33 105.598 70.292 169.706 70.292 50.612 0 98.822-15.57 139.186-44.428 4.932-1.952 9.556-4.906 13.544-8.894l16.802-16.802c0.056-0.056 0.116-0.112 0.172-0.168 0.038-0.038 0.074-0.076 0.112-0.116l289.010-289.014c15.622-15.618 15.62-40.942 0-56.56s-40.948-15.62-56.566 0l-289.124 289.122c-62.482 62.484-163.792 62.484-226.274 0-62.484-62.482-62.484-163.79 0-226.272h-0.002l433.134-433.12c0.058-0.060 0.112-0.122 0.172-0.18 38.99-38.99 102.43-38.99 141.42 0 38.992 38.99 38.99 102.432 0 141.422-0.058 0.060-0.122 0.114-0.18 0.17l0.006 0.006-280.536 280.534c-0.002-0.002-0.002-0.004-0.004-0.006l-79.978 79.98c-0.010 0.010-0.016 0.020-0.028 0.028-0.008 0.012-0.018 0.018-0.028 0.028l-0.064 0.062c-15.622 15.624-40.944 15.624-56.562 0-15.624-15.62-15.624-40.944-0.002-56.566l0.062-0.062c0.010-0.010 0.018-0.020 0.028-0.028 0.008-0.012 0.020-0.018 0.028-0.028l79.98-79.978c-0.002-0.002-0.004-0.002-0.006-0.004l136.508-136.512c15.622-15.62 15.62-40.944-0.002-56.562-15.618-15.62-40.946-15.62-56.564 0l-219.342 219.344c-1.284 1.284-2.42 2.652-3.494 4.052-40.4 47.148-38.316 118.184 6.322 162.824 44.64 44.638 115.674 46.722 162.82 6.324 1.402-1.072 2.772-2.21 4.054-3.494l2.83-2.832c0.002 0 0.002 0 0.002 0s0 0 0 0l360.54-360.54c0.058-0.056 0.12-0.114 0.18-0.172 0.050-0.050 0.098-0.106 0.15-0.158l0.994-0.994c0.34-0.338 0.63-0.702 0.952-1.052z',
|
|
@@ -5,11 +5,11 @@ export default {
|
|
|
5
5
|
component: Placeholder,
|
|
6
6
|
title: 'Basics/Placeholder'
|
|
7
7
|
};
|
|
8
|
-
export var
|
|
8
|
+
export var SingleChild = function SingleChild() {
|
|
9
9
|
return /*#__PURE__*/React.createElement(Placeholder, null, "This is a placeholder with single child, it's bolded");
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
export var
|
|
11
|
+
SingleChild.displayName = "SingleChild";
|
|
12
|
+
export var TwoChildren = function TwoChildren() {
|
|
13
13
|
return /*#__PURE__*/React.createElement(Placeholder, null, /*#__PURE__*/React.createElement(Fragment, {
|
|
14
14
|
key: "title"
|
|
15
15
|
}, "This has two children, the first bold"), /*#__PURE__*/React.createElement(Fragment, {
|
|
@@ -20,4 +20,4 @@ export var twoChildren = function twoChildren() {
|
|
|
20
20
|
cancel: false
|
|
21
21
|
}, "link")));
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
TwoChildren.displayName = "TwoChildren";
|
package/dist/esm/tabs/tabs.js
CHANGED
|
@@ -20,7 +20,7 @@ var Note = styled.div(function (_ref) {
|
|
|
20
20
|
whiteSpace: 'nowrap',
|
|
21
21
|
pointerEvents: 'none',
|
|
22
22
|
zIndex: -1,
|
|
23
|
-
background: 'rgba(
|
|
23
|
+
background: theme.base === 'light' ? 'rgba(60, 60, 60, 0.9)' : 'rgba(20, 20, 20, 0.85)',
|
|
24
24
|
margin: 6
|
|
25
25
|
};
|
|
26
26
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "core-js/modules/es.object.assign.js";
|
|
2
2
|
import "core-js/modules/es.string.match.js";
|
|
3
3
|
import "core-js/modules/es.regexp.exec.js";
|
|
4
|
-
import "core-js/modules/es.array.join.js";
|
|
5
4
|
import "core-js/modules/es.array.filter.js";
|
|
5
|
+
import "core-js/modules/es.array.join.js";
|
|
6
6
|
import "core-js/modules/es.array.concat.js";
|
|
7
7
|
import "core-js/modules/es.object.keys.js";
|
|
8
8
|
import "core-js/modules/es.symbol.js";
|
|
@@ -366,6 +366,12 @@ var DefaultCodeBlock = styled.code(function (_ref16) {
|
|
|
366
366
|
color: 'inherit'
|
|
367
367
|
};
|
|
368
368
|
}, codeCommon);
|
|
369
|
+
var isInlineCodeRegex = /[\n\r]/g;
|
|
370
|
+
|
|
371
|
+
var isReactChildString = function isReactChildString(child) {
|
|
372
|
+
return typeof child === 'string';
|
|
373
|
+
};
|
|
374
|
+
|
|
369
375
|
export var Code = function Code(_ref17) {
|
|
370
376
|
var _language$;
|
|
371
377
|
|
|
@@ -374,12 +380,15 @@ export var Code = function Code(_ref17) {
|
|
|
374
380
|
props = _objectWithoutProperties(_ref17, ["className", "children"]);
|
|
375
381
|
|
|
376
382
|
var language = (className || '').match(/lang-(\S+)/);
|
|
377
|
-
var
|
|
383
|
+
var childrenArray = React.Children.toArray(children);
|
|
384
|
+
var isInlineCode = !childrenArray.filter(isReactChildString).some(function (child) {
|
|
385
|
+
return child.match(isInlineCodeRegex);
|
|
386
|
+
});
|
|
378
387
|
|
|
379
388
|
if (isInlineCode) {
|
|
380
389
|
return /*#__PURE__*/React.createElement(DefaultCodeBlock, _extends({}, props, {
|
|
381
390
|
className: className
|
|
382
|
-
}),
|
|
391
|
+
}), childrenArray);
|
|
383
392
|
}
|
|
384
393
|
|
|
385
394
|
return /*#__PURE__*/React.createElement(StyledSyntaxHighlighter, _extends({
|
|
@@ -12,11 +12,11 @@ export default {
|
|
|
12
12
|
}, storyFn());
|
|
13
13
|
}]
|
|
14
14
|
};
|
|
15
|
-
export var
|
|
15
|
+
export var WithMarkdown = function WithMarkdown() {
|
|
16
16
|
return /*#__PURE__*/React.createElement(DocumentWrapper, null, /*#__PURE__*/React.createElement(MarkdownSample, null));
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
export var
|
|
18
|
+
WithMarkdown.displayName = "WithMarkdown";
|
|
19
|
+
export var WithDOM = function WithDOM() {
|
|
20
20
|
return /*#__PURE__*/React.createElement(DocumentWrapper, null, /*#__PURE__*/React.createElement("h1", null, "h1 Heading"), /*#__PURE__*/React.createElement("h2", null, "h2 Heading"), /*#__PURE__*/React.createElement("h3", null, "h3 Heading"), /*#__PURE__*/React.createElement("h4", null, "h4 Heading"), /*#__PURE__*/React.createElement("h5", null, "h5 Heading"), /*#__PURE__*/React.createElement("h6", null, "h6 Heading"), /*#__PURE__*/React.createElement("h2", null, "Typographic replacements"), /*#__PURE__*/React.createElement("p", null, "Enable typographer option to see result."), /*#__PURE__*/React.createElement("p", null, "\xA9 \xA9 \xAE \xAE \u2122 \u2122 \xA7 \xA7 \xB1"), /*#__PURE__*/React.createElement("p", null, "test\u2026 test\u2026 test\u2026 test?.. test!.."), /*#__PURE__*/React.createElement("p", null, "!!! ??? , \u2013 \u2014"), /*#__PURE__*/React.createElement("p", null, "\u201CSmartypants, double quotes\u201D and \u2018single quotes\u2019"), /*#__PURE__*/React.createElement("h2", null, "Emphasis"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, "This is bold text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, "This is bold text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, "This is italic text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, "This is italic text")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("em", null, /*#__PURE__*/React.createElement("strong", null, "This is bold italic text"))), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("s", null, "Strikethrough")), /*#__PURE__*/React.createElement("h2", null, "Blockquotes"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "Blockquotes can also be nested\u2026"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "\u2026by using additional greater-than signs right next to each other\u2026"), /*#__PURE__*/React.createElement("blockquote", null, /*#__PURE__*/React.createElement("p", null, "\u2026or with spaces between arrows.")))), /*#__PURE__*/React.createElement("h2", null, "Lists"), /*#__PURE__*/React.createElement("p", null, "Unordered"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Create a list by starting a line with ", /*#__PURE__*/React.createElement("code", null, "+"), ", ", /*#__PURE__*/React.createElement("code", null, "-"), ", or ", /*#__PURE__*/React.createElement("code", null, "*")), /*#__PURE__*/React.createElement("li", null, "Sub-lists are made by indenting 2 spaces:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Marker character change forces new list start:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Ac tristique libero volutpat at")), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Facilisis in pretium nisl aliquet")), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Nulla volutpat aliquam velit"))))), /*#__PURE__*/React.createElement("li", null, "Very easy!")), /*#__PURE__*/React.createElement("p", null, "Ordered"), /*#__PURE__*/React.createElement("ol", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Lorem ipsum dolor sit amet")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Consectetur adipiscing elit")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "Integer molestie lorem at massa")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "You can use sequential numbers\u2026")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("p", null, "\u2026or keep all the numbers as ", /*#__PURE__*/React.createElement("code", null, "1.")))), /*#__PURE__*/React.createElement("p", null, "Start numbering with offset:"), /*#__PURE__*/React.createElement("ol", {
|
|
21
21
|
start: 57
|
|
22
22
|
}, /*#__PURE__*/React.createElement("li", null, "foo"), /*#__PURE__*/React.createElement("li", null, "bar")), /*#__PURE__*/React.createElement("h2", null, "Horizontal Rule"), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement("h2", null, "Tables"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "Option"), /*#__PURE__*/React.createElement("th", null, "Description"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "data"), /*#__PURE__*/React.createElement("td", null, "path to data files to supply the data that will be passed into templates.")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "engine"), /*#__PURE__*/React.createElement("td", null, "engine to be used for processing templates. Handlebars is the default.")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "ext"), /*#__PURE__*/React.createElement("td", null, "extension to be used for dest files.")))), /*#__PURE__*/React.createElement("p", null, "Right aligned columns"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
|
|
@@ -67,4 +67,4 @@ export var withDOM = function withDOM() {
|
|
|
67
67
|
title: "The Stormtroopocat"
|
|
68
68
|
})));
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
WithDOM.displayName = "WithDOM";
|
|
@@ -166,7 +166,7 @@ export var Link = function Link(_ref8) {
|
|
|
166
166
|
rest = _objectWithoutProperties(_ref8, ["cancel", "children", "onClick", "withArrow", "containsIcon", "className"]);
|
|
167
167
|
|
|
168
168
|
return /*#__PURE__*/React.createElement(A, _extends({}, rest, {
|
|
169
|
-
onClick: cancel ? function (e) {
|
|
169
|
+
onClick: onClick && cancel ? function (e) {
|
|
170
170
|
return cancelled(e, onClick);
|
|
171
171
|
} : onClick,
|
|
172
172
|
className: className
|
|
@@ -182,7 +182,7 @@ Link.defaultProps = {
|
|
|
182
182
|
cancel: true,
|
|
183
183
|
className: undefined,
|
|
184
184
|
style: undefined,
|
|
185
|
-
onClick:
|
|
185
|
+
onClick: undefined,
|
|
186
186
|
withArrow: false,
|
|
187
187
|
containsIcon: false
|
|
188
188
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { typography } from '@storybook/theming';
|
|
2
|
+
import { Meta, Typeset } from '@storybook/addon-docs';
|
|
3
|
+
|
|
4
|
+
export const fontSizes = ['l3', 'l2', 'l1', 'm3', 'm2', 'm1', 's3', 's2', 's1'].map(
|
|
5
|
+
(size) => `${typography.size[size]}px`
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
export const sampleText =
|
|
9
|
+
'Storybook is an open source tool for building UI components and pages in isolation. It streamlines UI development, testing, and documentation.';
|
|
10
|
+
|
|
11
|
+
<Meta title="Basics/Typography" />
|
|
12
|
+
|
|
13
|
+
## Sans-serif
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
font-family:
|
|
17
|
+
"Nunito Sans",
|
|
18
|
+
-apple-system,
|
|
19
|
+
".SFNSText-Regular",
|
|
20
|
+
"San Francisco",
|
|
21
|
+
BlinkMacSystemFont,
|
|
22
|
+
"Segoe UI",
|
|
23
|
+
"Helvetica Neue",
|
|
24
|
+
Helvetica,
|
|
25
|
+
Arial,
|
|
26
|
+
sans-serif;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<Typeset
|
|
30
|
+
fontFamily={typography.fonts.base}
|
|
31
|
+
fontSizes={fontSizes}
|
|
32
|
+
fontWeight={typography.weight.regular}
|
|
33
|
+
sampleText={sampleText}
|
|
34
|
+
/>
|
|
35
|
+
<Typeset
|
|
36
|
+
fontFamily={typography.fonts.base}
|
|
37
|
+
fontSizes={fontSizes}
|
|
38
|
+
fontWeight={typography.weight.bold}
|
|
39
|
+
sampleText={sampleText}
|
|
40
|
+
/>
|
|
41
|
+
<Typeset
|
|
42
|
+
fontFamily={typography.fonts.base}
|
|
43
|
+
fontSizes={fontSizes}
|
|
44
|
+
fontWeight={typography.weight.black}
|
|
45
|
+
sampleText={sampleText}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
## Monospace
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
font-family:
|
|
52
|
+
ui-monospace,
|
|
53
|
+
Menlo,
|
|
54
|
+
Monaco,
|
|
55
|
+
"Roboto Mono",
|
|
56
|
+
"Oxygen Mono",
|
|
57
|
+
"Ubuntu Monospace",
|
|
58
|
+
"Source Code Pro",
|
|
59
|
+
"Droid Sans Mono",
|
|
60
|
+
"Courier New",
|
|
61
|
+
monospace;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
<Typeset
|
|
65
|
+
fontFamily={typography.fonts.mono}
|
|
66
|
+
fontSizes={fontSizes}
|
|
67
|
+
fontWeight={typography.weight.regular}
|
|
68
|
+
sampleText={sampleText}
|
|
69
|
+
/>
|
|
70
|
+
<Typeset
|
|
71
|
+
fontFamily={typography.fonts.mono}
|
|
72
|
+
fontSizes={fontSizes}
|
|
73
|
+
fontWeight={typography.weight.bold}
|
|
74
|
+
sampleText={sampleText}
|
|
75
|
+
/>
|
|
@@ -18,14 +18,14 @@ export default {
|
|
|
18
18
|
}
|
|
19
19
|
}, storyFn())]
|
|
20
20
|
};
|
|
21
|
-
export const
|
|
21
|
+
export const SingleItem = () => /*#__PURE__*/React.createElement(ActionBar, {
|
|
22
22
|
actionItems: [{
|
|
23
23
|
title: 'Clear',
|
|
24
24
|
onClick: action1
|
|
25
25
|
}]
|
|
26
26
|
});
|
|
27
|
-
|
|
28
|
-
export const
|
|
27
|
+
SingleItem.displayName = "SingleItem";
|
|
28
|
+
export const ManyItems = () => /*#__PURE__*/React.createElement(ActionBar, {
|
|
29
29
|
actionItems: [{
|
|
30
30
|
title: 'Action string',
|
|
31
31
|
onClick: action1
|
|
@@ -38,4 +38,4 @@ export const manyItems = () => /*#__PURE__*/React.createElement(ActionBar, {
|
|
|
38
38
|
onClick: action3
|
|
39
39
|
}]
|
|
40
40
|
});
|
|
41
|
-
|
|
41
|
+
ManyItems.displayName = "ManyItems";
|
|
@@ -410,7 +410,7 @@ export const getScrollAreaStyles = theme => ({
|
|
|
410
410
|
borderRadius: 10
|
|
411
411
|
},
|
|
412
412
|
'.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle': {
|
|
413
|
-
background: theme.color.
|
|
413
|
+
background: theme.color.mediumdark,
|
|
414
414
|
opacity: 0.5
|
|
415
415
|
},
|
|
416
416
|
'.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle': {
|
|
@@ -35,19 +35,19 @@ export default {
|
|
|
35
35
|
title: 'Basics/ScrollArea',
|
|
36
36
|
decorators: [storyFn => /*#__PURE__*/React.createElement(Wrapper, null, storyFn())]
|
|
37
37
|
};
|
|
38
|
-
export const
|
|
38
|
+
export const Vertical = () => /*#__PURE__*/React.createElement(ScrollArea, {
|
|
39
39
|
vertical: true
|
|
40
40
|
}, list(i => /*#__PURE__*/React.createElement(Fragment, {
|
|
41
41
|
key: i
|
|
42
42
|
}, /*#__PURE__*/React.createElement(Block, null, i), /*#__PURE__*/React.createElement("br", null))));
|
|
43
|
-
|
|
44
|
-
export const
|
|
43
|
+
Vertical.displayName = "Vertical";
|
|
44
|
+
export const Horizontal = () => /*#__PURE__*/React.createElement(ScrollArea, {
|
|
45
45
|
horizontal: true
|
|
46
46
|
}, list(i => /*#__PURE__*/React.createElement(Block, {
|
|
47
47
|
key: i
|
|
48
48
|
}, i)));
|
|
49
|
-
|
|
50
|
-
export const
|
|
49
|
+
Horizontal.displayName = "Horizontal";
|
|
50
|
+
export const Both = () => /*#__PURE__*/React.createElement(ScrollArea, {
|
|
51
51
|
horizontal: true,
|
|
52
52
|
vertical: true
|
|
53
53
|
}, list(i => /*#__PURE__*/React.createElement(Fragment, {
|
|
@@ -55,8 +55,8 @@ export const both = () => /*#__PURE__*/React.createElement(ScrollArea, {
|
|
|
55
55
|
}, list(ii => /*#__PURE__*/React.createElement(Block, {
|
|
56
56
|
key: ii
|
|
57
57
|
}, ii * i)), /*#__PURE__*/React.createElement("br", null))));
|
|
58
|
-
|
|
59
|
-
export const
|
|
58
|
+
Both.displayName = "Both";
|
|
59
|
+
export const WithOuterBorder = () => /*#__PURE__*/React.createElement(ScrollArea, {
|
|
60
60
|
horizontal: true,
|
|
61
61
|
vertical: true
|
|
62
62
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -67,4 +67,4 @@ export const withOuterBorder = () => /*#__PURE__*/React.createElement(ScrollArea
|
|
|
67
67
|
background: `url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAM4klEQVR4Xu2d224ktxGGayTN6LTrOO//PMmlAfvOgIEkFwEcZ71a7ep8muBjd2k4re4eVpHsaS1CeKH1is1u1s86slhcrP/261r62oGInB6LLBbNb8+PRQ75x/+3bArcPYh8vu4dZjEMyELk7Hjz0JwBYdGEddMuHmnXWPixDv/NqrkAOVw0HKJtDoAcHTZcerAQOTgQ4Rv5+ysQHbKvWyReAGUt8vIi8vQi8vzS/H1fQD08iny6MnLIG0BOGgJM2SD68lAEIPhZuj09i9w/ijw+lx55fDze+8dXKyDokJP9cAjEP142QEzR4B645v5J5PGp/hsfnkQ+fTMCcrQQOZlYZAEAolENifqkefsGRNnNgwiruFZDZP153YjRThtW6suFyPFEgKAHzhGJM7LiAOb6vuGc0s0FyOpAZLXafMqHk1aBFv46RNPJcr9cMTiltcjtY6NnSrb7h4ZDetowh6wORVbLuoBgVq+OSk61zliIr6u7cmPf3olc3OYCctyYmqUaIqqG5VTq+7rjILoApUfum195+yByYeWQ4yORZbR6P56UEyuIv6ksKDO1Rh6AU9AruaDc3Yt8vjFyCHI9JlopQBj3JNJNJQk2xVgoZKywnOZS6hDtqBVR+IMfTgcd4uRvQ0Qhqt57Q+TkKHoA+Xor8vDWtB5W6oRN1DPHL0DM5DjqjPEDoOYMMhMkEVkQ1Cu6Apc9igBsZ4w0QIKfkOmwna4a7/t7aTmWF4DcPYkQY+uAMgLIauOo4bABiLdhncEd31v7etMQ1doUEJ57Xovgl7TjLNZ/Zz8EMcLAiw0L4SOESKo0yv0sQxF/b9yhAHi5hHgZDqc2wHh+DuGaxfrnf62bMHS7b6Ay7fRI5PCwCVPz83TZYBb+tOHsGMCxVfLDWR0v37oya/T3cEkXkOi7GkD6Wrz/sTwQOYusoz4AlXVBOuw9wHjtvgU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rS9vq7ENzCGxul0vHBP+ogRoM41HAIgZh0SA8KpKKu9XWricx1HM1r4Pjz4LfAHPlq3LEgbClVRt/ul65A51rKaA1Ca95x6qotvRmR96b8/axiQ4FFT9KWdNQq+9kmkORB4im9wAaJ346pcDg6cQ5lOMcH39g7VIT3f/T+lOOGi/Z/IjAAAAABJRU5ErkJggg==')`
|
|
68
68
|
}
|
|
69
69
|
}));
|
|
70
|
-
|
|
70
|
+
WithOuterBorder.displayName = "WithOuterBorder";
|
|
@@ -32,18 +32,18 @@ const EXAMPLE_ELEMENT = /*#__PURE__*/React.createElement("div", {
|
|
|
32
32
|
const TemplateElement = args => /*#__PURE__*/React.createElement(Zoom.Element, args);
|
|
33
33
|
|
|
34
34
|
TemplateElement.displayName = "TemplateElement";
|
|
35
|
-
export const
|
|
36
|
-
|
|
35
|
+
export const ElementActualSize = TemplateElement.bind({});
|
|
36
|
+
ElementActualSize.args = {
|
|
37
37
|
scale: 1,
|
|
38
38
|
children: EXAMPLE_ELEMENT
|
|
39
39
|
};
|
|
40
|
-
export const
|
|
41
|
-
|
|
40
|
+
export const ElementZoomedIn = TemplateElement.bind({});
|
|
41
|
+
ElementZoomedIn.args = {
|
|
42
42
|
scale: 0.7,
|
|
43
43
|
children: EXAMPLE_ELEMENT
|
|
44
44
|
};
|
|
45
|
-
export const
|
|
46
|
-
|
|
45
|
+
export const ElementZoomedOut = TemplateElement.bind({});
|
|
46
|
+
ElementZoomedOut.args = {
|
|
47
47
|
scale: 3,
|
|
48
48
|
children: EXAMPLE_ELEMENT
|
|
49
49
|
};
|
|
@@ -79,34 +79,34 @@ const TemplateIFrame = args => {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
TemplateIFrame.displayName = "TemplateIFrame";
|
|
82
|
-
export const
|
|
83
|
-
|
|
82
|
+
export const IFrameActualSize = TemplateIFrame.bind({});
|
|
83
|
+
IFrameActualSize.args = {
|
|
84
84
|
scale: 1,
|
|
85
85
|
active: true
|
|
86
86
|
}; // The iFrame stories are disabled because useGlobals works in practice
|
|
87
87
|
// but, for some reason breaks in the stories for Zoom.iFrame
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
IFrameActualSize.parameters = {
|
|
90
90
|
chromatic: {
|
|
91
91
|
disableSnapshot: true
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
export const
|
|
95
|
-
|
|
94
|
+
export const IFrameZoomedIn = TemplateIFrame.bind({});
|
|
95
|
+
IFrameZoomedIn.args = {
|
|
96
96
|
scale: 0.7,
|
|
97
97
|
active: true
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
IFrameZoomedIn.parameters = {
|
|
100
100
|
chromatic: {
|
|
101
101
|
disableSnapshot: true
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
export const
|
|
105
|
-
|
|
104
|
+
export const IFrameZoomedOut = TemplateIFrame.bind({});
|
|
105
|
+
IFrameZoomedOut.args = {
|
|
106
106
|
scale: 3,
|
|
107
107
|
active: true
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
IFrameZoomedOut.parameters = {
|
|
110
110
|
chromatic: {
|
|
111
111
|
disableSnapshot: true
|
|
112
112
|
}
|
package/dist/modern/bar/bar.js
CHANGED
|
@@ -7,19 +7,21 @@ const Side = styled.div({
|
|
|
7
7
|
display: 'flex',
|
|
8
8
|
whiteSpace: 'nowrap',
|
|
9
9
|
flexBasis: 'auto',
|
|
10
|
-
flexShrink: 0
|
|
10
|
+
flexShrink: 0,
|
|
11
|
+
marginLeft: 3,
|
|
12
|
+
marginRight: 3
|
|
11
13
|
}, ({
|
|
12
14
|
left
|
|
13
15
|
}) => left ? {
|
|
14
16
|
'& > *': {
|
|
15
|
-
marginLeft:
|
|
17
|
+
marginLeft: 4
|
|
16
18
|
}
|
|
17
19
|
} : {}, ({
|
|
18
20
|
right
|
|
19
21
|
}) => right ? {
|
|
20
22
|
marginLeft: 30,
|
|
21
23
|
'& > *': {
|
|
22
|
-
marginRight:
|
|
24
|
+
marginRight: 4
|
|
23
25
|
}
|
|
24
26
|
} : {});
|
|
25
27
|
Side.displayName = 'Side';
|
|
@@ -4,6 +4,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { styled, isPropValid } from '@storybook/theming';
|
|
7
|
+
import { transparentize } from 'polished';
|
|
8
|
+
import { auto } from '@popperjs/core';
|
|
7
9
|
|
|
8
10
|
const ButtonOrLink = (_ref) => {
|
|
9
11
|
let {
|
|
@@ -62,37 +64,59 @@ export const TabButton = styled(ButtonOrLink, {
|
|
|
62
64
|
TabButton.displayName = 'TabButton';
|
|
63
65
|
export const IconButton = styled(ButtonOrLink, {
|
|
64
66
|
shouldForwardProp: isPropValid
|
|
65
|
-
})(({
|
|
66
|
-
theme
|
|
67
|
-
}) => ({
|
|
68
|
-
display: 'inline-flex',
|
|
69
|
-
justifyContent: 'center',
|
|
67
|
+
})(() => ({
|
|
70
68
|
alignItems: 'center',
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
background: 'transparent',
|
|
70
|
+
border: 'none',
|
|
71
|
+
borderRadius: 4,
|
|
73
72
|
color: 'inherit',
|
|
74
|
-
padding: 0,
|
|
75
73
|
cursor: 'pointer',
|
|
76
|
-
|
|
77
|
-
// While we don't recommend having text for IconButtons, this style ensures that the text is the correct size.
|
|
78
|
-
fontWeight: 'bold',
|
|
74
|
+
display: 'inline-flex',
|
|
79
75
|
fontSize: 13,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
'
|
|
85
|
-
outline: '0 none',
|
|
86
|
-
color: theme.color.secondary
|
|
87
|
-
},
|
|
76
|
+
fontWeight: 'bold',
|
|
77
|
+
height: 28,
|
|
78
|
+
justifyContent: 'center',
|
|
79
|
+
marginTop: 6,
|
|
80
|
+
padding: '8px 7px',
|
|
88
81
|
'& > svg': {
|
|
89
|
-
width:
|
|
82
|
+
width: 14
|
|
90
83
|
}
|
|
91
84
|
}), ({
|
|
92
85
|
active,
|
|
93
86
|
theme
|
|
94
87
|
}) => active ? {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} : {}
|
|
98
|
-
|
|
88
|
+
backgroundColor: theme.background.hoverable,
|
|
89
|
+
color: theme.color.secondary
|
|
90
|
+
} : {}, ({
|
|
91
|
+
disabled,
|
|
92
|
+
theme
|
|
93
|
+
}) => disabled ? {
|
|
94
|
+
opacity: 0.5,
|
|
95
|
+
cursor: 'not-allowed'
|
|
96
|
+
} : {
|
|
97
|
+
'&:hover, &:focus-visible': {
|
|
98
|
+
background: transparentize(0.88, theme.color.secondary),
|
|
99
|
+
color: theme.color.secondary
|
|
100
|
+
},
|
|
101
|
+
'&:focus-visible': {
|
|
102
|
+
outline: auto // Ensures links have the same focus style
|
|
103
|
+
|
|
104
|
+
},
|
|
105
|
+
'&:focus:not(:focus-visible)': {
|
|
106
|
+
outline: 'none'
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
IconButton.displayName = 'IconButton';
|
|
110
|
+
const IconPlaceholder = styled.div(({
|
|
111
|
+
theme
|
|
112
|
+
}) => ({
|
|
113
|
+
width: 14,
|
|
114
|
+
height: 14,
|
|
115
|
+
backgroundColor: theme.appBorderColor,
|
|
116
|
+
animation: `${theme.animation.glow} 1.5s ease-in-out infinite`
|
|
117
|
+
}));
|
|
118
|
+
const IconButtonSkeletonWrapper = styled.div(() => ({
|
|
119
|
+
padding: 5
|
|
120
|
+
}));
|
|
121
|
+
export const IconButtonSkeleton = () => /*#__PURE__*/React.createElement(IconButtonSkeletonWrapper, null, /*#__PURE__*/React.createElement(IconPlaceholder, null));
|
|
122
|
+
IconButtonSkeleton.displayName = "IconButtonSkeleton";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconButton, IconButtonSkeleton } from './button';
|
|
3
|
+
import { Icons } from '../icon/icon';
|
|
4
|
+
export default {
|
|
5
|
+
component: IconButton,
|
|
6
|
+
title: 'Basics/IconButton'
|
|
7
|
+
};
|
|
8
|
+
export const Loading = () => /*#__PURE__*/React.createElement(IconButtonSkeleton, null);
|
|
9
|
+
Loading.displayName = "Loading";
|
|
10
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11
|
+
export const _IconButton = () => /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(Icons, {
|
|
12
|
+
icon: "bookmark"
|
|
13
|
+
}));
|
|
14
|
+
_IconButton.displayName = "_IconButton";
|
|
15
|
+
export const Active = () => /*#__PURE__*/React.createElement(IconButton, {
|
|
16
|
+
active: true
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Icons, {
|
|
18
|
+
icon: "beaker"
|
|
19
|
+
}));
|
|
20
|
+
Active.displayName = "Active";
|
|
21
|
+
export const Disabled = () => /*#__PURE__*/React.createElement(IconButton, {
|
|
22
|
+
disabled: true
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Icons, {
|
|
24
|
+
icon: "beaker"
|
|
25
|
+
}));
|
|
26
|
+
Disabled.displayName = "Disabled";
|
|
27
|
+
export const WithText = () => /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(Icons, {
|
|
28
|
+
icon: "circlehollow"
|
|
29
|
+
}), "\xA0Howdy!");
|
|
30
|
+
WithText.displayName = "WithText";
|
|
31
|
+
export const WithTextActive = () => /*#__PURE__*/React.createElement(IconButton, {
|
|
32
|
+
active: true
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Icons, {
|
|
34
|
+
icon: "circlehollow"
|
|
35
|
+
}), "\xA0Howdy!");
|
|
36
|
+
WithTextActive.displayName = "WithTextActive";
|
|
37
|
+
export const WithTextDisabled = () => /*#__PURE__*/React.createElement(IconButton, {
|
|
38
|
+
disabled: true
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Icons, {
|
|
40
|
+
icon: "circlehollow"
|
|
41
|
+
}), "\xA0Howdy!");
|
|
42
|
+
WithTextDisabled.displayName = "WithTextDisabled";
|
|
@@ -6,6 +6,13 @@ import { ArgJsDoc } from './ArgJsDoc';
|
|
|
6
6
|
import { ArgValue } from './ArgValue';
|
|
7
7
|
import { ArgControl } from './ArgControl';
|
|
8
8
|
import { codeCommon } from '../../typography/shared';
|
|
9
|
+
export const argRowLoadingData = {
|
|
10
|
+
row: {
|
|
11
|
+
name: 'loading',
|
|
12
|
+
description: 'loading'
|
|
13
|
+
},
|
|
14
|
+
arg: 0
|
|
15
|
+
};
|
|
9
16
|
const Name = styled.span({
|
|
10
17
|
fontWeight: 'bold'
|
|
11
18
|
});
|
|
@@ -65,13 +72,14 @@ const StyledTd = styled.td(({
|
|
|
65
72
|
export const ArgRow = props => {
|
|
66
73
|
var _row$type;
|
|
67
74
|
|
|
75
|
+
// const isLoading = 'isLoading' in props;
|
|
68
76
|
const {
|
|
69
77
|
row,
|
|
70
78
|
updateArgs,
|
|
71
79
|
compact,
|
|
72
80
|
expandable,
|
|
73
81
|
initialExpandedArgs
|
|
74
|
-
} = props;
|
|
82
|
+
} = 'row' in props ? props : argRowLoadingData;
|
|
75
83
|
const {
|
|
76
84
|
name,
|
|
77
85
|
description
|