@react-spectrum/link 3.2.0 → 3.2.3

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,2 +1 @@
1
- ._spectrum-Link_f1e6e{background-color:initial;-webkit-text-decoration-skip:objects;transition:color .13s ease-in-out;outline:none;cursor:pointer}._spectrum-Link_f1e6e,._spectrum-Link_f1e6e._is-hovered_f1e6e{text-decoration:underline}._spectrum-Link_f1e6e._focus-ring_f1e6e{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}._spectrum-Link_f1e6e._is-disabled_f1e6e{cursor:default;pointer-events:none}._spectrum-Link_f1e6e._is-disabled_f1e6e._is-hovered_f1e6e,._spectrum-Link_f1e6e._is-disabled_f1e6e:focus{text-decoration:none}._spectrum-Link--overBackground_f1e6e,._spectrum-Link--secondary_f1e6e{text-decoration:underline}._spectrum-Link--quiet_f1e6e{text-decoration:none}._spectrum-Link_f1e6e,._spectrum-Link_f1e6e._is-hovered_f1e6e{color:var(--spectrum-global-color-blue-600)}._spectrum-Link_f1e6e:active{color:var(--spectrum-global-color-blue-700)}._spectrum-Link_f1e6e._focus-ring_f1e6e{color:var(--spectrum-alias-text-color-key-focus,var(--spectrum-global-color-blue-600))}._spectrum-Link_f1e6e._is-disabled_f1e6e{color:var(--spectrum-alias-text-color-disabled,var(--spectrum-global-color-gray-500))}._spectrum-Link--secondary_f1e6e,._spectrum-Link--secondary_f1e6e._is-hovered_f1e6e,._spectrum-Link--secondary_f1e6e:active,._spectrum-Link--secondary_f1e6e:focus{color:inherit}._spectrum-Link--overBackground_f1e6e,._spectrum-Link--overBackground_f1e6e._is-hovered_f1e6e,._spectrum-Link--overBackground_f1e6e:active,._spectrum-Link--overBackground_f1e6e:focus{color:var(--spectrum-global-color-static-white,#fff)}._spectrum-Link--overBackground_f1e6e._is-disabled_f1e6e{color:hsla(0,0%,100%,.5)}
2
- /*# sourceMappingURL=main.css.map */
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,102 +1,99 @@
1
- var {
2
- useProviderProps
3
- } = require("@react-spectrum/provider");
4
-
5
- var {
6
- useLink
7
- } = require("@react-aria/link");
8
-
9
- var {
10
- useHover
11
- } = require("@react-aria/interactions");
12
-
13
- var _react2 = require("react");
14
-
15
- var _react = $parcel$interopDefault(_react2);
16
-
17
- var {
18
- useRef
19
- } = _react2;
20
-
21
- var {
22
- mergeProps
23
- } = require("@react-aria/utils");
24
-
25
- var {
26
- FocusRing
27
- } = require("@react-aria/focus");
28
-
29
- var {
30
- classNames,
31
- getWrappedElement,
32
- useSlotProps,
33
- useStyleProps
34
- } = require("@react-spectrum/utils");
35
-
36
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
37
-
38
1
  require("./main.css");
39
-
2
+ var $fo5qX$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $fo5qX$reactariafocus = require("@react-aria/focus");
4
+ var $fo5qX$reactariautils = require("@react-aria/utils");
5
+ var $fo5qX$react = require("react");
6
+ var $fo5qX$reactariainteractions = require("@react-aria/interactions");
7
+ var $fo5qX$reactarialink = require("@react-aria/link");
8
+ var $fo5qX$reactspectrumprovider = require("@react-spectrum/provider");
9
+
10
+ function $parcel$exportWildcard(dest, source) {
11
+ Object.keys(source).forEach(function(key) {
12
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
13
+ return;
14
+ }
15
+
16
+ Object.defineProperty(dest, key, {
17
+ enumerable: true,
18
+ get: function get() {
19
+ return source[key];
20
+ }
21
+ });
22
+ });
23
+
24
+ return dest;
25
+ }
40
26
  function $parcel$interopDefault(a) {
41
27
  return a && a.__esModule ? a.default : a;
42
28
  }
43
-
44
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/link/vars.css
45
- var $ab502cff6933f7953f496b5b8a9d9e20$exports = {};
46
- $ab502cff6933f7953f496b5b8a9d9e20$exports = {
47
- "spectrum-Link": "_spectrum-Link_f1e6e",
48
- "is-hovered": "_is-hovered_f1e6e",
49
- "focus-ring": "_focus-ring_f1e6e",
50
- "is-disabled": "_is-disabled_f1e6e",
51
- "spectrum-Link--secondary": "_spectrum-Link--secondary_f1e6e",
52
- "spectrum-Link--overBackground": "_spectrum-Link--overBackground_f1e6e",
53
- "spectrum-Link--quiet": "_spectrum-Link--quiet_f1e6e"
54
- };
55
- var $ab502cff6933f7953f496b5b8a9d9e20$$interop$default = $parcel$interopDefault($ab502cff6933f7953f496b5b8a9d9e20$exports);
56
-
57
- /**
58
- * Links allow users to navigate to a different location.
59
- * They can be presented inline inside a paragraph or as standalone text.
60
- */
61
- function Link(props) {
62
- props = useProviderProps(props);
63
- props = useSlotProps(props, 'link');
64
- let {
65
- variant = 'primary',
66
- isQuiet,
67
- children,
68
- // @ts-ignore
69
- href
70
- } = props;
71
- let {
72
- styleProps
73
- } = useStyleProps(props);
74
- let {
75
- hoverProps,
76
- isHovered
77
- } = useHover({});
78
-
79
- if (href) {
80
- console.warn('href is deprecated, please use an anchor element as children');
81
- }
82
-
83
- let ref = useRef();
84
- let {
85
- linkProps
86
- } = useLink(_babelRuntimeHelpersExtends({}, props, {
87
- elementType: typeof children === 'string' ? 'span' : 'a'
88
- }), ref);
89
- return /*#__PURE__*/_react.createElement(FocusRing, {
90
- focusRingClass: classNames($ab502cff6933f7953f496b5b8a9d9e20$$interop$default, 'focus-ring')
91
- }, /*#__PURE__*/_react.cloneElement(getWrappedElement(children), _babelRuntimeHelpersExtends({}, styleProps, mergeProps(linkProps, hoverProps), {
92
- ref,
93
- className: classNames($ab502cff6933f7953f496b5b8a9d9e20$$interop$default, 'spectrum-Link', {
94
- 'spectrum-Link--quiet': isQuiet,
95
- ["spectrum-Link--" + variant]: variant,
96
- 'is-hovered': isHovered
97
- }, styleProps.className)
98
- })));
29
+ function $parcel$export(e, n, v, s) {
30
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
99
31
  }
32
+ var $1148fb7fc40f1ce2$exports = {};
33
+
34
+ $parcel$export($1148fb7fc40f1ce2$exports, "Link", () => $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a);
35
+
36
+
37
+
38
+
39
+ var $094ce2289235a9fa$exports = {};
40
+
41
+ $parcel$export($094ce2289235a9fa$exports, "spectrum-Link", () => $094ce2289235a9fa$export$d85dd8b94975f388, (v) => $094ce2289235a9fa$export$d85dd8b94975f388 = v);
42
+ $parcel$export($094ce2289235a9fa$exports, "is-hovered", () => $094ce2289235a9fa$export$b8813cd5d7824ce7, (v) => $094ce2289235a9fa$export$b8813cd5d7824ce7 = v);
43
+ $parcel$export($094ce2289235a9fa$exports, "focus-ring", () => $094ce2289235a9fa$export$f39a09f249340e2a, (v) => $094ce2289235a9fa$export$f39a09f249340e2a = v);
44
+ $parcel$export($094ce2289235a9fa$exports, "is-disabled", () => $094ce2289235a9fa$export$d35bc1e505d1ebbf, (v) => $094ce2289235a9fa$export$d35bc1e505d1ebbf = v);
45
+ $parcel$export($094ce2289235a9fa$exports, "spectrum-Link--secondary", () => $094ce2289235a9fa$export$ab09ed292dcb9a79, (v) => $094ce2289235a9fa$export$ab09ed292dcb9a79 = v);
46
+ $parcel$export($094ce2289235a9fa$exports, "spectrum-Link--overBackground", () => $094ce2289235a9fa$export$679b6267148797da, (v) => $094ce2289235a9fa$export$679b6267148797da = v);
47
+ $parcel$export($094ce2289235a9fa$exports, "spectrum-Link--quiet", () => $094ce2289235a9fa$export$81921ea93435e997, (v) => $094ce2289235a9fa$export$81921ea93435e997 = v);
48
+ var $094ce2289235a9fa$export$d85dd8b94975f388;
49
+ var $094ce2289235a9fa$export$b8813cd5d7824ce7;
50
+ var $094ce2289235a9fa$export$f39a09f249340e2a;
51
+ var $094ce2289235a9fa$export$d35bc1e505d1ebbf;
52
+ var $094ce2289235a9fa$export$ab09ed292dcb9a79;
53
+ var $094ce2289235a9fa$export$679b6267148797da;
54
+ var $094ce2289235a9fa$export$81921ea93435e997;
55
+ $094ce2289235a9fa$export$d85dd8b94975f388 = "spectrum-Link_5a03c7";
56
+ $094ce2289235a9fa$export$b8813cd5d7824ce7 = "is-hovered_5a03c7";
57
+ $094ce2289235a9fa$export$f39a09f249340e2a = "focus-ring_5a03c7";
58
+ $094ce2289235a9fa$export$d35bc1e505d1ebbf = "is-disabled_5a03c7";
59
+ $094ce2289235a9fa$export$ab09ed292dcb9a79 = "spectrum-Link--secondary_5a03c7";
60
+ $094ce2289235a9fa$export$679b6267148797da = "spectrum-Link--overBackground_5a03c7";
61
+ $094ce2289235a9fa$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
62
+
63
+
64
+
65
+
66
+
67
+ function $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a(props) {
68
+ props = $fo5qX$reactspectrumprovider.useProviderProps(props);
69
+ props = $fo5qX$reactspectrumutils.useSlotProps(props, 'link');
70
+ let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
71
+ href } = props;
72
+ let { styleProps: styleProps } = $fo5qX$reactspectrumutils.useStyleProps(props);
73
+ let { hoverProps: hoverProps , isHovered: isHovered } = $fo5qX$reactariainteractions.useHover({
74
+ });
75
+ if (href) console.warn('href is deprecated, please use an anchor element as children');
76
+ let ref = $fo5qX$react.useRef();
77
+ let { linkProps: linkProps } = $fo5qX$reactarialink.useLink({
78
+ ...props,
79
+ elementType: typeof children === 'string' ? 'span' : 'a'
80
+ }, ref);
81
+ return(/*#__PURE__*/ ($parcel$interopDefault($fo5qX$react)).createElement($fo5qX$reactariafocus.FocusRing, {
82
+ focusRingClass: $fo5qX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports)), 'focus-ring')
83
+ }, /*#__PURE__*/ ($parcel$interopDefault($fo5qX$react)).cloneElement($fo5qX$reactspectrumutils.getWrappedElement(children), {
84
+ ...styleProps,
85
+ ...$fo5qX$reactariautils.mergeProps(linkProps, hoverProps),
86
+ ref: ref,
87
+ className: $fo5qX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports)), 'spectrum-Link', {
88
+ 'spectrum-Link--quiet': isQuiet,
89
+ [`spectrum-Link--${variant}`]: variant,
90
+ 'is-hovered': isHovered
91
+ }, styleProps.className)
92
+ })));
93
+ }
94
+
95
+
96
+ $parcel$exportWildcard(module.exports, $1148fb7fc40f1ce2$exports);
97
+
100
98
 
101
- exports.Link = Link;
102
99
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,mBAAiB,sBADF;AAEf,gBAAc,mBAFC;AAGf,gBAAc,mBAHC;AAIf,iBAAe,oBAJA;AAKf,8BAA4B,iCALb;AAMf,mCAAiC,sCANlB;AAOf,0BAAwB;AAPT,CAAjB;;;ACsBA;;;;AAIO,SAASG,IAAT,CAAcC,KAAd,EAAwC;AAC7CA,EAAAA,KAAK,GAAGC,gBAAgB,CAACD,KAAD,CAAxB;AACAA,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,MAAR,CAApB;AACA,MAAI;AACFG,IAAAA,OAAO,GAAG,SADR;AAEFC,IAAAA,OAFE;AAGFC,IAAAA,QAHE;AAIF;AACAC,IAAAA;AALE,MAMAN,KANJ;AAOA,MAAI;AAACO,IAAAA;AAAD,MAAeC,aAAa,CAACR,KAAD,CAAhC;AACA,MAAI;AAACS,IAAAA,UAAD;AAAaC,IAAAA;AAAb,MAA0BC,QAAQ,CAAC,EAAD,CAAtC;;AAEA,MAAIL,IAAJ,EAAU;AACRM,IAAAA,OAAO,CAACC,IAAR,CAAa,8DAAb;AACD;;AAED,MAAIC,GAAG,GAAGC,MAAM,EAAhB;AACA,MAAI;AAACC,IAAAA;AAAD,MAAcC,OAAO,iCACpBjB,KADoB;AAEvBkB,IAAAA,WAAW,EAAE,OAAOb,QAAP,KAAoB,QAApB,GAA+B,MAA/B,GAAwC;AAF9B,MAGtBS,GAHsB,CAAzB;AAKA,sBACE,qBAAC,SAAD;AAAW,IAAA,cAAc,EAAEK,UAAU,qDAAS,YAAT;AAArC,kBACGC,MAAK,CAACC,YAAN,CACCC,iBAAiB,CAACjB,QAAD,CADlB,kCAGME,UAHN,EAIMgB,UAAU,CAACP,SAAD,EAAYP,UAAZ,CAJhB;AAKGK,IAAAA,GALH;AAMGU,IAAAA,SAAS,EAAEL,UAAU,qDAEnB,eAFmB,EAGnB;AACE,8BAAwBf,OAD1B;AAEE,2BAAmBD,OAAnB,GAA+BA,OAFjC;AAGE,oBAAcO;AAHhB,KAHmB,EAQnBH,UAAU,CAACiB,SARQ;AANxB,KADH,CADF;AAsBD","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/link/vars.css","./packages/@react-spectrum/link/src/Link.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\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","/*\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"],"names":["$parcel$interopDefault","a","__esModule","default","Link","props","useProviderProps","useSlotProps","variant","isQuiet","children","href","styleProps","useStyleProps","hoverProps","isHovered","useHover","console","warn","ref","useRef","linkProps","useLink","elementType","classNames","React","cloneElement","getWrappedElement","mergeProps","className"],"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,71 +1,83 @@
1
- import { useProviderProps } from "@react-spectrum/provider";
2
- import { useLink } from "@react-aria/link";
3
- import { useHover } from "@react-aria/interactions";
4
- import _react, { useRef } from "react";
5
- import { mergeProps } from "@react-aria/utils";
6
- import { FocusRing } from "@react-aria/focus";
7
- import { classNames, getWrappedElement, useSlotProps, useStyleProps } from "@react-spectrum/utils";
8
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
9
1
  import "./main.css";
2
+ import {useSlotProps as $11MUV$useSlotProps, useStyleProps as $11MUV$useStyleProps, classNames as $11MUV$classNames, getWrappedElement as $11MUV$getWrappedElement} from "@react-spectrum/utils";
3
+ import {FocusRing as $11MUV$FocusRing} from "@react-aria/focus";
4
+ import {mergeProps as $11MUV$mergeProps} from "@react-aria/utils";
5
+ import $11MUV$react, {useRef as $11MUV$useRef} from "react";
6
+ import {useHover as $11MUV$useHover} from "@react-aria/interactions";
7
+ import {useLink as $11MUV$useLink} from "@react-aria/link";
8
+ import {useProviderProps as $11MUV$useProviderProps} from "@react-spectrum/provider";
10
9
 
11
10
  function $parcel$interopDefault(a) {
12
11
  return a && a.__esModule ? a.default : a;
13
12
  }
13
+ function $parcel$export(e, n, v, s) {
14
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
+ }
16
+ var $3c5235ac12f2c9bb$exports = {};
17
+
18
+ $parcel$export($3c5235ac12f2c9bb$exports, "Link", () => $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a);
19
+
20
+
21
+
22
+
23
+ var $4564c6c10d1690b3$exports = {};
24
+
25
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link", () => $4564c6c10d1690b3$export$d85dd8b94975f388, (v) => $4564c6c10d1690b3$export$d85dd8b94975f388 = v);
26
+ $parcel$export($4564c6c10d1690b3$exports, "is-hovered", () => $4564c6c10d1690b3$export$b8813cd5d7824ce7, (v) => $4564c6c10d1690b3$export$b8813cd5d7824ce7 = v);
27
+ $parcel$export($4564c6c10d1690b3$exports, "focus-ring", () => $4564c6c10d1690b3$export$f39a09f249340e2a, (v) => $4564c6c10d1690b3$export$f39a09f249340e2a = v);
28
+ $parcel$export($4564c6c10d1690b3$exports, "is-disabled", () => $4564c6c10d1690b3$export$d35bc1e505d1ebbf, (v) => $4564c6c10d1690b3$export$d35bc1e505d1ebbf = v);
29
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--secondary", () => $4564c6c10d1690b3$export$ab09ed292dcb9a79, (v) => $4564c6c10d1690b3$export$ab09ed292dcb9a79 = v);
30
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--overBackground", () => $4564c6c10d1690b3$export$679b6267148797da, (v) => $4564c6c10d1690b3$export$679b6267148797da = v);
31
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--quiet", () => $4564c6c10d1690b3$export$81921ea93435e997, (v) => $4564c6c10d1690b3$export$81921ea93435e997 = v);
32
+ var $4564c6c10d1690b3$export$d85dd8b94975f388;
33
+ var $4564c6c10d1690b3$export$b8813cd5d7824ce7;
34
+ var $4564c6c10d1690b3$export$f39a09f249340e2a;
35
+ var $4564c6c10d1690b3$export$d35bc1e505d1ebbf;
36
+ var $4564c6c10d1690b3$export$ab09ed292dcb9a79;
37
+ var $4564c6c10d1690b3$export$679b6267148797da;
38
+ var $4564c6c10d1690b3$export$81921ea93435e997;
39
+ $4564c6c10d1690b3$export$d85dd8b94975f388 = "spectrum-Link_5a03c7";
40
+ $4564c6c10d1690b3$export$b8813cd5d7824ce7 = "is-hovered_5a03c7";
41
+ $4564c6c10d1690b3$export$f39a09f249340e2a = "focus-ring_5a03c7";
42
+ $4564c6c10d1690b3$export$d35bc1e505d1ebbf = "is-disabled_5a03c7";
43
+ $4564c6c10d1690b3$export$ab09ed292dcb9a79 = "spectrum-Link--secondary_5a03c7";
44
+ $4564c6c10d1690b3$export$679b6267148797da = "spectrum-Link--overBackground_5a03c7";
45
+ $4564c6c10d1690b3$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
46
+
14
47
 
15
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/link/vars.css
16
- var $b893bfef2c79e230cc467d335eb860$exports = {};
17
- $b893bfef2c79e230cc467d335eb860$exports = {
18
- "spectrum-Link": "_spectrum-Link_f1e6e",
19
- "is-hovered": "_is-hovered_f1e6e",
20
- "focus-ring": "_focus-ring_f1e6e",
21
- "is-disabled": "_is-disabled_f1e6e",
22
- "spectrum-Link--secondary": "_spectrum-Link--secondary_f1e6e",
23
- "spectrum-Link--overBackground": "_spectrum-Link--overBackground_f1e6e",
24
- "spectrum-Link--quiet": "_spectrum-Link--quiet_f1e6e"
25
- };
26
- var $b893bfef2c79e230cc467d335eb860$$interop$default = $parcel$interopDefault($b893bfef2c79e230cc467d335eb860$exports);
27
-
28
- /**
29
- * Links allow users to navigate to a different location.
30
- * They can be presented inline inside a paragraph or as standalone text.
31
- */
32
- export function Link(props) {
33
- props = useProviderProps(props);
34
- props = useSlotProps(props, 'link');
35
- let {
36
- variant = 'primary',
37
- isQuiet,
38
- children,
39
- // @ts-ignore
40
- href
41
- } = props;
42
- let {
43
- styleProps
44
- } = useStyleProps(props);
45
- let {
46
- hoverProps,
47
- isHovered
48
- } = useHover({});
49
-
50
- if (href) {
51
- console.warn('href is deprecated, please use an anchor element as children');
52
- }
53
-
54
- let ref = useRef();
55
- let {
56
- linkProps
57
- } = useLink(_babelRuntimeHelpersEsmExtends({}, props, {
58
- elementType: typeof children === 'string' ? 'span' : 'a'
59
- }), ref);
60
- return /*#__PURE__*/_react.createElement(FocusRing, {
61
- focusRingClass: classNames($b893bfef2c79e230cc467d335eb860$$interop$default, 'focus-ring')
62
- }, /*#__PURE__*/_react.cloneElement(getWrappedElement(children), _babelRuntimeHelpersEsmExtends({}, styleProps, mergeProps(linkProps, hoverProps), {
63
- ref,
64
- className: classNames($b893bfef2c79e230cc467d335eb860$$interop$default, 'spectrum-Link', {
65
- 'spectrum-Link--quiet': isQuiet,
66
- ["spectrum-Link--" + variant]: variant,
67
- 'is-hovered': isHovered
68
- }, styleProps.className)
69
- })));
48
+
49
+
50
+
51
+ function $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a(props) {
52
+ props = $11MUV$useProviderProps(props);
53
+ props = $11MUV$useSlotProps(props, 'link');
54
+ let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
55
+ href } = props;
56
+ let { styleProps: styleProps } = $11MUV$useStyleProps(props);
57
+ let { hoverProps: hoverProps , isHovered: isHovered } = $11MUV$useHover({
58
+ });
59
+ if (href) console.warn('href is deprecated, please use an anchor element as children');
60
+ let ref = $11MUV$useRef();
61
+ let { linkProps: linkProps } = $11MUV$useLink({
62
+ ...props,
63
+ elementType: typeof children === 'string' ? 'span' : 'a'
64
+ }, ref);
65
+ return(/*#__PURE__*/ $11MUV$react.createElement($11MUV$FocusRing, {
66
+ focusRingClass: $11MUV$classNames((/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports)), 'focus-ring')
67
+ }, /*#__PURE__*/ $11MUV$react.cloneElement($11MUV$getWrappedElement(children), {
68
+ ...styleProps,
69
+ ...$11MUV$mergeProps(linkProps, hoverProps),
70
+ ref: ref,
71
+ className: $11MUV$classNames((/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports)), 'spectrum-Link', {
72
+ 'spectrum-Link--quiet': isQuiet,
73
+ [`spectrum-Link--${variant}`]: variant,
74
+ 'is-hovered': isHovered
75
+ }, styleProps.className)
76
+ })));
70
77
  }
78
+
79
+
80
+
81
+
82
+ export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
71
83
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,0CAAiB;AACf,mBAAiB,sBADF;AAEf,gBAAc,mBAFC;AAGf,gBAAc,mBAHC;AAIf,iBAAe,oBAJA;AAKf,8BAA4B,iCALb;AAMf,mCAAiC,sCANlB;AAOf,0BAAwB;AAPT,CAAjB;;;ACsBA;;;;OAIO,SAASG,IAAT,CAAcC,KAAd,EAAwC;AAC7CA,EAAAA,KAAK,GAAGC,gBAAgB,CAACD,KAAD,CAAxB;AACAA,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,MAAR,CAApB;AACA,MAAI;AACFG,IAAAA,OAAO,GAAG,SADR;AAEFC,IAAAA,OAFE;AAGFC,IAAAA,QAHE;AAIF;AACAC,IAAAA;AALE,MAMAN,KANJ;AAOA,MAAI;AAACO,IAAAA;AAAD,MAAeC,aAAa,CAACR,KAAD,CAAhC;AACA,MAAI;AAACS,IAAAA,UAAD;AAAaC,IAAAA;AAAb,MAA0BC,QAAQ,CAAC,EAAD,CAAtC;;AAEA,MAAIL,IAAJ,EAAU;AACRM,IAAAA,OAAO,CAACC,IAAR,CAAa,8DAAb;AACD;;AAED,MAAIC,GAAG,GAAGC,MAAM,EAAhB;AACA,MAAI;AAACC,IAAAA;AAAD,MAAcC,OAAO,oCACpBjB,KADoB;AAEvBkB,IAAAA,WAAW,EAAE,OAAOb,QAAP,KAAoB,QAApB,GAA+B,MAA/B,GAAwC;AAF9B,MAGtBS,GAHsB,CAAzB;AAKA,sBACE,qBAAC,SAAD;AAAW,IAAA,cAAc,EAAEK,UAAU,mDAAS,YAAT;AAArC,kBACGC,MAAK,CAACC,YAAN,CACCC,iBAAiB,CAACjB,QAAD,CADlB,qCAGME,UAHN,EAIMgB,UAAU,CAACP,SAAD,EAAYP,UAAZ,CAJhB;AAKGK,IAAAA,GALH;AAMGU,IAAAA,SAAS,EAAEL,UAAU,mDAEnB,eAFmB,EAGnB;AACE,8BAAwBf,OAD1B;AAEE,2BAAmBD,OAAnB,GAA+BA,OAFjC;AAGE,oBAAcO;AAHhB,KAHmB,EAQnBH,UAAU,CAACiB,SARQ;AANxB,KADH,CADF;AAsBD","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/link/vars.css","./packages/@react-spectrum/link/src/Link.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\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","/*\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"],"names":["$parcel$interopDefault","a","__esModule","default","Link","props","useProviderProps","useSlotProps","variant","isQuiet","children","href","styleProps","useStyleProps","hoverProps","isHovered","useHover","console","warn","ref","useRef","linkProps","useLink","elementType","classNames","React","cloneElement","getWrappedElement","mergeProps","className"],"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"}
@@ -1 +1 @@
1
- {"mappings":"A;AAsBA;A;A;GAGG;AACH,qBAAqB,KAAK,EAAE,iBAAiB,eA6C5C","sources":["./packages/@react-spectrum/link/src/packages/@react-spectrum/link/src/Link.tsx","./packages/@react-spectrum/link/src/packages/@react-spectrum/link/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";AAsBA;;;GAGG;AACH,qBAAqB,KAAK,EAAE,iBAAiB,eA6C5C","sources":["packages/@react-spectrum/link/src/packages/@react-spectrum/link/src/Link.tsx","packages/@react-spectrum/link/src/packages/@react-spectrum/link/src/index.ts","packages/@react-spectrum/link/src/index.ts"],"sourcesContent":[null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/link",
3
- "version": "3.2.0",
3
+ "version": "3.2.3",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "^3.5.0",
36
- "@react-aria/interactions": "^3.6.0",
37
- "@react-aria/link": "^3.1.4",
38
- "@react-aria/utils": "^3.9.0",
39
- "@react-spectrum/utils": "^3.6.2",
40
- "@react-types/link": "^3.1.3"
35
+ "@react-aria/focus": "^3.5.3",
36
+ "@react-aria/interactions": "^3.8.2",
37
+ "@react-aria/link": "^3.2.3",
38
+ "@react-aria/utils": "^3.11.3",
39
+ "@react-spectrum/utils": "^3.6.6",
40
+ "@react-types/link": "^3.2.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "eb6c352a42ca230774b923cc0bde692d206e0999"
52
+ "gitHead": "ed8d8d984c2f7f2c31e8b18795b97858a95e4729"
53
53
  }
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"AAcA,sBAEE,wBAA6B,CAE7B,oCAAqC,CAErC,iCAA2E,CAC3E,YAAa,CACb,cAwBF,CAtBE,8DALA,yBAOA,CAMA,wCACE,yBAA0B,CAC1B,oCAA6B,CAA7B,4BACF,CAEA,yCACE,cAAe,CACf,mBAMF,CAJE,0GAEE,oBACF,CAQJ,uEACE,yBACF,CAEA,6BACE,oBACF,CC3CE,8DACE,2CACF,CAEA,6BACE,2CACF,CAEA,wCACE,sFACF,CAEA,yCACE,qFACF,CAcA,mKACE,aACF,CAcA,uLACE,oDACF,CAEA,yDACE,wBACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/link/index.css","./node_modules/@adobe/spectrum-css-temp/components/link/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n.spectrum-Link {\n /* Remove the gray background on active links in IE 10. */\n background-color: transparent;\n /* Remove gaps in links underline in iOS 8+ and Safari 8+. */\n -webkit-text-decoration-skip: objects;\n text-decoration: underline;\n transition: color var(--spectrum-global-animation-duration-100) ease-in-out;\n outline: none;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:focus-ring {\n text-decoration: underline;\n }\n\n &:focus-ring {\n text-decoration: underline;\n text-decoration-style: double;\n }\n\n &.is-disabled {\n cursor: default;\n pointer-events: none;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n }\n}\n\n.spectrum-Link--secondary {\n text-decoration: underline;\n}\n\n.spectrum-Link--overBackground {\n text-decoration: underline;\n}\n\n.spectrum-Link--quiet {\n text-decoration: none;\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-Link {\n color: var(--spectrum-link-text-color);\n\n &:hover {\n color: var(--spectrum-link-text-color-hover);\n }\n\n &:active {\n color: var(--spectrum-link-text-color-down);\n }\n\n &:focus-ring {\n color: var(--spectrum-link-text-color-key-focus);\n }\n\n &.is-disabled {\n color: var(--spectrum-link-text-color-disabled);\n }\n}\n\n.spectrum-Link--secondary{\n color: inherit;\n\n &:hover {\n color: inherit;\n }\n\n &:active {\n color: inherit;\n }\n\n &:focus {\n color: inherit;\n }\n}\n\n.spectrum-Link--overBackground {\n color: var(--spectrum-link-over-background-text-color);\n\n &:hover {\n color: var(--spectrum-link-over-background-text-color-hover);\n }\n\n &:active {\n color: var(--spectrum-link-over-background-text-color-down);\n }\n\n &:focus {\n color: var(--spectrum-link-over-background-text-color-key-focus);\n }\n\n &.is-disabled {\n color: var(--spectrum-link-over-background-text-color-disabled);\n }\n}\n"],"names":[],"version":3,"file":"main.css.map"}