@mirohq/design-system-link 1.2.11-use-press.1 → 1.2.12-calendar-component.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 +33 -39
- package/dist/main.js.map +1 -1
- package/dist/module.js +34 -40
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +23 -13
- package/package.json +7 -6
package/dist/main.js
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var link = require('@react-aria/link');
|
|
6
7
|
var utils = require('@react-aria/utils');
|
|
7
|
-
var
|
|
8
|
-
var interactions = require('@react-aria/interactions');
|
|
9
|
-
var designSystemUsePress = require('@mirohq/design-system-use-press');
|
|
8
|
+
var button = require('@react-aria/button');
|
|
10
9
|
var designSystemPrimitive = require('@mirohq/design-system-primitive');
|
|
11
10
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
12
11
|
var designSystemStyles = require('@mirohq/design-system-styles');
|
|
@@ -72,60 +71,55 @@ const Link = React__default["default"].forwardRef(
|
|
|
72
71
|
({
|
|
73
72
|
variant = "primary",
|
|
74
73
|
disabled = false,
|
|
75
|
-
"aria-disabled": ariaDisabled,
|
|
76
74
|
dashed = false,
|
|
77
|
-
asChild,
|
|
78
75
|
rel = "",
|
|
79
76
|
target,
|
|
80
77
|
href,
|
|
81
78
|
onClick,
|
|
82
79
|
onPress,
|
|
83
80
|
children,
|
|
84
|
-
onHoverStart,
|
|
85
|
-
onHoverEnd,
|
|
86
|
-
onHoverChange,
|
|
87
81
|
...restProps
|
|
88
82
|
}, forwardRef) => {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
83
|
+
const ref = React.useRef(null);
|
|
84
|
+
const refWithFallback = forwardRef != null ? forwardRef : ref;
|
|
85
|
+
const { linkProps } = link.useLink(
|
|
86
|
+
{
|
|
87
|
+
isDisabled: disabled,
|
|
88
|
+
onPress: onPress != null ? onPress : onClick,
|
|
89
|
+
...restProps
|
|
90
|
+
},
|
|
91
|
+
refWithFallback
|
|
92
|
+
);
|
|
93
|
+
const { buttonProps } = button.useButton(
|
|
94
|
+
{
|
|
95
|
+
isDisabled: disabled,
|
|
96
|
+
href,
|
|
97
|
+
onPress: onPress != null ? onPress : onClick,
|
|
98
|
+
allowFocusWhenDisabled: false,
|
|
99
|
+
...restProps
|
|
100
|
+
},
|
|
101
|
+
refWithFallback
|
|
102
|
+
);
|
|
103
|
+
const asButton = href == null && (onPress != null ? onPress : onClick) != null;
|
|
104
|
+
const elementProps = utils.mergeProps(
|
|
105
|
+
restProps,
|
|
106
|
+
asButton ? buttonProps : linkProps
|
|
107
|
+
);
|
|
109
108
|
const relProp = !asButton && {
|
|
110
|
-
rel: target === "_blank" ? `noopener noreferrer ${rel}
|
|
109
|
+
rel: target === "_blank" ? `noopener noreferrer ${rel}` : rel
|
|
111
110
|
};
|
|
112
111
|
return /* @__PURE__ */ React__default["default"].createElement(StyledLink, {
|
|
113
112
|
...elementProps,
|
|
114
|
-
|
|
115
|
-
"data-hovered": isHovered ? "" : void 0,
|
|
116
|
-
asChild: asButton || asChild,
|
|
113
|
+
ref: refWithFallback,
|
|
117
114
|
href,
|
|
118
115
|
variant,
|
|
119
116
|
disabled,
|
|
120
|
-
"aria-disabled": !asButton && (disabled || designSystemUtils.booleanify(ariaDisabled)) ? "true" : void 0,
|
|
121
117
|
dashed,
|
|
122
|
-
|
|
118
|
+
asChild: asButton,
|
|
119
|
+
tabIndex: disabled ? -1 : href != null ? void 0 : onClick != null || onPress != null ? 0 : void 0,
|
|
123
120
|
...relProp,
|
|
124
|
-
target
|
|
125
|
-
|
|
126
|
-
}, asButton ? /* @__PURE__ */ React__default["default"].createElement("button", {
|
|
127
|
-
disabled
|
|
128
|
-
}, children) : children);
|
|
121
|
+
target
|
|
122
|
+
}, asButton ? /* @__PURE__ */ React__default["default"].createElement("button", null, children) : children);
|
|
129
123
|
}
|
|
130
124
|
);
|
|
131
125
|
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/link.styled.ts","../src/link.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { focus } from '@mirohq/design-system-styles'\n\nconst TRANSITION_TIME = '250ms'\n\nexport const StyledLink = styled(Primitive.a, {\n textDecoration: 'none',\n border: 0,\n borderBottom: '1px solid currentColor',\n cursor: 'pointer',\n transition: `border ${TRANSITION_TIME}, color ${TRANSITION_TIME}`,\n\n // asButton\n background: 'none',\n padding: '$none',\n margin: '$none',\n font: 'inherit',\n\n variants: {\n variant: {\n primary: {\n color: 'rgba(66, 98, 255, 1)',\n borderColor: 'rgba(217, 224, 255, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(69, 91, 237, 1)',\n borderColor: 'rgba(104, 129, 255, 1)',\n },\n '&:active': {\n color: 'rgba(61, 81, 212, 1)',\n borderColor: 'rgba(66, 98, 255, 1)',\n },\n },\n secondary: {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(235, 235, 239, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n '&:active': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n },\n },\n dashed: {\n true: {\n borderStyle: 'dashed',\n },\n },\n disabled: {\n true: {\n pointerEvents: 'none',\n },\n },\n },\n})\n\nexport type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>\n","import React from 'react'\nimport type { ElementRef, ReactNode
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/link.styled.ts","../src/link.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { focus } from '@mirohq/design-system-styles'\n\nconst TRANSITION_TIME = '250ms'\n\nexport const StyledLink = styled(Primitive.a, {\n textDecoration: 'none',\n border: 0,\n borderBottom: '1px solid currentColor',\n cursor: 'pointer',\n transition: `border ${TRANSITION_TIME}, color ${TRANSITION_TIME}`,\n\n // asButton\n background: 'none',\n padding: '$none',\n margin: '$none',\n font: 'inherit',\n\n variants: {\n variant: {\n primary: {\n color: 'rgba(66, 98, 255, 1)',\n borderColor: 'rgba(217, 224, 255, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(69, 91, 237, 1)',\n borderColor: 'rgba(104, 129, 255, 1)',\n },\n '&:active': {\n color: 'rgba(61, 81, 212, 1)',\n borderColor: 'rgba(66, 98, 255, 1)',\n },\n },\n secondary: {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(235, 235, 239, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n '&:active': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n },\n },\n dashed: {\n true: {\n borderStyle: 'dashed',\n },\n },\n disabled: {\n true: {\n pointerEvents: 'none',\n },\n },\n },\n})\n\nexport type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>\n","import React, { useRef } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { useLink } from '@react-aria/link'\nimport type { AriaLinkProps } from '@react-types/link'\nimport { mergeProps } from '@react-aria/utils'\nimport { useButton } from '@react-aria/button'\n\nimport type { StyledLinkProps } from './link.styled'\nimport { StyledLink } from './link.styled'\n\ntype LinkPropsA11y = StyledLinkProps & AriaLinkProps\n\nexport interface LinkProps\n extends Omit<LinkPropsA11y, 'onClick' | 'isDisabled' | 'elementType'> {\n /**\n * The content\n */\n children: ReactNode\n\n /**\n * Change the link styles\n */\n variant?: StyledLinkProps['variant']\n\n /**\n * Disable the mouse events\n */\n disabled?: boolean\n\n /**\n * Set the underline to dashed mode\n */\n dashed?: boolean\n\n /**\n * Alias for onPress\n */\n onClick?: AriaLinkProps['onPress']\n}\n\nexport const Link = React.forwardRef<ElementRef<typeof StyledLink>, LinkProps>(\n (\n {\n variant = 'primary',\n disabled = false,\n dashed = false,\n rel = '',\n target,\n href,\n onClick,\n onPress,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const ref = useRef<HTMLAnchorElement>(null)\n const refWithFallback = forwardRef ?? ref\n const { linkProps } = useLink(\n {\n isDisabled: disabled,\n onPress: onPress ?? onClick,\n ...restProps,\n },\n // @ts-expect-error\n refWithFallback\n )\n\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n href,\n onPress: onPress ?? onClick,\n // @ts-expect-error\n allowFocusWhenDisabled: false,\n ...restProps,\n },\n refWithFallback\n )\n\n const asButton = href == null && (onPress ?? onClick) != null\n\n const elementProps = mergeProps(\n restProps,\n asButton ? buttonProps : linkProps\n )\n\n const relProp = !asButton && {\n rel: target === '_blank' ? `noopener noreferrer ${rel}` : rel,\n }\n\n return (\n <StyledLink\n {...elementProps}\n ref={refWithFallback}\n href={href}\n variant={variant}\n disabled={disabled}\n dashed={dashed}\n asChild={asButton}\n tabIndex={\n disabled\n ? -1\n : href != null\n ? undefined\n : onClick != null || onPress != null\n ? 0\n : undefined\n }\n {...relProp}\n target={target}\n >\n {asButton ? <button>{children}</button> : children}\n </StyledLink>\n )\n }\n)\n"],"names":["styled","Primitive","focus","React","useRef","useLink","useButton","mergeProps"],"mappings":";;;;;;;;;;;;;;;;AAKA,MAAM,eAAkB,GAAA,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EA,IAAM,MAAA,OAAA,GAAU,CAAC,QAAY,IAAA;AAAA,MAC3B,GAAK,EAAA,MAAA,KAAW,QAAW,GAAA,CAAA,oBAAA,EAAuB,GAAQ,CAAA,CAAA,GAAA,GAAA;AAAA,KAC5D,CAAA;AAEA,IAAA,uBACGJ,yBAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MACE,GAAG,YAAA;AAAA,MACJ,GAAK,EAAA,eAAA;AAAA,MACL,IAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAS,EAAA,QAAA;AAAA,MACT,QAAA,EACE,QACI,GAAA,CAAA,CAAA,GACA,IAAQ,IAAA,IAAA,GACR,SACA,OAAW,IAAA,IAAA,IAAQ,OAAW,IAAA,IAAA,GAC9B,CACA,GAAA,KAAA,CAAA;AAAA,MAEL,GAAG,OAAA;AAAA,MACJ,MAAA;AAAA,KAAA,EAEC,QAAW,mBAAAA,yBAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA,EAAA,QAAS,IAAY,QAC5C,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
package/dist/module.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { useLink } from '@react-aria/link';
|
|
2
3
|
import { mergeProps } from '@react-aria/utils';
|
|
3
|
-
import {
|
|
4
|
-
import { useHover } from '@react-aria/interactions';
|
|
5
|
-
import { usePress } from '@mirohq/design-system-use-press';
|
|
4
|
+
import { useButton } from '@react-aria/button';
|
|
6
5
|
import { Primitive } from '@mirohq/design-system-primitive';
|
|
7
6
|
import { styled } from '@mirohq/design-system-stitches';
|
|
8
7
|
import { focus } from '@mirohq/design-system-styles';
|
|
@@ -64,60 +63,55 @@ const Link = React.forwardRef(
|
|
|
64
63
|
({
|
|
65
64
|
variant = "primary",
|
|
66
65
|
disabled = false,
|
|
67
|
-
"aria-disabled": ariaDisabled,
|
|
68
66
|
dashed = false,
|
|
69
|
-
asChild,
|
|
70
67
|
rel = "",
|
|
71
68
|
target,
|
|
72
69
|
href,
|
|
73
70
|
onClick,
|
|
74
71
|
onPress,
|
|
75
72
|
children,
|
|
76
|
-
onHoverStart,
|
|
77
|
-
onHoverEnd,
|
|
78
|
-
onHoverChange,
|
|
79
73
|
...restProps
|
|
80
74
|
}, forwardRef) => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
75
|
+
const ref = useRef(null);
|
|
76
|
+
const refWithFallback = forwardRef != null ? forwardRef : ref;
|
|
77
|
+
const { linkProps } = useLink(
|
|
78
|
+
{
|
|
79
|
+
isDisabled: disabled,
|
|
80
|
+
onPress: onPress != null ? onPress : onClick,
|
|
81
|
+
...restProps
|
|
82
|
+
},
|
|
83
|
+
refWithFallback
|
|
84
|
+
);
|
|
85
|
+
const { buttonProps } = useButton(
|
|
86
|
+
{
|
|
87
|
+
isDisabled: disabled,
|
|
88
|
+
href,
|
|
89
|
+
onPress: onPress != null ? onPress : onClick,
|
|
90
|
+
allowFocusWhenDisabled: false,
|
|
91
|
+
...restProps
|
|
92
|
+
},
|
|
93
|
+
refWithFallback
|
|
94
|
+
);
|
|
95
|
+
const asButton = href == null && (onPress != null ? onPress : onClick) != null;
|
|
96
|
+
const elementProps = mergeProps(
|
|
97
|
+
restProps,
|
|
98
|
+
asButton ? buttonProps : linkProps
|
|
99
|
+
);
|
|
101
100
|
const relProp = !asButton && {
|
|
102
|
-
rel: target === "_blank" ? `noopener noreferrer ${rel}
|
|
101
|
+
rel: target === "_blank" ? `noopener noreferrer ${rel}` : rel
|
|
103
102
|
};
|
|
104
103
|
return /* @__PURE__ */ React.createElement(StyledLink, {
|
|
105
104
|
...elementProps,
|
|
106
|
-
|
|
107
|
-
"data-hovered": isHovered ? "" : void 0,
|
|
108
|
-
asChild: asButton || asChild,
|
|
105
|
+
ref: refWithFallback,
|
|
109
106
|
href,
|
|
110
107
|
variant,
|
|
111
108
|
disabled,
|
|
112
|
-
"aria-disabled": !asButton && (disabled || booleanify(ariaDisabled)) ? "true" : void 0,
|
|
113
109
|
dashed,
|
|
114
|
-
|
|
110
|
+
asChild: asButton,
|
|
111
|
+
tabIndex: disabled ? -1 : href != null ? void 0 : onClick != null || onPress != null ? 0 : void 0,
|
|
115
112
|
...relProp,
|
|
116
|
-
target
|
|
117
|
-
|
|
118
|
-
}, asButton ? /* @__PURE__ */ React.createElement("button", {
|
|
119
|
-
disabled
|
|
120
|
-
}, children) : children);
|
|
113
|
+
target
|
|
114
|
+
}, asButton ? /* @__PURE__ */ React.createElement("button", null, children) : children);
|
|
121
115
|
}
|
|
122
116
|
);
|
|
123
117
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/link.styled.ts","../src/link.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { focus } from '@mirohq/design-system-styles'\n\nconst TRANSITION_TIME = '250ms'\n\nexport const StyledLink = styled(Primitive.a, {\n textDecoration: 'none',\n border: 0,\n borderBottom: '1px solid currentColor',\n cursor: 'pointer',\n transition: `border ${TRANSITION_TIME}, color ${TRANSITION_TIME}`,\n\n // asButton\n background: 'none',\n padding: '$none',\n margin: '$none',\n font: 'inherit',\n\n variants: {\n variant: {\n primary: {\n color: 'rgba(66, 98, 255, 1)',\n borderColor: 'rgba(217, 224, 255, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(69, 91, 237, 1)',\n borderColor: 'rgba(104, 129, 255, 1)',\n },\n '&:active': {\n color: 'rgba(61, 81, 212, 1)',\n borderColor: 'rgba(66, 98, 255, 1)',\n },\n },\n secondary: {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(235, 235, 239, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n '&:active': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n },\n },\n dashed: {\n true: {\n borderStyle: 'dashed',\n },\n },\n disabled: {\n true: {\n pointerEvents: 'none',\n },\n },\n },\n})\n\nexport type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>\n","import React from 'react'\nimport type { ElementRef, ReactNode
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/link.styled.ts","../src/link.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { focus } from '@mirohq/design-system-styles'\n\nconst TRANSITION_TIME = '250ms'\n\nexport const StyledLink = styled(Primitive.a, {\n textDecoration: 'none',\n border: 0,\n borderBottom: '1px solid currentColor',\n cursor: 'pointer',\n transition: `border ${TRANSITION_TIME}, color ${TRANSITION_TIME}`,\n\n // asButton\n background: 'none',\n padding: '$none',\n margin: '$none',\n font: 'inherit',\n\n variants: {\n variant: {\n primary: {\n color: 'rgba(66, 98, 255, 1)',\n borderColor: 'rgba(217, 224, 255, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(69, 91, 237, 1)',\n borderColor: 'rgba(104, 129, 255, 1)',\n },\n '&:active': {\n color: 'rgba(61, 81, 212, 1)',\n borderColor: 'rgba(66, 98, 255, 1)',\n },\n },\n secondary: {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(235, 235, 239, 1)',\n ...focus.defaults,\n '&:hover': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n '&:active': {\n color: 'rgba(95, 92, 128, 1)',\n borderColor: 'rgba(147, 145, 166, 1)',\n },\n },\n },\n dashed: {\n true: {\n borderStyle: 'dashed',\n },\n },\n disabled: {\n true: {\n pointerEvents: 'none',\n },\n },\n },\n})\n\nexport type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>\n","import React, { useRef } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { useLink } from '@react-aria/link'\nimport type { AriaLinkProps } from '@react-types/link'\nimport { mergeProps } from '@react-aria/utils'\nimport { useButton } from '@react-aria/button'\n\nimport type { StyledLinkProps } from './link.styled'\nimport { StyledLink } from './link.styled'\n\ntype LinkPropsA11y = StyledLinkProps & AriaLinkProps\n\nexport interface LinkProps\n extends Omit<LinkPropsA11y, 'onClick' | 'isDisabled' | 'elementType'> {\n /**\n * The content\n */\n children: ReactNode\n\n /**\n * Change the link styles\n */\n variant?: StyledLinkProps['variant']\n\n /**\n * Disable the mouse events\n */\n disabled?: boolean\n\n /**\n * Set the underline to dashed mode\n */\n dashed?: boolean\n\n /**\n * Alias for onPress\n */\n onClick?: AriaLinkProps['onPress']\n}\n\nexport const Link = React.forwardRef<ElementRef<typeof StyledLink>, LinkProps>(\n (\n {\n variant = 'primary',\n disabled = false,\n dashed = false,\n rel = '',\n target,\n href,\n onClick,\n onPress,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const ref = useRef<HTMLAnchorElement>(null)\n const refWithFallback = forwardRef ?? ref\n const { linkProps } = useLink(\n {\n isDisabled: disabled,\n onPress: onPress ?? onClick,\n ...restProps,\n },\n // @ts-expect-error\n refWithFallback\n )\n\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n href,\n onPress: onPress ?? onClick,\n // @ts-expect-error\n allowFocusWhenDisabled: false,\n ...restProps,\n },\n refWithFallback\n )\n\n const asButton = href == null && (onPress ?? onClick) != null\n\n const elementProps = mergeProps(\n restProps,\n asButton ? buttonProps : linkProps\n )\n\n const relProp = !asButton && {\n rel: target === '_blank' ? `noopener noreferrer ${rel}` : rel,\n }\n\n return (\n <StyledLink\n {...elementProps}\n ref={refWithFallback}\n href={href}\n variant={variant}\n disabled={disabled}\n dashed={dashed}\n asChild={asButton}\n tabIndex={\n disabled\n ? -1\n : href != null\n ? undefined\n : onClick != null || onPress != null\n ? 0\n : undefined\n }\n {...relProp}\n target={target}\n >\n {asButton ? <button>{children}</button> : children}\n </StyledLink>\n )\n }\n)\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAM,eAAkB,GAAA,OAAA,CAAA;AAEX,MAAA,UAAA,GAAa,MAAO,CAAA,SAAA,CAAU,CAAG,EAAA;AAAA,EAC5C,cAAgB,EAAA,MAAA;AAAA,EAChB,MAAQ,EAAA,CAAA;AAAA,EACR,YAAc,EAAA,wBAAA;AAAA,EACd,MAAQ,EAAA,SAAA;AAAA,EACR,UAAA,EAAY,UAAU,eAA0B,CAAA,QAAA,EAAA,eAAA,CAAA,CAAA;AAAA,EAGhD,UAAY,EAAA,MAAA;AAAA,EACZ,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,IAAM,EAAA,SAAA;AAAA,EAEN,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,sBAAA;AAAA,QACP,WAAa,EAAA,wBAAA;AAAA,QACb,GAAG,KAAM,CAAA,QAAA;AAAA,QACT,SAAW,EAAA;AAAA,UACT,KAAO,EAAA,sBAAA;AAAA,UACP,WAAa,EAAA,wBAAA;AAAA,SACf;AAAA,QACA,UAAY,EAAA;AAAA,UACV,KAAO,EAAA,sBAAA;AAAA,UACP,WAAa,EAAA,sBAAA;AAAA,SACf;AAAA,OACF;AAAA,MACA,SAAW,EAAA;AAAA,QACT,KAAO,EAAA,sBAAA;AAAA,QACP,WAAa,EAAA,wBAAA;AAAA,QACb,GAAG,KAAM,CAAA,QAAA;AAAA,QACT,SAAW,E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B,sBAAwB,EAAA,KAAA;AAAA,QACxB,GAAG,SAAA;AAAA,OACL;AAAA,MACA,eAAA;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,QAAW,GAAA,IAAA,IAAQ,IAAS,IAAA,CAAA,OAAA,IAAA,IAAA,GAAA,OAAA,GAAW,OAAY,KAAA,IAAA,CAAA;AAEzD,IAAA,MAAM,YAAe,GAAA,UAAA;AAAA,MACnB,SAAA;AAAA,MACA,WAAW,WAAc,GAAA,SAAA;AAAA,KAC3B,CAAA;AAEA,IAAM,MAAA,OAAA,GAAU,CAAC,QAAY,IAAA;AAAA,MAC3B,GAAK,EAAA,MAAA,KAAW,QAAW,GAAA,CAAA,oBAAA,EAAuB,GAAQ,CAAA,CAAA,GAAA,GAAA;AAAA,KAC5D,CAAA;AAEA,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MACE,GAAG,YAAA;AAAA,MACJ,GAAK,EAAA,eAAA;AAAA,MACL,IAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAS,EAAA,QAAA;AAAA,MACT,QAAA,EACE,QACI,GAAA,CAAA,CAAA,GACA,IAAQ,IAAA,IAAA,GACR,SACA,OAAW,IAAA,IAAA,IAAQ,OAAW,IAAA,IAAA,GAC9B,CACA,GAAA,KAAA,CAAA;AAAA,MAEL,GAAG,OAAA;AAAA,MACJ,MAAA;AAAA,KAAA,EAEC,QAAW,mBAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA,EAAA,QAAS,IAAY,QAC5C,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { PressProps } from '@mirohq/design-system-use-press';
|
|
3
|
+
import { AriaLinkProps } from '@react-types/link';
|
|
5
4
|
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
6
5
|
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
7
6
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
@@ -11,7 +10,7 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
11
10
|
variant?: "primary" | "secondary" | undefined;
|
|
12
11
|
dashed?: boolean | "true" | undefined;
|
|
13
12
|
disabled?: boolean | "true" | undefined;
|
|
14
|
-
}, "
|
|
13
|
+
}, "disabled" | "dashed" | "variant"> & _stitches_react_types_styled_component.TransformProps<{
|
|
15
14
|
variant?: "primary" | "secondary" | undefined;
|
|
16
15
|
dashed?: boolean | "true" | undefined;
|
|
17
16
|
disabled?: boolean | "true" | undefined;
|
|
@@ -92,7 +91,6 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
92
91
|
readonly 'background-danger-prominent-active'?: any;
|
|
93
92
|
readonly 'background-danger-prominent-hover'?: any;
|
|
94
93
|
readonly 'background-neutrals'?: any;
|
|
95
|
-
readonly 'background-neutrals-body'?: any;
|
|
96
94
|
readonly 'background-neutrals-container'?: any;
|
|
97
95
|
readonly 'background-neutrals-controls-disabled'?: any;
|
|
98
96
|
readonly 'background-neutrals-disabled'?: any;
|
|
@@ -100,6 +98,8 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
100
98
|
readonly 'background-neutrals-inactive-hover'?: any;
|
|
101
99
|
readonly 'background-neutrals-inverted'?: any;
|
|
102
100
|
readonly 'background-neutrals-inverted-subtle'?: any;
|
|
101
|
+
readonly 'background-neutrals-page'?: any;
|
|
102
|
+
readonly 'background-neutrals-page-subtle'?: any;
|
|
103
103
|
readonly 'background-neutrals-scrolls'?: any;
|
|
104
104
|
readonly 'background-neutrals-scrolls-hover'?: any;
|
|
105
105
|
readonly 'background-neutrals-subtle'?: any;
|
|
@@ -123,12 +123,11 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
123
123
|
readonly 'text-neutrals'?: any;
|
|
124
124
|
readonly 'text-neutrals-disabled'?: any;
|
|
125
125
|
readonly 'text-neutrals-inverted'?: any;
|
|
126
|
-
readonly 'text-neutrals-link'?: any;
|
|
127
|
-
readonly 'text-neutrals-link-active'?: any;
|
|
128
|
-
readonly 'text-neutrals-link-hover'?: any;
|
|
129
126
|
readonly 'text-neutrals-placeholder'?: any;
|
|
130
127
|
readonly 'text-neutrals-placeholder-only'?: any;
|
|
131
128
|
readonly 'text-neutrals-subtle'?: any;
|
|
129
|
+
readonly 'text-neutrals-subtle-active'?: any;
|
|
130
|
+
readonly 'text-neutrals-subtle-hover'?: any;
|
|
132
131
|
readonly 'text-primary'?: any;
|
|
133
132
|
readonly 'text-primary-active'?: any;
|
|
134
133
|
readonly 'text-primary-hover'?: any;
|
|
@@ -148,7 +147,7 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
148
147
|
readonly 'icon-neutrals-inverted'?: any;
|
|
149
148
|
readonly 'icon-neutrals-search'?: any;
|
|
150
149
|
readonly 'icon-neutrals-subtle'?: any;
|
|
151
|
-
readonly 'icon-neutrals-
|
|
150
|
+
readonly 'icon-neutrals-text'?: any;
|
|
152
151
|
readonly 'icon-primary'?: any;
|
|
153
152
|
readonly 'icon-primary-active'?: any;
|
|
154
153
|
readonly 'icon-primary-hover'?: any;
|
|
@@ -157,7 +156,10 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
157
156
|
readonly 'icon-success'?: any;
|
|
158
157
|
readonly 'icon-success-inverted'?: any;
|
|
159
158
|
readonly 'icon-warning'?: any;
|
|
159
|
+
readonly 'icon-warning-prominent'?: any;
|
|
160
160
|
readonly 'border-danger'?: any;
|
|
161
|
+
readonly 'border-danger-active'?: any;
|
|
162
|
+
readonly 'border-danger-hover'?: any;
|
|
161
163
|
readonly 'border-focus-inner'?: any;
|
|
162
164
|
readonly 'border-focus-middle'?: any;
|
|
163
165
|
readonly 'border-focus-outer'?: any;
|
|
@@ -169,6 +171,9 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
169
171
|
readonly 'border-neutrals-hover'?: any;
|
|
170
172
|
readonly 'border-neutrals-inverted'?: any;
|
|
171
173
|
readonly 'border-neutrals-subtle'?: any;
|
|
174
|
+
readonly 'border-neutrals-text-subtle'?: any;
|
|
175
|
+
readonly 'border-neutrals-text-subtle-active'?: any;
|
|
176
|
+
readonly 'border-neutrals-text-subtle-hover'?: any;
|
|
172
177
|
readonly 'border-primary'?: any;
|
|
173
178
|
readonly 'border-primary-active'?: any;
|
|
174
179
|
readonly 'border-primary-hover'?: any;
|
|
@@ -460,14 +465,15 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
460
465
|
}> | undefined;
|
|
461
466
|
}> & {
|
|
462
467
|
children?: react.ReactNode;
|
|
463
|
-
} & _mirohq_design_system_stitches.CustomStylesProps, "
|
|
468
|
+
} & _mirohq_design_system_stitches.CustomStylesProps, "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "type" | "referrerPolicy" | "media" | "target" | "href" | "download" | "hrefLang" | "ping" | "rel" | "asChild" | "dashed" | keyof _mirohq_design_system_stitches.CustomStylesProps | "variant"> & react.RefAttributes<HTMLAnchorElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"a">>, {
|
|
464
469
|
variant?: "primary" | "secondary" | undefined;
|
|
465
470
|
dashed?: boolean | "true" | undefined;
|
|
466
471
|
disabled?: boolean | "true" | undefined;
|
|
467
472
|
}, {}>;
|
|
468
473
|
declare type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>;
|
|
469
474
|
|
|
470
|
-
|
|
475
|
+
declare type LinkPropsA11y = StyledLinkProps & AriaLinkProps;
|
|
476
|
+
interface LinkProps extends Omit<LinkPropsA11y, 'onClick' | 'isDisabled' | 'elementType'> {
|
|
471
477
|
/**
|
|
472
478
|
* The content
|
|
473
479
|
*/
|
|
@@ -476,15 +482,19 @@ interface LinkProps extends StyledLinkProps, PressProps, HoverEvents {
|
|
|
476
482
|
* Change the link styles
|
|
477
483
|
*/
|
|
478
484
|
variant?: StyledLinkProps['variant'];
|
|
485
|
+
/**
|
|
486
|
+
* Disable the mouse events
|
|
487
|
+
*/
|
|
488
|
+
disabled?: boolean;
|
|
479
489
|
/**
|
|
480
490
|
* Set the underline to dashed mode
|
|
481
491
|
*/
|
|
482
492
|
dashed?: boolean;
|
|
483
493
|
/**
|
|
484
|
-
*
|
|
494
|
+
* Alias for onPress
|
|
485
495
|
*/
|
|
486
|
-
|
|
496
|
+
onClick?: AriaLinkProps['onPress'];
|
|
487
497
|
}
|
|
488
|
-
declare const Link: react__default.ForwardRefExoticComponent<Pick<LinkProps, "
|
|
498
|
+
declare const Link: react__default.ForwardRefExoticComponent<Pick<LinkProps, "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "type" | "referrerPolicy" | "media" | "target" | "href" | "download" | "hrefLang" | "ping" | "rel" | "asChild" | "css" | "UNSAFE_style" | "dashed" | "variant" | "onPress" | "onPressStart" | "onPressEnd" | "onPressChange" | "onPressUp" | "onFocusChange"> & react__default.RefAttributes<HTMLAnchorElement>>;
|
|
489
499
|
|
|
490
500
|
export { Link, LinkProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-link",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12-calendar-component.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
"react": "^16.14 || ^17 || ^18"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-aria/
|
|
29
|
+
"@react-aria/button": "^3.5.0",
|
|
30
|
+
"@react-aria/link": "^3.3.0",
|
|
30
31
|
"@react-aria/utils": "^3.13.0",
|
|
31
|
-
"@react-types/
|
|
32
|
+
"@react-types/link": "^3.3.0",
|
|
32
33
|
"@mirohq/design-system-primitive": "^1.1.0",
|
|
33
|
-
"@mirohq/design-system-stitches": "^2.3.2
|
|
34
|
-
"@mirohq/design-system-
|
|
35
|
-
"@mirohq/design-system-
|
|
34
|
+
"@mirohq/design-system-stitches": "^2.3.2",
|
|
35
|
+
"@mirohq/design-system-styles": "^1.0.24",
|
|
36
|
+
"@mirohq/design-system-utils": "^0.14.0-calendar-component.0"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
39
|
"build": "rollup -c ../../../rollup.config.js",
|