@storybook/components 6.5.0-alpha.3 → 6.5.0-alpha.30
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 +33 -14
- package/dist/cjs/ScrollArea/ScrollArea.js +12 -11
- 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 +9 -8
- 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 +5 -3
- package/dist/cjs/blocks/ArgsTable/ArgRow.js +2 -2
- package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +3 -3
- package/dist/cjs/blocks/ArgsTable/ArgValue.js +12 -12
- package/dist/cjs/blocks/ArgsTable/ArgsTable.js +12 -8
- 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 +3 -3
- 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 +5 -3
- package/dist/cjs/blocks/ColorPalette.stories.js +1 -1
- package/dist/cjs/blocks/Description.js +4 -4
- package/dist/cjs/blocks/Description.stories.js +1 -1
- package/dist/cjs/blocks/DocsPage.js +4 -4
- package/dist/cjs/blocks/DocsPage.stories.js +6 -6
- package/dist/cjs/blocks/EmptyBlock.js +2 -2
- package/dist/cjs/blocks/EmptyBlock.stories.js +1 -1
- package/dist/cjs/blocks/IFrame.js +13 -11
- package/dist/cjs/blocks/IconGallery.js +6 -4
- package/dist/cjs/blocks/IconGallery.stories.js +1 -1
- package/dist/cjs/blocks/Preview.js +16 -12
- 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 +16 -10
- package/dist/cjs/blocks/Story.stories.js +9 -7
- package/dist/cjs/blocks/Toolbar.js +11 -9
- package/dist/cjs/blocks/Typeset.js +5 -3
- 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 +8 -8
- 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/JsonNodes.js +1748 -0
- package/dist/cjs/controls/react-editable-json-tree/index.js +36 -83
- package/dist/cjs/controls/react-editable-json-tree/types/dataTypes.js +12 -15
- package/dist/cjs/controls/react-editable-json-tree/types/inputUsageTypes.js +3 -6
- package/dist/cjs/controls/react-editable-json-tree/utils/objectTypes.js +3 -3
- package/dist/cjs/controls/react-editable-json-tree/utils/parse.js +2 -5
- 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 +28 -7
- package/dist/cjs/icon/icon.stories.js +2 -0
- package/dist/cjs/icon/icons.js +1 -1
- package/dist/cjs/index.js +296 -73
- 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 +8 -8
- 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 +9 -10
- package/dist/cjs/typography/DocumentFormatting.js +6 -555
- package/dist/cjs/typography/DocumentWrapper.stories.js +1 -1
- package/dist/cjs/typography/ResetWrapper.js +21 -0
- package/dist/cjs/typography/components.js +126 -0
- package/dist/cjs/typography/elements/A.js +36 -0
- package/dist/cjs/typography/elements/Blockquote.js +27 -0
- package/dist/cjs/typography/elements/Code.js +109 -0
- package/dist/cjs/typography/elements/DL.js +44 -0
- package/dist/cjs/typography/elements/Div.js +14 -0
- package/dist/cjs/typography/elements/H1.js +20 -0
- package/dist/cjs/typography/elements/H2.js +21 -0
- package/dist/cjs/typography/elements/H3.js +19 -0
- package/dist/cjs/typography/elements/H4.js +19 -0
- package/dist/cjs/typography/elements/H5.js +19 -0
- package/dist/cjs/typography/elements/H6.js +20 -0
- package/dist/cjs/typography/elements/HR.js +20 -0
- package/dist/cjs/typography/elements/Img.js +14 -0
- package/dist/cjs/typography/elements/LI.js +31 -0
- package/dist/cjs/typography/elements/Link.js +44 -0
- package/dist/cjs/typography/elements/OL.js +28 -0
- package/dist/cjs/typography/elements/P.js +24 -0
- package/dist/cjs/typography/elements/Pre.js +53 -0
- package/dist/cjs/typography/elements/Span.js +92 -0
- package/dist/cjs/typography/elements/TT.js +14 -0
- package/dist/cjs/typography/elements/Table.js +50 -0
- package/dist/cjs/typography/elements/UL.js +28 -0
- package/dist/cjs/typography/{shared.js → lib/common.js} +1 -1
- package/dist/cjs/typography/lib/isReactChildString.js +12 -0
- package/dist/cjs/typography/link/link.js +5 -3
- 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 +12 -10
- package/dist/esm/ScrollArea/ScrollArea.js +7 -5
- package/dist/esm/Zoom/Zoom.js +4 -4
- package/dist/esm/Zoom/Zoom.stories.js +3 -2
- package/dist/esm/Zoom/ZoomElement.js +5 -4
- 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 +2 -1
- package/dist/esm/blocks/ArgsTable/ArgRow.js +1 -1
- package/dist/esm/blocks/ArgsTable/ArgRow.stories.js +1 -1
- package/dist/esm/blocks/ArgsTable/ArgValue.js +5 -5
- package/dist/esm/blocks/ArgsTable/ArgsTable.js +6 -4
- package/dist/esm/blocks/ArgsTable/SectionRow.js +3 -2
- package/dist/esm/blocks/ArgsTable/SectionRow.stories.js +1 -1
- package/dist/esm/blocks/ArgsTable/TabbedArgsTable.js +17 -14
- package/dist/esm/blocks/ColorPalette.js +4 -2
- package/dist/esm/blocks/Description.js +2 -2
- package/dist/esm/blocks/DocsPage.js +1 -1
- package/dist/esm/blocks/EmptyBlock.js +1 -1
- package/dist/esm/blocks/IFrame.js +16 -14
- package/dist/esm/blocks/IconGallery.js +4 -2
- package/dist/esm/blocks/Preview.js +17 -15
- package/dist/esm/blocks/Source.js +2 -1
- package/dist/esm/blocks/Story.js +10 -5
- package/dist/esm/blocks/Story.stories.js +3 -2
- package/dist/esm/blocks/Toolbar.js +8 -6
- package/dist/esm/blocks/Typeset.js +6 -4
- 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 +4 -4
- 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 +3 -3
- 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/JsonNodes.js +1703 -0
- package/dist/esm/controls/react-editable-json-tree/index.js +29 -73
- package/dist/esm/controls/react-editable-json-tree/types/dataTypes.js +1 -13
- package/dist/esm/controls/react-editable-json-tree/types/deltaTypes.js +1 -3
- package/dist/esm/controls/react-editable-json-tree/types/inputUsageTypes.js +1 -4
- package/dist/esm/controls/react-editable-json-tree/utils/objectTypes.js +5 -9
- package/dist/esm/controls/react-editable-json-tree/utils/parse.js +2 -4
- package/dist/esm/controls/react-editable-json-tree/utils/styles.js +4 -7
- 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 +7 -6
- package/dist/esm/icon/icon.stories.js +1 -0
- package/dist/esm/index.js +30 -5
- package/dist/esm/placeholder/placeholder.js +16 -12
- package/dist/esm/spaced/Spaced.js +6 -4
- package/dist/esm/syntaxhighlighter/lazy-syntaxhighlighter.js +3 -3
- 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 +4 -4
- package/dist/esm/typography/DocumentFormatting.js +4 -480
- package/dist/esm/typography/ResetWrapper.js +11 -0
- package/dist/esm/typography/components.js +92 -0
- package/dist/esm/typography/elements/A.js +25 -0
- package/dist/esm/typography/elements/Blockquote.js +16 -0
- package/dist/esm/typography/elements/Code.js +64 -0
- package/dist/esm/typography/elements/DL.js +32 -0
- package/dist/esm/typography/elements/Div.js +3 -0
- package/dist/esm/typography/elements/H1.js +9 -0
- package/dist/esm/typography/elements/H2.js +10 -0
- package/dist/esm/typography/elements/H3.js +8 -0
- package/dist/esm/typography/elements/H4.js +8 -0
- package/dist/esm/typography/elements/H5.js +8 -0
- package/dist/esm/typography/elements/H6.js +9 -0
- package/dist/esm/typography/elements/HR.js +10 -0
- package/dist/esm/typography/elements/Img.js +4 -0
- package/dist/esm/typography/elements/LI.js +20 -0
- package/dist/esm/typography/elements/Link.js +29 -0
- package/dist/esm/typography/elements/OL.js +15 -0
- package/dist/esm/typography/elements/P.js +13 -0
- package/dist/esm/typography/elements/Pre.js +42 -0
- package/dist/esm/typography/elements/Span.js +81 -0
- package/dist/esm/typography/elements/TT.js +3 -0
- package/dist/esm/typography/elements/Table.js +39 -0
- package/dist/esm/typography/elements/UL.js +15 -0
- package/dist/esm/typography/{shared.js → lib/common.js} +0 -0
- package/dist/esm/typography/lib/isReactChildString.js +3 -0
- 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 +10 -8
- package/dist/modern/ScrollArea/ScrollArea.js +7 -5
- package/dist/modern/Zoom/Zoom.js +4 -4
- package/dist/modern/Zoom/ZoomElement.js +2 -2
- package/dist/modern/bar/bar.js +4 -2
- package/dist/modern/bar/button.js +4 -2
- package/dist/modern/blocks/ArgsTable/ArgJsDoc.js +1 -1
- package/dist/modern/blocks/ArgsTable/ArgRow.js +1 -1
- package/dist/modern/blocks/ArgsTable/ArgRow.stories.js +1 -1
- package/dist/modern/blocks/ArgsTable/ArgValue.js +1 -1
- package/dist/modern/blocks/ArgsTable/ArgsTable.js +1 -1
- package/dist/modern/blocks/ArgsTable/SectionRow.stories.js +1 -1
- package/dist/modern/blocks/ArgsTable/TabbedArgsTable.js +4 -2
- package/dist/modern/blocks/ColorPalette.js +5 -3
- package/dist/modern/blocks/Description.js +2 -2
- package/dist/modern/blocks/DocsPage.js +1 -1
- package/dist/modern/blocks/EmptyBlock.js +1 -1
- package/dist/modern/blocks/IFrame.js +3 -1
- package/dist/modern/blocks/IconGallery.js +5 -3
- package/dist/modern/blocks/Preview.js +5 -3
- package/dist/modern/blocks/Source.js +3 -1
- package/dist/modern/blocks/Story.js +9 -4
- package/dist/modern/blocks/Toolbar.js +6 -3
- package/dist/modern/blocks/Typeset.js +5 -3
- 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/Object.js +1 -2
- package/dist/modern/controls/index.js +2 -2
- package/dist/modern/controls/react-editable-json-tree/JsonNodes.js +1539 -0
- package/dist/modern/controls/react-editable-json-tree/index.js +18 -57
- package/dist/modern/controls/react-editable-json-tree/types/dataTypes.js +1 -13
- package/dist/modern/controls/react-editable-json-tree/types/deltaTypes.js +1 -3
- package/dist/modern/controls/react-editable-json-tree/types/inputUsageTypes.js +1 -4
- package/dist/modern/controls/react-editable-json-tree/utils/objectTypes.js +3 -7
- package/dist/modern/controls/react-editable-json-tree/utils/parse.js +2 -4
- package/dist/modern/controls/react-editable-json-tree/utils/styles.js +4 -7
- 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 +6 -4
- package/dist/modern/index.js +29 -5
- package/dist/modern/placeholder/placeholder.js +4 -2
- package/dist/modern/spaced/Spaced.js +4 -2
- package/dist/modern/syntaxhighlighter/lazy-syntaxhighlighter.js +2 -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/tooltip/lazy-WithTooltip.js +3 -3
- package/dist/modern/typography/DocumentFormatting.js +2 -413
- package/dist/modern/typography/ResetWrapper.js +11 -0
- package/dist/modern/typography/components.js +48 -0
- package/dist/modern/typography/elements/A.js +24 -0
- package/dist/modern/typography/elements/Blockquote.js +15 -0
- package/dist/modern/typography/elements/Code.js +52 -0
- package/dist/modern/typography/elements/DL.js +31 -0
- package/dist/modern/typography/elements/Div.js +3 -0
- package/dist/modern/typography/elements/H1.js +8 -0
- package/dist/modern/typography/elements/H2.js +9 -0
- package/dist/modern/typography/elements/H3.js +7 -0
- package/dist/modern/typography/elements/H4.js +7 -0
- package/dist/modern/typography/elements/H5.js +7 -0
- package/dist/modern/typography/elements/H6.js +8 -0
- package/dist/modern/typography/elements/HR.js +9 -0
- package/dist/modern/typography/elements/Img.js +4 -0
- package/dist/modern/typography/elements/LI.js +19 -0
- package/dist/modern/typography/elements/Link.js +24 -0
- package/dist/modern/typography/elements/OL.js +14 -0
- package/dist/modern/typography/elements/P.js +12 -0
- package/dist/modern/typography/elements/Pre.js +41 -0
- package/dist/modern/typography/elements/Span.js +80 -0
- package/dist/modern/typography/elements/TT.js +3 -0
- package/dist/modern/typography/elements/Table.js +38 -0
- package/dist/modern/typography/elements/UL.js +14 -0
- package/dist/modern/typography/{shared.js → lib/common.js} +0 -0
- package/dist/modern/typography/lib/isReactChildString.js +1 -0
- package/dist/modern/typography/link/link.js +4 -2
- package/dist/modern/utils/getStoryHref.js +13 -0
- package/dist/ts3.4/Button/Button.d.ts +2 -2
- package/dist/ts3.4/Colors/SideBySide.d.ts +1 -1
- package/dist/ts3.4/Loader/Loader.d.ts +1 -1
- package/dist/ts3.4/ScrollArea/OverlayScrollbars.d.ts +3 -3
- package/dist/ts3.4/Zoom/Zoom.d.ts +4 -4
- package/dist/ts3.4/Zoom/ZoomIFrame.d.ts +2 -2
- package/dist/ts3.4/bar/button.d.ts +6 -6
- package/dist/ts3.4/blocks/ArgsTable/ArgJsDoc.d.ts +1 -1
- package/dist/ts3.4/blocks/ColorPalette.d.ts +2 -2
- package/dist/ts3.4/blocks/DocsPage.d.ts +1 -1
- package/dist/ts3.4/blocks/Story.d.ts +1 -1
- package/dist/ts3.4/controls/Color.d.ts +2 -2
- package/dist/ts3.4/controls/Object.d.ts +2 -2
- package/dist/ts3.4/controls/index.d.ts +5 -4
- package/dist/ts3.4/controls/react-editable-json-tree/JsonNodes.d.ts +247 -0
- package/dist/ts3.4/controls/react-editable-json-tree/index.d.ts +42 -0
- package/dist/ts3.4/controls/react-editable-json-tree/types/dataTypes.d.ts +12 -0
- package/dist/ts3.4/controls/react-editable-json-tree/types/deltaTypes.d.ts +4 -0
- package/dist/ts3.4/controls/react-editable-json-tree/types/inputUsageTypes.d.ts +3 -0
- package/dist/ts3.4/controls/react-editable-json-tree/utils/objectTypes.d.ts +13 -0
- package/dist/ts3.4/controls/react-editable-json-tree/utils/parse.d.ts +6 -0
- package/dist/ts3.4/controls/react-editable-json-tree/utils/styles.d.ts +59 -0
- package/dist/ts3.4/form/index.d.ts +4 -4
- package/dist/ts3.4/form/input/input.d.ts +3 -3
- package/dist/ts3.4/index.d.ts +46 -2
- package/dist/ts3.4/syntaxhighlighter/lazy-syntaxhighlighter.d.ts +2 -2
- package/dist/ts3.4/syntaxhighlighter/syntaxhighlighter-types.d.ts +2 -2
- package/dist/ts3.4/tabs/tabs.d.ts +1 -1
- package/dist/ts3.4/tooltip/ListItem.d.ts +1 -1
- package/dist/ts3.4/tooltip/lazy-WithTooltip.d.ts +3 -3
- package/dist/ts3.4/typography/DocumentFormatting.d.ts +4 -55
- package/dist/ts3.4/typography/ResetWrapper.d.ts +9 -0
- package/dist/ts3.4/typography/components.d.ts +25 -0
- package/dist/ts3.4/typography/elements/A.d.ts +6 -0
- package/dist/ts3.4/typography/elements/Blockquote.d.ts +6 -0
- package/dist/ts3.4/typography/elements/Code.d.ts +6 -0
- package/dist/ts3.4/typography/elements/DL.d.ts +4 -0
- package/dist/ts3.4/typography/elements/Div.d.ts +4 -0
- package/dist/ts3.4/typography/elements/H1.d.ts +6 -0
- package/dist/ts3.4/typography/elements/H2.d.ts +6 -0
- package/dist/ts3.4/typography/elements/H3.d.ts +6 -0
- package/dist/ts3.4/typography/elements/H4.d.ts +6 -0
- package/dist/ts3.4/typography/elements/H5.d.ts +6 -0
- package/dist/ts3.4/typography/elements/H6.d.ts +6 -0
- package/dist/ts3.4/typography/elements/HR.d.ts +2 -0
- package/dist/ts3.4/typography/elements/Img.d.ts +2 -0
- package/dist/ts3.4/typography/elements/LI.d.ts +6 -0
- package/dist/ts3.4/typography/elements/Link.d.ts +2 -0
- package/dist/ts3.4/typography/elements/OL.d.ts +4 -0
- package/dist/ts3.4/typography/elements/P.d.ts +6 -0
- package/dist/ts3.4/typography/elements/Pre.d.ts +6 -0
- package/dist/ts3.4/typography/elements/Span.d.ts +6 -0
- package/dist/ts3.4/typography/elements/TT.d.ts +4 -0
- package/dist/ts3.4/typography/elements/Table.d.ts +6 -0
- package/dist/ts3.4/typography/elements/UL.d.ts +4 -0
- package/dist/ts3.4/typography/{shared.d.ts → lib/common.d.ts} +0 -0
- package/dist/ts3.4/typography/lib/isReactChildString.d.ts +2 -0
- package/dist/ts3.4/utils/getStoryHref.d.ts +1 -0
- package/dist/ts3.9/Button/Button.d.ts +2 -2
- package/dist/ts3.9/Colors/SideBySide.d.ts +1 -1
- package/dist/ts3.9/Loader/Loader.d.ts +1 -1
- package/dist/ts3.9/ScrollArea/OverlayScrollbars.d.ts +3 -3
- package/dist/ts3.9/Zoom/Zoom.d.ts +4 -4
- package/dist/ts3.9/Zoom/ZoomIFrame.d.ts +2 -2
- package/dist/ts3.9/bar/button.d.ts +6 -6
- package/dist/ts3.9/blocks/ArgsTable/ArgJsDoc.d.ts +1 -1
- package/dist/ts3.9/blocks/ColorPalette.d.ts +2 -2
- package/dist/ts3.9/blocks/DocsPage.d.ts +1 -1
- package/dist/ts3.9/blocks/Story.d.ts +1 -1
- package/dist/ts3.9/controls/Color.d.ts +2 -2
- package/dist/ts3.9/controls/Object.d.ts +2 -2
- package/dist/ts3.9/controls/index.d.ts +5 -4
- package/dist/ts3.9/controls/react-editable-json-tree/JsonNodes.d.ts +247 -0
- package/dist/ts3.9/controls/react-editable-json-tree/index.d.ts +42 -0
- package/dist/ts3.9/controls/react-editable-json-tree/types/dataTypes.d.ts +12 -0
- package/dist/ts3.9/controls/react-editable-json-tree/types/deltaTypes.d.ts +4 -0
- package/dist/ts3.9/controls/react-editable-json-tree/types/inputUsageTypes.d.ts +3 -0
- package/dist/ts3.9/controls/react-editable-json-tree/utils/objectTypes.d.ts +13 -0
- package/dist/ts3.9/controls/react-editable-json-tree/utils/parse.d.ts +6 -0
- package/dist/ts3.9/controls/react-editable-json-tree/utils/styles.d.ts +59 -0
- package/dist/ts3.9/form/index.d.ts +4 -4
- package/dist/ts3.9/form/input/input.d.ts +3 -3
- package/dist/ts3.9/index.d.ts +46 -2
- package/dist/ts3.9/syntaxhighlighter/lazy-syntaxhighlighter.d.ts +2 -2
- package/dist/ts3.9/syntaxhighlighter/syntaxhighlighter-types.d.ts +2 -2
- package/dist/ts3.9/tabs/tabs.d.ts +1 -1
- package/dist/ts3.9/tooltip/ListItem.d.ts +1 -1
- package/dist/ts3.9/tooltip/lazy-WithTooltip.d.ts +3 -3
- package/dist/ts3.9/typography/DocumentFormatting.d.ts +4 -55
- package/dist/ts3.9/typography/ResetWrapper.d.ts +9 -0
- package/dist/ts3.9/typography/components.d.ts +25 -0
- package/dist/ts3.9/typography/elements/A.d.ts +6 -0
- package/dist/ts3.9/typography/elements/Blockquote.d.ts +6 -0
- package/dist/ts3.9/typography/elements/Code.d.ts +6 -0
- package/dist/ts3.9/typography/elements/DL.d.ts +4 -0
- package/dist/ts3.9/typography/elements/Div.d.ts +4 -0
- package/dist/ts3.9/typography/elements/H1.d.ts +6 -0
- package/dist/ts3.9/typography/elements/H2.d.ts +6 -0
- package/dist/ts3.9/typography/elements/H3.d.ts +6 -0
- package/dist/ts3.9/typography/elements/H4.d.ts +6 -0
- package/dist/ts3.9/typography/elements/H5.d.ts +6 -0
- package/dist/ts3.9/typography/elements/H6.d.ts +6 -0
- package/dist/ts3.9/typography/elements/HR.d.ts +2 -0
- package/dist/ts3.9/typography/elements/Img.d.ts +2 -0
- package/dist/ts3.9/typography/elements/LI.d.ts +6 -0
- package/dist/ts3.9/typography/elements/Link.d.ts +2 -0
- package/dist/ts3.9/typography/elements/OL.d.ts +4 -0
- package/dist/ts3.9/typography/elements/P.d.ts +6 -0
- package/dist/ts3.9/typography/elements/Pre.d.ts +6 -0
- package/dist/ts3.9/typography/elements/Span.d.ts +6 -0
- package/dist/ts3.9/typography/elements/TT.d.ts +4 -0
- package/dist/ts3.9/typography/elements/Table.d.ts +6 -0
- package/dist/ts3.9/typography/elements/UL.d.ts +4 -0
- package/dist/ts3.9/typography/{shared.d.ts → lib/common.d.ts} +1 -1
- package/dist/ts3.9/typography/lib/isReactChildString.d.ts +2 -0
- package/dist/ts3.9/utils/getStoryHref.d.ts +1 -0
- package/package.json +6 -5
- package/dist/cjs/Colors/colorpalette.stories.mdx +0 -125
- package/dist/cjs/blocks/DocsPageExampleCaption.md +0 -92
- package/dist/cjs/blocks/DocsPageExampleCaption.mdx +0 -92
- package/dist/cjs/controls/react-editable-json-tree/LICENSE.md +0 -14
- package/dist/cjs/controls/react-editable-json-tree/components/JsonAddValue.js +0 -228
- package/dist/cjs/controls/react-editable-json-tree/components/JsonArray.js +0 -507
- package/dist/cjs/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -321
- package/dist/cjs/controls/react-editable-json-tree/components/JsonNode.js +0 -422
- package/dist/cjs/controls/react-editable-json-tree/components/JsonObject.js +0 -509
- package/dist/cjs/controls/react-editable-json-tree/components/JsonValue.js +0 -312
- package/dist/cjs/typings.d.js +0 -1
- package/dist/cjs/typography/DocumentFormattingSample.md +0 -141
- package/dist/cjs/typography/typography.stories.mdx +0 -75
- package/dist/esm/Colors/colorpalette.stories.mdx +0 -125
- package/dist/esm/blocks/DocsPageExampleCaption.md +0 -92
- package/dist/esm/blocks/DocsPageExampleCaption.mdx +0 -92
- package/dist/esm/controls/react-editable-json-tree/LICENSE.md +0 -14
- package/dist/esm/controls/react-editable-json-tree/components/JsonAddValue.js +0 -194
- package/dist/esm/controls/react-editable-json-tree/components/JsonArray.js +0 -465
- package/dist/esm/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -282
- package/dist/esm/controls/react-editable-json-tree/components/JsonNode.js +0 -387
- package/dist/esm/controls/react-editable-json-tree/components/JsonObject.js +0 -467
- package/dist/esm/controls/react-editable-json-tree/components/JsonValue.js +0 -272
- package/dist/esm/typings.d.js +0 -0
- package/dist/esm/typography/DocumentFormattingSample.md +0 -141
- package/dist/esm/typography/typography.stories.mdx +0 -75
- package/dist/modern/Colors/colorpalette.stories.mdx +0 -125
- package/dist/modern/blocks/DocsPageExampleCaption.md +0 -92
- package/dist/modern/blocks/DocsPageExampleCaption.mdx +0 -92
- package/dist/modern/controls/react-editable-json-tree/LICENSE.md +0 -14
- package/dist/modern/controls/react-editable-json-tree/components/JsonAddValue.js +0 -148
- package/dist/modern/controls/react-editable-json-tree/components/JsonArray.js +0 -392
- package/dist/modern/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -215
- package/dist/modern/controls/react-editable-json-tree/components/JsonNode.js +0 -339
- package/dist/modern/controls/react-editable-json-tree/components/JsonObject.js +0 -394
- package/dist/modern/controls/react-editable-json-tree/components/JsonValue.js +0 -202
- package/dist/modern/typings.d.js +0 -0
- package/dist/modern/typography/DocumentFormattingSample.md +0 -141
- package/dist/modern/typography/typography.stories.mdx +0 -75
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import JsonNode from './components/JsonNode';
|
|
2
|
+
import { JsonNode } from './JsonNodes';
|
|
4
3
|
import { value, object, array } from './utils/styles';
|
|
5
4
|
import { ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE } from './types/deltaTypes';
|
|
6
5
|
import { getObjectType } from './utils/objectTypes';
|
|
7
|
-
import DATA_TYPES from './types/dataTypes';
|
|
8
|
-
import INPUT_USAGE_TYPES from './types/inputUsageTypes';
|
|
9
|
-
import parse from './utils/parse';
|
|
10
|
-
|
|
11
|
-
class JsonTree extends Component {
|
|
6
|
+
import * as DATA_TYPES from './types/dataTypes';
|
|
7
|
+
import * as INPUT_USAGE_TYPES from './types/inputUsageTypes';
|
|
8
|
+
import { parse } from './utils/parse';
|
|
9
|
+
export class JsonTree extends Component {
|
|
12
10
|
constructor(props) {
|
|
13
11
|
super(props);
|
|
14
12
|
this.state = {
|
|
@@ -64,7 +62,7 @@ class JsonTree extends Component {
|
|
|
64
62
|
beforeUpdateAction,
|
|
65
63
|
logger,
|
|
66
64
|
onSubmitValueParser,
|
|
67
|
-
fallback
|
|
65
|
+
fallback = null
|
|
68
66
|
} = this.props; // Node type
|
|
69
67
|
|
|
70
68
|
const dataType = getObjectType(data);
|
|
@@ -77,12 +75,14 @@ class JsonTree extends Component {
|
|
|
77
75
|
let inputElementFunction = inputElement;
|
|
78
76
|
|
|
79
77
|
if (inputElement && getObjectType(inputElement) !== 'Function') {
|
|
78
|
+
// @ts-ignore
|
|
80
79
|
inputElementFunction = () => inputElement;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
let textareaElementFunction = textareaElement;
|
|
84
83
|
|
|
85
84
|
if (textareaElement && getObjectType(textareaElement) !== 'Function') {
|
|
85
|
+
// @ts-ignore
|
|
86
86
|
textareaElementFunction = () => textareaElement;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -92,7 +92,6 @@ class JsonTree extends Component {
|
|
|
92
92
|
}, /*#__PURE__*/React.createElement(JsonNode, {
|
|
93
93
|
data: data,
|
|
94
94
|
name: rootName,
|
|
95
|
-
collapsed: false,
|
|
96
95
|
deep: -1,
|
|
97
96
|
isCollapsed: isCollapsed,
|
|
98
97
|
onUpdate: this.onUpdate,
|
|
@@ -119,29 +118,8 @@ class JsonTree extends Component {
|
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
}
|
|
122
|
-
|
|
123
121
|
JsonTree.displayName = "JsonTree";
|
|
124
|
-
|
|
125
|
-
data: PropTypes.any.isRequired,
|
|
126
|
-
rootName: PropTypes.string,
|
|
127
|
-
isCollapsed: PropTypes.func,
|
|
128
|
-
onFullyUpdate: PropTypes.func,
|
|
129
|
-
onDeltaUpdate: PropTypes.func,
|
|
130
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
131
|
-
getStyle: PropTypes.func,
|
|
132
|
-
addButtonElement: PropTypes.element,
|
|
133
|
-
cancelButtonElement: PropTypes.element,
|
|
134
|
-
editButtonElement: PropTypes.element,
|
|
135
|
-
inputElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
136
|
-
textareaElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
137
|
-
minusMenuElement: PropTypes.element,
|
|
138
|
-
plusMenuElement: PropTypes.element,
|
|
139
|
-
beforeRemoveAction: PropTypes.func,
|
|
140
|
-
beforeAddAction: PropTypes.func,
|
|
141
|
-
beforeUpdateAction: PropTypes.func,
|
|
142
|
-
logger: PropTypes.object,
|
|
143
|
-
onSubmitValueParser: PropTypes.func
|
|
144
|
-
};
|
|
122
|
+
// @ts-ignore
|
|
145
123
|
JsonTree.defaultProps = {
|
|
146
124
|
rootName: 'root',
|
|
147
125
|
isCollapsed: (keyPath, deep) => deep !== -1,
|
|
@@ -158,35 +136,18 @@ JsonTree.defaultProps = {
|
|
|
158
136
|
return value;
|
|
159
137
|
}
|
|
160
138
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
keyPath,
|
|
168
|
-
deep,
|
|
169
|
-
key,
|
|
170
|
-
newValue,
|
|
171
|
-
oldValue
|
|
172
|
-
}) => {},
|
|
173
|
-
beforeRemoveAction: (key, keyPath, deep, oldValue) => new Promise(resolve => resolve()),
|
|
174
|
-
beforeAddAction: (key, keyPath, deep, newValue) => new Promise(resolve => resolve()),
|
|
175
|
-
beforeUpdateAction: (key, keyPath, deep, oldValue, newValue) => new Promise(resolve => resolve()),
|
|
139
|
+
readOnly: () => false,
|
|
140
|
+
onFullyUpdate: () => {},
|
|
141
|
+
onDeltaUpdate: () => {},
|
|
142
|
+
beforeRemoveAction: () => Promise.resolve(),
|
|
143
|
+
beforeAddAction: () => Promise.resolve(),
|
|
144
|
+
beforeUpdateAction: () => Promise.resolve(),
|
|
176
145
|
logger: {
|
|
177
146
|
error: () => {}
|
|
178
147
|
},
|
|
179
148
|
onSubmitValueParser: (isEditMode, keyPath, deep, name, rawValue) => parse(rawValue),
|
|
180
|
-
inputElement: (
|
|
181
|
-
textareaElement: (
|
|
182
|
-
|
|
183
|
-
/* eslint-enable */
|
|
149
|
+
inputElement: () => /*#__PURE__*/React.createElement("input", null),
|
|
150
|
+
textareaElement: () => /*#__PURE__*/React.createElement("textarea", null),
|
|
184
151
|
fallback: null
|
|
185
152
|
};
|
|
186
|
-
export {
|
|
187
|
-
export { getObjectType };
|
|
188
|
-
export { ADD_DELTA_TYPE };
|
|
189
|
-
export { REMOVE_DELTA_TYPE };
|
|
190
|
-
export { UPDATE_DELTA_TYPE };
|
|
191
|
-
export { DATA_TYPES };
|
|
192
|
-
export { INPUT_USAGE_TYPES };
|
|
153
|
+
export { getObjectType, ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE, DATA_TYPES, INPUT_USAGE_TYPES };
|
|
@@ -9,16 +9,4 @@ const NULL = 'Null';
|
|
|
9
9
|
const UNDEFINED = 'Undefined';
|
|
10
10
|
const FUNCTION = 'Function';
|
|
11
11
|
const SYMBOL = 'Symbol';
|
|
12
|
-
export
|
|
13
|
-
ERROR,
|
|
14
|
-
OBJECT,
|
|
15
|
-
ARRAY,
|
|
16
|
-
STRING,
|
|
17
|
-
NUMBER,
|
|
18
|
-
BOOLEAN,
|
|
19
|
-
DATE,
|
|
20
|
-
NULL,
|
|
21
|
-
UNDEFINED,
|
|
22
|
-
FUNCTION,
|
|
23
|
-
SYMBOL
|
|
24
|
-
};
|
|
12
|
+
export { ERROR, OBJECT, ARRAY, STRING, NUMBER, BOOLEAN, DATE, NULL, UNDEFINED, FUNCTION, SYMBOL };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
const ADD_DELTA_TYPE = 'ADD_DELTA_TYPE';
|
|
2
2
|
const REMOVE_DELTA_TYPE = 'REMOVE_DELTA_TYPE';
|
|
3
3
|
const UPDATE_DELTA_TYPE = 'UPDATE_DELTA_TYPE';
|
|
4
|
-
export { ADD_DELTA_TYPE };
|
|
5
|
-
export { REMOVE_DELTA_TYPE };
|
|
6
|
-
export { UPDATE_DELTA_TYPE };
|
|
4
|
+
export { ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param obj {*} object to get type
|
|
4
4
|
* @returns {*}
|
|
5
5
|
*/
|
|
6
|
-
function getObjectType(obj) {
|
|
6
|
+
export function getObjectType(obj) {
|
|
7
7
|
if (obj !== null && typeof obj === 'object' && !Array.isArray(obj) && typeof obj[Symbol.iterator] === 'function') {
|
|
8
8
|
return 'Iterable';
|
|
9
9
|
}
|
|
@@ -17,12 +17,8 @@ function getObjectType(obj) {
|
|
|
17
17
|
* @returns {boolean} result
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
function isComponentWillChange(oldValue, newValue) {
|
|
20
|
+
export function isComponentWillChange(oldValue, newValue) {
|
|
22
21
|
const oldType = getObjectType(oldValue);
|
|
23
22
|
const newType = getObjectType(newValue);
|
|
24
23
|
return (oldType === 'Function' || newType === 'Function') && newType !== oldType;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { getObjectType };
|
|
28
|
-
export { isComponentWillChange };
|
|
24
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param string {String} string to parse
|
|
4
4
|
* @returns {*}
|
|
5
5
|
*/
|
|
6
|
-
function parse(string) {
|
|
6
|
+
export function parse(string) {
|
|
7
7
|
let result = string; // Check if string contains 'function' and start with it to eval it
|
|
8
8
|
|
|
9
9
|
if (result.indexOf('function') === 0) {
|
|
@@ -16,6 +16,4 @@ function parse(string) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return result;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default parse;
|
|
19
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const object = {
|
|
1
|
+
export const object = {
|
|
2
2
|
minus: {
|
|
3
3
|
color: 'red'
|
|
4
4
|
},
|
|
@@ -19,7 +19,7 @@ const object = {
|
|
|
19
19
|
},
|
|
20
20
|
addForm: {}
|
|
21
21
|
};
|
|
22
|
-
const array = {
|
|
22
|
+
export const array = {
|
|
23
23
|
minus: {
|
|
24
24
|
color: 'red'
|
|
25
25
|
},
|
|
@@ -40,7 +40,7 @@ const array = {
|
|
|
40
40
|
},
|
|
41
41
|
addForm: {}
|
|
42
42
|
};
|
|
43
|
-
const value = {
|
|
43
|
+
export const value = {
|
|
44
44
|
minus: {
|
|
45
45
|
color: 'red'
|
|
46
46
|
},
|
|
@@ -56,7 +56,4 @@ const value = {
|
|
|
56
56
|
name: {
|
|
57
57
|
color: '#2287CD'
|
|
58
58
|
}
|
|
59
|
-
};
|
|
60
|
-
export { object };
|
|
61
|
-
export { array };
|
|
62
|
-
export { value };
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["label", "children"];
|
|
2
|
+
|
|
1
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
4
|
|
|
3
5
|
import React from 'react';
|
|
@@ -24,12 +26,12 @@ const Label = styled.span(({
|
|
|
24
26
|
alignItems: 'center',
|
|
25
27
|
lineHeight: '16px'
|
|
26
28
|
}));
|
|
27
|
-
export const Field =
|
|
29
|
+
export const Field = _ref => {
|
|
28
30
|
let {
|
|
29
31
|
label,
|
|
30
32
|
children
|
|
31
33
|
} = _ref,
|
|
32
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
34
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
33
35
|
|
|
34
36
|
return /*#__PURE__*/React.createElement(Wrapper, props, label ? /*#__PURE__*/React.createElement(Label, null, /*#__PURE__*/React.createElement("span", null, label)) : null, children);
|
|
35
37
|
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const _excluded = ["size", "valid", "align"],
|
|
2
|
+
_excluded2 = ["size", "valid", "align"],
|
|
3
|
+
_excluded3 = ["size", "valid", "align"],
|
|
4
|
+
_excluded4 = ["size", "valid", "align"];
|
|
5
|
+
|
|
1
6
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
7
|
|
|
3
8
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -139,7 +144,7 @@ const validation = ({
|
|
|
139
144
|
};
|
|
140
145
|
|
|
141
146
|
export const Input = Object.assign(styled( /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
142
|
-
let props = _objectWithoutPropertiesLoose(_ref,
|
|
147
|
+
let props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
143
148
|
|
|
144
149
|
return /*#__PURE__*/React.createElement("input", _extends({}, props, {
|
|
145
150
|
ref: ref
|
|
@@ -150,7 +155,7 @@ export const Input = Object.assign(styled( /*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
150
155
|
displayName: 'Input'
|
|
151
156
|
});
|
|
152
157
|
export const Select = Object.assign(styled( /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
153
|
-
let props = _objectWithoutPropertiesLoose(_ref2,
|
|
158
|
+
let props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
154
159
|
|
|
155
160
|
return /*#__PURE__*/React.createElement("select", _extends({}, props, {
|
|
156
161
|
ref: ref
|
|
@@ -164,7 +169,7 @@ export const Select = Object.assign(styled( /*#__PURE__*/forwardRef((_ref2, ref)
|
|
|
164
169
|
displayName: 'Select'
|
|
165
170
|
});
|
|
166
171
|
export const Textarea = Object.assign(styled( /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
167
|
-
let props = _objectWithoutPropertiesLoose(_ref3,
|
|
172
|
+
let props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
168
173
|
|
|
169
174
|
return /*#__PURE__*/React.createElement(TextareaAutoResize, _extends({}, props, {
|
|
170
175
|
ref: ref
|
|
@@ -178,7 +183,7 @@ export const Textarea = Object.assign(styled( /*#__PURE__*/forwardRef((_ref3, re
|
|
|
178
183
|
displayName: 'Textarea'
|
|
179
184
|
});
|
|
180
185
|
const ButtonStyled = styled( /*#__PURE__*/forwardRef((_ref4, ref) => {
|
|
181
|
-
let props = _objectWithoutPropertiesLoose(_ref4,
|
|
186
|
+
let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
182
187
|
|
|
183
188
|
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, props, {
|
|
184
189
|
ref: ref
|
package/dist/modern/icon/icon.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
const _excluded = ["icon", "symbol"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
6
|
|
|
5
|
-
import React from 'react';
|
|
7
|
+
import React, { memo } from 'react';
|
|
6
8
|
import { styled } from '@storybook/theming';
|
|
7
9
|
import icons from './icons';
|
|
8
10
|
import Svg from './svg';
|
|
@@ -10,12 +12,12 @@ const Path = styled.path({
|
|
|
10
12
|
fill: 'currentColor'
|
|
11
13
|
});
|
|
12
14
|
// TODO: if we can resize the 1024 to 20, we can remove the size attributes
|
|
13
|
-
export const Icons = /*#__PURE__*/
|
|
15
|
+
export const Icons = /*#__PURE__*/memo(_ref => {
|
|
14
16
|
let {
|
|
15
17
|
icon,
|
|
16
18
|
symbol
|
|
17
19
|
} = _ref,
|
|
18
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
20
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
21
|
|
|
20
22
|
return /*#__PURE__*/React.createElement(Svg, _extends({
|
|
21
23
|
viewBox: "0 0 1024 1024"
|
|
@@ -25,7 +27,7 @@ export const Icons = /*#__PURE__*/React.memo((_ref) => {
|
|
|
25
27
|
d: icons[icon]
|
|
26
28
|
}));
|
|
27
29
|
});
|
|
28
|
-
export const Symbols = /*#__PURE__*/
|
|
30
|
+
export const Symbols = /*#__PURE__*/memo(({
|
|
29
31
|
icons: keys = Object.keys(icons)
|
|
30
32
|
}) => /*#__PURE__*/React.createElement("svg", {
|
|
31
33
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/modern/index.js
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as typography from './typography/components';
|
|
3
|
+
export { A } from './typography/elements/A';
|
|
4
|
+
export { Blockquote } from './typography/elements/Blockquote';
|
|
5
|
+
export { Code } from './typography/elements/Code';
|
|
6
|
+
export { Div } from './typography/elements/Div';
|
|
7
|
+
export { DL } from './typography/elements/DL';
|
|
8
|
+
export { H1 } from './typography/elements/H1';
|
|
9
|
+
export { H2 } from './typography/elements/H2';
|
|
10
|
+
export { H3 } from './typography/elements/H3';
|
|
11
|
+
export { H4 } from './typography/elements/H4';
|
|
12
|
+
export { H5 } from './typography/elements/H5';
|
|
13
|
+
export { H6 } from './typography/elements/H6';
|
|
14
|
+
export { HR } from './typography/elements/HR';
|
|
15
|
+
export { Img } from './typography/elements/Img';
|
|
16
|
+
export { LI } from './typography/elements/LI';
|
|
17
|
+
export { OL } from './typography/elements/OL';
|
|
18
|
+
export { P } from './typography/elements/P';
|
|
19
|
+
export { Pre } from './typography/elements/Pre';
|
|
20
|
+
export { Span } from './typography/elements/Span';
|
|
21
|
+
export { Table } from './typography/elements/Table';
|
|
22
|
+
export { TT } from './typography/elements/TT';
|
|
23
|
+
export { UL } from './typography/elements/UL';
|
|
3
24
|
export { Badge } from './Badge/Badge'; // Typography
|
|
4
25
|
|
|
5
26
|
export { Link } from './typography/link/link';
|
|
@@ -33,11 +54,14 @@ export { StorybookIcon } from './brand/StorybookIcon'; // Doc blocks
|
|
|
33
54
|
export * from './blocks';
|
|
34
55
|
export * from './controls'; // Loader
|
|
35
56
|
|
|
36
|
-
export { Loader } from './Loader/Loader';
|
|
37
|
-
|
|
38
|
-
export {
|
|
57
|
+
export { Loader } from './Loader/Loader'; // Utils
|
|
58
|
+
|
|
59
|
+
export { getStoryHref } from './utils/getStoryHref';
|
|
60
|
+
export * from './typography/DocumentFormatting'; // eslint-disable-next-line prefer-destructuring
|
|
61
|
+
|
|
62
|
+
export const components = typography.components;
|
|
39
63
|
const resetComponents = {};
|
|
40
|
-
Object.keys(
|
|
64
|
+
Object.keys(typography.components).forEach(key => {
|
|
41
65
|
resetComponents[key] = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/createElement(key, Object.assign({}, props, {
|
|
42
66
|
ref
|
|
43
67
|
})));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["children"];
|
|
2
|
+
|
|
1
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
4
|
|
|
3
5
|
import React, { Children } from 'react';
|
|
@@ -16,11 +18,11 @@ const Message = styled.div(({
|
|
|
16
18
|
color: theme.color.defaultText,
|
|
17
19
|
fontSize: theme.typography.size.s2 - 1
|
|
18
20
|
}));
|
|
19
|
-
export const Placeholder =
|
|
21
|
+
export const Placeholder = _ref => {
|
|
20
22
|
let {
|
|
21
23
|
children
|
|
22
24
|
} = _ref,
|
|
23
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
25
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
26
|
|
|
25
27
|
const [title, desc] = Children.toArray(children);
|
|
26
28
|
return /*#__PURE__*/React.createElement(Message, props, /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["col", "row", "outer", "children"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -57,14 +59,14 @@ const Container = styled.div(({
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
|
-
export const Spaced =
|
|
62
|
+
export const Spaced = _ref => {
|
|
61
63
|
let {
|
|
62
64
|
col,
|
|
63
65
|
row,
|
|
64
66
|
outer,
|
|
65
67
|
children
|
|
66
68
|
} = _ref,
|
|
67
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
69
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
68
70
|
|
|
69
71
|
const outerAmount = toNumber(typeof outer === 'number' || !outer ? outer : col || row);
|
|
70
72
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { Suspense } from 'react';
|
|
2
|
-
const LazySyntaxHighlighter = /*#__PURE__*/
|
|
1
|
+
import React, { Suspense, lazy } from 'react';
|
|
2
|
+
const LazySyntaxHighlighter = /*#__PURE__*/lazy(() => import('./syntaxhighlighter'));
|
|
3
3
|
export const SyntaxHighlighter = props => /*#__PURE__*/React.createElement(Suspense, {
|
|
4
4
|
fallback: /*#__PURE__*/React.createElement("div", null)
|
|
5
5
|
}, /*#__PURE__*/React.createElement(LazySyntaxHighlighter, props));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["children", "language", "copyable", "bordered", "padded", "format", "className", "showLineNumbers"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -117,7 +119,7 @@ const Code = styled.code({
|
|
|
117
119
|
paddingRight: 0,
|
|
118
120
|
opacity: 1
|
|
119
121
|
});
|
|
120
|
-
export const SyntaxHighlighter =
|
|
122
|
+
export const SyntaxHighlighter = _ref => {
|
|
121
123
|
let {
|
|
122
124
|
children,
|
|
123
125
|
language = 'jsx',
|
|
@@ -128,7 +130,7 @@ export const SyntaxHighlighter = (_ref) => {
|
|
|
128
130
|
className = null,
|
|
129
131
|
showLineNumbers = false
|
|
130
132
|
} = _ref,
|
|
131
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
133
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
132
134
|
|
|
133
135
|
if (typeof children !== 'string' || !children.trim()) {
|
|
134
136
|
return null;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const _excluded = ["active", "loading", "disabled"],
|
|
2
|
+
_excluded2 = ["loading", "left", "title", "center", "right", "active", "disabled", "href", "onClick", "LinkWrapper"];
|
|
3
|
+
|
|
1
4
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
5
|
|
|
3
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -6,8 +9,8 @@ import React from 'react';
|
|
|
6
9
|
import { styled } from '@storybook/theming';
|
|
7
10
|
import memoize from 'memoizerific';
|
|
8
11
|
import { transparentize } from 'polished';
|
|
9
|
-
const Title = styled(
|
|
10
|
-
let rest = _objectWithoutPropertiesLoose(_ref,
|
|
12
|
+
const Title = styled(_ref => {
|
|
13
|
+
let rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
14
|
|
|
12
15
|
return /*#__PURE__*/React.createElement("span", rest);
|
|
13
16
|
})(({
|
|
@@ -142,7 +145,7 @@ const getItemProps = memoize(100)((onClick, href, LinkWrapper) => {
|
|
|
142
145
|
return result;
|
|
143
146
|
});
|
|
144
147
|
|
|
145
|
-
const ListItem =
|
|
148
|
+
const ListItem = _ref2 => {
|
|
146
149
|
let {
|
|
147
150
|
loading,
|
|
148
151
|
left,
|
|
@@ -155,7 +158,7 @@ const ListItem = (_ref2) => {
|
|
|
155
158
|
onClick,
|
|
156
159
|
LinkWrapper
|
|
157
160
|
} = _ref2,
|
|
158
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
161
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
159
162
|
|
|
160
163
|
const itemProps = getItemProps(onClick, href, LinkWrapper);
|
|
161
164
|
const commonProps = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["placement", "hasChrome", "children", "arrowProps", "tooltipRef", "arrowRef", "color"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -74,7 +76,7 @@ const Wrapper = styled.div(({
|
|
|
74
76
|
borderRadius: theme.appBorderRadius * 2,
|
|
75
77
|
fontSize: theme.typography.size.s1
|
|
76
78
|
} : {});
|
|
77
|
-
export const Tooltip =
|
|
79
|
+
export const Tooltip = _ref => {
|
|
78
80
|
let {
|
|
79
81
|
placement,
|
|
80
82
|
hasChrome,
|
|
@@ -84,7 +86,7 @@ export const Tooltip = (_ref) => {
|
|
|
84
86
|
arrowRef,
|
|
85
87
|
color
|
|
86
88
|
} = _ref,
|
|
87
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
89
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
88
90
|
|
|
89
91
|
return /*#__PURE__*/React.createElement(Wrapper, _extends({
|
|
90
92
|
hasChrome: hasChrome,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const _excluded = ["LinkWrapper", "onClick"],
|
|
2
|
+
_excluded2 = ["isGatsby"];
|
|
3
|
+
|
|
1
4
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
5
|
|
|
3
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -22,7 +25,7 @@ const Item = props => {
|
|
|
22
25
|
LinkWrapper,
|
|
23
26
|
onClick: onClickFromProps
|
|
24
27
|
} = props,
|
|
25
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
28
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
29
|
|
|
27
30
|
const {
|
|
28
31
|
title,
|
|
@@ -47,11 +50,11 @@ Item.displayName = "Item";
|
|
|
47
50
|
export const TooltipLinkList = ({
|
|
48
51
|
links,
|
|
49
52
|
LinkWrapper
|
|
50
|
-
}) => /*#__PURE__*/React.createElement(List, null, links.map(
|
|
53
|
+
}) => /*#__PURE__*/React.createElement(List, null, links.map(_ref => {
|
|
51
54
|
let {
|
|
52
55
|
isGatsby
|
|
53
56
|
} = _ref,
|
|
54
|
-
p = _objectWithoutPropertiesLoose(_ref,
|
|
57
|
+
p = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
55
58
|
|
|
56
59
|
return /*#__PURE__*/React.createElement(Item, _extends({
|
|
57
60
|
key: p.id,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["title"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -37,11 +39,11 @@ export const TooltipMessage = ({
|
|
|
37
39
|
desc,
|
|
38
40
|
links
|
|
39
41
|
}) => {
|
|
40
|
-
return /*#__PURE__*/React.createElement(MessageWrapper, null, /*#__PURE__*/React.createElement(Message, null, title && /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc)), links && /*#__PURE__*/React.createElement(Links, null, links.map(
|
|
42
|
+
return /*#__PURE__*/React.createElement(MessageWrapper, null, /*#__PURE__*/React.createElement(Message, null, title && /*#__PURE__*/React.createElement(Title, null, title), desc && /*#__PURE__*/React.createElement(Desc, null, desc)), links && /*#__PURE__*/React.createElement(Links, null, links.map(_ref => {
|
|
41
43
|
let {
|
|
42
44
|
title: linkTitle
|
|
43
45
|
} = _ref,
|
|
44
|
-
other = _objectWithoutPropertiesLoose(_ref,
|
|
46
|
+
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
45
47
|
|
|
46
48
|
return /*#__PURE__*/React.createElement(Link, _extends({}, other, {
|
|
47
49
|
key: linkTitle
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const _excluded = ["note"];
|
|
2
|
+
|
|
1
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
2
4
|
|
|
3
5
|
import React from 'react';
|
|
@@ -18,11 +20,11 @@ const Note = styled.div(({
|
|
|
18
20
|
background: theme.base === 'light' ? 'rgba(60, 60, 60, 0.9)' : 'rgba(20, 20, 20, 0.85)',
|
|
19
21
|
margin: 6
|
|
20
22
|
}));
|
|
21
|
-
export const TooltipNote =
|
|
23
|
+
export const TooltipNote = _ref => {
|
|
22
24
|
let {
|
|
23
25
|
note
|
|
24
26
|
} = _ref,
|
|
25
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
27
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
26
28
|
|
|
27
29
|
return /*#__PURE__*/React.createElement(Note, props, note);
|
|
28
30
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const _excluded = ["svg", "trigger", "closeOnClick", "placement", "modifiers", "hasChrome", "tooltip", "children", "tooltipShown", "onVisibilityChange"],
|
|
2
|
+
_excluded2 = ["startOpen", "onVisibilityChange"];
|
|
3
|
+
|
|
1
4
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
5
|
|
|
3
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -20,7 +23,7 @@ const TargetSvgContainer = styled.g`
|
|
|
20
23
|
`;
|
|
21
24
|
|
|
22
25
|
// Pure, does not bind to the body
|
|
23
|
-
const WithTooltipPure =
|
|
26
|
+
const WithTooltipPure = _ref => {
|
|
24
27
|
let {
|
|
25
28
|
svg,
|
|
26
29
|
trigger,
|
|
@@ -32,7 +35,7 @@ const WithTooltipPure = (_ref) => {
|
|
|
32
35
|
tooltipShown,
|
|
33
36
|
onVisibilityChange
|
|
34
37
|
} = _ref,
|
|
35
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
38
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
36
39
|
|
|
37
40
|
const Container = svg ? TargetSvgContainer : TargetContainer;
|
|
38
41
|
return /*#__PURE__*/React.createElement(TooltipTrigger, {
|
|
@@ -93,12 +96,12 @@ WithTooltipPure.defaultProps = {
|
|
|
93
96
|
tooltipShown: false
|
|
94
97
|
};
|
|
95
98
|
|
|
96
|
-
const WithToolTipState =
|
|
99
|
+
const WithToolTipState = _ref2 => {
|
|
97
100
|
let {
|
|
98
101
|
startOpen,
|
|
99
102
|
onVisibilityChange: onChange
|
|
100
103
|
} = _ref2,
|
|
101
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
104
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
102
105
|
|
|
103
106
|
const [tooltipShown, setTooltipShown] = useState(startOpen || false);
|
|
104
107
|
const onVisibilityChange = useCallback(visibility => {
|