@mirohq/design-system-link 1.2.11-use-press.0 → 1.2.11-use-press.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -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 button = require('@react-aria/button');
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 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
- );
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}` : 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
- ref: refWithFallback,
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: asButton,
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
- }, asButton ? /* @__PURE__ */ React__default["default"].createElement("button", null, children) : children);
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, { 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,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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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;;;;"}
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,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AAA,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,2BAAYD,yBAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MAAO,QAAA;AAAA,KAAqB,EAAA,QAAS,IAAY,QAChE,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
package/dist/module.js CHANGED
@@ -1,7 +1,8 @@
1
- import React, { useRef } from 'react';
2
- import { useLink } from '@react-aria/link';
1
+ import React from 'react';
3
2
  import { mergeProps } from '@react-aria/utils';
4
- import { useButton } from '@react-aria/button';
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 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
- );
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}` : rel
102
+ rel: target === "_blank" ? `noopener noreferrer ${rel}`.trim() : rel
102
103
  };
103
104
  return /* @__PURE__ */ React.createElement(StyledLink, {
104
105
  ...elementProps,
105
- ref: refWithFallback,
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: asButton,
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
- }, asButton ? /* @__PURE__ */ React.createElement("button", null, children) : children);
116
+ target,
117
+ ref: forwardRef
118
+ }, asButton ? /* @__PURE__ */ React.createElement("button", {
119
+ disabled
120
+ }, children) : children);
115
121
  }
116
122
  );
117
123
 
@@ -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, { 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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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;;;;"}
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,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,EA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A,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 { AriaLinkProps } from '@react-types/link';
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
- }, "disabled" | "dashed" | "variant"> & _stitches_react_types_styled_component.TransformProps<{
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, "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">>, {
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
- declare type LinkPropsA11y = StyledLinkProps & AriaLinkProps;
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
- * Alias for onPress
484
+ * Make the link non-interactive
489
485
  */
490
- onClick?: AriaLinkProps['onPress'];
486
+ disabled?: boolean;
491
487
  }
492
- 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>>;
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.0",
3
+ "version": "1.2.11-use-press.2",
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/button": "^3.5.0",
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/link": "^3.3.0",
31
+ "@react-types/shared": "^3.16.0",
33
32
  "@mirohq/design-system-primitive": "^1.1.0",
34
- "@mirohq/design-system-stitches": "^2.3.1",
35
- "@mirohq/design-system-styles": "^1.0.23",
36
- "@mirohq/design-system-utils": "^0.14.0-use-press.0"
33
+ "@mirohq/design-system-stitches": "^2.3.2-use-press.0",
34
+ "@mirohq/design-system-styles": "^1.1.0-use-press.0",
35
+ "@mirohq/design-system-utils": "^0.14.0-use-press.2"
37
36
  },
38
37
  "scripts": {
39
38
  "build": "rollup -c ../../../rollup.config.js",