@mirohq/design-system-base-switch 1.1.2-dummy.0 → 1.2.0-fix-stitches-types.0
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 +1 -7
- package/dist/main.js.map +1 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +21 -2
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var designSystemPrimitive = require('@mirohq/design-system-primitive');
|
|
6
4
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
7
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
6
|
var React = require('react');
|
|
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 TRANSITION_TIME = "100ms";
|
|
15
9
|
const StyledThumb = designSystemStitches.styled(designSystemPrimitive.Primitive.span, {
|
|
16
10
|
display: "block",
|
|
@@ -95,7 +89,7 @@ const styles = {
|
|
|
95
89
|
}
|
|
96
90
|
};
|
|
97
91
|
|
|
98
|
-
const Thumb =
|
|
92
|
+
const Thumb = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledThumbWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(StyledThumb, { ref: forwardRef, ...props }) }));
|
|
99
93
|
|
|
100
94
|
exports.Thumb = Thumb;
|
|
101
95
|
exports.styles = styles;
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/thumb.styled.tsx","../src/switch-styles.ts","../src/thumb.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const TRANSITION_TIME = '100ms'\n\nexport const StyledThumb = styled(Primitive.span, {\n display: 'block',\n backgroundColor: '$background-neutrals',\n borderRadius: '$round',\n width: '100%',\n height: '100%',\n})\n\nexport const StyledThumbWrapper = styled(Primitive.span, {\n display: 'block',\n width: '50%',\n height: '100%',\n transition: `transform ${TRANSITION_TIME}, padding ${TRANSITION_TIME}`,\n willChange: 'transform',\n boxSizing: 'border-box',\n padding: 1,\n})\n\nexport type StyledThumbProps = ComponentPropsWithRef<typeof StyledThumb>\n","import {\n StyledThumb,\n StyledThumbWrapper,\n TRANSITION_TIME,\n} from './thumb.styled'\n\nexport const styles = {\n default: {\n all: 'unset',\n boxSizing: 'border-box',\n backgroundColor: '$background-neutrals-inactive',\n borderRadius: '$round',\n display: 'inline-flex',\n padding: 2,\n transition: `background ${TRANSITION_TIME}`,\n\n '@media (forced-colors: active)': {\n border: '1px solid ButtonText',\n padding: 1,\n backgroundColor: 'ButtonFace',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'ButtonFace',\n border: '1px solid ButtonText',\n margin: -1,\n },\n },\n },\n checked: {\n background: '$background-primary-prominent-selected',\n\n [`& ${StyledThumbWrapper}`]: {\n transform: 'translateX(100%)',\n },\n [`[dir=\"rtl\"] & ${StyledThumbWrapper}`]: {\n transform: 'translateX(-100%)',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n borderColor: 'Highlight',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'Highlight',\n },\n },\n },\n hovered: {\n backgroundColor: '$background-neutrals-inactive-hover',\n\n [`& ${StyledThumbWrapper}`]: {\n padding: 0,\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n },\n },\n checkedHovered: {\n background: '$background-primary-prominent-hover',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n },\n disabled: {\n cursor: 'default',\n background: '$background-neutrals-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$icon-neutrals-disabled',\n },\n\n '@media (forced-colors: active)': {\n borderColor: 'GrayText',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'GrayText',\n },\n },\n },\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb, StyledThumbWrapper } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n StyledThumbProps\n>((props, forwardRef) => (\n <StyledThumbWrapper>\n <StyledThumb ref={forwardRef} {...props} />\n </StyledThumbWrapper>\n))\n"],"names":["styled","Primitive","
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/thumb.styled.tsx","../src/switch-styles.ts","../src/thumb.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const TRANSITION_TIME = '100ms'\n\nexport const StyledThumb = styled(Primitive.span, {\n display: 'block',\n backgroundColor: '$background-neutrals',\n borderRadius: '$round',\n width: '100%',\n height: '100%',\n})\n\nexport const StyledThumbWrapper = styled(Primitive.span, {\n display: 'block',\n width: '50%',\n height: '100%',\n transition: `transform ${TRANSITION_TIME}, padding ${TRANSITION_TIME}`,\n willChange: 'transform',\n boxSizing: 'border-box',\n padding: 1,\n})\n\nexport type StyledThumbProps = ComponentPropsWithRef<typeof StyledThumb>\n","import {\n StyledThumb,\n StyledThumbWrapper,\n TRANSITION_TIME,\n} from './thumb.styled'\n\nexport const styles = {\n default: {\n all: 'unset',\n boxSizing: 'border-box',\n backgroundColor: '$background-neutrals-inactive',\n borderRadius: '$round',\n display: 'inline-flex',\n padding: 2,\n transition: `background ${TRANSITION_TIME}`,\n\n '@media (forced-colors: active)': {\n border: '1px solid ButtonText',\n padding: 1,\n backgroundColor: 'ButtonFace',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'ButtonFace',\n border: '1px solid ButtonText',\n margin: -1,\n },\n },\n },\n checked: {\n background: '$background-primary-prominent-selected',\n\n [`& ${StyledThumbWrapper}`]: {\n transform: 'translateX(100%)',\n },\n [`[dir=\"rtl\"] & ${StyledThumbWrapper}`]: {\n transform: 'translateX(-100%)',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n borderColor: 'Highlight',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'Highlight',\n },\n },\n },\n hovered: {\n backgroundColor: '$background-neutrals-inactive-hover',\n\n [`& ${StyledThumbWrapper}`]: {\n padding: 0,\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n },\n },\n checkedHovered: {\n background: '$background-primary-prominent-hover',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n },\n disabled: {\n cursor: 'default',\n background: '$background-neutrals-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$icon-neutrals-disabled',\n },\n\n '@media (forced-colors: active)': {\n borderColor: 'GrayText',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'GrayText',\n },\n },\n },\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb, StyledThumbWrapper } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n StyledThumbProps\n>((props, forwardRef) => (\n <StyledThumbWrapper>\n <StyledThumb ref={forwardRef} {...props} />\n </StyledThumbWrapper>\n))\n"],"names":["styled","Primitive","jsx"],"mappings":";;;;;;;AAIO,MAAM,eAAA,GAAkB,OAAA;AAExB,MAAM,WAAA,GAAcA,2BAAA,CAAOC,+BAAA,CAAU,IAAA,EAAM;AAAA,EAChD,OAAA,EAAS,OAAA;AAAA,EACT,eAAA,EAAiB,sBAAA;AAAA,EACjB,YAAA,EAAc,QAAA;AAAA,EACd,KAAA,EAAO,MAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAC,CAA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A;AAAA,MACjB,WAAA,EAAa,WAAA;AAAA,MAEb,CAAC,IAAA,CAAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAA,EAAa;AAAA;AACf;AACF,GACF;AAAA,EACA,OAAA,EAAS;AAAA,IACP,eAAA,EAAiB,qCAAA;AAAA,IAEjB,CAAC,IAAA,CAAK,MAAA,CAAA,kBAAA,CAAoB,GAAG;AAAA,MAC3B,OAAA,EAAS;AAAA,KACX;AAAA,IAEA,gCAAA,EAAkC;AAAA,MAChC,eAAA,EAAiB;AAAA;AACnB,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,UAAA,EAAY,qCAAA;AAAA,IAEZ,gCAAA,EAAkC;AAAA,MAChC,eAAA,EAAiB;AAAA;AACnB,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,SAAA;AAAA,IACR,UAAA,EAAY,+BAAA;AAAA,IAEZ,CAAC,IAAA,CAAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,MACpB,UAAA,EAAY;AAAA,KACd;AAAA,IAEA,gCAAA,EAAkC;AAAA,MAChC,WAAA,EAAa,UAAA;AAAA,MAEb,CAAC,IAAA,CAAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAA,EAAa;AAAA;AACf;AACF;AAEJ;;AC3EO,MAAM,KAAA,GAAQ,KAAA,CAAM,UAAA,CAGzB,CAAC,OAAO,UAAA,qBACRC,cAAA,CAAC,kBAAA,EAAA,EACC,QAAA,kBAAAA,cAAA,CAAC,eAAY,GAAA,EAAK,UAAA,EAAa,GAAG,KAAA,EAAO,GAC3C,CACD;;;;;"}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/thumb.styled.tsx","../src/switch-styles.ts","../src/thumb.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const TRANSITION_TIME = '100ms'\n\nexport const StyledThumb = styled(Primitive.span, {\n display: 'block',\n backgroundColor: '$background-neutrals',\n borderRadius: '$round',\n width: '100%',\n height: '100%',\n})\n\nexport const StyledThumbWrapper = styled(Primitive.span, {\n display: 'block',\n width: '50%',\n height: '100%',\n transition: `transform ${TRANSITION_TIME}, padding ${TRANSITION_TIME}`,\n willChange: 'transform',\n boxSizing: 'border-box',\n padding: 1,\n})\n\nexport type StyledThumbProps = ComponentPropsWithRef<typeof StyledThumb>\n","import {\n StyledThumb,\n StyledThumbWrapper,\n TRANSITION_TIME,\n} from './thumb.styled'\n\nexport const styles = {\n default: {\n all: 'unset',\n boxSizing: 'border-box',\n backgroundColor: '$background-neutrals-inactive',\n borderRadius: '$round',\n display: 'inline-flex',\n padding: 2,\n transition: `background ${TRANSITION_TIME}`,\n\n '@media (forced-colors: active)': {\n border: '1px solid ButtonText',\n padding: 1,\n backgroundColor: 'ButtonFace',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'ButtonFace',\n border: '1px solid ButtonText',\n margin: -1,\n },\n },\n },\n checked: {\n background: '$background-primary-prominent-selected',\n\n [`& ${StyledThumbWrapper}`]: {\n transform: 'translateX(100%)',\n },\n [`[dir=\"rtl\"] & ${StyledThumbWrapper}`]: {\n transform: 'translateX(-100%)',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n borderColor: 'Highlight',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'Highlight',\n },\n },\n },\n hovered: {\n backgroundColor: '$background-neutrals-inactive-hover',\n\n [`& ${StyledThumbWrapper}`]: {\n padding: 0,\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n },\n },\n checkedHovered: {\n background: '$background-primary-prominent-hover',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n },\n disabled: {\n cursor: 'default',\n background: '$background-neutrals-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$icon-neutrals-disabled',\n },\n\n '@media (forced-colors: active)': {\n borderColor: 'GrayText',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'GrayText',\n },\n },\n },\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb, StyledThumbWrapper } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n StyledThumbProps\n>((props, forwardRef) => (\n <StyledThumbWrapper>\n <StyledThumb ref={forwardRef} {...props} />\n </StyledThumbWrapper>\n))\n"],"names":[],"mappings":";;;;;AAIO,MAAM,
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/thumb.styled.tsx","../src/switch-styles.ts","../src/thumb.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const TRANSITION_TIME = '100ms'\n\nexport const StyledThumb = styled(Primitive.span, {\n display: 'block',\n backgroundColor: '$background-neutrals',\n borderRadius: '$round',\n width: '100%',\n height: '100%',\n})\n\nexport const StyledThumbWrapper = styled(Primitive.span, {\n display: 'block',\n width: '50%',\n height: '100%',\n transition: `transform ${TRANSITION_TIME}, padding ${TRANSITION_TIME}`,\n willChange: 'transform',\n boxSizing: 'border-box',\n padding: 1,\n})\n\nexport type StyledThumbProps = ComponentPropsWithRef<typeof StyledThumb>\n","import {\n StyledThumb,\n StyledThumbWrapper,\n TRANSITION_TIME,\n} from './thumb.styled'\n\nexport const styles = {\n default: {\n all: 'unset',\n boxSizing: 'border-box',\n backgroundColor: '$background-neutrals-inactive',\n borderRadius: '$round',\n display: 'inline-flex',\n padding: 2,\n transition: `background ${TRANSITION_TIME}`,\n\n '@media (forced-colors: active)': {\n border: '1px solid ButtonText',\n padding: 1,\n backgroundColor: 'ButtonFace',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'ButtonFace',\n border: '1px solid ButtonText',\n margin: -1,\n },\n },\n },\n checked: {\n background: '$background-primary-prominent-selected',\n\n [`& ${StyledThumbWrapper}`]: {\n transform: 'translateX(100%)',\n },\n [`[dir=\"rtl\"] & ${StyledThumbWrapper}`]: {\n transform: 'translateX(-100%)',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n borderColor: 'Highlight',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'Highlight',\n },\n },\n },\n hovered: {\n backgroundColor: '$background-neutrals-inactive-hover',\n\n [`& ${StyledThumbWrapper}`]: {\n padding: 0,\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n },\n },\n checkedHovered: {\n background: '$background-primary-prominent-hover',\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n },\n disabled: {\n cursor: 'default',\n background: '$background-neutrals-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$icon-neutrals-disabled',\n },\n\n '@media (forced-colors: active)': {\n borderColor: 'GrayText',\n\n [`& ${StyledThumb}`]: {\n borderColor: 'GrayText',\n },\n },\n },\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledThumb, StyledThumbWrapper } from './thumb.styled'\nimport type { StyledThumbProps } from './thumb.styled'\n\nexport const Thumb = React.forwardRef<\n ElementRef<typeof StyledThumb>,\n StyledThumbProps\n>((props, forwardRef) => (\n <StyledThumbWrapper>\n <StyledThumb ref={forwardRef} {...props} />\n </StyledThumbWrapper>\n))\n"],"names":[],"mappings":";;;;;AAIO,MAAM,eAAA,GAAkB,OAAA;AAExB,MAAM,WAAA,GAAc,MAAA,CAAO,SAAA,CAAU,IAAA,EAAM;AAAA,EAChD,OAAA,EAAS,OAAA;AAAA,EACT,eAAA,EAAiB,sBAAA;AAAA,EACjB,YAAA,EAAc,QAAA;AAAA,EACd,KAAA,EAAO,MAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAC,CAAA;AAEM,MAAM,kBAAA,GAAqB,MAAA,CAAO,SAAA,CAAU,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AAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAA,EAAa;AAAA;AACf;AACF,GACF;AAAA,EACA,OAAA,EAAS;AAAA,IACP,eAAA,EAAiB,qCAAA;AAAA,IAEjB,CAAC,IAAA,CAAK,MAAA,CAAA,kBAAA,CAAoB,GAAG;AAAA,MAC3B,OAAA,EAAS;AAAA,KACX;AAAA,IAEA,gCAAA,EAAkC;AAAA,MAChC,eAAA,EAAiB;AAAA;AACnB,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,UAAA,EAAY,qCAAA;AAAA,IAEZ,gCAAA,EAAkC;AAAA,MAChC,eAAA,EAAiB;AAAA;AACnB,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,SAAA;AAAA,IACR,UAAA,EAAY,+BAAA;AAAA,IAEZ,CAAC,IAAA,CAAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,MACpB,UAAA,EAAY;AAAA,KACd;AAAA,IAEA,gCAAA,EAAkC;AAAA,MAChC,WAAA,EAAa,UAAA;AAAA,MAEb,CAAC,IAAA,CAAK,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAA,EAAa;AAAA;AACf;AACF;AAEJ;;AC3EO,MAAM,KAAA,GAAQ,KAAA,CAAM,UAAA,CAGzB,CAAC,OAAO,UAAA,qBACR,GAAA,CAAC,kBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,eAAY,GAAA,EAAK,UAAA,EAAa,GAAG,KAAA,EAAO,GAC3C,CACD;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
2
1
|
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
3
2
|
import * as _mirohq_design_system_components_primitive from '@mirohq/design-system-components/primitive';
|
|
4
3
|
import React from 'react';
|
|
@@ -86,7 +85,27 @@ declare const styles: {
|
|
|
86
85
|
};
|
|
87
86
|
};
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
/* Utilities */
|
|
89
|
+
/* ========================================================================== */
|
|
90
|
+
|
|
91
|
+
/** Returns a string with the given prefix followed by the given values. */
|
|
92
|
+
type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
|
|
93
|
+
|
|
94
|
+
type TransformProps<Props, Media> = {
|
|
95
|
+
[K in keyof Props]: (
|
|
96
|
+
| Props[K]
|
|
97
|
+
| (
|
|
98
|
+
& {
|
|
99
|
+
[KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
|
|
100
|
+
}
|
|
101
|
+
& {
|
|
102
|
+
[KMedia in string]: Props[K]
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_components_primitive.PrimitiveProps<"span">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
90
109
|
ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
91
110
|
}, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
92
111
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-base-switch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-fix-stitches-types.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"react": "^16.14 || ^17 || ^18 || ^19"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@mirohq/design-system-primitive": "^2.
|
|
30
|
-
"@mirohq/design-system-stitches": "^3.
|
|
29
|
+
"@mirohq/design-system-primitive": "^2.2.0-fix-stitches-types.0",
|
|
30
|
+
"@mirohq/design-system-stitches": "^3.2.0-fix-stitches-types.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "rollup -c ../../../../rollup.config.js",
|