@react-spectrum/link 3.0.0-nightly.1383 → 3.0.0-nightly.1395

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.css CHANGED
@@ -1 +1 @@
1
- ._spectrum-Link_5a03c7{-webkit-text-decoration-skip:objects;background-color:initial;cursor:pointer;outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}._spectrum-Link_5a03c7,._spectrum-Link_5a03c7._is-hovered_5a03c7{text-decoration:underline}._spectrum-Link_5a03c7._focus-ring_5a03c7{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}._spectrum-Link_5a03c7._is-disabled_5a03c7{cursor:default;pointer-events:none}._spectrum-Link_5a03c7._is-disabled_5a03c7._is-hovered_5a03c7,._spectrum-Link_5a03c7._is-disabled_5a03c7:focus{text-decoration:none}._spectrum-Link--overBackground_5a03c7,._spectrum-Link--secondary_5a03c7{text-decoration:underline}._spectrum-Link--quiet_5a03c7{text-decoration:none}._spectrum-Link_5a03c7{color:var(--spectrum-link-text-color,var(--spectrum-global-color-blue-600))}._spectrum-Link_5a03c7._is-hovered_5a03c7{color:var(--spectrum-link-text-color-hover,var(--spectrum-global-color-blue-600))}._spectrum-Link_5a03c7:active{color:var(--spectrum-link-text-color-down,var(--spectrum-global-color-blue-700))}._spectrum-Link_5a03c7._focus-ring_5a03c7{color:var(--spectrum-link-text-color-key-focus,var(--spectrum-alias-text-color-key-focus))}._spectrum-Link_5a03c7._is-disabled_5a03c7{color:var(--spectrum-link-text-color-disabled,var(--spectrum-alias-text-color-disabled))}._spectrum-Link--secondary_5a03c7,._spectrum-Link--secondary_5a03c7._is-hovered_5a03c7,._spectrum-Link--secondary_5a03c7:active,._spectrum-Link--secondary_5a03c7:focus{color:inherit}._spectrum-Link--overBackground_5a03c7{color:var(--spectrum-link-over-background-text-color,var(--spectrum-global-color-static-white))}._spectrum-Link--overBackground_5a03c7._is-hovered_5a03c7{color:var(--spectrum-link-over-background-text-color-hover,var(--spectrum-global-color-static-white))}._spectrum-Link--overBackground_5a03c7:active{color:var(--spectrum-link-over-background-text-color-down,var(--spectrum-global-color-static-white))}._spectrum-Link--overBackground_5a03c7:focus{color:var(--spectrum-link-over-background-text-color-key-focus,var(--spectrum-global-color-static-white))}._spectrum-Link--overBackground_5a03c7._is-disabled_5a03c7{color:var(--spectrum-link-over-background-text-color-disabled,hsla(0,0%,100%,.5))}
1
+ .spectrum-Link_5a03c7{-webkit-text-decoration-skip:objects;transition:color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;cursor:pointer;background-color:#0000;outline:0;text-decoration:underline}.spectrum-Link_5a03c7.is-hovered_5a03c7,.spectrum-Link_5a03c7.focus-ring_5a03c7{text-decoration:underline}.spectrum-Link_5a03c7.focus-ring_5a03c7{text-decoration:underline;text-decoration-style:double}.spectrum-Link_5a03c7.is-disabled_5a03c7{cursor:default;pointer-events:none}.spectrum-Link_5a03c7.is-disabled_5a03c7.is-hovered_5a03c7,.spectrum-Link_5a03c7.is-disabled_5a03c7:focus{text-decoration:none}.spectrum-Link--secondary_5a03c7,.spectrum-Link--overBackground_5a03c7{text-decoration:underline}.spectrum-Link--quiet_5a03c7{text-decoration:none}.spectrum-Link_5a03c7{color:var(--spectrum-link-text-color,var(--spectrum-global-color-blue-600))}.spectrum-Link_5a03c7.is-hovered_5a03c7{color:var(--spectrum-link-text-color-hover,var(--spectrum-global-color-blue-600))}.spectrum-Link_5a03c7:active{color:var(--spectrum-link-text-color-down,var(--spectrum-global-color-blue-700))}.spectrum-Link_5a03c7.focus-ring_5a03c7{color:var(--spectrum-link-text-color-key-focus,var(--spectrum-alias-text-color-key-focus))}.spectrum-Link_5a03c7.is-disabled_5a03c7{color:var(--spectrum-link-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Link--secondary_5a03c7,.spectrum-Link--secondary_5a03c7.is-hovered_5a03c7,.spectrum-Link--secondary_5a03c7:active,.spectrum-Link--secondary_5a03c7:focus{color:inherit}.spectrum-Link--overBackground_5a03c7{color:var(--spectrum-link-over-background-text-color,var(--spectrum-global-color-static-white))}.spectrum-Link--overBackground_5a03c7.is-hovered_5a03c7{color:var(--spectrum-link-over-background-text-color-hover,var(--spectrum-global-color-static-white))}.spectrum-Link--overBackground_5a03c7:active{color:var(--spectrum-link-over-background-text-color-down,var(--spectrum-global-color-static-white))}.spectrum-Link--overBackground_5a03c7:focus{color:var(--spectrum-link-over-background-text-color-key-focus,var(--spectrum-global-color-static-white))}.spectrum-Link--overBackground_5a03c7.is-disabled_5a03c7{color:var(--spectrum-link-over-background-text-color-disabled,#ffffff80)}
package/dist/main.js CHANGED
@@ -1,11 +1,11 @@
1
1
  require("./main.css");
2
- var $z1Cxk$reactspectrumutils = require("@react-spectrum/utils");
3
- var $z1Cxk$reactariafocus = require("@react-aria/focus");
4
- var $z1Cxk$reactariautils = require("@react-aria/utils");
5
- var $z1Cxk$react = require("react");
6
- var $z1Cxk$reactariainteractions = require("@react-aria/interactions");
7
- var $z1Cxk$reactarialink = require("@react-aria/link");
8
- var $z1Cxk$reactspectrumprovider = require("@react-spectrum/provider");
2
+ var $cT6zj$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $cT6zj$reactariafocus = require("@react-aria/focus");
4
+ var $cT6zj$reactariautils = require("@react-aria/utils");
5
+ var $cT6zj$react = require("react");
6
+ var $cT6zj$reactariainteractions = require("@react-aria/interactions");
7
+ var $cT6zj$reactarialink = require("@react-aria/link");
8
+ var $cT6zj$reactspectrumprovider = require("@react-spectrum/provider");
9
9
 
10
10
  function $parcel$exportWildcard(dest, source) {
11
11
  Object.keys(source).forEach(function(key) {
@@ -29,62 +29,62 @@ function $parcel$interopDefault(a) {
29
29
  function $parcel$export(e, n, v, s) {
30
30
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
31
31
  }
32
- var $6b370a27f4e56d58$exports = {};
32
+ var $d7a9466b5d41752d$exports = {};
33
33
 
34
- $parcel$export($6b370a27f4e56d58$exports, "Link", () => $6b370a27f4e56d58$export$a6c7ac8248d6e38a);
34
+ $parcel$export($d7a9466b5d41752d$exports, "Link", () => $d7a9466b5d41752d$export$a6c7ac8248d6e38a);
35
35
 
36
36
 
37
37
 
38
38
 
39
- var $3b12e8ebd188e5b9$exports = {};
39
+ var $bb1f304c038c7914$exports = {};
40
40
 
41
- $parcel$export($3b12e8ebd188e5b9$exports, "spectrum-Link", () => $3b12e8ebd188e5b9$export$d85dd8b94975f388, (v) => $3b12e8ebd188e5b9$export$d85dd8b94975f388 = v);
42
- $parcel$export($3b12e8ebd188e5b9$exports, "is-hovered", () => $3b12e8ebd188e5b9$export$b8813cd5d7824ce7, (v) => $3b12e8ebd188e5b9$export$b8813cd5d7824ce7 = v);
43
- $parcel$export($3b12e8ebd188e5b9$exports, "focus-ring", () => $3b12e8ebd188e5b9$export$f39a09f249340e2a, (v) => $3b12e8ebd188e5b9$export$f39a09f249340e2a = v);
44
- $parcel$export($3b12e8ebd188e5b9$exports, "is-disabled", () => $3b12e8ebd188e5b9$export$d35bc1e505d1ebbf, (v) => $3b12e8ebd188e5b9$export$d35bc1e505d1ebbf = v);
45
- $parcel$export($3b12e8ebd188e5b9$exports, "spectrum-Link--secondary", () => $3b12e8ebd188e5b9$export$ab09ed292dcb9a79, (v) => $3b12e8ebd188e5b9$export$ab09ed292dcb9a79 = v);
46
- $parcel$export($3b12e8ebd188e5b9$exports, "spectrum-Link--overBackground", () => $3b12e8ebd188e5b9$export$679b6267148797da, (v) => $3b12e8ebd188e5b9$export$679b6267148797da = v);
47
- $parcel$export($3b12e8ebd188e5b9$exports, "spectrum-Link--quiet", () => $3b12e8ebd188e5b9$export$81921ea93435e997, (v) => $3b12e8ebd188e5b9$export$81921ea93435e997 = v);
48
- var $3b12e8ebd188e5b9$export$d85dd8b94975f388;
49
- var $3b12e8ebd188e5b9$export$b8813cd5d7824ce7;
50
- var $3b12e8ebd188e5b9$export$f39a09f249340e2a;
51
- var $3b12e8ebd188e5b9$export$d35bc1e505d1ebbf;
52
- var $3b12e8ebd188e5b9$export$ab09ed292dcb9a79;
53
- var $3b12e8ebd188e5b9$export$679b6267148797da;
54
- var $3b12e8ebd188e5b9$export$81921ea93435e997;
55
- $3b12e8ebd188e5b9$export$d85dd8b94975f388 = "_spectrum-Link_5a03c7";
56
- $3b12e8ebd188e5b9$export$b8813cd5d7824ce7 = "_is-hovered_5a03c7";
57
- $3b12e8ebd188e5b9$export$f39a09f249340e2a = "_focus-ring_5a03c7";
58
- $3b12e8ebd188e5b9$export$d35bc1e505d1ebbf = "_is-disabled_5a03c7";
59
- $3b12e8ebd188e5b9$export$ab09ed292dcb9a79 = "_spectrum-Link--secondary_5a03c7";
60
- $3b12e8ebd188e5b9$export$679b6267148797da = "_spectrum-Link--overBackground_5a03c7";
61
- $3b12e8ebd188e5b9$export$81921ea93435e997 = "_spectrum-Link--quiet_5a03c7";
41
+ $parcel$export($bb1f304c038c7914$exports, "spectrum-Link", () => $bb1f304c038c7914$export$d85dd8b94975f388, (v) => $bb1f304c038c7914$export$d85dd8b94975f388 = v);
42
+ $parcel$export($bb1f304c038c7914$exports, "is-hovered", () => $bb1f304c038c7914$export$b8813cd5d7824ce7, (v) => $bb1f304c038c7914$export$b8813cd5d7824ce7 = v);
43
+ $parcel$export($bb1f304c038c7914$exports, "focus-ring", () => $bb1f304c038c7914$export$f39a09f249340e2a, (v) => $bb1f304c038c7914$export$f39a09f249340e2a = v);
44
+ $parcel$export($bb1f304c038c7914$exports, "is-disabled", () => $bb1f304c038c7914$export$d35bc1e505d1ebbf, (v) => $bb1f304c038c7914$export$d35bc1e505d1ebbf = v);
45
+ $parcel$export($bb1f304c038c7914$exports, "spectrum-Link--secondary", () => $bb1f304c038c7914$export$ab09ed292dcb9a79, (v) => $bb1f304c038c7914$export$ab09ed292dcb9a79 = v);
46
+ $parcel$export($bb1f304c038c7914$exports, "spectrum-Link--overBackground", () => $bb1f304c038c7914$export$679b6267148797da, (v) => $bb1f304c038c7914$export$679b6267148797da = v);
47
+ $parcel$export($bb1f304c038c7914$exports, "spectrum-Link--quiet", () => $bb1f304c038c7914$export$81921ea93435e997, (v) => $bb1f304c038c7914$export$81921ea93435e997 = v);
48
+ var $bb1f304c038c7914$export$d85dd8b94975f388;
49
+ var $bb1f304c038c7914$export$b8813cd5d7824ce7;
50
+ var $bb1f304c038c7914$export$f39a09f249340e2a;
51
+ var $bb1f304c038c7914$export$d35bc1e505d1ebbf;
52
+ var $bb1f304c038c7914$export$ab09ed292dcb9a79;
53
+ var $bb1f304c038c7914$export$679b6267148797da;
54
+ var $bb1f304c038c7914$export$81921ea93435e997;
55
+ $bb1f304c038c7914$export$d85dd8b94975f388 = "spectrum-Link_5a03c7";
56
+ $bb1f304c038c7914$export$b8813cd5d7824ce7 = "is-hovered_5a03c7";
57
+ $bb1f304c038c7914$export$f39a09f249340e2a = "focus-ring_5a03c7";
58
+ $bb1f304c038c7914$export$d35bc1e505d1ebbf = "is-disabled_5a03c7";
59
+ $bb1f304c038c7914$export$ab09ed292dcb9a79 = "spectrum-Link--secondary_5a03c7";
60
+ $bb1f304c038c7914$export$679b6267148797da = "spectrum-Link--overBackground_5a03c7";
61
+ $bb1f304c038c7914$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
62
62
 
63
63
 
64
64
 
65
65
 
66
66
 
67
- function $6b370a27f4e56d58$export$a6c7ac8248d6e38a(props) {
68
- props = $z1Cxk$reactspectrumprovider.useProviderProps(props);
69
- props = $z1Cxk$reactspectrumutils.useSlotProps(props, 'link');
67
+ function $d7a9466b5d41752d$export$a6c7ac8248d6e38a(props) {
68
+ props = $cT6zj$reactspectrumprovider.useProviderProps(props);
69
+ props = $cT6zj$reactspectrumutils.useSlotProps(props, 'link');
70
70
  let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
71
71
  href } = props;
72
- let { styleProps: styleProps } = $z1Cxk$reactspectrumutils.useStyleProps(props);
73
- let { hoverProps: hoverProps , isHovered: isHovered } = $z1Cxk$reactariainteractions.useHover({
72
+ let { styleProps: styleProps } = $cT6zj$reactspectrumutils.useStyleProps(props);
73
+ let { hoverProps: hoverProps , isHovered: isHovered } = $cT6zj$reactariainteractions.useHover({
74
74
  });
75
75
  if (href) console.warn('href is deprecated, please use an anchor element as children');
76
- let ref = $z1Cxk$react.useRef();
77
- let { linkProps: linkProps } = $z1Cxk$reactarialink.useLink({
76
+ let ref = $cT6zj$react.useRef();
77
+ let { linkProps: linkProps } = $cT6zj$reactarialink.useLink({
78
78
  ...props,
79
79
  elementType: typeof children === 'string' ? 'span' : 'a'
80
80
  }, ref);
81
- return(/*#__PURE__*/ ($parcel$interopDefault($z1Cxk$react)).createElement($z1Cxk$reactariafocus.FocusRing, {
82
- focusRingClass: $z1Cxk$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3b12e8ebd188e5b9$exports)), 'focus-ring')
83
- }, /*#__PURE__*/ ($parcel$interopDefault($z1Cxk$react)).cloneElement($z1Cxk$reactspectrumutils.getWrappedElement(children), {
81
+ return(/*#__PURE__*/ ($parcel$interopDefault($cT6zj$react)).createElement($cT6zj$reactariafocus.FocusRing, {
82
+ focusRingClass: $cT6zj$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($bb1f304c038c7914$exports)), 'focus-ring')
83
+ }, /*#__PURE__*/ ($parcel$interopDefault($cT6zj$react)).cloneElement($cT6zj$reactspectrumutils.getWrappedElement(children), {
84
84
  ...styleProps,
85
- ...$z1Cxk$reactariautils.mergeProps(linkProps, hoverProps),
85
+ ...$cT6zj$reactariautils.mergeProps(linkProps, hoverProps),
86
86
  ref: ref,
87
- className: $z1Cxk$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3b12e8ebd188e5b9$exports)), 'spectrum-Link', {
87
+ className: $cT6zj$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($bb1f304c038c7914$exports)), 'spectrum-Link', {
88
88
  'spectrum-Link--quiet': isQuiet,
89
89
  [`spectrum-Link--${variant}`]: variant,
90
90
  'is-hovered': isHovered
@@ -93,7 +93,7 @@ function $6b370a27f4e56d58$export$a6c7ac8248d6e38a(props) {
93
93
  }
94
94
 
95
95
 
96
- $parcel$exportWildcard(module.exports, $6b370a27f4e56d58$exports);
96
+ $parcel$exportWildcard(module.exports, $d7a9466b5d41752d$exports);
97
97
 
98
98
 
99
99
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,CAAuB;AACzD,yCAA4B,GAAG,CAAoB;AACnD,yCAA4B,GAAG,CAAoB;AACnD,yCAA6B,GAAG,CAAqB;AACrD,yCAA0C,GAAG,CAAkC;AAC/E,yCAA+C,GAAG,CAAuC;AACzF,yCAAsC,GAAG,CAA8B;;;;;;SDoBvD,yCAAI,CAAC,KAAwB,EAAE,CAAC;IAC9C,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAM;IAClC,GAAG,CAAC,CAAC,UACH,OAAO,GAAG,CAAS,oBACnB,OAAO,aACP,QAAQ,SACR,EAAa,AAAb,WAAa;IACb,IAAI,EACN,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,KAAK;IACtC,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,qCAAQ,CAAC,CAAC;IAAA,CAAC;IAEzC,EAAE,EAAE,IAAI,EACN,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,GAAG,CAAC,GAAG,GAAG,mBAAM;IAChB,GAAG,CAAC,CAAC,YAAA,SAAS,EAAA,CAAC,GAAG,4BAAO,CAAC,CAAC;WACtB,KAAK;QACR,WAAW,EAAE,MAAM,CAAC,QAAQ,KAAK,CAAQ,UAAG,CAAM,QAAG,CAAG;IAC1D,CAAC,EAAE,GAAG;IAEN,MAAM,oEACH,+BAAS;QAAC,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAY;qBACvD,sCAAK,CAAC,YAAY,CACjB,2CAAiB,CAAC,QAAQ,GAC1B,CAAC;WACI,UAAU;WACV,gCAAU,CAAC,SAAS,EAAE,UAAU;aACnC,GAAG;QACH,SAAS,EAAE,oCAAU,CACnB,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAsB,uBAAE,OAAO;cAC7B,eAAe,EAAE,OAAO,KAAK,OAAO;YACtC,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;IAExB,CAAC;AAIT,CAAC","sources":["packages/@react-spectrum/link/src/index.ts","packages/@react-spectrum/link/src/Link.tsx","packages/@adobe/spectrum-css-temp/components/link/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,CAAsB;AACxD,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA0C,GAAG,CAAiC;AAC9E,yCAA+C,GAAG,CAAsC;AACxF,yCAAsC,GAAG,CAA6B;;;;;;SDoBtD,yCAAI,CAAC,KAAwB,EAAE,CAAC;IAC9C,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,sCAAY,CAAC,KAAK,EAAE,CAAM;IAClC,GAAG,CAAC,CAAC,UACH,OAAO,GAAG,CAAS,oBACnB,OAAO,aACP,QAAQ,SACR,EAAa,AAAb,WAAa;IACb,IAAI,EACN,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,KAAK;IACtC,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,qCAAQ,CAAC,CAAC;IAAA,CAAC;IAEzC,EAAE,EAAE,IAAI,EACN,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,GAAG,CAAC,GAAG,GAAG,mBAAM;IAChB,GAAG,CAAC,CAAC,YAAA,SAAS,EAAA,CAAC,GAAG,4BAAO,CAAC,CAAC;WACtB,KAAK;QACR,WAAW,EAAE,MAAM,CAAC,QAAQ,KAAK,CAAQ,UAAG,CAAM,QAAG,CAAG;IAC1D,CAAC,EAAE,GAAG;IAEN,MAAM,oEACH,+BAAS;QAAC,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAY;qBACvD,sCAAK,CAAC,YAAY,CACjB,2CAAiB,CAAC,QAAQ,GAC1B,CAAC;WACI,UAAU;WACV,gCAAU,CAAC,SAAS,EAAE,UAAU;aACnC,GAAG;QACH,SAAS,EAAE,oCAAU,CACnB,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAsB,uBAAE,OAAO;cAC7B,eAAe,EAAE,OAAO,KAAK,OAAO;YACtC,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;IAExB,CAAC;AAIT,CAAC","sources":["packages/@react-spectrum/link/src/index.ts","packages/@react-spectrum/link/src/Link.tsx","packages/@adobe/spectrum-css-temp/components/link/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import "./main.css";
2
- import {useSlotProps as $9PFyS$useSlotProps, useStyleProps as $9PFyS$useStyleProps, classNames as $9PFyS$classNames, getWrappedElement as $9PFyS$getWrappedElement} from "@react-spectrum/utils";
3
- import {FocusRing as $9PFyS$FocusRing} from "@react-aria/focus";
4
- import {mergeProps as $9PFyS$mergeProps} from "@react-aria/utils";
5
- import $9PFyS$react, {useRef as $9PFyS$useRef} from "react";
6
- import {useHover as $9PFyS$useHover} from "@react-aria/interactions";
7
- import {useLink as $9PFyS$useLink} from "@react-aria/link";
8
- import {useProviderProps as $9PFyS$useProviderProps} from "@react-spectrum/provider";
2
+ import {useSlotProps as $laCyr$useSlotProps, useStyleProps as $laCyr$useStyleProps, classNames as $laCyr$classNames, getWrappedElement as $laCyr$getWrappedElement} from "@react-spectrum/utils";
3
+ import {FocusRing as $laCyr$FocusRing} from "@react-aria/focus";
4
+ import {mergeProps as $laCyr$mergeProps} from "@react-aria/utils";
5
+ import $laCyr$react, {useRef as $laCyr$useRef} from "react";
6
+ import {useHover as $laCyr$useHover} from "@react-aria/interactions";
7
+ import {useLink as $laCyr$useLink} from "@react-aria/link";
8
+ import {useProviderProps as $laCyr$useProviderProps} from "@react-spectrum/provider";
9
9
 
10
10
  function $parcel$interopDefault(a) {
11
11
  return a && a.__esModule ? a.default : a;
@@ -13,62 +13,62 @@ function $parcel$interopDefault(a) {
13
13
  function $parcel$export(e, n, v, s) {
14
14
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
15
  }
16
- var $c213a7985eeee7ca$exports = {};
16
+ var $cad7a8e22b47dfbf$exports = {};
17
17
 
18
- $parcel$export($c213a7985eeee7ca$exports, "Link", () => $c213a7985eeee7ca$export$a6c7ac8248d6e38a);
18
+ $parcel$export($cad7a8e22b47dfbf$exports, "Link", () => $cad7a8e22b47dfbf$export$a6c7ac8248d6e38a);
19
19
 
20
20
 
21
21
 
22
22
 
23
- var $4791defda0ed9da2$exports = {};
23
+ var $5833bfa28c465cef$exports = {};
24
24
 
25
- $parcel$export($4791defda0ed9da2$exports, "spectrum-Link", () => $4791defda0ed9da2$export$d85dd8b94975f388, (v) => $4791defda0ed9da2$export$d85dd8b94975f388 = v);
26
- $parcel$export($4791defda0ed9da2$exports, "is-hovered", () => $4791defda0ed9da2$export$b8813cd5d7824ce7, (v) => $4791defda0ed9da2$export$b8813cd5d7824ce7 = v);
27
- $parcel$export($4791defda0ed9da2$exports, "focus-ring", () => $4791defda0ed9da2$export$f39a09f249340e2a, (v) => $4791defda0ed9da2$export$f39a09f249340e2a = v);
28
- $parcel$export($4791defda0ed9da2$exports, "is-disabled", () => $4791defda0ed9da2$export$d35bc1e505d1ebbf, (v) => $4791defda0ed9da2$export$d35bc1e505d1ebbf = v);
29
- $parcel$export($4791defda0ed9da2$exports, "spectrum-Link--secondary", () => $4791defda0ed9da2$export$ab09ed292dcb9a79, (v) => $4791defda0ed9da2$export$ab09ed292dcb9a79 = v);
30
- $parcel$export($4791defda0ed9da2$exports, "spectrum-Link--overBackground", () => $4791defda0ed9da2$export$679b6267148797da, (v) => $4791defda0ed9da2$export$679b6267148797da = v);
31
- $parcel$export($4791defda0ed9da2$exports, "spectrum-Link--quiet", () => $4791defda0ed9da2$export$81921ea93435e997, (v) => $4791defda0ed9da2$export$81921ea93435e997 = v);
32
- var $4791defda0ed9da2$export$d85dd8b94975f388;
33
- var $4791defda0ed9da2$export$b8813cd5d7824ce7;
34
- var $4791defda0ed9da2$export$f39a09f249340e2a;
35
- var $4791defda0ed9da2$export$d35bc1e505d1ebbf;
36
- var $4791defda0ed9da2$export$ab09ed292dcb9a79;
37
- var $4791defda0ed9da2$export$679b6267148797da;
38
- var $4791defda0ed9da2$export$81921ea93435e997;
39
- $4791defda0ed9da2$export$d85dd8b94975f388 = "_spectrum-Link_5a03c7";
40
- $4791defda0ed9da2$export$b8813cd5d7824ce7 = "_is-hovered_5a03c7";
41
- $4791defda0ed9da2$export$f39a09f249340e2a = "_focus-ring_5a03c7";
42
- $4791defda0ed9da2$export$d35bc1e505d1ebbf = "_is-disabled_5a03c7";
43
- $4791defda0ed9da2$export$ab09ed292dcb9a79 = "_spectrum-Link--secondary_5a03c7";
44
- $4791defda0ed9da2$export$679b6267148797da = "_spectrum-Link--overBackground_5a03c7";
45
- $4791defda0ed9da2$export$81921ea93435e997 = "_spectrum-Link--quiet_5a03c7";
25
+ $parcel$export($5833bfa28c465cef$exports, "spectrum-Link", () => $5833bfa28c465cef$export$d85dd8b94975f388, (v) => $5833bfa28c465cef$export$d85dd8b94975f388 = v);
26
+ $parcel$export($5833bfa28c465cef$exports, "is-hovered", () => $5833bfa28c465cef$export$b8813cd5d7824ce7, (v) => $5833bfa28c465cef$export$b8813cd5d7824ce7 = v);
27
+ $parcel$export($5833bfa28c465cef$exports, "focus-ring", () => $5833bfa28c465cef$export$f39a09f249340e2a, (v) => $5833bfa28c465cef$export$f39a09f249340e2a = v);
28
+ $parcel$export($5833bfa28c465cef$exports, "is-disabled", () => $5833bfa28c465cef$export$d35bc1e505d1ebbf, (v) => $5833bfa28c465cef$export$d35bc1e505d1ebbf = v);
29
+ $parcel$export($5833bfa28c465cef$exports, "spectrum-Link--secondary", () => $5833bfa28c465cef$export$ab09ed292dcb9a79, (v) => $5833bfa28c465cef$export$ab09ed292dcb9a79 = v);
30
+ $parcel$export($5833bfa28c465cef$exports, "spectrum-Link--overBackground", () => $5833bfa28c465cef$export$679b6267148797da, (v) => $5833bfa28c465cef$export$679b6267148797da = v);
31
+ $parcel$export($5833bfa28c465cef$exports, "spectrum-Link--quiet", () => $5833bfa28c465cef$export$81921ea93435e997, (v) => $5833bfa28c465cef$export$81921ea93435e997 = v);
32
+ var $5833bfa28c465cef$export$d85dd8b94975f388;
33
+ var $5833bfa28c465cef$export$b8813cd5d7824ce7;
34
+ var $5833bfa28c465cef$export$f39a09f249340e2a;
35
+ var $5833bfa28c465cef$export$d35bc1e505d1ebbf;
36
+ var $5833bfa28c465cef$export$ab09ed292dcb9a79;
37
+ var $5833bfa28c465cef$export$679b6267148797da;
38
+ var $5833bfa28c465cef$export$81921ea93435e997;
39
+ $5833bfa28c465cef$export$d85dd8b94975f388 = "spectrum-Link_5a03c7";
40
+ $5833bfa28c465cef$export$b8813cd5d7824ce7 = "is-hovered_5a03c7";
41
+ $5833bfa28c465cef$export$f39a09f249340e2a = "focus-ring_5a03c7";
42
+ $5833bfa28c465cef$export$d35bc1e505d1ebbf = "is-disabled_5a03c7";
43
+ $5833bfa28c465cef$export$ab09ed292dcb9a79 = "spectrum-Link--secondary_5a03c7";
44
+ $5833bfa28c465cef$export$679b6267148797da = "spectrum-Link--overBackground_5a03c7";
45
+ $5833bfa28c465cef$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
46
46
 
47
47
 
48
48
 
49
49
 
50
50
 
51
- function $c213a7985eeee7ca$export$a6c7ac8248d6e38a(props) {
52
- props = $9PFyS$useProviderProps(props);
53
- props = $9PFyS$useSlotProps(props, 'link');
51
+ function $cad7a8e22b47dfbf$export$a6c7ac8248d6e38a(props) {
52
+ props = $laCyr$useProviderProps(props);
53
+ props = $laCyr$useSlotProps(props, 'link');
54
54
  let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
55
55
  href } = props;
56
- let { styleProps: styleProps } = $9PFyS$useStyleProps(props);
57
- let { hoverProps: hoverProps , isHovered: isHovered } = $9PFyS$useHover({
56
+ let { styleProps: styleProps } = $laCyr$useStyleProps(props);
57
+ let { hoverProps: hoverProps , isHovered: isHovered } = $laCyr$useHover({
58
58
  });
59
59
  if (href) console.warn('href is deprecated, please use an anchor element as children');
60
- let ref = $9PFyS$useRef();
61
- let { linkProps: linkProps } = $9PFyS$useLink({
60
+ let ref = $laCyr$useRef();
61
+ let { linkProps: linkProps } = $laCyr$useLink({
62
62
  ...props,
63
63
  elementType: typeof children === 'string' ? 'span' : 'a'
64
64
  }, ref);
65
- return(/*#__PURE__*/ $9PFyS$react.createElement($9PFyS$FocusRing, {
66
- focusRingClass: $9PFyS$classNames((/*@__PURE__*/$parcel$interopDefault($4791defda0ed9da2$exports)), 'focus-ring')
67
- }, /*#__PURE__*/ $9PFyS$react.cloneElement($9PFyS$getWrappedElement(children), {
65
+ return(/*#__PURE__*/ $laCyr$react.createElement($laCyr$FocusRing, {
66
+ focusRingClass: $laCyr$classNames((/*@__PURE__*/$parcel$interopDefault($5833bfa28c465cef$exports)), 'focus-ring')
67
+ }, /*#__PURE__*/ $laCyr$react.cloneElement($laCyr$getWrappedElement(children), {
68
68
  ...styleProps,
69
- ...$9PFyS$mergeProps(linkProps, hoverProps),
69
+ ...$laCyr$mergeProps(linkProps, hoverProps),
70
70
  ref: ref,
71
- className: $9PFyS$classNames((/*@__PURE__*/$parcel$interopDefault($4791defda0ed9da2$exports)), 'spectrum-Link', {
71
+ className: $laCyr$classNames((/*@__PURE__*/$parcel$interopDefault($5833bfa28c465cef$exports)), 'spectrum-Link', {
72
72
  'spectrum-Link--quiet': isQuiet,
73
73
  [`spectrum-Link--${variant}`]: variant,
74
74
  'is-hovered': isHovered
@@ -79,5 +79,5 @@ function $c213a7985eeee7ca$export$a6c7ac8248d6e38a(props) {
79
79
 
80
80
 
81
81
 
82
- export {$c213a7985eeee7ca$export$a6c7ac8248d6e38a as Link};
82
+ export {$cad7a8e22b47dfbf$export$a6c7ac8248d6e38a as Link};
83
83
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,CAAuB;AACzD,yCAA4B,GAAG,CAAoB;AACnD,yCAA4B,GAAG,CAAoB;AACnD,yCAA6B,GAAG,CAAqB;AACrD,yCAA0C,GAAG,CAAkC;AAC/E,yCAA+C,GAAG,CAAuC;AACzF,yCAAsC,GAAG,CAA8B;;;;;;SDoBvD,yCAAI,CAAC,KAAwB,EAAE,CAAC;IAC9C,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAM;IAClC,GAAG,CAAC,CAAC,UACH,OAAO,GAAG,CAAS,oBACnB,OAAO,aACP,QAAQ,SACR,EAAa,AAAb,WAAa;IACb,IAAI,EACN,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,KAAK;IACtC,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,eAAQ,CAAC,CAAC;IAAA,CAAC;IAEzC,EAAE,EAAE,IAAI,EACN,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,GAAG,CAAC,GAAG,GAAG,aAAM;IAChB,GAAG,CAAC,CAAC,YAAA,SAAS,EAAA,CAAC,GAAG,cAAO,CAAC,CAAC;WACtB,KAAK;QACR,WAAW,EAAE,MAAM,CAAC,QAAQ,KAAK,CAAQ,UAAG,CAAM,QAAG,CAAG;IAC1D,CAAC,EAAE,GAAG;IAEN,MAAM,0CACH,gBAAS;QAAC,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAY;qBACvD,YAAK,CAAC,YAAY,CACjB,wBAAiB,CAAC,QAAQ,GAC1B,CAAC;WACI,UAAU;WACV,iBAAU,CAAC,SAAS,EAAE,UAAU;aACnC,GAAG;QACH,SAAS,EAAE,iBAAU,CACnB,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAsB,uBAAE,OAAO;cAC7B,eAAe,EAAE,OAAO,KAAK,OAAO;YACtC,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;IAExB,CAAC;AAIT,CAAC","sources":["packages/@react-spectrum/link/src/index.ts","packages/@react-spectrum/link/src/Link.tsx","packages/@adobe/spectrum-css-temp/components/link/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,CAAsB;AACxD,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA0C,GAAG,CAAiC;AAC9E,yCAA+C,GAAG,CAAsC;AACxF,yCAAsC,GAAG,CAA6B;;;;;;SDoBtD,yCAAI,CAAC,KAAwB,EAAE,CAAC;IAC9C,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAM;IAClC,GAAG,CAAC,CAAC,UACH,OAAO,GAAG,CAAS,oBACnB,OAAO,aACP,QAAQ,SACR,EAAa,AAAb,WAAa;IACb,IAAI,EACN,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC,KAAK;IACtC,GAAG,CAAC,CAAC,aAAA,UAAU,cAAE,SAAS,EAAA,CAAC,GAAG,eAAQ,CAAC,CAAC;IAAA,CAAC;IAEzC,EAAE,EAAE,IAAI,EACN,OAAO,CAAC,IAAI,CAAC,CAA8D;IAG7E,GAAG,CAAC,GAAG,GAAG,aAAM;IAChB,GAAG,CAAC,CAAC,YAAA,SAAS,EAAA,CAAC,GAAG,cAAO,CAAC,CAAC;WACtB,KAAK;QACR,WAAW,EAAE,MAAM,CAAC,QAAQ,KAAK,CAAQ,UAAG,CAAM,QAAG,CAAG;IAC1D,CAAC,EAAE,GAAG;IAEN,MAAM,0CACH,gBAAS;QAAC,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAY;qBACvD,YAAK,CAAC,YAAY,CACjB,wBAAiB,CAAC,QAAQ,GAC1B,CAAC;WACI,UAAU;WACV,iBAAU,CAAC,SAAS,EAAE,UAAU;aACnC,GAAG;QACH,SAAS,EAAE,iBAAU,CACnB,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAsB,uBAAE,OAAO;cAC7B,eAAe,EAAE,OAAO,KAAK,OAAO;YACtC,CAAY,aAAE,SAAS;QACzB,CAAC,EACD,UAAU,CAAC,SAAS;IAExB,CAAC;AAIT,CAAC","sources":["packages/@react-spectrum/link/src/index.ts","packages/@react-spectrum/link/src/Link.tsx","packages/@adobe/spectrum-css-temp/components/link/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/link",
3
- "version": "3.0.0-nightly.1383+df9eb3253",
3
+ "version": "3.0.0-nightly.1395+b2abc5d94",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,15 +32,15 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "3.0.0-nightly.1383+df9eb3253",
36
- "@react-aria/interactions": "3.0.0-nightly.1383+df9eb3253",
37
- "@react-aria/link": "3.0.0-nightly.1383+df9eb3253",
38
- "@react-aria/utils": "3.0.0-nightly.1383+df9eb3253",
39
- "@react-spectrum/utils": "3.0.0-nightly.1383+df9eb3253",
40
- "@react-types/link": "3.0.0-nightly.1383+df9eb3253"
35
+ "@react-aria/focus": "3.0.0-nightly.1395+b2abc5d94",
36
+ "@react-aria/interactions": "3.0.0-nightly.1395+b2abc5d94",
37
+ "@react-aria/link": "3.0.0-nightly.1395+b2abc5d94",
38
+ "@react-aria/utils": "3.0.0-nightly.1395+b2abc5d94",
39
+ "@react-spectrum/utils": "3.0.0-nightly.1395+b2abc5d94",
40
+ "@react-types/link": "3.0.0-nightly.1395+b2abc5d94"
41
41
  },
42
42
  "devDependencies": {
43
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1383+df9eb3253"
43
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1395+b2abc5d94"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@react-spectrum/provider": "^3.0.0",
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "df9eb3253328c2aee23de4ff3d48c63b4d8222e8"
52
+ "gitHead": "b2abc5d94162a7bd614fffcdf11e3d3754dc7d9f"
53
53
  }