@mirohq/design-system-link 1.2.11-use-press.0 → 1.2.11-use-press.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +39 -33
- package/dist/main.js.map +1 -1
- package/dist/module.js +40 -34
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +8 -12
- package/package.json +6 -7
package/dist/main.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var link = require('@react-aria/link');
|
|
7
6
|
var utils = require('@react-aria/utils');
|
|
8
|
-
var
|
|
7
|
+
var designSystemUtils = require('@mirohq/design-system-utils');
|
|
8
|
+
var interactions = require('@react-aria/interactions');
|
|
9
|
+
var designSystemUsePress = require('@mirohq/design-system-use-press');
|
|
9
10
|
var designSystemPrimitive = require('@mirohq/design-system-primitive');
|
|
10
11
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
11
12
|
var designSystemStyles = require('@mirohq/design-system-styles');
|
|
@@ -71,55 +72,60 @@ const Link = React__default["default"].forwardRef(
|
|
|
71
72
|
({
|
|
72
73
|
variant = "primary",
|
|
73
74
|
disabled = false,
|
|
75
|
+
"aria-disabled": ariaDisabled,
|
|
74
76
|
dashed = false,
|
|
77
|
+
asChild,
|
|
75
78
|
rel = "",
|
|
76
79
|
target,
|
|
77
80
|
href,
|
|
78
81
|
onClick,
|
|
79
82
|
onPress,
|
|
80
83
|
children,
|
|
84
|
+
onHoverStart,
|
|
85
|
+
onHoverEnd,
|
|
86
|
+
onHoverChange,
|
|
81
87
|
...restProps
|
|
82
88
|
}, forwardRef) => {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
);
|
|
103
|
-
const asButton = href == null && (onPress != null ? onPress : onClick) != null;
|
|
104
|
-
const elementProps = utils.mergeProps(
|
|
105
|
-
restProps,
|
|
106
|
-
asButton ? buttonProps : linkProps
|
|
107
|
-
);
|
|
89
|
+
const asButton = href === void 0 && Boolean(onPress != null ? onPress : onClick);
|
|
90
|
+
let elementProps = { ...restProps, onClick };
|
|
91
|
+
if (disabled || designSystemUtils.booleanify(ariaDisabled)) {
|
|
92
|
+
elementProps = designSystemUtils.removeEventProps(
|
|
93
|
+
elementProps,
|
|
94
|
+
disabled ? [] : ["onBlur", "onFocus"]
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
const { pressProps, isPressed } = designSystemUsePress.usePress({
|
|
98
|
+
preventFocusOnPress: true,
|
|
99
|
+
disabled: disabled || designSystemUtils.booleanify(ariaDisabled),
|
|
100
|
+
onPress,
|
|
101
|
+
...elementProps
|
|
102
|
+
});
|
|
103
|
+
const { hoverProps, isHovered } = interactions.useHover({
|
|
104
|
+
onHoverStart,
|
|
105
|
+
onHoverEnd,
|
|
106
|
+
onHoverChange
|
|
107
|
+
});
|
|
108
|
+
elementProps = utils.mergeProps(pressProps, hoverProps);
|
|
108
109
|
const relProp = !asButton && {
|
|
109
|
-
rel: target === "_blank" ? `noopener noreferrer ${rel}
|
|
110
|
+
rel: target === "_blank" ? `noopener noreferrer ${rel}`.trim() : rel
|
|
110
111
|
};
|
|
111
112
|
return /* @__PURE__ */ React__default["default"].createElement(StyledLink, {
|
|
112
113
|
...elementProps,
|
|
113
|
-
|
|
114
|
+
"data-pressed": isPressed ? "" : void 0,
|
|
115
|
+
"data-hovered": isHovered ? "" : void 0,
|
|
116
|
+
asChild: asButton || asChild,
|
|
114
117
|
href,
|
|
115
118
|
variant,
|
|
116
119
|
disabled,
|
|
120
|
+
"aria-disabled": !asButton && (disabled || designSystemUtils.booleanify(ariaDisabled)) ? "true" : void 0,
|
|
117
121
|
dashed,
|
|
118
|
-
asChild:
|
|
119
|
-
tabIndex: disabled ? -1 : href != null ? void 0 : onClick != null || onPress != null ? 0 : void 0,
|
|
122
|
+
tabIndex: disabled && !asButton ? -1 : asChild === true && !asButton ? 0 : void 0,
|
|
120
123
|
...relProp,
|
|
121
|
-
target
|
|
122
|
-
|
|
124
|
+
target,
|
|
125
|
+
ref: forwardRef
|
|
126
|
+
}, asButton ? /* @__PURE__ */ React__default["default"].createElement("button", {
|
|
127
|
+
disabled
|
|
128
|
+
}, children) : children);
|
|
123
129
|
}
|
|
124
130
|
);
|
|
125
131
|
|
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, {
|
|
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, DOMAttributes } from 'react'\nimport { mergeProps } from '@react-aria/utils'\nimport { booleanify, removeEventProps } from '@mirohq/design-system-utils'\nimport { useHover } from '@react-aria/interactions'\nimport type { HoverEvents } from '@react-types/shared'\nimport { usePress } from '@mirohq/design-system-use-press'\nimport type { PressProps } from '@mirohq/design-system-use-press'\n\nimport type { StyledLinkProps } from './link.styled'\nimport { StyledLink } from './link.styled'\n\nexport interface LinkProps extends StyledLinkProps, PressProps, HoverEvents {\n /**\n * The content\n */\n children: ReactNode\n\n /**\n * Change the link styles\n */\n variant?: StyledLinkProps['variant']\n\n /**\n * Set the underline to dashed mode\n */\n dashed?: boolean\n\n /**\n * Make the link non-interactive\n */\n disabled?: boolean\n}\n\nexport const Link = React.forwardRef<ElementRef<'a' | 'button'>, LinkProps>(\n (\n {\n variant = 'primary',\n disabled = false,\n 'aria-disabled': ariaDisabled,\n dashed = false,\n asChild,\n rel = '',\n target,\n href,\n onClick,\n onPress,\n children,\n onHoverStart,\n onHoverEnd,\n onHoverChange,\n ...restProps\n },\n forwardRef\n ) => {\n const asButton = href === undefined && Boolean(onPress ?? onClick)\n let elementProps: DOMAttributes<any> = { ...restProps, onClick }\n\n if (disabled || booleanify(ariaDisabled)) {\n elementProps = removeEventProps(\n elementProps,\n disabled ? [] : ['onBlur', 'onFocus']\n )\n }\n\n const { pressProps, isPressed } = usePress({\n preventFocusOnPress: true,\n disabled: disabled || booleanify(ariaDisabled),\n onPress,\n ...elementProps,\n })\n\n const { hoverProps, isHovered } = useHover({\n onHoverStart,\n onHoverEnd,\n onHoverChange,\n })\n\n elementProps = mergeProps(pressProps, hoverProps)\n\n const relProp = !asButton && {\n rel: target === '_blank' ? `noopener noreferrer ${rel}`.trim() : rel,\n }\n\n return (\n <StyledLink\n {...elementProps}\n data-pressed={isPressed ? '' : undefined}\n data-hovered={isHovered ? '' : undefined}\n asChild={asButton || asChild}\n href={href}\n variant={variant}\n disabled={disabled}\n aria-disabled={\n !asButton && (disabled || booleanify(ariaDisabled))\n ? 'true'\n : undefined\n }\n dashed={dashed}\n tabIndex={\n disabled && !asButton\n ? -1\n : asChild === true && !asButton\n ? 0\n : undefined\n }\n {...relProp}\n target={target}\n // @ts-expect-error\n ref={forwardRef}\n >\n {asButton ? <button disabled={disabled}>{children}</button> : children}\n </StyledLink>\n )\n }\n)\n"],"names":["styled","Primitive","focus","React","booleanify","removeEventProps","usePress","useHover","mergeProps"],"mappings":";;;;;;;;;;;;;;;;;AAKA,MAAM,eAAkB,GAAA,OAAA,CAAA;AAEX,MAAA,UAAA,GAAaA,2BAAO,CAAAC,+BAAA,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,GAAGC,wBAAM,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,GAAGA,wBAAM,CAAA,QAAA;AAAA,QACT,SAAW,EAAA;AAAA,UACT,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,IAAY,QAChE,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { useLink } from '@react-aria/link';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { mergeProps } from '@react-aria/utils';
|
|
4
|
-
import {
|
|
3
|
+
import { booleanify, removeEventProps } from '@mirohq/design-system-utils';
|
|
4
|
+
import { useHover } from '@react-aria/interactions';
|
|
5
|
+
import { usePress } from '@mirohq/design-system-use-press';
|
|
5
6
|
import { Primitive } from '@mirohq/design-system-primitive';
|
|
6
7
|
import { styled } from '@mirohq/design-system-stitches';
|
|
7
8
|
import { focus } from '@mirohq/design-system-styles';
|
|
@@ -63,55 +64,60 @@ const Link = React.forwardRef(
|
|
|
63
64
|
({
|
|
64
65
|
variant = "primary",
|
|
65
66
|
disabled = false,
|
|
67
|
+
"aria-disabled": ariaDisabled,
|
|
66
68
|
dashed = false,
|
|
69
|
+
asChild,
|
|
67
70
|
rel = "",
|
|
68
71
|
target,
|
|
69
72
|
href,
|
|
70
73
|
onClick,
|
|
71
74
|
onPress,
|
|
72
75
|
children,
|
|
76
|
+
onHoverStart,
|
|
77
|
+
onHoverEnd,
|
|
78
|
+
onHoverChange,
|
|
73
79
|
...restProps
|
|
74
80
|
}, forwardRef) => {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
95
|
-
const asButton = href == null && (onPress != null ? onPress : onClick) != null;
|
|
96
|
-
const elementProps = mergeProps(
|
|
97
|
-
restProps,
|
|
98
|
-
asButton ? buttonProps : linkProps
|
|
99
|
-
);
|
|
81
|
+
const asButton = href === void 0 && Boolean(onPress != null ? onPress : onClick);
|
|
82
|
+
let elementProps = { ...restProps, onClick };
|
|
83
|
+
if (disabled || booleanify(ariaDisabled)) {
|
|
84
|
+
elementProps = removeEventProps(
|
|
85
|
+
elementProps,
|
|
86
|
+
disabled ? [] : ["onBlur", "onFocus"]
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
const { pressProps, isPressed } = usePress({
|
|
90
|
+
preventFocusOnPress: true,
|
|
91
|
+
disabled: disabled || booleanify(ariaDisabled),
|
|
92
|
+
onPress,
|
|
93
|
+
...elementProps
|
|
94
|
+
});
|
|
95
|
+
const { hoverProps, isHovered } = useHover({
|
|
96
|
+
onHoverStart,
|
|
97
|
+
onHoverEnd,
|
|
98
|
+
onHoverChange
|
|
99
|
+
});
|
|
100
|
+
elementProps = mergeProps(pressProps, hoverProps);
|
|
100
101
|
const relProp = !asButton && {
|
|
101
|
-
rel: target === "_blank" ? `noopener noreferrer ${rel}
|
|
102
|
+
rel: target === "_blank" ? `noopener noreferrer ${rel}`.trim() : rel
|
|
102
103
|
};
|
|
103
104
|
return /* @__PURE__ */ React.createElement(StyledLink, {
|
|
104
105
|
...elementProps,
|
|
105
|
-
|
|
106
|
+
"data-pressed": isPressed ? "" : void 0,
|
|
107
|
+
"data-hovered": isHovered ? "" : void 0,
|
|
108
|
+
asChild: asButton || asChild,
|
|
106
109
|
href,
|
|
107
110
|
variant,
|
|
108
111
|
disabled,
|
|
112
|
+
"aria-disabled": !asButton && (disabled || booleanify(ariaDisabled)) ? "true" : void 0,
|
|
109
113
|
dashed,
|
|
110
|
-
asChild:
|
|
111
|
-
tabIndex: disabled ? -1 : href != null ? void 0 : onClick != null || onPress != null ? 0 : void 0,
|
|
114
|
+
tabIndex: disabled && !asButton ? -1 : asChild === true && !asButton ? 0 : void 0,
|
|
112
115
|
...relProp,
|
|
113
|
-
target
|
|
114
|
-
|
|
116
|
+
target,
|
|
117
|
+
ref: forwardRef
|
|
118
|
+
}, asButton ? /* @__PURE__ */ React.createElement("button", {
|
|
119
|
+
disabled
|
|
120
|
+
}, children) : children);
|
|
115
121
|
}
|
|
116
122
|
);
|
|
117
123
|
|
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, {
|
|
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, DOMAttributes } from 'react'\nimport { mergeProps } from '@react-aria/utils'\nimport { booleanify, removeEventProps } from '@mirohq/design-system-utils'\nimport { useHover } from '@react-aria/interactions'\nimport type { HoverEvents } from '@react-types/shared'\nimport { usePress } from '@mirohq/design-system-use-press'\nimport type { PressProps } from '@mirohq/design-system-use-press'\n\nimport type { StyledLinkProps } from './link.styled'\nimport { StyledLink } from './link.styled'\n\nexport interface LinkProps extends StyledLinkProps, PressProps, HoverEvents {\n /**\n * The content\n */\n children: ReactNode\n\n /**\n * Change the link styles\n */\n variant?: StyledLinkProps['variant']\n\n /**\n * Set the underline to dashed mode\n */\n dashed?: boolean\n\n /**\n * Make the link non-interactive\n */\n disabled?: boolean\n}\n\nexport const Link = React.forwardRef<ElementRef<'a' | 'button'>, LinkProps>(\n (\n {\n variant = 'primary',\n disabled = false,\n 'aria-disabled': ariaDisabled,\n dashed = false,\n asChild,\n rel = '',\n target,\n href,\n onClick,\n onPress,\n children,\n onHoverStart,\n onHoverEnd,\n onHoverChange,\n ...restProps\n },\n forwardRef\n ) => {\n const asButton = href === undefined && Boolean(onPress ?? onClick)\n let elementProps: DOMAttributes<any> = { ...restProps, onClick }\n\n if (disabled || booleanify(ariaDisabled)) {\n elementProps = removeEventProps(\n elementProps,\n disabled ? [] : ['onBlur', 'onFocus']\n )\n }\n\n const { pressProps, isPressed } = usePress({\n preventFocusOnPress: true,\n disabled: disabled || booleanify(ariaDisabled),\n onPress,\n ...elementProps,\n })\n\n const { hoverProps, isHovered } = useHover({\n onHoverStart,\n onHoverEnd,\n onHoverChange,\n })\n\n elementProps = mergeProps(pressProps, hoverProps)\n\n const relProp = !asButton && {\n rel: target === '_blank' ? `noopener noreferrer ${rel}`.trim() : rel,\n }\n\n return (\n <StyledLink\n {...elementProps}\n data-pressed={isPressed ? '' : undefined}\n data-hovered={isHovered ? '' : undefined}\n asChild={asButton || asChild}\n href={href}\n variant={variant}\n disabled={disabled}\n aria-disabled={\n !asButton && (disabled || booleanify(ariaDisabled))\n ? 'true'\n : undefined\n }\n dashed={dashed}\n tabIndex={\n disabled && !asButton\n ? -1\n : asChild === true && !asButton\n ? 0\n : undefined\n }\n {...relProp}\n target={target}\n // @ts-expect-error\n ref={forwardRef}\n >\n {asButton ? <button disabled={disabled}>{children}</button> : children}\n </StyledLink>\n )\n }\n)\n"],"names":[],"mappings":";;;;;;;;;AAKA,MAAM,eAAkB,GAAA,OAAA,CAAA;AAEX,MAAA,UAAA,GAAa,MAAO,CAA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MAAA,OAAA,GAAU,CAAC,QAAY,IAAA;AAAA,MAC3B,KAAK,MAAW,KAAA,QAAA,GAAW,CAAuB,oBAAA,EAAA,GAAA,CAAA,CAAA,CAAM,MAAS,GAAA,GAAA;AAAA,KACnE,CAAA;AAEA,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,MACE,GAAG,YAAA;AAAA,MACJ,cAAA,EAAc,YAAY,EAAK,GAAA,KAAA,CAAA;AAAA,MAC/B,cAAA,EAAc,YAAY,EAAK,GAAA,KAAA,CAAA;AAAA,MAC/B,SAAS,QAAY,IAAA,OAAA;AAAA,MACrB,IAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,iBACE,CAAC,QAAA,KAAa,YAAY,UAAW,CAAA,YAAY,KAC7C,MACA,GAAA,KAAA,CAAA;AAAA,MAEN,MAAA;AAAA,MACA,QAAA,EACE,YAAY,CAAC,QAAA,GACT,KACA,OAAY,KAAA,IAAA,IAAQ,CAAC,QAAA,GACrB,CACA,GAAA,KAAA,CAAA;AAAA,MAEL,GAAG,OAAA;AAAA,MACJ,MAAA;AAAA,MAEA,GAAK,EAAA,UAAA;AAAA,KAAA,EAEJ,2BAAY,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MAAO,QAAA;AAAA,KAAqB,EAAA,QAAS,IAAY,QAChE,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { HoverEvents } from '@react-types/shared';
|
|
4
|
+
import { PressProps } from '@mirohq/design-system-use-press';
|
|
4
5
|
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
5
6
|
import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
|
|
6
7
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
@@ -10,7 +11,7 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
10
11
|
variant?: "primary" | "secondary" | undefined;
|
|
11
12
|
dashed?: boolean | "true" | undefined;
|
|
12
13
|
disabled?: boolean | "true" | undefined;
|
|
13
|
-
}, "
|
|
14
|
+
}, "dashed" | "disabled" | "variant"> & _stitches_react_types_styled_component.TransformProps<{
|
|
14
15
|
variant?: "primary" | "secondary" | undefined;
|
|
15
16
|
dashed?: boolean | "true" | undefined;
|
|
16
17
|
disabled?: boolean | "true" | undefined;
|
|
@@ -459,15 +460,14 @@ declare const StyledLink: react.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
459
460
|
}> | undefined;
|
|
460
461
|
}> & {
|
|
461
462
|
children?: react.ReactNode;
|
|
462
|
-
} & _mirohq_design_system_stitches.CustomStylesProps, "
|
|
463
|
+
} & _mirohq_design_system_stitches.CustomStylesProps, "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" | "key" | "slot" | "title" | "color" | "translate" | "hidden" | "dashed" | "prefix" | "id" | "role" | "tabIndex" | "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" | "disabled" | "target" | "href" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "download" | "hrefLang" | "media" | "ping" | "rel" | "referrerPolicy" | "asChild" | keyof _mirohq_design_system_stitches.CustomStylesProps | "variant"> & react.RefAttributes<HTMLAnchorElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"a">>, {
|
|
463
464
|
variant?: "primary" | "secondary" | undefined;
|
|
464
465
|
dashed?: boolean | "true" | undefined;
|
|
465
466
|
disabled?: boolean | "true" | undefined;
|
|
466
467
|
}, {}>;
|
|
467
468
|
declare type StyledLinkProps = ComponentPropsWithRef<typeof StyledLink>;
|
|
468
469
|
|
|
469
|
-
|
|
470
|
-
interface LinkProps extends Omit<LinkPropsA11y, 'onClick' | 'isDisabled' | 'elementType'> {
|
|
470
|
+
interface LinkProps extends StyledLinkProps, PressProps, HoverEvents {
|
|
471
471
|
/**
|
|
472
472
|
* The content
|
|
473
473
|
*/
|
|
@@ -476,19 +476,15 @@ interface LinkProps extends Omit<LinkPropsA11y, 'onClick' | 'isDisabled' | 'elem
|
|
|
476
476
|
* Change the link styles
|
|
477
477
|
*/
|
|
478
478
|
variant?: StyledLinkProps['variant'];
|
|
479
|
-
/**
|
|
480
|
-
* Disable the mouse events
|
|
481
|
-
*/
|
|
482
|
-
disabled?: boolean;
|
|
483
479
|
/**
|
|
484
480
|
* Set the underline to dashed mode
|
|
485
481
|
*/
|
|
486
482
|
dashed?: boolean;
|
|
487
483
|
/**
|
|
488
|
-
*
|
|
484
|
+
* Make the link non-interactive
|
|
489
485
|
*/
|
|
490
|
-
|
|
486
|
+
disabled?: boolean;
|
|
491
487
|
}
|
|
492
|
-
declare const Link: react__default.ForwardRefExoticComponent<Pick<LinkProps, "
|
|
488
|
+
declare const Link: react__default.ForwardRefExoticComponent<Pick<LinkProps, "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" | "key" | "slot" | "title" | "color" | "translate" | "hidden" | "dashed" | "prefix" | "id" | "role" | "tabIndex" | "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" | "pressed" | "disabled" | "preventFocusOnPress" | "allowTextSelectionOnPress" | "shouldCancelOnPointerExit" | "target" | "href" | "type" | "onPressStart" | "onPressEnd" | "onPressChange" | "onPress" | "onPressUp" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "download" | "hrefLang" | "media" | "ping" | "rel" | "referrerPolicy" | "asChild" | "css" | "UNSAFE_style" | "variant" | "onHoverStart" | "onHoverEnd" | "onHoverChange"> & react__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
493
489
|
|
|
494
490
|
export { Link, LinkProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-link",
|
|
3
|
-
"version": "1.2.11-use-press.
|
|
3
|
+
"version": "1.2.11-use-press.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -26,14 +26,13 @@
|
|
|
26
26
|
"react": "^16.14 || ^17 || ^18"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-aria/
|
|
30
|
-
"@react-aria/link": "^3.3.0",
|
|
29
|
+
"@react-aria/interactions": "^3.13.0",
|
|
31
30
|
"@react-aria/utils": "^3.13.0",
|
|
32
|
-
"@react-types/
|
|
31
|
+
"@react-types/shared": "^3.16.0",
|
|
33
32
|
"@mirohq/design-system-primitive": "^1.1.0",
|
|
34
|
-
"@mirohq/design-system-stitches": "^2.3.
|
|
35
|
-
"@mirohq/design-system-
|
|
36
|
-
"@mirohq/design-system-
|
|
33
|
+
"@mirohq/design-system-stitches": "^2.3.2-use-press.0",
|
|
34
|
+
"@mirohq/design-system-utils": "^0.14.0-use-press.1",
|
|
35
|
+
"@mirohq/design-system-styles": "^1.1.0-use-press.0"
|
|
37
36
|
},
|
|
38
37
|
"scripts": {
|
|
39
38
|
"build": "rollup -c ../../../rollup.config.js",
|