@mirohq/design-system-base-switch 0.1.23 → 0.1.24

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
@@ -15,7 +15,7 @@ const TRANSITION_TIME = "100ms";
15
15
  const StyledThumb = designSystemStitches.styled(designSystemPrimitive.Primitive.span, {
16
16
  display: "block",
17
17
  backgroundColor: "$background-neutrals",
18
- borderRadius: "$half",
18
+ borderRadius: "$round",
19
19
  width: "100%",
20
20
  height: "100%"
21
21
  });
@@ -34,7 +34,7 @@ const styles = {
34
34
  all: "unset",
35
35
  boxSizing: "border-box",
36
36
  backgroundColor: "$background-neutrals-inactive",
37
- borderRadius: "$half",
37
+ borderRadius: "$round",
38
38
  display: "inline-flex",
39
39
  padding: 2,
40
40
  transition: "background ".concat(TRANSITION_TIME),
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: '$half',\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: '$half',\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\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-controls-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$background-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","React","jsx"],"mappings":";;;;;;;;;;;;;AAIO,MAAM,eAAkB,GAAA,OAAA,CAAA;AAElB,MAAA,WAAA,GAAcA,2BAAO,CAAAC,+BAAA,CAAU,IAAM,EAAA;AAAA,EAChD,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,sBAAA;AAAA,EAC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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\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-controls-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$background-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","React","jsx"],"mappings":";;;;;;;;;;;;;AAIO,MAAM,eAAkB,GAAA,OAAA,CAAA;AAElB,MAAA,WAAA,GAAcA,2BAAO,CAAAC,+BAAA,CAAU,IAAM,EAAA;AAAA,EAChD,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,sBAAA;AAAA,EACjB,YAAc,EAAA,QAAA;AAAA,EACd,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AACV,CAAC,CAAA,CAAA;AAEY,MAAA,kBAAA,GAAqBD,2BAAO,CAAAC,+BAAA,CAAU,IAAM,EAAA;AAAA,EACvD,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,KAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,UAAA,EAAY,YAAa,CAAA,MAAA,CAAA,eAAA,EAAe,YAAa,CAAA,CAAA,MAAA,CAAA,eAAA,CAAA;AAAA,EACrD,UAAY,EAAA,WAAA;AAAA,EACZ,SAAW,EAAA,YAAA;AAAA,EACX,OAAS,EAAA,CAAA;AACX,CAAC,CAAA;;AChBM,MAAM,MAAS,GAAA;AAAA,EACpB,OAAS,EAAA;AAAA,IACP,GAAK,EAAA,OAAA;AAAA,IACL,SAAW,EAAA,YAAA;AAAA,IACX,eAAiB,EAAA,+BAAA;AAAA,IACjB,YAAc,EAAA,QAAA;AAAA,IACd,OA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CAAA;AAAA,IAEZ,CAAC,IAAK,CAAA,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,MACpB,UAAY,EAAA,+BAAA;AAAA,KACd;AAAA,IAEA,gCAAkC,EAAA;AAAA,MAChC,WAAa,EAAA,UAAA;AAAA,MAEb,CAAC,IAAK,CAAA,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAa,EAAA,UAAA;AAAA,OACf;AAAA,KACF;AAAA,GACF;AACF;;ACxEO,MAAM,KAAQ,GAAAC,yBAAA,CAAM,UAGzB,CAAA,CAAC,OAAO,UACR,qBAAAC,cAAA,CAAC,kBACC,EAAA,EAAA,QAAA,kBAAAA,cAAA,CAAC,eAAY,GAAK,EAAA,UAAA,EAAa,GAAG,KAAA,EAAO,GAC3C,CACD;;;;;"}
package/dist/module.js CHANGED
@@ -7,7 +7,7 @@ const TRANSITION_TIME = "100ms";
7
7
  const StyledThumb = styled(Primitive.span, {
8
8
  display: "block",
9
9
  backgroundColor: "$background-neutrals",
10
- borderRadius: "$half",
10
+ borderRadius: "$round",
11
11
  width: "100%",
12
12
  height: "100%"
13
13
  });
@@ -26,7 +26,7 @@ const styles = {
26
26
  all: "unset",
27
27
  boxSizing: "border-box",
28
28
  backgroundColor: "$background-neutrals-inactive",
29
- borderRadius: "$half",
29
+ borderRadius: "$round",
30
30
  display: "inline-flex",
31
31
  padding: 2,
32
32
  transition: "background ".concat(TRANSITION_TIME),
@@ -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: '$half',\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: '$half',\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\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-controls-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$background-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,eAAkB,GAAA,OAAA,CAAA;AAElB,MAAA,WAAA,GAAc,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EAChD,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,sBAAA;AAAA,EACjB,YAAc,EAAA,OAAA;AAAA,EACd,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AACV,CAAC,CAAA,CAAA;AAEY,MAAA,kBAAA,GAAqB,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EACvD,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,KAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,UAAA,EAAY,YAAa,CAAA,MAAA,CAAA,eAAA,EAAe,YAAa,CAAA,CAAA,MAAA,CAAA,eAAA,CAAA;AAAA,EACrD,UAAY,EAAA,WAAA;AAAA,EACZ,SAAW,EAAA,YAAA;AAAA,EACX,OAAS,EAAA,CAAA;AACX,CAAC,CAAA;;AChBM,MAAM,MAAS,GAAA;AAAA,EACpB,OAAS,EAAA;AAAA,IACP,GAAK,EAAA,OAAA;AAAA,IACL,SAAW,EAAA,YAAA;AAAA,IACX,eAAiB,EAAA,+BAAA;AAAA,IACjB,YAAc,EAAA,OAAA;AAAA,IACd,OAAS,EAAA,aAAA;AAAA,IACT,OAAS,EAAA,CAAA;AAAA,IACT,YAAY,aAAc,CAAA,MAAA,CAAA,eAAA,CAAA;AAAA,IAE1B,gCAAkC,EAAA;AAAA,MAChC,MAAQ,EAAA,sBAAA;AAAA,MACR,OAAS,EAAA,CAAA;AAAA,MACT,eAAiB,EAAA,YAAA;AAAA,MAEjB,CAAC,IAAK,CAAA,MAAA,CAAA,WAAA,CAAa,GAAG;A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AAA,GACF;AACF;;ACxEO,MAAM,KAAQ,GAAA,KAAA,CAAM,UAGzB,CAAA,CAAC,OAAO,UACR,qBAAA,GAAA,CAAC,kBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,eAAY,GAAK,EAAA,UAAA,EAAa,GAAG,KAAA,EAAO,GAC3C,CACD;;;;"}
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\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-controls-disabled',\n\n [`& ${StyledThumb}`]: {\n background: '$background-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,eAAkB,GAAA,OAAA,CAAA;AAElB,MAAA,WAAA,GAAc,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EAChD,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,sBAAA;AAAA,EACjB,YAAc,EAAA,QAAA;AAAA,EACd,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AACV,CAAC,CAAA,CAAA;AAEY,MAAA,kBAAA,GAAqB,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EACvD,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,KAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,UAAA,EAAY,YAAa,CAAA,MAAA,CAAA,eAAA,EAAe,YAAa,CAAA,CAAA,MAAA,CAAA,eAAA,CAAA;AAAA,EACrD,UAAY,EAAA,W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,MAChC,eAAiB,EAAA,YAAA;AAAA,KACnB;AAAA,GACF;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,UAAY,EAAA,qCAAA;AAAA,IAEZ,gCAAkC,EAAA;AAAA,MAChC,eAAiB,EAAA,WAAA;AAAA,KACnB;AAAA,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,MAAQ,EAAA,SAAA;AAAA,IACR,UAAY,EAAA,wCAAA;AAAA,IAEZ,CAAC,IAAK,CAAA,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,MACpB,UAAY,EAAA,+BAAA;AAAA,KACd;AAAA,IAEA,gCAAkC,EAAA;AAAA,MAChC,WAAa,EAAA,UAAA;AAAA,MAEb,CAAC,IAAK,CAAA,MAAA,CAAA,WAAA,CAAa,GAAG;AAAA,QACpB,WAAa,EAAA,UAAA;AAAA,OACf;AAAA,KACF;AAAA,GACF;AACF;;ACxEO,MAAM,KAAQ,GAAA,KAAA,CAAM,UAGzB,CAAA,CAAC,OAAO,UACR,qBAAA,GAAA,CAAC,kBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,eAAY,GAAK,EAAA,UAAA,EAAa,GAAG,KAAA,EAAO,GAC3C,CACD;;;;"}
package/dist/types.d.ts CHANGED
@@ -338,17 +338,17 @@ declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<_mirohq_desi
338
338
  readonly body: "Open Sans, sans-serif";
339
339
  };
340
340
  radii: {
341
+ readonly 0: "0px";
341
342
  readonly 25: "2px";
342
343
  readonly 50: "4px";
343
344
  readonly 75: "6px";
344
345
  readonly 100: "8px";
345
346
  readonly 200: "16px";
346
- readonly half: "999px";
347
- readonly none: "0px";
347
+ readonly round: "999px";
348
348
  };
349
349
  shadows: {
350
- 50: any;
351
350
  100: any;
351
+ 50: any;
352
352
  "focus-small": any;
353
353
  "focus-small-outline": any;
354
354
  "focus-large": any;
@@ -378,48 +378,6 @@ declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<_mirohq_desi
378
378
  readonly 1200: "96px";
379
379
  readonly 1600: "128px";
380
380
  };
381
- 'space-gap': {
382
- readonly 0: any;
383
- readonly 50: any;
384
- readonly 100: any;
385
- readonly 200: any;
386
- readonly 300: any;
387
- };
388
- 'space-inset': {
389
- readonly 0: any;
390
- readonly 50: any;
391
- readonly 100: any;
392
- readonly 150: any;
393
- readonly 200: any;
394
- readonly 300: any;
395
- readonly 400: any;
396
- readonly 500: any;
397
- readonly 600: any;
398
- readonly 700: any;
399
- readonly 800: any;
400
- readonly 1200: any;
401
- readonly 1600: any;
402
- };
403
- 'space-offset': {
404
- readonly 0: any;
405
- readonly 50: any;
406
- readonly 100: any;
407
- readonly 150: any;
408
- readonly 200: any;
409
- readonly 300: any;
410
- readonly 400: any;
411
- readonly 600: any;
412
- readonly 800: any;
413
- readonly 1200: any;
414
- readonly 1600: any;
415
- readonly 'stacking-0': any;
416
- readonly 'stacking-100': any;
417
- readonly 'stacking-200': any;
418
- readonly 'stacking-300': any;
419
- readonly 'stacking-400': any;
420
- readonly 'stacking-500': any;
421
- readonly 'stacking-800': any;
422
- };
423
381
  'stroke-width': {
424
382
  readonly thin: "1.5px";
425
383
  readonly normal: "2px";
@@ -460,7 +418,7 @@ declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<_mirohq_desi
460
418
  readonly borderRightColor: "colors";
461
419
  readonly borderRightStyle: "border-styles";
462
420
  readonly borderRightWidth: "border-widths";
463
- readonly borderSpacing: "space-offset";
421
+ readonly borderSpacing: "space";
464
422
  readonly borderStyle: "border-styles";
465
423
  readonly borderTop: "colors";
466
424
  readonly borderTopColor: "colors";
@@ -473,42 +431,42 @@ declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<_mirohq_desi
473
431
  readonly boxShadow: "shadows";
474
432
  readonly caretColor: "colors";
475
433
  readonly color: "colors";
476
- readonly columnGap: "space-gap";
434
+ readonly columnGap: "space";
477
435
  readonly columnRuleColor: "colors";
478
436
  readonly fill: "colors";
479
437
  readonly flexBasis: "sizes";
480
438
  readonly fontFamily: "fonts";
481
439
  readonly fontSize: "font-sizes";
482
440
  readonly fontWeight: "font-weights";
483
- readonly gap: "space-gap";
484
- readonly gridColumnGap: "space-gap";
485
- readonly gridGap: "space-gap";
486
- readonly gridRowGap: "space-gap";
441
+ readonly gap: "space";
442
+ readonly gridColumnGap: "space";
443
+ readonly gridGap: "space";
444
+ readonly gridRowGap: "space";
487
445
  readonly gridTemplateColumns: "sizes";
488
446
  readonly gridTemplateRows: "sizes";
489
447
  readonly height: "sizes";
490
448
  readonly inlineSize: "sizes";
491
- readonly inset: "space-inset";
492
- readonly insetBlock: "space-inset";
493
- readonly insetBlockEnd: "space-inset";
494
- readonly insetBlockStart: "space-inset";
495
- readonly insetInline: "space-inset";
496
- readonly insetInlineEnd: "space-inset";
497
- readonly insetInlineStart: "space-inset";
449
+ readonly inset: "space";
450
+ readonly insetBlock: "space";
451
+ readonly insetBlockEnd: "space";
452
+ readonly insetBlockStart: "space";
453
+ readonly insetInline: "space";
454
+ readonly insetInlineEnd: "space";
455
+ readonly insetInlineStart: "space";
498
456
  readonly left: "space";
499
457
  readonly letterSpacing: "letter-spacings";
500
458
  readonly lineHeight: "line-heights";
501
- readonly margin: "space-offset";
502
- readonly marginBlock: "space-offset";
503
- readonly marginBlockEnd: "space-offset";
504
- readonly marginBlockStart: "space-offset";
505
- readonly marginBottom: "space-offset";
506
- readonly marginInline: "space-offset";
507
- readonly marginInlineEnd: "space-offset";
508
- readonly marginInlineStart: "space-offset";
509
- readonly marginLeft: "space-offset";
510
- readonly marginRight: "space-offset";
511
- readonly marginTop: "space-offset";
459
+ readonly margin: "space";
460
+ readonly marginBlock: "space";
461
+ readonly marginBlockEnd: "space";
462
+ readonly marginBlockStart: "space";
463
+ readonly marginBottom: "space";
464
+ readonly marginInline: "space";
465
+ readonly marginInlineEnd: "space";
466
+ readonly marginInlineStart: "space";
467
+ readonly marginLeft: "space";
468
+ readonly marginRight: "space";
469
+ readonly marginTop: "space";
512
470
  readonly maxBlockSize: "sizes";
513
471
  readonly maxHeight: "sizes";
514
472
  readonly maxInlineSize: "sizes";
@@ -519,41 +477,41 @@ declare const Thumb: React.ForwardRefExoticComponent<Omit<Omit<Omit<_mirohq_desi
519
477
  readonly minWidth: "sizes";
520
478
  readonly outline: "colors";
521
479
  readonly outlineColor: "colors";
522
- readonly padding: "space-inset";
523
- readonly paddingBlock: "space-inset";
524
- readonly paddingBlockEnd: "space-inset";
525
- readonly paddingBlockStart: "space-inset";
526
- readonly paddingBottom: "space-inset";
527
- readonly paddingInline: "space-inset";
528
- readonly paddingInlineEnd: "space-inset";
529
- readonly paddingInlineStart: "space-inset";
530
- readonly paddingLeft: "space-inset";
531
- readonly paddingRight: "space-inset";
532
- readonly paddingTop: "space-inset";
480
+ readonly padding: "space";
481
+ readonly paddingBlock: "space";
482
+ readonly paddingBlockEnd: "space";
483
+ readonly paddingBlockStart: "space";
484
+ readonly paddingBottom: "space";
485
+ readonly paddingInline: "space";
486
+ readonly paddingInlineEnd: "space";
487
+ readonly paddingInlineStart: "space";
488
+ readonly paddingLeft: "space";
489
+ readonly paddingRight: "space";
490
+ readonly paddingTop: "space";
533
491
  readonly right: "space";
534
- readonly rowGap: "space-gap";
535
- readonly scrollMargin: "space-offset";
536
- readonly scrollMarginBlock: "space-offset";
537
- readonly scrollMarginBlockEnd: "space-offset";
538
- readonly scrollMarginBlockStart: "space-offset";
539
- readonly scrollMarginBottom: "space-offset";
540
- readonly scrollMarginInline: "space-offset";
541
- readonly scrollMarginInlineEnd: "space-offset";
542
- readonly scrollMarginInlineStart: "space-offset";
543
- readonly scrollMarginLeft: "space-offset";
544
- readonly scrollMarginRight: "space-offset";
545
- readonly scrollMarginTop: "space-offset";
546
- readonly scrollPadding: "space-inset";
547
- readonly scrollPaddingBlock: "space-inset";
548
- readonly scrollPaddingBlockEnd: "space-inset";
549
- readonly scrollPaddingBlockStart: "space-inset";
550
- readonly scrollPaddingBottom: "space-inset";
551
- readonly scrollPaddingInline: "space-inset";
552
- readonly scrollPaddingInlineEnd: "space-inset";
553
- readonly scrollPaddingInlineStart: "space-inset";
554
- readonly scrollPaddingLeft: "space-inset";
555
- readonly scrollPaddingRight: "space-inset";
556
- readonly scrollPaddingTop: "space-inset";
492
+ readonly rowGap: "space";
493
+ readonly scrollMargin: "space";
494
+ readonly scrollMarginBlock: "space";
495
+ readonly scrollMarginBlockEnd: "space";
496
+ readonly scrollMarginBlockStart: "space";
497
+ readonly scrollMarginBottom: "space";
498
+ readonly scrollMarginInline: "space";
499
+ readonly scrollMarginInlineEnd: "space";
500
+ readonly scrollMarginInlineStart: "space";
501
+ readonly scrollMarginLeft: "space";
502
+ readonly scrollMarginRight: "space";
503
+ readonly scrollMarginTop: "space";
504
+ readonly scrollPadding: "space";
505
+ readonly scrollPaddingBlock: "space";
506
+ readonly scrollPaddingBlockEnd: "space";
507
+ readonly scrollPaddingBlockStart: "space";
508
+ readonly scrollPaddingBottom: "space";
509
+ readonly scrollPaddingInline: "space";
510
+ readonly scrollPaddingInlineEnd: "space";
511
+ readonly scrollPaddingInlineStart: "space";
512
+ readonly scrollPaddingLeft: "space";
513
+ readonly scrollPaddingRight: "space";
514
+ readonly scrollPaddingTop: "space";
557
515
  readonly stroke: "colors";
558
516
  readonly strokeWidth: "stroke-width";
559
517
  readonly textDecorationColor: "colors";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-base-switch",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@mirohq/design-system-primitive": "^1.1.2",
30
- "@mirohq/design-system-stitches": "^2.6.3"
30
+ "@mirohq/design-system-stitches": "^2.6.4"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "rollup -c ../../../../rollup.config.js",