@mirohq/design-system-scroll-area 1.1.2 → 1.2.0-fix-stitches-types.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/dist/main.js CHANGED
@@ -1,23 +1,17 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var jsxRuntime = require('react/jsx-runtime');
6
4
  var React = require('react');
7
5
  var reactScrollArea = require('@radix-ui/react-scroll-area');
8
6
  var designSystemStitches = require('@mirohq/design-system-stitches');
9
7
 
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
-
14
8
  const StyledViewport = designSystemStitches.styled(reactScrollArea.Viewport, {
15
9
  width: "100%",
16
10
  height: "100%",
17
11
  boxSizing: "border-box"
18
12
  });
19
13
 
20
- const Viewport = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledViewport, { ...props, ref: forwardRef }));
14
+ const Viewport = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledViewport, { ...props, ref: forwardRef }));
21
15
 
22
16
  const StyledScrollbar = designSystemStitches.styled(reactScrollArea.Scrollbar, {
23
17
  display: "flex",
@@ -36,7 +30,7 @@ const StyledScrollbar = designSystemStitches.styled(reactScrollArea.Scrollbar, {
36
30
  }
37
31
  });
38
32
 
39
- const Scrollbar = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledScrollbar, { ...props, ref: forwardRef }));
33
+ const Scrollbar = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledScrollbar, { ...props, ref: forwardRef }));
40
34
 
41
35
  const StyledThumb = designSystemStitches.styled(reactScrollArea.Thumb, {
42
36
  flex: 1,
@@ -62,16 +56,16 @@ const StyledThumb = designSystemStitches.styled(reactScrollArea.Thumb, {
62
56
  }
63
57
  });
64
58
 
65
- const Thumb = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledThumb, { ...props, ref: forwardRef }));
59
+ const Thumb = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledThumb, { ...props, ref: forwardRef }));
66
60
 
67
61
  const StyledCorner = designSystemStitches.styled(reactScrollArea.Corner);
68
- const Corner = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledCorner, { ...props, ref: forwardRef }));
62
+ const Corner = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledCorner, { ...props, ref: forwardRef }));
69
63
 
70
64
  const StyledScrollArea = designSystemStitches.styled(reactScrollArea.Root, {
71
65
  overflow: "hidden"
72
66
  });
73
67
 
74
- const ScrollArea = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledScrollArea, { ...props, ref: forwardRef }));
68
+ const ScrollArea = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledScrollArea, { ...props, ref: forwardRef }));
75
69
  ScrollArea.Viewport = Viewport;
76
70
  ScrollArea.Scrollbar = Scrollbar;
77
71
  ScrollArea.Thumb = Thumb;
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/partials/viewport.styled.tsx","../src/partials/viewport.tsx","../src/partials/scrollbar.styled.tsx","../src/partials/scrollbar.tsx","../src/partials/thumb.styled.tsx","../src/partials/thumb.tsx","../src/partials/corner.tsx","../src/scroll-area.styled.tsx","../src/scroll-area.tsx"],"sourcesContent":["import { Viewport as RadixViewport } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledViewport = styled(RadixViewport, {\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n})\n\nexport type StyledViewportProps = StrictComponentProps<typeof StyledViewport>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledViewport } from './viewport.styled'\nimport type { StyledViewportProps } from './viewport.styled'\n\nexport type ViewportProps = StyledViewportProps\n\nexport const Viewport = React.forwardRef<\n ElementRef<typeof StyledViewport>,\n ViewportProps\n>((props, forwardRef) => <StyledViewport {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Scrollbar as RadixScrollbar } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollbar = styled(RadixScrollbar, {\n display: 'flex',\n // ensures no selection\n userSelect: 'none',\n // disable browser handling of all panning and zooming gestures on touch devices\n touchAction: 'none',\n background: 'transparent',\n transition: 'background 160ms ease-out',\n zIndex: '1',\n '&[data-orientation=\"vertical\"]': { width: '$1', minHeight: '$2' },\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: '$1',\n padding: '0 2px',\n },\n})\n\nexport type StyledScrollbarProps = StrictComponentProps<typeof StyledScrollbar>\n","import type { ElementRef } from 'react'\nimport React from 'react'\n\nimport { StyledScrollbar } from './scrollbar.styled'\nimport type { StyledScrollbarProps } from './scrollbar.styled'\n\nexport interface ScrollbarProps extends StyledScrollbarProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The orientation of the scrollbar.\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport const Scrollbar = React.forwardRef<\n ElementRef<typeof StyledScrollbar>,\n ScrollbarProps\n>((props, forwardRef) => <StyledScrollbar {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Thumb as RadixThumb } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledThumb = styled(RadixThumb, {\n flex: 1,\n background: '$background-neutrals-scrollbar',\n borderRadius: '$50',\n position: 'relative',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n minWidth: '$6',\n minHeight: '$6',\n },\n '&:hover': {\n backgroundColor: '$background-neutrals-scrollbar-hover',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonText',\n },\n})\nexport type StyledThumbProps = StrictComponentProps<typeof StyledThumb>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport interface ThumbProps extends StyledThumbProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n ThumbProps\n>((props, forwardRef) => <StyledThumb {...props} ref={forwardRef} />)\n","import React from 'react'\nimport { Corner as RadixCorner } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport type { ElementRef } from 'react'\n\nconst StyledCorner = styled(RadixCorner)\ntype StyledCornerProps = StrictComponentProps<typeof StyledCorner>\n\nexport interface CornerProps extends StyledCornerProps {}\n\nexport const Corner = React.forwardRef<\n ElementRef<typeof StyledCorner>,\n CornerProps\n>((props, forwardRef) => <StyledCorner {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixScrollArea } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollArea = styled(RadixScrollArea, {\n overflow: 'hidden',\n})\nexport type StyledScrollAreaProps = StrictComponentProps<\n typeof StyledScrollArea\n>\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { Viewport } from './partials/viewport'\nimport { Scrollbar } from './partials/scrollbar'\nimport { Thumb } from './partials/thumb'\nimport { Corner } from './partials/corner'\nimport { StyledScrollArea } from './scroll-area.styled'\nimport type { StyledScrollAreaProps } from './scroll-area.styled'\n\nexport interface ScrollAreaProps extends StyledScrollAreaProps {\n children: React.ReactNode\n\n /**\n * Describes the nature of scrollbar visibility, similar to how the scrollbar\n * preferences in MacOS control visibility of native scrollbars. \"auto\" means\n * that scrollbars are visible when content is overflowing on the corresponding\n * orientation. \"always\" means that scrollbars are always visible regardless of\n * whether the content is overflowing. \"scroll\" means that scrollbars are\n * visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is scrolling along its corresponding orientation and\n * when the user is hovering over the scroll area.\n * @default hover\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover'\n\n /**\n * The reading direction of the scroll area. If omitted, inherits globally\n * from DirectionProvider or assumes LTR (left-to-right) reading mode.\n * @default 'ltr'\n */\n dir?: 'ltr' | 'rtl'\n\n /**\n * If type is set to either \"scroll\" or \"hover\", this prop determines the\n * length of time, in milliseconds, before the scrollbars are hidden after the\n * user stops interacting with scrollbars.\n */\n scrollHideDelay?: number\n}\n\nexport const ScrollArea = React.forwardRef<\n ElementRef<typeof StyledScrollArea>,\n ScrollAreaProps\n>((props, forwardRef) => (\n <StyledScrollArea {...props} ref={forwardRef} />\n)) as ForwardRefExoticComponent<ScrollAreaProps> & Partials\n\n// Partials\n// -----------------------------------------------------------------------------\n\nexport interface Partials {\n Viewport: typeof Viewport\n Scrollbar: typeof Scrollbar\n Thumb: typeof Thumb\n Corner: typeof Corner\n}\n\nScrollArea.Viewport = Viewport\nScrollArea.Scrollbar = Scrollbar\nScrollArea.Thumb = Thumb\nScrollArea.Corner = Corner\n"],"names":["styled","RadixViewport","React","jsx","RadixScrollbar","RadixThumb","RadixCorner","RadixScrollArea"],"mappings":";;;;;;;;;;;;;AAIa,MAAA,cAAA,GAAiBA,4BAAOC,wBAAe,EAAA;AAAA,EAClD,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,SAA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AA;AAAA,IACR,QAAU,EAAA,IAAA;AAAA,IACV,SAAW,EAAA,IAAA;AAAA,GACb;AAAA,EACA,SAAW,EAAA;AAAA,IACT,eAAiB,EAAA,sCAAA;AAAA,GACnB;AAAA,EAEA,gCAAkC,EAAA;AAAA,IAChC,eAAiB,EAAA,YAAA;AAAA,GACnB;AACF,CAAC,CAAA;;ACbM,MAAM,KAAQ,GAAAH,yBAAA,CAAM,UAGzB,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgBC,cAAA,CAAA,WAAA,EAAA,EAAa,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACXpE,MAAM,YAAA,GAAeH,4BAAOM,sBAAW,CAAA,CAAA;AAKhC,MAAM,MAAS,GAAAJ,yBAAA,CAAM,UAG1B,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgBC,cAAA,CAAA,YAAA,EAAA,EAAc,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACVxD,MAAA,gBAAA,GAAmBH,4BAAOO,oBAAiB,EAAA;AAAA,EACtD,QAAU,EAAA,QAAA;AACZ,CAAC,CAAA;;ACmCM,MAAM,UAAa,GAAAL,yBAAA,CAAM,UAG9B,CAAA,CAAC,KAAO,EAAA,UAAA,qBACPC,cAAA,CAAA,gBAAA,EAAA,EAAkB,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAC/C,EAAA;AAYD,UAAA,CAAW,QAAW,GAAA,QAAA,CAAA;AACtB,UAAA,CAAW,SAAY,GAAA,SAAA,CAAA;AACvB,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AACnB,UAAA,CAAW,MAAS,GAAA,MAAA;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/partials/viewport.styled.tsx","../src/partials/viewport.tsx","../src/partials/scrollbar.styled.tsx","../src/partials/scrollbar.tsx","../src/partials/thumb.styled.tsx","../src/partials/thumb.tsx","../src/partials/corner.tsx","../src/scroll-area.styled.tsx","../src/scroll-area.tsx"],"sourcesContent":["import { Viewport as RadixViewport } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledViewport = styled(RadixViewport, {\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n})\n\nexport type StyledViewportProps = StrictComponentProps<typeof StyledViewport>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledViewport } from './viewport.styled'\nimport type { StyledViewportProps } from './viewport.styled'\n\nexport type ViewportProps = StyledViewportProps\n\nexport const Viewport = React.forwardRef<\n ElementRef<typeof StyledViewport>,\n ViewportProps\n>((props, forwardRef) => <StyledViewport {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Scrollbar as RadixScrollbar } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollbar = styled(RadixScrollbar, {\n display: 'flex',\n // ensures no selection\n userSelect: 'none',\n // disable browser handling of all panning and zooming gestures on touch devices\n touchAction: 'none',\n background: 'transparent',\n transition: 'background 160ms ease-out',\n zIndex: '1',\n '&[data-orientation=\"vertical\"]': { width: '$1', minHeight: '$2' },\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: '$1',\n padding: '0 2px',\n },\n})\n\nexport type StyledScrollbarProps = StrictComponentProps<typeof StyledScrollbar>\n","import type { ElementRef } from 'react'\nimport React from 'react'\n\nimport { StyledScrollbar } from './scrollbar.styled'\nimport type { StyledScrollbarProps } from './scrollbar.styled'\n\nexport interface ScrollbarProps extends StyledScrollbarProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The orientation of the scrollbar.\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport const Scrollbar = React.forwardRef<\n ElementRef<typeof StyledScrollbar>,\n ScrollbarProps\n>((props, forwardRef) => <StyledScrollbar {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Thumb as RadixThumb } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledThumb = styled(RadixThumb, {\n flex: 1,\n background: '$background-neutrals-scrollbar',\n borderRadius: '$50',\n position: 'relative',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n minWidth: '$6',\n minHeight: '$6',\n },\n '&:hover': {\n backgroundColor: '$background-neutrals-scrollbar-hover',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonText',\n },\n})\nexport type StyledThumbProps = StrictComponentProps<typeof StyledThumb>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport interface ThumbProps extends StyledThumbProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n ThumbProps\n>((props, forwardRef) => <StyledThumb {...props} ref={forwardRef} />)\n","import React from 'react'\nimport { Corner as RadixCorner } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport type { ElementRef } from 'react'\n\nconst StyledCorner = styled(RadixCorner)\ntype StyledCornerProps = StrictComponentProps<typeof StyledCorner>\n\nexport interface CornerProps extends StyledCornerProps {}\n\nexport const Corner = React.forwardRef<\n ElementRef<typeof StyledCorner>,\n CornerProps\n>((props, forwardRef) => <StyledCorner {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixScrollArea } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollArea = styled(RadixScrollArea, {\n overflow: 'hidden',\n})\nexport type StyledScrollAreaProps = StrictComponentProps<\n typeof StyledScrollArea\n>\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { Viewport } from './partials/viewport'\nimport { Scrollbar } from './partials/scrollbar'\nimport { Thumb } from './partials/thumb'\nimport { Corner } from './partials/corner'\nimport { StyledScrollArea } from './scroll-area.styled'\nimport type { StyledScrollAreaProps } from './scroll-area.styled'\n\nexport interface ScrollAreaProps extends StyledScrollAreaProps {\n children: React.ReactNode\n\n /**\n * Describes the nature of scrollbar visibility, similar to how the scrollbar\n * preferences in MacOS control visibility of native scrollbars. \"auto\" means\n * that scrollbars are visible when content is overflowing on the corresponding\n * orientation. \"always\" means that scrollbars are always visible regardless of\n * whether the content is overflowing. \"scroll\" means that scrollbars are\n * visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is scrolling along its corresponding orientation and\n * when the user is hovering over the scroll area.\n * @default hover\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover'\n\n /**\n * The reading direction of the scroll area. If omitted, inherits globally\n * from DirectionProvider or assumes LTR (left-to-right) reading mode.\n * @default 'ltr'\n */\n dir?: 'ltr' | 'rtl'\n\n /**\n * If type is set to either \"scroll\" or \"hover\", this prop determines the\n * length of time, in milliseconds, before the scrollbars are hidden after the\n * user stops interacting with scrollbars.\n */\n scrollHideDelay?: number\n}\n\nexport const ScrollArea = React.forwardRef<\n ElementRef<typeof StyledScrollArea>,\n ScrollAreaProps\n>((props, forwardRef) => (\n <StyledScrollArea {...props} ref={forwardRef} />\n)) as ForwardRefExoticComponent<ScrollAreaProps> & Partials\n\n// Partials\n// -----------------------------------------------------------------------------\n\nexport interface Partials {\n Viewport: typeof Viewport\n Scrollbar: typeof Scrollbar\n Thumb: typeof Thumb\n Corner: typeof Corner\n}\n\nScrollArea.Viewport = Viewport\nScrollArea.Scrollbar = Scrollbar\nScrollArea.Thumb = Thumb\nScr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["../src/partials/viewport.styled.tsx","../src/partials/viewport.tsx","../src/partials/scrollbar.styled.tsx","../src/partials/scrollbar.tsx","../src/partials/thumb.styled.tsx","../src/partials/thumb.tsx","../src/partials/corner.tsx","../src/scroll-area.styled.tsx","../src/scroll-area.tsx"],"sourcesContent":["import { Viewport as RadixViewport } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledViewport = styled(RadixViewport, {\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n})\n\nexport type StyledViewportProps = StrictComponentProps<typeof StyledViewport>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledViewport } from './viewport.styled'\nimport type { StyledViewportProps } from './viewport.styled'\n\nexport type ViewportProps = StyledViewportProps\n\nexport const Viewport = React.forwardRef<\n ElementRef<typeof StyledViewport>,\n ViewportProps\n>((props, forwardRef) => <StyledViewport {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Scrollbar as RadixScrollbar } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollbar = styled(RadixScrollbar, {\n display: 'flex',\n // ensures no selection\n userSelect: 'none',\n // disable browser handling of all panning and zooming gestures on touch devices\n touchAction: 'none',\n background: 'transparent',\n transition: 'background 160ms ease-out',\n zIndex: '1',\n '&[data-orientation=\"vertical\"]': { width: '$1', minHeight: '$2' },\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: '$1',\n padding: '0 2px',\n },\n})\n\nexport type StyledScrollbarProps = StrictComponentProps<typeof StyledScrollbar>\n","import type { ElementRef } from 'react'\nimport React from 'react'\n\nimport { StyledScrollbar } from './scrollbar.styled'\nimport type { StyledScrollbarProps } from './scrollbar.styled'\n\nexport interface ScrollbarProps extends StyledScrollbarProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The orientation of the scrollbar.\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport const Scrollbar = React.forwardRef<\n ElementRef<typeof StyledScrollbar>,\n ScrollbarProps\n>((props, forwardRef) => <StyledScrollbar {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Thumb as RadixThumb } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledThumb = styled(RadixThumb, {\n flex: 1,\n background: '$background-neutrals-scrollbar',\n borderRadius: '$50',\n position: 'relative',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n minWidth: '$6',\n minHeight: '$6',\n },\n '&:hover': {\n backgroundColor: '$background-neutrals-scrollbar-hover',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonText',\n },\n})\nexport type StyledThumbProps = StrictComponentProps<typeof StyledThumb>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport interface ThumbProps extends StyledThumbProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n ThumbProps\n>((props, forwardRef) => <StyledThumb {...props} ref={forwardRef} />)\n","import React from 'react'\nimport { Corner as RadixCorner } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport type { ElementRef } from 'react'\n\nconst StyledCorner = styled(RadixCorner)\ntype StyledCornerProps = StrictComponentProps<typeof StyledCorner>\n\nexport interface CornerProps extends StyledCornerProps {}\n\nexport const Corner = React.forwardRef<\n ElementRef<typeof StyledCorner>,\n CornerProps\n>((props, forwardRef) => <StyledCorner {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixScrollArea } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollArea = styled(RadixScrollArea, {\n overflow: 'hidden',\n})\nexport type StyledScrollAreaProps = StrictComponentProps<\n typeof StyledScrollArea\n>\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { Viewport } from './partials/viewport'\nimport { Scrollbar } from './partials/scrollbar'\nimport { Thumb } from './partials/thumb'\nimport { Corner } from './partials/corner'\nimport { StyledScrollArea } from './scroll-area.styled'\nimport type { StyledScrollAreaProps } from './scroll-area.styled'\n\nexport interface ScrollAreaProps extends StyledScrollAreaProps {\n children: React.ReactNode\n\n /**\n * Describes the nature of scrollbar visibility, similar to how the scrollbar\n * preferences in MacOS control visibility of native scrollbars. \"auto\" means\n * that scrollbars are visible when content is overflowing on the corresponding\n * orientation. \"always\" means that scrollbars are always visible regardless of\n * whether the content is overflowing. \"scroll\" means that scrollbars are\n * visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is scrolling along its corresponding orientation and\n * when the user is hovering over the scroll area.\n * @default hover\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover'\n\n /**\n * The reading direction of the scroll area. If omitted, inherits globally\n * from DirectionProvider or assumes LTR (left-to-right) reading mode.\n * @default 'ltr'\n */\n dir?: 'ltr' | 'rtl'\n\n /**\n * If type is set to either \"scroll\" or \"hover\", this prop determines the\n * length of time, in milliseconds, before the scrollbars are hidden after the\n * user stops interacting with scrollbars.\n */\n scrollHideDelay?: number\n}\n\nexport const ScrollArea = React.forwardRef<\n ElementRef<typeof StyledScrollArea>,\n ScrollAreaProps\n>((props, forwardRef) => (\n <StyledScrollArea {...props} ref={forwardRef} />\n)) as ForwardRefExoticComponent<ScrollAreaProps> & Partials\n\n// Partials\n// -----------------------------------------------------------------------------\n\nexport interface Partials {\n Viewport: typeof Viewport\n Scrollbar: typeof Scrollbar\n Thumb: typeof Thumb\n Corner: typeof Corner\n}\n\nScrollArea.Viewport = Viewport\nScrollArea.Scrollbar = Scrollbar\nScrollArea.Thumb = Thumb\nScrollArea.Corner = Corner\n"],"names":["RadixViewport","RadixScrollbar","RadixThumb","RadixCorner","RadixScrollArea"],"mappings":";;;;;AAIa,MAAA,cAAA,GAAiB,OAAOA,UAAe,EAAA;AAAA,EAClD,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,SAAW,EAAA,YAAA;AACb,CAAC,CAAA;;ACAM,MAAM,QAAW,GAAA,KAAA,CAAM,UAG5B,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgB,GAAA,CAAA,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACP1D,MAAA,eAAA,GAAkB,OAAOC,WAAgB,EAAA;AAAA,EACpD,OAAS,EAAA,MAAA;AAAA;AAAA,EAET,UAAY,EAAA,MAAA;AAAA;AAAA,EAEZ,WAAa,EAAA,MAAA;AAAA,EACb,UAAY,EAAA,aAAA;AAAA,EACZ,UAAY,EAAA,2BAAA;AAAA,EACZ,MAAQ,EAAA,GAAA;AAAA,EACR,gCAAkC,EAAA,EAAE,KAAO,EAAA,IAAA,EAAM,WAAW,IAAK,EAAA;AAAA,EACjE,kCAAoC,EAAA;AAAA,IAClC,aAAe,EAAA,QAAA;AAAA,IACf,MAAQ,EAAA,IAAA;AAAA,IACR,OAAS,EAAA,OAAA;AAAA,GACX;AACF,CAAC,CAAA;;ACCM,MAAM,SAAY,GAAA,KAAA,CAAM,UAG7B,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgB,GAAA,CAAA,eAAA,EAAA,EAAiB,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACnB3D,MAAA,WAAA,GAAc,OAAOC,OAAY,EAAA;AAAA,EAC5C,IAAM,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A,QAAA,CAAA;AACtB,UAAA,CAAW,SAAY,GAAA,SAAA,CAAA;AACvB,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AACnB,UAAA,CAAW,MAAS,GAAA,MAAA;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/partials/viewport.styled.tsx","../src/partials/viewport.tsx","../src/partials/scrollbar.styled.tsx","../src/partials/scrollbar.tsx","../src/partials/thumb.styled.tsx","../src/partials/thumb.tsx","../src/partials/corner.tsx","../src/scroll-area.styled.tsx","../src/scroll-area.tsx"],"sourcesContent":["import { Viewport as RadixViewport } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledViewport = styled(RadixViewport, {\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n})\n\nexport type StyledViewportProps = StrictComponentProps<typeof StyledViewport>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledViewport } from './viewport.styled'\nimport type { StyledViewportProps } from './viewport.styled'\n\nexport type ViewportProps = StyledViewportProps\n\nexport const Viewport = React.forwardRef<\n ElementRef<typeof StyledViewport>,\n ViewportProps\n>((props, forwardRef) => <StyledViewport {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Scrollbar as RadixScrollbar } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollbar = styled(RadixScrollbar, {\n display: 'flex',\n // ensures no selection\n userSelect: 'none',\n // disable browser handling of all panning and zooming gestures on touch devices\n touchAction: 'none',\n background: 'transparent',\n transition: 'background 160ms ease-out',\n zIndex: '1',\n '&[data-orientation=\"vertical\"]': { width: '$1', minHeight: '$2' },\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: '$1',\n padding: '0 2px',\n },\n})\n\nexport type StyledScrollbarProps = StrictComponentProps<typeof StyledScrollbar>\n","import type { ElementRef } from 'react'\nimport React from 'react'\n\nimport { StyledScrollbar } from './scrollbar.styled'\nimport type { StyledScrollbarProps } from './scrollbar.styled'\n\nexport interface ScrollbarProps extends StyledScrollbarProps {\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The orientation of the scrollbar.\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport const Scrollbar = React.forwardRef<\n ElementRef<typeof StyledScrollbar>,\n ScrollbarProps\n>((props, forwardRef) => <StyledScrollbar {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Thumb as RadixThumb } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledThumb = styled(RadixThumb, {\n flex: 1,\n background: '$background-neutrals-scrollbar',\n borderRadius: '$50',\n position: 'relative',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n minWidth: '$6',\n minHeight: '$6',\n },\n '&:hover': {\n backgroundColor: '$background-neutrals-scrollbar-hover',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonText',\n },\n})\nexport type StyledThumbProps = StrictComponentProps<typeof StyledThumb>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport interface ThumbProps extends StyledThumbProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n ThumbProps\n>((props, forwardRef) => <StyledThumb {...props} ref={forwardRef} />)\n","import React from 'react'\nimport { Corner as RadixCorner } from '@radix-ui/react-scroll-area'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport type { ElementRef } from 'react'\n\nconst StyledCorner = styled(RadixCorner)\ntype StyledCornerProps = StrictComponentProps<typeof StyledCorner>\n\nexport interface CornerProps extends StyledCornerProps {}\n\nexport const Corner = React.forwardRef<\n ElementRef<typeof StyledCorner>,\n CornerProps\n>((props, forwardRef) => <StyledCorner {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixScrollArea } from '@radix-ui/react-scroll-area'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledScrollArea = styled(RadixScrollArea, {\n overflow: 'hidden',\n})\nexport type StyledScrollAreaProps = StrictComponentProps<\n typeof StyledScrollArea\n>\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { Viewport } from './partials/viewport'\nimport { Scrollbar } from './partials/scrollbar'\nimport { Thumb } from './partials/thumb'\nimport { Corner } from './partials/corner'\nimport { StyledScrollArea } from './scroll-area.styled'\nimport type { StyledScrollAreaProps } from './scroll-area.styled'\n\nexport interface ScrollAreaProps extends StyledScrollAreaProps {\n children: React.ReactNode\n\n /**\n * Describes the nature of scrollbar visibility, similar to how the scrollbar\n * preferences in MacOS control visibility of native scrollbars. \"auto\" means\n * that scrollbars are visible when content is overflowing on the corresponding\n * orientation. \"always\" means that scrollbars are always visible regardless of\n * whether the content is overflowing. \"scroll\" means that scrollbars are\n * visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is scrolling along its corresponding orientation and\n * when the user is hovering over the scroll area.\n * @default hover\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover'\n\n /**\n * The reading direction of the scroll area. If omitted, inherits globally\n * from DirectionProvider or assumes LTR (left-to-right) reading mode.\n * @default 'ltr'\n */\n dir?: 'ltr' | 'rtl'\n\n /**\n * If type is set to either \"scroll\" or \"hover\", this prop determines the\n * length of time, in milliseconds, before the scrollbars are hidden after the\n * user stops interacting with scrollbars.\n */\n scrollHideDelay?: number\n}\n\nexport const ScrollArea = React.forwardRef<\n ElementRef<typeof StyledScrollArea>,\n ScrollAreaProps\n>((props, forwardRef) => (\n <StyledScrollArea {...props} ref={forwardRef} />\n)) as ForwardRefExoticComponent<ScrollAreaProps> & Partials\n\n// Partials\n// -----------------------------------------------------------------------------\n\nexport interface Partials {\n Viewport: typeof Viewport\n Scrollbar: typeof Scrollbar\n Thumb: typeof Thumb\n Corner: typeof Corner\n}\n\nScrollArea.Viewport = Viewport\nScrollArea.Scrollbar = Scrollbar\nScrollArea.Thumb = Thumb\nScrollArea.Corner = Corner\n"],"names":["RadixViewport","RadixScrollbar","RadixThumb","RadixCorner","RadixScrollArea"],"mappings":";;;;;AAIO,MAAM,cAAA,GAAiB,OAAOA,UAAA,EAAe;AAAA,EAClD,KAAA,EAAO,MAAA;AAAA,EACP,MAAA,EAAQ,MAAA;AAAA,EACR,SAAA,EAAW;AACb,CAAC,CAAA;;ACAM,MAAM,QAAA,GAAW,KAAA,CAAM,UAAA,CAG5B,CAAC,KAAA,EAAO,UAAA,qBAAe,GAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,GAAA,EAAK,UAAA,EAAY,CAAE,CAAA;;ACPhE,MAAM,eAAA,GAAkB,OAAOC,WAAA,EAAgB;AAAA,EACpD,OAAA,EAAS,MAAA;AAAA;AAAA,EAET,UAAA,EAAY,MAAA;AAAA;AAAA,EAEZ,WAAA,EAAa,MAAA;AAAA,EACb,UAAA,EAAY,aAAA;AAAA,EACZ,UAAA,EAAY,2BAAA;AAAA,EACZ,MAAA,EAAQ,GAAA;AAAA,EACR,gCAAA,EAAkC,EAAE,KAAA,EAAO,IAAA,EAAM,WAAW,IAAA,EAAK;AAAA,EACjE,kCAAA,EAAoC;AAAA,IAClC,aAAA,EAAe,QAAA;AAAA,IACf,MAAA,EAAQ,IAAA;AAAA,IACR,OAAA,EAAS;AAAA;AAEb,CAAC,CAAA;;ACCM,MAAM,SAAA,GAAY,KAAA,CAAM,UAAA,CAG7B,CAAC,KAAA,EAAO,UAAA,qBAAe,G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A,CAAC,gBAAA,EAAA,EAAkB,GAAG,KAAA,EAAO,GAAA,EAAK,UAAA,EAAY,CAC/C;AAYD,UAAA,CAAW,QAAA,GAAW,QAAA;AACtB,UAAA,CAAW,SAAA,GAAY,SAAA;AACvB,UAAA,CAAW,KAAA,GAAQ,KAAA;AACnB,UAAA,CAAW,MAAA,GAAS,MAAA;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,17 +1,36 @@
1
- import * as react from 'react';
2
- import react__default, { ForwardRefExoticComponent } from 'react';
3
- import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
1
+ import * as React from 'react';
2
+ import React__default, { ForwardRefExoticComponent } from 'react';
4
3
  import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
5
4
  import { StrictComponentProps } from '@mirohq/design-system-stitches';
6
5
  import * as _radix_ui_react_scroll_area from '@radix-ui/react-scroll-area';
7
6
 
8
- declare const StyledViewport: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaViewportProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaViewportProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
7
+ /* Utilities */
8
+ /* ========================================================================== */
9
+
10
+ /** Returns a string with the given prefix followed by the given values. */
11
+ type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
12
+
13
+ type TransformProps<Props, Media> = {
14
+ [K in keyof Props]: (
15
+ | Props[K]
16
+ | (
17
+ & {
18
+ [KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
19
+ }
20
+ & {
21
+ [KMedia in string]: Props[K]
22
+ }
23
+ )
24
+ )
25
+ }
26
+
27
+ declare const StyledViewport: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>>, {}, {}>;
9
28
  type StyledViewportProps = StrictComponentProps<typeof StyledViewport>;
10
29
 
11
30
  type ViewportProps = StyledViewportProps;
12
- declare const Viewport: react__default.ForwardRefExoticComponent<Omit<StyledViewportProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
31
+ declare const Viewport: React__default.ForwardRefExoticComponent<Omit<StyledViewportProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
13
32
 
14
- declare const StyledScrollbar: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaScrollbarProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaScrollbarProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
33
+ declare const StyledScrollbar: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>>, {}, {}>;
15
34
  type StyledScrollbarProps = StrictComponentProps<typeof StyledScrollbar>;
16
35
 
17
36
  interface ScrollbarProps extends StyledScrollbarProps {
@@ -26,9 +45,9 @@ interface ScrollbarProps extends StyledScrollbarProps {
26
45
  */
27
46
  orientation?: 'horizontal' | 'vertical';
28
47
  }
29
- declare const Scrollbar: react__default.ForwardRefExoticComponent<Omit<ScrollbarProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
48
+ declare const Scrollbar: React__default.ForwardRefExoticComponent<Omit<ScrollbarProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
30
49
 
31
- declare const StyledThumb: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaThumbProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaThumbProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
50
+ declare const StyledThumb: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaThumbProps & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaThumbProps & React.RefAttributes<HTMLDivElement>>, {}, {}>;
32
51
  type StyledThumbProps = StrictComponentProps<typeof StyledThumb>;
33
52
 
34
53
  interface ThumbProps extends StyledThumbProps {
@@ -38,19 +57,19 @@ interface ThumbProps extends StyledThumbProps {
38
57
  */
39
58
  forceMount?: true;
40
59
  }
41
- declare const Thumb: react__default.ForwardRefExoticComponent<Omit<ThumbProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
60
+ declare const Thumb: React__default.ForwardRefExoticComponent<Omit<ThumbProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
42
61
 
43
- declare const StyledCorner: react__default.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react__default.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaCornerProps & react__default.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react__default.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react__default.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaCornerProps & react__default.RefAttributes<HTMLDivElement>>, {}, {}>;
62
+ declare const StyledCorner: React__default.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React__default.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaCornerProps & React__default.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React__default.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React__default.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaCornerProps & React__default.RefAttributes<HTMLDivElement>>, {}, {}>;
44
63
  type StyledCornerProps = StrictComponentProps<typeof StyledCorner>;
45
64
  interface CornerProps extends StyledCornerProps {
46
65
  }
47
- declare const Corner: react__default.ForwardRefExoticComponent<Omit<CornerProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
66
+ declare const Corner: React__default.ForwardRefExoticComponent<Omit<CornerProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
48
67
 
49
- declare const StyledScrollArea: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
68
+ declare const StyledScrollArea: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaProps & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_radix_ui_react_scroll_area.ScrollAreaProps & React.RefAttributes<HTMLDivElement>>, {}, {}>;
50
69
  type StyledScrollAreaProps = StrictComponentProps<typeof StyledScrollArea>;
51
70
 
52
71
  interface ScrollAreaProps extends StyledScrollAreaProps {
53
- children: react__default.ReactNode;
72
+ children: React__default.ReactNode;
54
73
  /**
55
74
  * Describes the nature of scrollbar visibility, similar to how the scrollbar
56
75
  * preferences in MacOS control visibility of native scrollbars. "auto" means
@@ -84,4 +103,5 @@ interface Partials {
84
103
  Corner: typeof Corner;
85
104
  }
86
105
 
87
- export { ScrollArea, CornerProps as ScrollAreaCornerProps, ScrollAreaProps, ScrollbarProps as ScrollAreaScrollbarProps, ThumbProps as ScrollAreaThumbProps, ViewportProps as ScrollAreaViewportProps };
106
+ export { ScrollArea };
107
+ export type { CornerProps as ScrollAreaCornerProps, ScrollAreaProps, ScrollbarProps as ScrollAreaScrollbarProps, ThumbProps as ScrollAreaThumbProps, ViewportProps as ScrollAreaViewportProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-scroll-area",
3
- "version": "1.1.2",
3
+ "version": "1.2.0-fix-stitches-types.1",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@radix-ui/react-scroll-area": "^1.0.4",
30
- "@mirohq/design-system-stitches": "^3.1.2"
30
+ "@mirohq/design-system-stitches": "^3.2.0-fix-stitches-types.1"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "rollup -c ../../../rollup.config.js",