@stoplight/elements-core 7.5.0 → 7.5.1

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/index.esm.js CHANGED
@@ -8,7 +8,7 @@ import isPlainObject from 'lodash/isPlainObject.js';
8
8
  import { parse } from '@stoplight/markdown';
9
9
  import { NodeType, HttpParamStyles } from '@stoplight/types';
10
10
  import { parse as parse$1 } from '@stoplight/yaml';
11
- import { isArray as isArray$1, Box, Flex, Icon, Popover, Button, Panel, CopyButton, Menu, Text, Input, Select, FieldButton, Image, Link, useThemeIsDark, HStack, VStack, InvertTheme, Tooltip, Badge, LinkHeading, Tabs, TabList, Tab, TabPanels, TabPanel, Heading as Heading$1, useClipboard, useMosaicContext, Provider as Provider$1 } from '@stoplight/mosaic';
11
+ import { isArray as isArray$1, Box, Flex, Icon, Button, Popover, Panel, CopyButton, Menu, Text, Input, Select, FieldButton, Image, Link, useThemeIsDark, HStack, VStack, InvertTheme, Tooltip, Badge, LinkHeading, Tabs, TabList, Tab, TabPanels, TabPanel, Heading as Heading$1, useClipboard, useMosaicContext, Provider as Provider$1 } from '@stoplight/mosaic';
12
12
  import { withErrorBoundary } from '@stoplight/react-error-boundary';
13
13
  import { MarkdownViewer as MarkdownViewer$1, DefaultSMDComponents, MarkdownViewerProvider } from '@stoplight/markdown-viewer';
14
14
  export { DefaultSMDComponents } from '@stoplight/markdown-viewer';
@@ -294,9 +294,10 @@ const Headings = ({ headings, className, title = 'On This Page', minimal, maxWid
294
294
  React.createElement(Box, { as: Icon, icon: faStream, mr: 2 }),
295
295
  title)),
296
296
  headings.map((heading, i) => (React.createElement(Heading, { key: i, item: heading, isSelected: locationHash === `#${heading.id}` })))));
297
+ const button = React.createElement(Button, { pos: "sticky", size: "sm", borderColor: "light", icon: faStream, style: { top: 10 } });
297
298
  if (minimal) {
298
- return (React.createElement(Box, { pos: "absolute", top: 0, right: 0, style: { top: 10 } },
299
- React.createElement(Popover, { renderTrigger: React.createElement(Button, { size: "sm", borderColor: "light", icon: faStream }), placement: "bottom" },
299
+ return (React.createElement(Box, { pos: "sticky", top: 0, right: 0, style: { top: 10 } },
300
+ React.createElement(Popover, { renderTrigger: button, placement: "bottom" },
300
301
  React.createElement(Box, { className: className }, component))));
301
302
  }
302
303
  return (React.createElement(Box, { pos: "sticky", pr: 4, pl: 16, h: "full", overflowX: "auto", overflowY: "auto", className: className, style: { top: 30 } },
@@ -2381,7 +2382,7 @@ const SidebarLayout = React.forwardRef(({ sidebar, children, maxContentWidth = M
2381
2382
  paddingLeft: `calc((100% - ${maxContentWidth}px) / 2)`,
2382
2383
  minWidth: `${sidebarWidth}px`,
2383
2384
  } }, sidebar),
2384
- React.createElement(Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, overflowY: "auto", overflowX: "hidden", w: "full" },
2385
+ React.createElement(Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, w: "full" },
2385
2386
  React.createElement(Box, { style: { maxWidth: `${maxContentWidth - sidebarWidth}px` }, py: 16 }, children))));
2386
2387
  });
2387
2388
 
package/index.js CHANGED
@@ -349,9 +349,10 @@ const Headings = ({ headings, className, title = 'On This Page', minimal, maxWid
349
349
  React__namespace.createElement(mosaic.Box, { as: mosaic.Icon, icon: freeSolidSvgIcons.faStream, mr: 2 }),
350
350
  title)),
351
351
  headings.map((heading, i) => (React__namespace.createElement(Heading, { key: i, item: heading, isSelected: locationHash === `#${heading.id}` })))));
352
+ const button = React__namespace.createElement(mosaic.Button, { pos: "sticky", size: "sm", borderColor: "light", icon: freeSolidSvgIcons.faStream, style: { top: 10 } });
352
353
  if (minimal) {
353
- return (React__namespace.createElement(mosaic.Box, { pos: "absolute", top: 0, right: 0, style: { top: 10 } },
354
- React__namespace.createElement(mosaic.Popover, { renderTrigger: React__namespace.createElement(mosaic.Button, { size: "sm", borderColor: "light", icon: freeSolidSvgIcons.faStream }), placement: "bottom" },
354
+ return (React__namespace.createElement(mosaic.Box, { pos: "sticky", top: 0, right: 0, style: { top: 10 } },
355
+ React__namespace.createElement(mosaic.Popover, { renderTrigger: button, placement: "bottom" },
355
356
  React__namespace.createElement(mosaic.Box, { className: className }, component))));
356
357
  }
357
358
  return (React__namespace.createElement(mosaic.Box, { pos: "sticky", pr: 4, pl: 16, h: "full", overflowX: "auto", overflowY: "auto", className: className, style: { top: 30 } },
@@ -2436,7 +2437,7 @@ const SidebarLayout = React__namespace.forwardRef(({ sidebar, children, maxConte
2436
2437
  paddingLeft: `calc((100% - ${maxContentWidth}px) / 2)`,
2437
2438
  minWidth: `${sidebarWidth}px`,
2438
2439
  } }, sidebar),
2439
- React__namespace.createElement(mosaic.Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, overflowY: "auto", overflowX: "hidden", w: "full" },
2440
+ React__namespace.createElement(mosaic.Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, w: "full" },
2440
2441
  React__namespace.createElement(mosaic.Box, { style: { maxWidth: `${maxContentWidth - sidebarWidth}px` }, py: 16 }, children))));
2441
2442
  });
2442
2443
 
package/index.mjs CHANGED
@@ -8,7 +8,7 @@ import isPlainObject from 'lodash/isPlainObject.js';
8
8
  import { parse } from '@stoplight/markdown';
9
9
  import { NodeType, HttpParamStyles } from '@stoplight/types';
10
10
  import { parse as parse$1 } from '@stoplight/yaml';
11
- import { isArray as isArray$1, Box, Flex, Icon, Popover, Button, Panel, CopyButton, Menu, Text, Input, Select, FieldButton, Image, Link, useThemeIsDark, HStack, VStack, InvertTheme, Tooltip, Badge, LinkHeading, Tabs, TabList, Tab, TabPanels, TabPanel, Heading as Heading$1, useClipboard, useMosaicContext, Provider as Provider$1 } from '@stoplight/mosaic';
11
+ import { isArray as isArray$1, Box, Flex, Icon, Button, Popover, Panel, CopyButton, Menu, Text, Input, Select, FieldButton, Image, Link, useThemeIsDark, HStack, VStack, InvertTheme, Tooltip, Badge, LinkHeading, Tabs, TabList, Tab, TabPanels, TabPanel, Heading as Heading$1, useClipboard, useMosaicContext, Provider as Provider$1 } from '@stoplight/mosaic';
12
12
  import { withErrorBoundary } from '@stoplight/react-error-boundary';
13
13
  import { MarkdownViewer as MarkdownViewer$1, DefaultSMDComponents, MarkdownViewerProvider } from '@stoplight/markdown-viewer';
14
14
  export { DefaultSMDComponents } from '@stoplight/markdown-viewer';
@@ -294,9 +294,10 @@ const Headings = ({ headings, className, title = 'On This Page', minimal, maxWid
294
294
  React.createElement(Box, { as: Icon, icon: faStream, mr: 2 }),
295
295
  title)),
296
296
  headings.map((heading, i) => (React.createElement(Heading, { key: i, item: heading, isSelected: locationHash === `#${heading.id}` })))));
297
+ const button = React.createElement(Button, { pos: "sticky", size: "sm", borderColor: "light", icon: faStream, style: { top: 10 } });
297
298
  if (minimal) {
298
- return (React.createElement(Box, { pos: "absolute", top: 0, right: 0, style: { top: 10 } },
299
- React.createElement(Popover, { renderTrigger: React.createElement(Button, { size: "sm", borderColor: "light", icon: faStream }), placement: "bottom" },
299
+ return (React.createElement(Box, { pos: "sticky", top: 0, right: 0, style: { top: 10 } },
300
+ React.createElement(Popover, { renderTrigger: button, placement: "bottom" },
300
301
  React.createElement(Box, { className: className }, component))));
301
302
  }
302
303
  return (React.createElement(Box, { pos: "sticky", pr: 4, pl: 16, h: "full", overflowX: "auto", overflowY: "auto", className: className, style: { top: 30 } },
@@ -2381,7 +2382,7 @@ const SidebarLayout = React.forwardRef(({ sidebar, children, maxContentWidth = M
2381
2382
  paddingLeft: `calc((100% - ${maxContentWidth}px) / 2)`,
2382
2383
  minWidth: `${sidebarWidth}px`,
2383
2384
  } }, sidebar),
2384
- React.createElement(Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, overflowY: "auto", overflowX: "hidden", w: "full" },
2385
+ React.createElement(Box, { ref: scrollRef, bg: "canvas", px: 24, flex: 1, w: "full" },
2385
2386
  React.createElement(Box, { style: { maxWidth: `${maxContentWidth - sidebarWidth}px` }, py: 16 }, children))));
2386
2387
  });
2387
2388
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "7.5.0",
3
+ "version": "7.5.1",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",