@mirohq/design-system-switch 3.0.6 → 3.0.7
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 +26 -21
- package/dist/main.js.map +1 -1
- package/dist/module.js +26 -21
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var designSystemUtils = require('@mirohq/design-system-utils');
|
|
7
8
|
var designSystemBaseSwitch = require('@mirohq/design-system-base-switch');
|
|
@@ -68,28 +69,32 @@ const Switch = React__default["default"].forwardRef(
|
|
|
68
69
|
onUnchecked,
|
|
69
70
|
onClick,
|
|
70
71
|
...restProps
|
|
71
|
-
}, forwardRef) => /* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
72
|
+
}, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
StyledSwitch,
|
|
74
|
+
{
|
|
75
|
+
...restProps,
|
|
76
|
+
ref: forwardRef,
|
|
77
|
+
size,
|
|
78
|
+
disabled,
|
|
79
|
+
required,
|
|
80
|
+
"aria-disabled": ariaDisabled,
|
|
81
|
+
onClick: (e) => {
|
|
82
|
+
if (designSystemUtils.booleanify(ariaDisabled)) {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
} else {
|
|
85
|
+
onClick == null ? void 0 : onClick(e);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
onCheckedChange: (value) => {
|
|
89
|
+
if (value) {
|
|
90
|
+
onChecked == null ? void 0 : onChecked();
|
|
91
|
+
} else {
|
|
92
|
+
onUnchecked == null ? void 0 : onUnchecked();
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystemBaseSwitch.Thumb, {})
|
|
91
96
|
}
|
|
92
|
-
|
|
97
|
+
)
|
|
93
98
|
);
|
|
94
99
|
|
|
95
100
|
exports.Switch = Switch;
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/switch.styled.ts","../src/switch.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixSwitch from '@radix-ui/react-switch'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styles } from '@mirohq/design-system-base-switch'\n\nexport const StyledSwitch = styled(RadixSwitch.Root, {\n ...styles.default,\n cursor: 'pointer',\n\n ...focus.css({\n boxShadow: '$focus-controls',\n }),\n\n '&[data-state=\"checked\"]': styles.checked,\n\n '&:hover:not([disabled]):not([aria-disabled=\"true\"])': {\n ...styles.hovered,\n\n '&[data-state=\"checked\"]': styles.checkedHovered,\n },\n '&[disabled], &[aria-disabled=\"true\"]': styles.disabled,\n\n variants: {\n size: {\n medium: {\n width: '$7',\n height: '$4',\n },\n large: {\n width: '$9',\n height: '$5',\n },\n },\n },\n})\n\nexport type StyledSwitchProps = StrictComponentProps<typeof StyledSwitch>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport type { StyledSwitchProps } from './switch.styled'\nimport { StyledSwitch } from './switch.styled'\n\nexport interface SwitchProps extends StyledSwitchProps {\n /**\n * Change the size of the switch.\n */\n size?: StyledSwitchProps['size']\n\n /**\n * The state of the switch.\n */\n checked?: boolean\n\n /**\n * The checked state of the checkbox when it is initially rendered. Use when\n * you do not need to control its checked state.\n */\n defaultChecked?: boolean\n\n /**\n * Event handler called when the checked state equals true.\n */\n onChecked?: () => void\n\n /**\n * Event handler called when the checked state equals false.\n */\n onUnchecked?: () => void\n\n /**\n * Prevents the user from interacting with the switch.\n */\n disabled?: boolean\n\n /**\n * Indicates that the user must check the switch.\n */\n required?: boolean\n\n /**\n * The name of the switch used in the form.\n */\n name?: string\n\n /**\n * The data when accessing the switch by its name in the form.\n */\n value?: string\n\n /**\n * When true, prevents the user from interacting with the switch but focus\n * is still possible.\n */\n 'aria-disabled'?: Booleanish\n}\n\nexport const Switch = React.forwardRef<\n ElementRef<typeof StyledSwitch>,\n SwitchProps\n>(\n (\n {\n size = 'medium',\n disabled = false,\n required = false,\n 'aria-disabled': ariaDisabled,\n onChecked,\n onUnchecked,\n onClick,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledSwitch\n {...restProps}\n ref={forwardRef}\n size={size}\n disabled={disabled}\n required={required}\n aria-disabled={ariaDisabled}\n onClick={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n } else {\n onClick?.(e)\n }\n }}\n onCheckedChange={value => {\n if (value) {\n onChecked?.()\n } else {\n onUnchecked?.()\n }\n }}\n >\n <Thumb />\n </StyledSwitch>\n )\n)\n"],"names":["styled","RadixSwitch","styles","focus","React","booleanify","Thumb"],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/switch.styled.ts","../src/switch.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixSwitch from '@radix-ui/react-switch'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styles } from '@mirohq/design-system-base-switch'\n\nexport const StyledSwitch = styled(RadixSwitch.Root, {\n ...styles.default,\n cursor: 'pointer',\n\n ...focus.css({\n boxShadow: '$focus-controls',\n }),\n\n '&[data-state=\"checked\"]': styles.checked,\n\n '&:hover:not([disabled]):not([aria-disabled=\"true\"])': {\n ...styles.hovered,\n\n '&[data-state=\"checked\"]': styles.checkedHovered,\n },\n '&[disabled], &[aria-disabled=\"true\"]': styles.disabled,\n\n variants: {\n size: {\n medium: {\n width: '$7',\n height: '$4',\n },\n large: {\n width: '$9',\n height: '$5',\n },\n },\n },\n})\n\nexport type StyledSwitchProps = StrictComponentProps<typeof StyledSwitch>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport type { StyledSwitchProps } from './switch.styled'\nimport { StyledSwitch } from './switch.styled'\n\nexport interface SwitchProps extends StyledSwitchProps {\n /**\n * Change the size of the switch.\n */\n size?: StyledSwitchProps['size']\n\n /**\n * The state of the switch.\n */\n checked?: boolean\n\n /**\n * The checked state of the checkbox when it is initially rendered. Use when\n * you do not need to control its checked state.\n */\n defaultChecked?: boolean\n\n /**\n * Event handler called when the checked state equals true.\n */\n onChecked?: () => void\n\n /**\n * Event handler called when the checked state equals false.\n */\n onUnchecked?: () => void\n\n /**\n * Prevents the user from interacting with the switch.\n */\n disabled?: boolean\n\n /**\n * Indicates that the user must check the switch.\n */\n required?: boolean\n\n /**\n * The name of the switch used in the form.\n */\n name?: string\n\n /**\n * The data when accessing the switch by its name in the form.\n */\n value?: string\n\n /**\n * When true, prevents the user from interacting with the switch but focus\n * is still possible.\n */\n 'aria-disabled'?: Booleanish\n}\n\nexport const Switch = React.forwardRef<\n ElementRef<typeof StyledSwitch>,\n SwitchProps\n>(\n (\n {\n size = 'medium',\n disabled = false,\n required = false,\n 'aria-disabled': ariaDisabled,\n onChecked,\n onUnchecked,\n onClick,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledSwitch\n {...restProps}\n ref={forwardRef}\n size={size}\n disabled={disabled}\n required={required}\n aria-disabled={ariaDisabled}\n onClick={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n } else {\n onClick?.(e)\n }\n }}\n onCheckedChange={value => {\n if (value) {\n onChecked?.()\n } else {\n onUnchecked?.()\n }\n }}\n >\n <Thumb />\n </StyledSwitch>\n )\n)\n"],"names":["styled","RadixSwitch","styles","focus","React","jsx","booleanify","Thumb"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMa,MAAA,YAAA,GAAeA,2BAAO,CAAAC,sBAAA,CAAY,IAAM,EAAA;AAAA,EACnD,GAAGC,6BAAO,CAAA,OAAA;AAAA,EACV,MAAQ,EAAA,SAAA;AAAA,EAER,GAAGC,yBAAM,GAAI,CAAA;AAAA,IACX,SAAW,EAAA,iBAAA;AAAA,GACZ,CAAA;AAAA,EAED,2BAA2BD,6BAAO,CAAA,OAAA;AAAA,EAElC,qDAAuD,EAAA;AAAA,IACrD,GAAGA,6BAAO,CAAA,OAAA;AAAA,IAEV,2BAA2BA,6BAAO,CAAA,cAAA;AAAA,GACpC;AAAA,EACA,wCAAwCA,6BAAO,CAAA,QAAA;AAAA,EAE/C,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,KAAO,EAAA,IAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,OACV;AAAA,MACA,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,IAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,OACV;AAAA,KACF;AAAA,GACF;AACF,CAAC,CAAA;;AC4BM,MAAM,SAASE,yBAAM,CAAA,UAAA;AAAA,EAI1B,CACE;AAAA,IACE,IAAO,GAAA,QAAA;AAAA,IACP,QAAW,GAAA,KAAA;AAAA,IACX,QAAW,GAAA,KAAA;AAAA,IACX,eAAiB,EAAA,YAAA;AAAA,IACjB,SAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,GAAG,SAAA;AAAA,KAEL,UAEA,qBAAAC,cAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,GAAK,EAAA,UAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,eAAe,EAAA,YAAA;AAAA,MACf,SAAS,CAAK,CAAA,KAAA;AACZ,QAAI,IAAAC,4BAAA,CAAW,YAAY,CAAG,EAAA;AAC5B,UAAA,CAAA,CAAE,cAAe,EAAA,CAAA;AAAA,SACZ,MAAA;AACL,UAAU,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAAA,SACZ;AAAA,OACF;AAAA,MACA,iBAAiB,CAAS,KAAA,KAAA;AACxB,QAAA,IAAI,KAAO,EAAA;AACT,UAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AAAA,SACK,MAAA;AACL,UAAA,WAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,WAAA,EAAA,CAAA;AAAA,SACF;AAAA,OACF;AAAA,MAEA,yCAACC,4BAAM,EAAA,EAAA,CAAA;AAAA,KAAA;AAAA,GACT;AAEJ;;;;"}
|
package/dist/module.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { booleanify } from '@mirohq/design-system-utils';
|
|
3
4
|
import { styles, Thumb } from '@mirohq/design-system-base-switch';
|
|
@@ -41,28 +42,32 @@ const Switch = React.forwardRef(
|
|
|
41
42
|
onUnchecked,
|
|
42
43
|
onClick,
|
|
43
44
|
...restProps
|
|
44
|
-
}, forwardRef) => /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
}, forwardRef) => /* @__PURE__ */ jsx(
|
|
46
|
+
StyledSwitch,
|
|
47
|
+
{
|
|
48
|
+
...restProps,
|
|
49
|
+
ref: forwardRef,
|
|
50
|
+
size,
|
|
51
|
+
disabled,
|
|
52
|
+
required,
|
|
53
|
+
"aria-disabled": ariaDisabled,
|
|
54
|
+
onClick: (e) => {
|
|
55
|
+
if (booleanify(ariaDisabled)) {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
} else {
|
|
58
|
+
onClick == null ? void 0 : onClick(e);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
onCheckedChange: (value) => {
|
|
62
|
+
if (value) {
|
|
63
|
+
onChecked == null ? void 0 : onChecked();
|
|
64
|
+
} else {
|
|
65
|
+
onUnchecked == null ? void 0 : onUnchecked();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsx(Thumb, {})
|
|
64
69
|
}
|
|
65
|
-
|
|
70
|
+
)
|
|
66
71
|
);
|
|
67
72
|
|
|
68
73
|
export { Switch };
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/switch.styled.ts","../src/switch.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixSwitch from '@radix-ui/react-switch'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styles } from '@mirohq/design-system-base-switch'\n\nexport const StyledSwitch = styled(RadixSwitch.Root, {\n ...styles.default,\n cursor: 'pointer',\n\n ...focus.css({\n boxShadow: '$focus-controls',\n }),\n\n '&[data-state=\"checked\"]': styles.checked,\n\n '&:hover:not([disabled]):not([aria-disabled=\"true\"])': {\n ...styles.hovered,\n\n '&[data-state=\"checked\"]': styles.checkedHovered,\n },\n '&[disabled], &[aria-disabled=\"true\"]': styles.disabled,\n\n variants: {\n size: {\n medium: {\n width: '$7',\n height: '$4',\n },\n large: {\n width: '$9',\n height: '$5',\n },\n },\n },\n})\n\nexport type StyledSwitchProps = StrictComponentProps<typeof StyledSwitch>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport type { StyledSwitchProps } from './switch.styled'\nimport { StyledSwitch } from './switch.styled'\n\nexport interface SwitchProps extends StyledSwitchProps {\n /**\n * Change the size of the switch.\n */\n size?: StyledSwitchProps['size']\n\n /**\n * The state of the switch.\n */\n checked?: boolean\n\n /**\n * The checked state of the checkbox when it is initially rendered. Use when\n * you do not need to control its checked state.\n */\n defaultChecked?: boolean\n\n /**\n * Event handler called when the checked state equals true.\n */\n onChecked?: () => void\n\n /**\n * Event handler called when the checked state equals false.\n */\n onUnchecked?: () => void\n\n /**\n * Prevents the user from interacting with the switch.\n */\n disabled?: boolean\n\n /**\n * Indicates that the user must check the switch.\n */\n required?: boolean\n\n /**\n * The name of the switch used in the form.\n */\n name?: string\n\n /**\n * The data when accessing the switch by its name in the form.\n */\n value?: string\n\n /**\n * When true, prevents the user from interacting with the switch but focus\n * is still possible.\n */\n 'aria-disabled'?: Booleanish\n}\n\nexport const Switch = React.forwardRef<\n ElementRef<typeof StyledSwitch>,\n SwitchProps\n>(\n (\n {\n size = 'medium',\n disabled = false,\n required = false,\n 'aria-disabled': ariaDisabled,\n onChecked,\n onUnchecked,\n onClick,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledSwitch\n {...restProps}\n ref={forwardRef}\n size={size}\n disabled={disabled}\n required={required}\n aria-disabled={ariaDisabled}\n onClick={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n } else {\n onClick?.(e)\n }\n }}\n onCheckedChange={value => {\n if (value) {\n onChecked?.()\n } else {\n onUnchecked?.()\n }\n }}\n >\n <Thumb />\n </StyledSwitch>\n )\n)\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/switch.styled.ts","../src/switch.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixSwitch from '@radix-ui/react-switch'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styles } from '@mirohq/design-system-base-switch'\n\nexport const StyledSwitch = styled(RadixSwitch.Root, {\n ...styles.default,\n cursor: 'pointer',\n\n ...focus.css({\n boxShadow: '$focus-controls',\n }),\n\n '&[data-state=\"checked\"]': styles.checked,\n\n '&:hover:not([disabled]):not([aria-disabled=\"true\"])': {\n ...styles.hovered,\n\n '&[data-state=\"checked\"]': styles.checkedHovered,\n },\n '&[disabled], &[aria-disabled=\"true\"]': styles.disabled,\n\n variants: {\n size: {\n medium: {\n width: '$7',\n height: '$4',\n },\n large: {\n width: '$9',\n height: '$5',\n },\n },\n },\n})\n\nexport type StyledSwitchProps = StrictComponentProps<typeof StyledSwitch>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { Thumb } from '@mirohq/design-system-base-switch'\n\nimport type { StyledSwitchProps } from './switch.styled'\nimport { StyledSwitch } from './switch.styled'\n\nexport interface SwitchProps extends StyledSwitchProps {\n /**\n * Change the size of the switch.\n */\n size?: StyledSwitchProps['size']\n\n /**\n * The state of the switch.\n */\n checked?: boolean\n\n /**\n * The checked state of the checkbox when it is initially rendered. Use when\n * you do not need to control its checked state.\n */\n defaultChecked?: boolean\n\n /**\n * Event handler called when the checked state equals true.\n */\n onChecked?: () => void\n\n /**\n * Event handler called when the checked state equals false.\n */\n onUnchecked?: () => void\n\n /**\n * Prevents the user from interacting with the switch.\n */\n disabled?: boolean\n\n /**\n * Indicates that the user must check the switch.\n */\n required?: boolean\n\n /**\n * The name of the switch used in the form.\n */\n name?: string\n\n /**\n * The data when accessing the switch by its name in the form.\n */\n value?: string\n\n /**\n * When true, prevents the user from interacting with the switch but focus\n * is still possible.\n */\n 'aria-disabled'?: Booleanish\n}\n\nexport const Switch = React.forwardRef<\n ElementRef<typeof StyledSwitch>,\n SwitchProps\n>(\n (\n {\n size = 'medium',\n disabled = false,\n required = false,\n 'aria-disabled': ariaDisabled,\n onChecked,\n onUnchecked,\n onClick,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledSwitch\n {...restProps}\n ref={forwardRef}\n size={size}\n disabled={disabled}\n required={required}\n aria-disabled={ariaDisabled}\n onClick={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n } else {\n onClick?.(e)\n }\n }}\n onCheckedChange={value => {\n if (value) {\n onChecked?.()\n } else {\n onUnchecked?.()\n }\n }}\n >\n <Thumb />\n </StyledSwitch>\n )\n)\n"],"names":[],"mappings":";;;;;;;;AAMa,MAAA,YAAA,GAAe,MAAO,CAAA,WAAA,CAAY,IAAM,EAAA;AAAA,EACnD,GAAG,MAAO,CAAA,OAAA;AAAA,EACV,MAAQ,EAAA,SAAA;AAAA,EAER,GAAG,MAAM,GAAI,CAAA;AAAA,IACX,SAAW,EAAA,iBAAA;AAAA,GACZ,CAAA;AAAA,EAED,2BAA2B,MAAO,CAAA,OAAA;AAAA,EAElC,qDAAuD,EAAA;AAAA,IACrD,GAAG,MAAO,CAAA,OAAA;AAAA,IAEV,2BAA2B,MAAO,CAAA,cAAA;AAAA,GACpC;AAAA,EACA,wCAAwC,MAAO,CAAA,QAAA;AAAA,EAE/C,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,KAAO,EAAA,IAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,OACV;AAAA,MACA,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,IAAA;AAAA,QACP,MAAQ,EAAA,IAAA;AAAA,OACV;AAAA,KACF;AAAA,GACF;AACF,CAAC,CAAA;;AC4BM,MAAM,SAAS,KAAM,CAAA,UAAA;AAAA,EAI1B,CACE;AAAA,IACE,IAAO,GAAA,QAAA;AAAA,IACP,QAAW,GAAA,KAAA;AAAA,IACX,QAAW,GAAA,KAAA;AAAA,IACX,eAAiB,EAAA,YAAA;AAAA,IACjB,SAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,GAAG,SAAA;AAAA,KAEL,UAEA,qBAAA,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,SAAA;AAAA,MACJ,GAAK,EAAA,UAAA;AAAA,MACL,IAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,eAAe,EAAA,YAAA;AAAA,MACf,SAAS,CAAK,CAAA,KAAA;AACZ,QAAI,IAAA,UAAA,CAAW,YAAY,CAAG,EAAA;AAC5B,UAAA,CAAA,CAAE,cAAe,EAAA,CAAA;AAAA,SACZ,MAAA;AACL,UAAU,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAAA,SACZ;AAAA,OACF;AAAA,MACA,iBAAiB,CAAS,KAAA,KAAA;AACxB,QAAA,IAAI,KAAO,EAAA;AACT,UAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AAAA,SACK,MAAA;AACL,UAAA,WAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,WAAA,EAAA,CAAA;AAAA,SACF;AAAA,OACF;AAAA,MAEA,8BAAC,KAAM,EAAA,EAAA,CAAA;AAAA,KAAA;AAAA,GACT;AAEJ;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as _stitches_react_types_css_util from '@stitches/react/types/css-util'
|
|
|
7
7
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
8
8
|
import * as RadixSwitch from '@radix-ui/react-switch';
|
|
9
9
|
|
|
10
|
-
declare const StyledSwitch: react.ForwardRefExoticComponent<
|
|
10
|
+
declare const StyledSwitch: react.ForwardRefExoticComponent<Omit<Omit<{
|
|
11
11
|
size?: "medium" | "large" | undefined;
|
|
12
12
|
}, "size"> & _stitches_react_types_styled_component.TransformProps<{
|
|
13
13
|
size?: "medium" | "large" | undefined;
|
|
@@ -458,7 +458,7 @@ declare const StyledSwitch: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
458
458
|
}> | undefined;
|
|
459
459
|
}> & {
|
|
460
460
|
children?: react.ReactNode;
|
|
461
|
-
} & _mirohq_design_system_stitches.CustomStylesProps, "
|
|
461
|
+
} & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<RadixSwitch.SwitchProps & react.RefAttributes<HTMLButtonElement>>, {
|
|
462
462
|
size?: "medium" | "large" | undefined;
|
|
463
463
|
}, {}>;
|
|
464
464
|
declare type StyledSwitchProps = StrictComponentProps<typeof StyledSwitch>;
|
|
@@ -507,6 +507,6 @@ interface SwitchProps extends StyledSwitchProps {
|
|
|
507
507
|
*/
|
|
508
508
|
'aria-disabled'?: Booleanish;
|
|
509
509
|
}
|
|
510
|
-
declare const Switch: react__default.ForwardRefExoticComponent<
|
|
510
|
+
declare const Switch: react__default.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & react__default.RefAttributes<HTMLButtonElement>>;
|
|
511
511
|
|
|
512
512
|
export { Switch, SwitchProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-switch",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@radix-ui/react-switch": "^1.0.0",
|
|
31
|
-
"@mirohq/design-system-base-switch": "^0.1.
|
|
31
|
+
"@mirohq/design-system-base-switch": "^0.1.2",
|
|
32
32
|
"@mirohq/design-system-utils": "^0.14.0",
|
|
33
|
-
"@mirohq/design-system-types": "^0.
|
|
34
|
-
"@mirohq/design-system-styles": "^1.0
|
|
35
|
-
"@mirohq/design-system-stitches": "^2.3.
|
|
33
|
+
"@mirohq/design-system-types": "^0.6.0",
|
|
34
|
+
"@mirohq/design-system-styles": "^1.1.0",
|
|
35
|
+
"@mirohq/design-system-stitches": "^2.3.4"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "rollup -c ../../../rollup.config.js",
|