@react-spectrum/link 3.6.24 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/import.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {Link as $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a} from "./Link.mjs";
1
+ import {Link as $10630308549a3101$re_export$Link} from "@adobe/react-spectrum/Link";
2
2
 
3
3
  /*
4
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -14,5 +14,5 @@ import {Link as $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a} from "./Link.mjs";
14
14
 
15
15
 
16
16
 
17
- export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
17
+ export {$10630308549a3101$re_export$Link as Link};
18
18
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,11 +1,11 @@
1
- var $1148fb7fc40f1ce2$exports = require("./Link.main.js");
1
+ var $2GPOZ$adobereactspectrumLink = require("@adobe/react-spectrum/Link");
2
2
 
3
3
 
4
4
  function $parcel$export(e, n, v, s) {
5
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
6
  }
7
7
 
8
- $parcel$export(module.exports, "Link", () => $1148fb7fc40f1ce2$exports.Link);
8
+ $parcel$export(module.exports, "Link", function () { return $2GPOZ$adobereactspectrumLink.Link; });
9
9
  /*
10
10
  * Copyright 2020 Adobe. All rights reserved.
11
11
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/link/src/index.ts"],"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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/link/src/index.ts"],"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 {Link} from '@adobe/react-spectrum/Link';\n\nexport type {SpectrumLinkProps} from '@adobe/react-spectrum/Link';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,4 +1,4 @@
1
- import {Link as $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a} from "./Link.module.js";
1
+ import {Link as $10630308549a3101$re_export$Link} from "@adobe/react-spectrum/Link";
2
2
 
3
3
  /*
4
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -14,5 +14,5 @@ import {Link as $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a} from "./Link.module.j
14
14
 
15
15
 
16
16
 
17
- export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
17
+ export {$10630308549a3101$re_export$Link as Link};
18
18
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/link/src/index.ts"],"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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/link/src/index.ts"],"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 {Link} from '@adobe/react-spectrum/Link';\n\nexport type {SpectrumLinkProps} from '@adobe/react-spectrum/Link';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,2 @@
1
+ export { Link } from '@adobe/react-spectrum/Link';
2
+ export type { SpectrumLinkProps } from '@adobe/react-spectrum/Link';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-spectrum/link",
3
- "version": "3.6.24",
3
+ "version": "3.7.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -24,41 +24,22 @@
24
24
  "*.css"
25
25
  ],
26
26
  "targets": {
27
- "main": {
28
- "includeNodeModules": [
29
- "@adobe/spectrum-css-temp"
30
- ]
31
- },
32
- "module": {
33
- "includeNodeModules": [
34
- "@adobe/spectrum-css-temp"
35
- ]
36
- }
27
+ "types": false
37
28
  },
38
29
  "repository": {
39
30
  "type": "git",
40
31
  "url": "https://github.com/adobe/react-spectrum"
41
32
  },
42
33
  "dependencies": {
43
- "@react-aria/focus": "^3.21.4",
44
- "@react-aria/interactions": "^3.27.0",
45
- "@react-aria/link": "^3.8.8",
46
- "@react-aria/utils": "^3.33.0",
47
- "@react-spectrum/utils": "^3.12.11",
48
- "@react-types/link": "^3.6.6",
49
- "@react-types/shared": "^3.33.0",
34
+ "@adobe/react-spectrum": "3.47.0",
50
35
  "@swc/helpers": "^0.5.0"
51
36
  },
52
- "devDependencies": {
53
- "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
54
- },
55
37
  "peerDependencies": {
56
- "@react-spectrum/provider": "^3.0.0",
57
38
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
58
39
  "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
59
40
  },
60
41
  "publishConfig": {
61
42
  "access": "public"
62
43
  },
63
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
44
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
64
45
  }
package/src/index.ts CHANGED
@@ -12,5 +12,6 @@
12
12
 
13
13
  /// <reference types="css-module-types" />
14
14
 
15
- export {Link} from './Link';
16
- export type {SpectrumLinkProps} from '@react-types/link';
15
+ export {Link} from '@adobe/react-spectrum/Link';
16
+
17
+ export type {SpectrumLinkProps} from '@adobe/react-spectrum/Link';
package/dist/Link.main.js DELETED
@@ -1,84 +0,0 @@
1
- require("./link.60ca145f.css");
2
- var $094ce2289235a9fa$exports = require("./link_vars_css.main.js");
3
- var $jQffG$reactspectrumutils = require("@react-spectrum/utils");
4
- var $jQffG$reactariafocus = require("@react-aria/focus");
5
- var $jQffG$reactariautils = require("@react-aria/utils");
6
- var $jQffG$react = require("react");
7
- var $jQffG$reactariainteractions = require("@react-aria/interactions");
8
- var $jQffG$reactarialink = require("@react-aria/link");
9
- var $jQffG$reactspectrumprovider = require("@react-spectrum/provider");
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
-
16
- function $parcel$export(e, n, v, s) {
17
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
- }
19
-
20
- $parcel$export(module.exports, "Link", () => $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a);
21
- /*
22
- * Copyright 2020 Adobe. All rights reserved.
23
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
- * you may not use this file except in compliance with the License. You may obtain a copy
25
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
- *
27
- * Unless required by applicable law or agreed to in writing, software distributed under
28
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
- * OF ANY KIND, either express or implied. See the License for the specific language
30
- * governing permissions and limitations under the License.
31
- */
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
- let $1148fb7fc40f1ce2$var$isOldReact = parseInt((0, ($parcel$interopDefault($jQffG$react))).version, 10) <= 18;
40
- function $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a(props) {
41
- props = (0, $jQffG$reactspectrumprovider.useProviderProps)(props);
42
- props = (0, $jQffG$reactspectrumutils.useSlotProps)(props, 'link');
43
- let { variant: variant = 'primary', isQuiet: isQuiet, children: children, href: // @ts-ignore
44
- href } = props;
45
- let { styleProps: styleProps } = (0, $jQffG$reactspectrumutils.useStyleProps)(props);
46
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $jQffG$reactariainteractions.useHover)({});
47
- let ref = (0, $jQffG$react.useRef)(null);
48
- let { linkProps: linkProps } = (0, $jQffG$reactarialink.useLink)({
49
- ...props,
50
- elementType: !href && typeof children === 'string' ? 'span' : 'a'
51
- }, ref);
52
- let domProps = {
53
- ...styleProps,
54
- ...(0, $jQffG$reactariautils.mergeProps)(linkProps, hoverProps),
55
- ref: ref,
56
- className: (0, $jQffG$reactspectrumutils.classNames)((0, ($parcel$interopDefault($094ce2289235a9fa$exports))), 'spectrum-Link', {
57
- 'spectrum-Link--quiet': isQuiet,
58
- [`spectrum-Link--${variant}`]: variant,
59
- 'is-hovered': isHovered
60
- }, styleProps.className)
61
- };
62
- let link;
63
- if (href) link = /*#__PURE__*/ (0, ($parcel$interopDefault($jQffG$react))).createElement("a", domProps, children);
64
- else {
65
- // Backward compatibility.
66
- let wrappedChild = (0, $jQffG$reactspectrumutils.getWrappedElement)(children);
67
- let mergedRef = ref;
68
- if ($1148fb7fc40f1ce2$var$isOldReact) // @ts-ignore
69
- mergedRef = (0, $jQffG$reactariautils.mergeRefs)(ref, wrappedChild.ref);
70
- else // @ts-ignore
71
- mergedRef = (0, $jQffG$reactariautils.mergeRefs)(ref, wrappedChild.props.ref);
72
- link = /*#__PURE__*/ (0, ($parcel$interopDefault($jQffG$react))).cloneElement(wrappedChild, {
73
- ...(0, $jQffG$reactariautils.mergeProps)(wrappedChild.props, domProps),
74
- // @ts-ignore https://github.com/facebook/react/issues/8873
75
- ref: mergedRef
76
- });
77
- }
78
- return /*#__PURE__*/ (0, ($parcel$interopDefault($jQffG$react))).createElement((0, $jQffG$reactariafocus.FocusRing), {
79
- focusRingClass: (0, $jQffG$reactspectrumutils.classNames)((0, ($parcel$interopDefault($094ce2289235a9fa$exports))), 'focus-ring')
80
- }, link);
81
- }
82
-
83
-
84
- //# sourceMappingURL=Link.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAYD,IAAI,mCAAa,SAAS,CAAA,GAAA,sCAAI,EAAE,OAAO,EAAE,OAAO;AAKzC,SAAS,0CAAK,KAAwB;IAC3C,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,WACF,UAAU,oBACV,OAAO,YACP,QAAQ,QACR,aAAa;IACb,IAAI,EACL,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE,CAAC;IAExC,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,4BAAM,EAAE;QACxB,GAAG,KAAK;QACR,aAAa,CAAC,QAAQ,OAAO,aAAa,WAAW,SAAS;IAChE,GAAG;IAEH,IAAI,WAAW;QACb,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,gCAAS,EAAE,WAAW,WAAW;aACpC;QACA,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,iBACA;YACE,wBAAwB;YACxB,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE;YAC/B,cAAc;QAChB,GACA,WAAW,SAAS;IAExB;IAEA,IAAI;IACJ,IAAI,MACF,qBAAO,0DAAC,KAAM,UAAW;SACpB;QACL,0BAA0B;QAC1B,IAAI,eAAe,CAAA,GAAA,2CAAgB,EAAE;QACrC,IAAI,YAAuD;QAC3D,IAAI,kCACF,aAAa;QACb,YAAY,CAAA,GAAA,+BAAQ,EAAE,KAAK,aAAa,GAAG;aAE3C,aAAa;QACb,YAAY,CAAA,GAAA,+BAAQ,EAAE,KAAK,aAAa,KAAK,CAAC,GAAG;QAEnD,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,cAAc;YACtC,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,KAAK,EAAE,SAAS;YAC3C,2DAA2D;YAC3D,KAAK;QACP;IACF;IAGA,qBACE,0DAAC,CAAA,GAAA,+BAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAC3C;AAGP","sources":["packages/@react-spectrum/link/src/Link.tsx"],"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\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, JSX, MutableRefObject, 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\nlet isOldReact = parseInt(React.version, 10) <= 18;\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): JSX.Element {\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 let ref = useRef(null);\n let {linkProps} = useLink({\n ...props,\n elementType: !href && typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n let domProps = {\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 let link: JSX.Element;\n if (href) {\n link = <a {...domProps}>{children}</a>;\n } else {\n // Backward compatibility.\n let wrappedChild = getWrappedElement(children);\n let mergedRef: MutableRefObject<any> | ForwardedRef<any> = ref;\n if (isOldReact) {\n // @ts-ignore\n mergedRef = mergeRefs(ref, wrappedChild.ref);\n } else {\n // @ts-ignore\n mergedRef = mergeRefs(ref, wrappedChild.props.ref);\n }\n link = React.cloneElement(wrappedChild, {\n ...mergeProps(wrappedChild.props, domProps),\n // @ts-ignore https://github.com/facebook/react/issues/8873\n ref: mergedRef\n });\n }\n\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {link}\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"Link.main.js.map"}
package/dist/Link.mjs DELETED
@@ -1,79 +0,0 @@
1
- import "./link.60ca145f.css";
2
- import $35Vau$link_vars_cssmodulejs from "./link_vars_css.mjs";
3
- import {useSlotProps as $35Vau$useSlotProps, useStyleProps as $35Vau$useStyleProps, classNames as $35Vau$classNames, getWrappedElement as $35Vau$getWrappedElement} from "@react-spectrum/utils";
4
- import {FocusRing as $35Vau$FocusRing} from "@react-aria/focus";
5
- import {mergeProps as $35Vau$mergeProps, mergeRefs as $35Vau$mergeRefs} from "@react-aria/utils";
6
- import $35Vau$react, {useRef as $35Vau$useRef} from "react";
7
- import {useHover as $35Vau$useHover} from "@react-aria/interactions";
8
- import {useLink as $35Vau$useLink} from "@react-aria/link";
9
- import {useProviderProps as $35Vau$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- let $3c5235ac12f2c9bb$var$isOldReact = parseInt((0, $35Vau$react).version, 10) <= 18;
34
- function $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a(props) {
35
- props = (0, $35Vau$useProviderProps)(props);
36
- props = (0, $35Vau$useSlotProps)(props, 'link');
37
- let { variant: variant = 'primary', isQuiet: isQuiet, children: children, href: // @ts-ignore
38
- href } = props;
39
- let { styleProps: styleProps } = (0, $35Vau$useStyleProps)(props);
40
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $35Vau$useHover)({});
41
- let ref = (0, $35Vau$useRef)(null);
42
- let { linkProps: linkProps } = (0, $35Vau$useLink)({
43
- ...props,
44
- elementType: !href && typeof children === 'string' ? 'span' : 'a'
45
- }, ref);
46
- let domProps = {
47
- ...styleProps,
48
- ...(0, $35Vau$mergeProps)(linkProps, hoverProps),
49
- ref: ref,
50
- className: (0, $35Vau$classNames)((0, ($parcel$interopDefault($35Vau$link_vars_cssmodulejs))), 'spectrum-Link', {
51
- 'spectrum-Link--quiet': isQuiet,
52
- [`spectrum-Link--${variant}`]: variant,
53
- 'is-hovered': isHovered
54
- }, styleProps.className)
55
- };
56
- let link;
57
- if (href) link = /*#__PURE__*/ (0, $35Vau$react).createElement("a", domProps, children);
58
- else {
59
- // Backward compatibility.
60
- let wrappedChild = (0, $35Vau$getWrappedElement)(children);
61
- let mergedRef = ref;
62
- if ($3c5235ac12f2c9bb$var$isOldReact) // @ts-ignore
63
- mergedRef = (0, $35Vau$mergeRefs)(ref, wrappedChild.ref);
64
- else // @ts-ignore
65
- mergedRef = (0, $35Vau$mergeRefs)(ref, wrappedChild.props.ref);
66
- link = /*#__PURE__*/ (0, $35Vau$react).cloneElement(wrappedChild, {
67
- ...(0, $35Vau$mergeProps)(wrappedChild.props, domProps),
68
- // @ts-ignore https://github.com/facebook/react/issues/8873
69
- ref: mergedRef
70
- });
71
- }
72
- return /*#__PURE__*/ (0, $35Vau$react).createElement((0, $35Vau$FocusRing), {
73
- focusRingClass: (0, $35Vau$classNames)((0, ($parcel$interopDefault($35Vau$link_vars_cssmodulejs))), 'focus-ring')
74
- }, link);
75
- }
76
-
77
-
78
- export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
79
- //# sourceMappingURL=Link.module.js.map
@@ -1,79 +0,0 @@
1
- import "./link.60ca145f.css";
2
- import $35Vau$link_vars_cssmodulejs from "./link_vars_css.module.js";
3
- import {useSlotProps as $35Vau$useSlotProps, useStyleProps as $35Vau$useStyleProps, classNames as $35Vau$classNames, getWrappedElement as $35Vau$getWrappedElement} from "@react-spectrum/utils";
4
- import {FocusRing as $35Vau$FocusRing} from "@react-aria/focus";
5
- import {mergeProps as $35Vau$mergeProps, mergeRefs as $35Vau$mergeRefs} from "@react-aria/utils";
6
- import $35Vau$react, {useRef as $35Vau$useRef} from "react";
7
- import {useHover as $35Vau$useHover} from "@react-aria/interactions";
8
- import {useLink as $35Vau$useLink} from "@react-aria/link";
9
- import {useProviderProps as $35Vau$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- let $3c5235ac12f2c9bb$var$isOldReact = parseInt((0, $35Vau$react).version, 10) <= 18;
34
- function $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a(props) {
35
- props = (0, $35Vau$useProviderProps)(props);
36
- props = (0, $35Vau$useSlotProps)(props, 'link');
37
- let { variant: variant = 'primary', isQuiet: isQuiet, children: children, href: // @ts-ignore
38
- href } = props;
39
- let { styleProps: styleProps } = (0, $35Vau$useStyleProps)(props);
40
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $35Vau$useHover)({});
41
- let ref = (0, $35Vau$useRef)(null);
42
- let { linkProps: linkProps } = (0, $35Vau$useLink)({
43
- ...props,
44
- elementType: !href && typeof children === 'string' ? 'span' : 'a'
45
- }, ref);
46
- let domProps = {
47
- ...styleProps,
48
- ...(0, $35Vau$mergeProps)(linkProps, hoverProps),
49
- ref: ref,
50
- className: (0, $35Vau$classNames)((0, ($parcel$interopDefault($35Vau$link_vars_cssmodulejs))), 'spectrum-Link', {
51
- 'spectrum-Link--quiet': isQuiet,
52
- [`spectrum-Link--${variant}`]: variant,
53
- 'is-hovered': isHovered
54
- }, styleProps.className)
55
- };
56
- let link;
57
- if (href) link = /*#__PURE__*/ (0, $35Vau$react).createElement("a", domProps, children);
58
- else {
59
- // Backward compatibility.
60
- let wrappedChild = (0, $35Vau$getWrappedElement)(children);
61
- let mergedRef = ref;
62
- if ($3c5235ac12f2c9bb$var$isOldReact) // @ts-ignore
63
- mergedRef = (0, $35Vau$mergeRefs)(ref, wrappedChild.ref);
64
- else // @ts-ignore
65
- mergedRef = (0, $35Vau$mergeRefs)(ref, wrappedChild.props.ref);
66
- link = /*#__PURE__*/ (0, $35Vau$react).cloneElement(wrappedChild, {
67
- ...(0, $35Vau$mergeProps)(wrappedChild.props, domProps),
68
- // @ts-ignore https://github.com/facebook/react/issues/8873
69
- ref: mergedRef
70
- });
71
- }
72
- return /*#__PURE__*/ (0, $35Vau$react).createElement((0, $35Vau$FocusRing), {
73
- focusRingClass: (0, $35Vau$classNames)((0, ($parcel$interopDefault($35Vau$link_vars_cssmodulejs))), 'focus-ring')
74
- }, link);
75
- }
76
-
77
-
78
- export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
79
- //# sourceMappingURL=Link.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAYD,IAAI,mCAAa,SAAS,CAAA,GAAA,YAAI,EAAE,OAAO,EAAE,OAAO;AAKzC,SAAS,0CAAK,KAAwB;IAC3C,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,WACF,UAAU,oBACV,OAAO,YACP,QAAQ,QACR,aAAa;IACb,IAAI,EACL,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE,CAAC;IAExC,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,cAAM,EAAE;QACxB,GAAG,KAAK;QACR,aAAa,CAAC,QAAQ,OAAO,aAAa,WAAW,SAAS;IAChE,GAAG;IAEH,IAAI,WAAW;QACb,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,iBAAS,EAAE,WAAW,WAAW;aACpC;QACA,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL,iBACA;YACE,wBAAwB;YACxB,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE;YAC/B,cAAc;QAChB,GACA,WAAW,SAAS;IAExB;IAEA,IAAI;IACJ,IAAI,MACF,qBAAO,gCAAC,KAAM,UAAW;SACpB;QACL,0BAA0B;QAC1B,IAAI,eAAe,CAAA,GAAA,wBAAgB,EAAE;QACrC,IAAI,YAAuD;QAC3D,IAAI,kCACF,aAAa;QACb,YAAY,CAAA,GAAA,gBAAQ,EAAE,KAAK,aAAa,GAAG;aAE3C,aAAa;QACb,YAAY,CAAA,GAAA,gBAAQ,EAAE,KAAK,aAAa,KAAK,CAAC,GAAG;QAEnD,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,cAAc;YACtC,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,KAAK,EAAE,SAAS;YAC3C,2DAA2D;YAC3D,KAAK;QACP;IACF;IAGA,qBACE,gCAAC,CAAA,GAAA,gBAAQ;QAAE,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;OAC3C;AAGP","sources":["packages/@react-spectrum/link/src/Link.tsx"],"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\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, JSX, MutableRefObject, 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\nlet isOldReact = parseInt(React.version, 10) <= 18;\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): JSX.Element {\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 let ref = useRef(null);\n let {linkProps} = useLink({\n ...props,\n elementType: !href && typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n let domProps = {\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 let link: JSX.Element;\n if (href) {\n link = <a {...domProps}>{children}</a>;\n } else {\n // Backward compatibility.\n let wrappedChild = getWrappedElement(children);\n let mergedRef: MutableRefObject<any> | ForwardedRef<any> = ref;\n if (isOldReact) {\n // @ts-ignore\n mergedRef = mergeRefs(ref, wrappedChild.ref);\n } else {\n // @ts-ignore\n mergedRef = mergeRefs(ref, wrappedChild.props.ref);\n }\n link = React.cloneElement(wrappedChild, {\n ...mergeProps(wrappedChild.props, domProps),\n // @ts-ignore https://github.com/facebook/react/issues/8873\n ref: mergedRef\n });\n }\n\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {link}\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"Link.module.js.map"}
@@ -1,168 +0,0 @@
1
- ._9-Xiq_i18nFontFamily {
2
- font-synthesis: weight;
3
- font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
4
- }
5
-
6
- ._9-Xiq_i18nFontFamily:lang(ar) {
7
- font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
8
- }
9
-
10
- ._9-Xiq_i18nFontFamily:lang(he) {
11
- font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
12
- }
13
-
14
- ._9-Xiq_i18nFontFamily:lang(zh) {
15
- font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
16
- }
17
-
18
- ._9-Xiq_i18nFontFamily:lang(zh-Hans) {
19
- font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
20
- }
21
-
22
- ._9-Xiq_i18nFontFamily:lang(zh-Hant) {
23
- font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
24
- }
25
-
26
- ._9-Xiq_i18nFontFamily:lang(zh-SG), ._9-Xiq_i18nFontFamily:lang(zh-CN) {
27
- font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
28
- }
29
-
30
- ._9-Xiq_i18nFontFamily:lang(ko) {
31
- font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
32
- }
33
-
34
- ._9-Xiq_i18nFontFamily:lang(ja) {
35
- font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
36
- }
37
-
38
- ._9-Xiq_spectrum-FocusRing-ring {
39
- --spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
40
- --spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
41
- --spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
42
- --spectrum-focus-ring-border-size: 0px;
43
- --spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
44
- }
45
-
46
- ._9-Xiq_spectrum-FocusRing-ring:after {
47
- border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
48
- content: "";
49
- margin: calc(-1 * var(--spectrum-focus-ring-border-size));
50
- pointer-events: none;
51
- transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
52
- display: block;
53
- position: absolute;
54
- inset: 0;
55
- }
56
-
57
- ._9-Xiq_spectrum-FocusRing._9-Xiq_focus-ring:after {
58
- margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
59
- box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
60
- }
61
-
62
- ._9-Xiq_spectrum-FocusRing--quiet:after {
63
- border-radius: 0;
64
- }
65
-
66
- ._9-Xiq_spectrum-FocusRing--quiet._9-Xiq_focus-ring:after {
67
- margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
68
- box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
69
- }
70
-
71
- @media (forced-colors: active) {
72
- ._9-Xiq_spectrum-FocusRing, ._9-Xiq_spectrum-FocusRing-ring, ._9-Xiq_spectrum-FocusRing--quiet {
73
- --spectrum-high-contrast-focus-ring-color: Highlight;
74
- }
75
-
76
- :is(._9-Xiq_spectrum-FocusRing, ._9-Xiq_spectrum-FocusRing-ring, ._9-Xiq_spectrum-FocusRing--quiet):after {
77
- forced-color-adjust: none;
78
- }
79
- }
80
-
81
- ._9-Xiq_spectrum-Link {
82
- -webkit-text-decoration-skip: objects;
83
- transition: color var(--spectrum-global-animation-duration-100, .13s) ease-in-out;
84
- cursor: pointer;
85
- background-color: #0000;
86
- outline: none;
87
- text-decoration: underline;
88
- }
89
-
90
- ._9-Xiq_spectrum-Link._9-Xiq_is-hovered, ._9-Xiq_spectrum-Link._9-Xiq_focus-ring {
91
- text-decoration: underline;
92
- }
93
-
94
- ._9-Xiq_spectrum-Link._9-Xiq_focus-ring {
95
- text-decoration: underline double;
96
- }
97
-
98
- ._9-Xiq_spectrum-Link._9-Xiq_is-disabled {
99
- cursor: default;
100
- pointer-events: none;
101
- }
102
-
103
- ._9-Xiq_spectrum-Link._9-Xiq_is-disabled._9-Xiq_is-hovered, ._9-Xiq_spectrum-Link._9-Xiq_is-disabled:focus {
104
- text-decoration: none;
105
- }
106
-
107
- ._9-Xiq_spectrum-Link--secondary, ._9-Xiq_spectrum-Link--overBackground {
108
- text-decoration: underline;
109
- }
110
-
111
- ._9-Xiq_spectrum-Link--quiet {
112
- text-decoration: none;
113
- }
114
-
115
- ._9-Xiq_spectrum-Link {
116
- --spectrum-link-text-color: var(--spectrum-accent-color-1000);
117
- --spectrum-link-text-color-hover: var(--spectrum-accent-color-1000);
118
- --spectrum-link-text-color-down: var(--spectrum-accent-color-1100);
119
- --spectrum-link-text-color-key-focus: var(--spectrum-accent-color-1000);
120
- color: var(--spectrum-link-text-color, var(--spectrum-global-color-blue-600));
121
- }
122
-
123
- ._9-Xiq_spectrum-Link._9-Xiq_is-hovered {
124
- color: var(--spectrum-link-text-color-hover, var(--spectrum-global-color-blue-600));
125
- }
126
-
127
- ._9-Xiq_spectrum-Link:active {
128
- color: var(--spectrum-link-text-color-down, var(--spectrum-global-color-blue-700));
129
- }
130
-
131
- ._9-Xiq_spectrum-Link._9-Xiq_focus-ring {
132
- color: var(--spectrum-link-text-color-key-focus, var(--spectrum-alias-text-color-key-focus));
133
- }
134
-
135
- ._9-Xiq_spectrum-Link._9-Xiq_is-disabled {
136
- color: var(--spectrum-link-text-color-disabled, var(--spectrum-alias-text-color-disabled));
137
- }
138
-
139
- ._9-Xiq_spectrum-Link--secondary, ._9-Xiq_spectrum-Link--secondary._9-Xiq_is-hovered, ._9-Xiq_spectrum-Link--secondary:active, ._9-Xiq_spectrum-Link--secondary:focus {
140
- color: inherit;
141
- }
142
-
143
- ._9-Xiq_spectrum-Link--overBackground {
144
- color: var(--spectrum-link-over-background-text-color, var(--spectrum-global-color-static-white));
145
- }
146
-
147
- ._9-Xiq_spectrum-Link--overBackground._9-Xiq_is-hovered {
148
- color: var(--spectrum-link-over-background-text-color-hover, var(--spectrum-global-color-static-white));
149
- }
150
-
151
- ._9-Xiq_spectrum-Link--overBackground:active {
152
- color: var(--spectrum-link-over-background-text-color-down, var(--spectrum-global-color-static-white));
153
- }
154
-
155
- ._9-Xiq_spectrum-Link--overBackground:focus {
156
- color: var(--spectrum-link-over-background-text-color-key-focus, var(--spectrum-global-color-static-white));
157
- }
158
-
159
- ._9-Xiq_spectrum-Link--overBackground._9-Xiq_is-disabled {
160
- color: var(--spectrum-link-over-background-text-color-disabled, #ffffff80);
161
- }
162
-
163
- @media (forced-colors: active) {
164
- ._9-Xiq_spectrum-Link, ._9-Xiq_spectrum-Link._9-Xiq_is-hovered, ._9-Xiq_spectrum-Link:active, ._9-Xiq_spectrum-Link:focus {
165
- color: linktext;
166
- }
167
- }
168
- /*# sourceMappingURL=link.60ca145f.css.map */
@@ -1 +0,0 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;AAUE;;;;AAQA;;;;AAKA;;;;;AAIE;;;;AAOJ;;;;AAQA;;;;AAgBA;;;;;;;;AAQE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAgBA;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;EACE","sources":["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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"link.60ca145f.css.map"}
@@ -1,41 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
-
6
- $parcel$export(module.exports, "focus-ring", () => $094ce2289235a9fa$export$f39a09f249340e2a, (v) => $094ce2289235a9fa$export$f39a09f249340e2a = v);
7
- $parcel$export(module.exports, "i18nFontFamily", () => $094ce2289235a9fa$export$8c4ee2c50c22c514, (v) => $094ce2289235a9fa$export$8c4ee2c50c22c514 = v);
8
- $parcel$export(module.exports, "is-disabled", () => $094ce2289235a9fa$export$d35bc1e505d1ebbf, (v) => $094ce2289235a9fa$export$d35bc1e505d1ebbf = v);
9
- $parcel$export(module.exports, "is-hovered", () => $094ce2289235a9fa$export$b8813cd5d7824ce7, (v) => $094ce2289235a9fa$export$b8813cd5d7824ce7 = v);
10
- $parcel$export(module.exports, "spectrum-FocusRing-ring", () => $094ce2289235a9fa$export$4109102f950813a6, (v) => $094ce2289235a9fa$export$4109102f950813a6 = v);
11
- $parcel$export(module.exports, "spectrum-FocusRing", () => $094ce2289235a9fa$export$24c7f46a6e3605dd, (v) => $094ce2289235a9fa$export$24c7f46a6e3605dd = v);
12
- $parcel$export(module.exports, "spectrum-FocusRing--quiet", () => $094ce2289235a9fa$export$2927016961429360, (v) => $094ce2289235a9fa$export$2927016961429360 = v);
13
- $parcel$export(module.exports, "spectrum-Link", () => $094ce2289235a9fa$export$d85dd8b94975f388, (v) => $094ce2289235a9fa$export$d85dd8b94975f388 = v);
14
- $parcel$export(module.exports, "spectrum-Link--overBackground", () => $094ce2289235a9fa$export$679b6267148797da, (v) => $094ce2289235a9fa$export$679b6267148797da = v);
15
- $parcel$export(module.exports, "spectrum-Link--quiet", () => $094ce2289235a9fa$export$81921ea93435e997, (v) => $094ce2289235a9fa$export$81921ea93435e997 = v);
16
- $parcel$export(module.exports, "spectrum-Link--secondary", () => $094ce2289235a9fa$export$ab09ed292dcb9a79, (v) => $094ce2289235a9fa$export$ab09ed292dcb9a79 = v);
17
- var $094ce2289235a9fa$export$f39a09f249340e2a;
18
- var $094ce2289235a9fa$export$8c4ee2c50c22c514;
19
- var $094ce2289235a9fa$export$d35bc1e505d1ebbf;
20
- var $094ce2289235a9fa$export$b8813cd5d7824ce7;
21
- var $094ce2289235a9fa$export$4109102f950813a6;
22
- var $094ce2289235a9fa$export$24c7f46a6e3605dd;
23
- var $094ce2289235a9fa$export$2927016961429360;
24
- var $094ce2289235a9fa$export$d85dd8b94975f388;
25
- var $094ce2289235a9fa$export$679b6267148797da;
26
- var $094ce2289235a9fa$export$81921ea93435e997;
27
- var $094ce2289235a9fa$export$ab09ed292dcb9a79;
28
- $094ce2289235a9fa$export$f39a09f249340e2a = `_9-Xiq_focus-ring`;
29
- $094ce2289235a9fa$export$8c4ee2c50c22c514 = `_9-Xiq_i18nFontFamily`;
30
- $094ce2289235a9fa$export$d35bc1e505d1ebbf = `_9-Xiq_is-disabled`;
31
- $094ce2289235a9fa$export$b8813cd5d7824ce7 = `_9-Xiq_is-hovered`;
32
- $094ce2289235a9fa$export$4109102f950813a6 = `_9-Xiq_spectrum-FocusRing-ring`;
33
- $094ce2289235a9fa$export$24c7f46a6e3605dd = `_9-Xiq_spectrum-FocusRing ${$094ce2289235a9fa$export$4109102f950813a6}`;
34
- $094ce2289235a9fa$export$2927016961429360 = `_9-Xiq_spectrum-FocusRing--quiet`;
35
- $094ce2289235a9fa$export$d85dd8b94975f388 = `_9-Xiq_spectrum-Link`;
36
- $094ce2289235a9fa$export$679b6267148797da = `_9-Xiq_spectrum-Link--overBackground`;
37
- $094ce2289235a9fa$export$81921ea93435e997 = `_9-Xiq_spectrum-Link--quiet`;
38
- $094ce2289235a9fa$export$ab09ed292dcb9a79 = `_9-Xiq_spectrum-Link--secondary`;
39
-
40
-
41
- //# sourceMappingURL=link_vars_css.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,2CAA2C;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA6C,CAAC,+BAA+B,CAAC","sources":["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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"link_vars_css.main.js.map"}
@@ -1,43 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
- var $4564c6c10d1690b3$exports = {};
6
-
7
- $parcel$export($4564c6c10d1690b3$exports, "focus-ring", () => $4564c6c10d1690b3$export$f39a09f249340e2a, (v) => $4564c6c10d1690b3$export$f39a09f249340e2a = v);
8
- $parcel$export($4564c6c10d1690b3$exports, "i18nFontFamily", () => $4564c6c10d1690b3$export$8c4ee2c50c22c514, (v) => $4564c6c10d1690b3$export$8c4ee2c50c22c514 = v);
9
- $parcel$export($4564c6c10d1690b3$exports, "is-disabled", () => $4564c6c10d1690b3$export$d35bc1e505d1ebbf, (v) => $4564c6c10d1690b3$export$d35bc1e505d1ebbf = v);
10
- $parcel$export($4564c6c10d1690b3$exports, "is-hovered", () => $4564c6c10d1690b3$export$b8813cd5d7824ce7, (v) => $4564c6c10d1690b3$export$b8813cd5d7824ce7 = v);
11
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing-ring", () => $4564c6c10d1690b3$export$4109102f950813a6, (v) => $4564c6c10d1690b3$export$4109102f950813a6 = v);
12
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing", () => $4564c6c10d1690b3$export$24c7f46a6e3605dd, (v) => $4564c6c10d1690b3$export$24c7f46a6e3605dd = v);
13
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing--quiet", () => $4564c6c10d1690b3$export$2927016961429360, (v) => $4564c6c10d1690b3$export$2927016961429360 = v);
14
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link", () => $4564c6c10d1690b3$export$d85dd8b94975f388, (v) => $4564c6c10d1690b3$export$d85dd8b94975f388 = v);
15
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--overBackground", () => $4564c6c10d1690b3$export$679b6267148797da, (v) => $4564c6c10d1690b3$export$679b6267148797da = v);
16
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--quiet", () => $4564c6c10d1690b3$export$81921ea93435e997, (v) => $4564c6c10d1690b3$export$81921ea93435e997 = v);
17
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--secondary", () => $4564c6c10d1690b3$export$ab09ed292dcb9a79, (v) => $4564c6c10d1690b3$export$ab09ed292dcb9a79 = v);
18
- var $4564c6c10d1690b3$export$f39a09f249340e2a;
19
- var $4564c6c10d1690b3$export$8c4ee2c50c22c514;
20
- var $4564c6c10d1690b3$export$d35bc1e505d1ebbf;
21
- var $4564c6c10d1690b3$export$b8813cd5d7824ce7;
22
- var $4564c6c10d1690b3$export$4109102f950813a6;
23
- var $4564c6c10d1690b3$export$24c7f46a6e3605dd;
24
- var $4564c6c10d1690b3$export$2927016961429360;
25
- var $4564c6c10d1690b3$export$d85dd8b94975f388;
26
- var $4564c6c10d1690b3$export$679b6267148797da;
27
- var $4564c6c10d1690b3$export$81921ea93435e997;
28
- var $4564c6c10d1690b3$export$ab09ed292dcb9a79;
29
- $4564c6c10d1690b3$export$f39a09f249340e2a = `_9-Xiq_focus-ring`;
30
- $4564c6c10d1690b3$export$8c4ee2c50c22c514 = `_9-Xiq_i18nFontFamily`;
31
- $4564c6c10d1690b3$export$d35bc1e505d1ebbf = `_9-Xiq_is-disabled`;
32
- $4564c6c10d1690b3$export$b8813cd5d7824ce7 = `_9-Xiq_is-hovered`;
33
- $4564c6c10d1690b3$export$4109102f950813a6 = `_9-Xiq_spectrum-FocusRing-ring`;
34
- $4564c6c10d1690b3$export$24c7f46a6e3605dd = `_9-Xiq_spectrum-FocusRing ${$4564c6c10d1690b3$export$4109102f950813a6}`;
35
- $4564c6c10d1690b3$export$2927016961429360 = `_9-Xiq_spectrum-FocusRing--quiet`;
36
- $4564c6c10d1690b3$export$d85dd8b94975f388 = `_9-Xiq_spectrum-Link`;
37
- $4564c6c10d1690b3$export$679b6267148797da = `_9-Xiq_spectrum-Link--overBackground`;
38
- $4564c6c10d1690b3$export$81921ea93435e997 = `_9-Xiq_spectrum-Link--quiet`;
39
- $4564c6c10d1690b3$export$ab09ed292dcb9a79 = `_9-Xiq_spectrum-Link--secondary`;
40
-
41
-
42
- export {$4564c6c10d1690b3$exports as default};
43
- //# sourceMappingURL=link_vars_css.module.js.map
@@ -1,43 +0,0 @@
1
-
2
- function $parcel$export(e, n, v, s) {
3
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
- }
5
- var $4564c6c10d1690b3$exports = {};
6
-
7
- $parcel$export($4564c6c10d1690b3$exports, "focus-ring", () => $4564c6c10d1690b3$export$f39a09f249340e2a, (v) => $4564c6c10d1690b3$export$f39a09f249340e2a = v);
8
- $parcel$export($4564c6c10d1690b3$exports, "i18nFontFamily", () => $4564c6c10d1690b3$export$8c4ee2c50c22c514, (v) => $4564c6c10d1690b3$export$8c4ee2c50c22c514 = v);
9
- $parcel$export($4564c6c10d1690b3$exports, "is-disabled", () => $4564c6c10d1690b3$export$d35bc1e505d1ebbf, (v) => $4564c6c10d1690b3$export$d35bc1e505d1ebbf = v);
10
- $parcel$export($4564c6c10d1690b3$exports, "is-hovered", () => $4564c6c10d1690b3$export$b8813cd5d7824ce7, (v) => $4564c6c10d1690b3$export$b8813cd5d7824ce7 = v);
11
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing-ring", () => $4564c6c10d1690b3$export$4109102f950813a6, (v) => $4564c6c10d1690b3$export$4109102f950813a6 = v);
12
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing", () => $4564c6c10d1690b3$export$24c7f46a6e3605dd, (v) => $4564c6c10d1690b3$export$24c7f46a6e3605dd = v);
13
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-FocusRing--quiet", () => $4564c6c10d1690b3$export$2927016961429360, (v) => $4564c6c10d1690b3$export$2927016961429360 = v);
14
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link", () => $4564c6c10d1690b3$export$d85dd8b94975f388, (v) => $4564c6c10d1690b3$export$d85dd8b94975f388 = v);
15
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--overBackground", () => $4564c6c10d1690b3$export$679b6267148797da, (v) => $4564c6c10d1690b3$export$679b6267148797da = v);
16
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--quiet", () => $4564c6c10d1690b3$export$81921ea93435e997, (v) => $4564c6c10d1690b3$export$81921ea93435e997 = v);
17
- $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--secondary", () => $4564c6c10d1690b3$export$ab09ed292dcb9a79, (v) => $4564c6c10d1690b3$export$ab09ed292dcb9a79 = v);
18
- var $4564c6c10d1690b3$export$f39a09f249340e2a;
19
- var $4564c6c10d1690b3$export$8c4ee2c50c22c514;
20
- var $4564c6c10d1690b3$export$d35bc1e505d1ebbf;
21
- var $4564c6c10d1690b3$export$b8813cd5d7824ce7;
22
- var $4564c6c10d1690b3$export$4109102f950813a6;
23
- var $4564c6c10d1690b3$export$24c7f46a6e3605dd;
24
- var $4564c6c10d1690b3$export$2927016961429360;
25
- var $4564c6c10d1690b3$export$d85dd8b94975f388;
26
- var $4564c6c10d1690b3$export$679b6267148797da;
27
- var $4564c6c10d1690b3$export$81921ea93435e997;
28
- var $4564c6c10d1690b3$export$ab09ed292dcb9a79;
29
- $4564c6c10d1690b3$export$f39a09f249340e2a = `_9-Xiq_focus-ring`;
30
- $4564c6c10d1690b3$export$8c4ee2c50c22c514 = `_9-Xiq_i18nFontFamily`;
31
- $4564c6c10d1690b3$export$d35bc1e505d1ebbf = `_9-Xiq_is-disabled`;
32
- $4564c6c10d1690b3$export$b8813cd5d7824ce7 = `_9-Xiq_is-hovered`;
33
- $4564c6c10d1690b3$export$4109102f950813a6 = `_9-Xiq_spectrum-FocusRing-ring`;
34
- $4564c6c10d1690b3$export$24c7f46a6e3605dd = `_9-Xiq_spectrum-FocusRing ${$4564c6c10d1690b3$export$4109102f950813a6}`;
35
- $4564c6c10d1690b3$export$2927016961429360 = `_9-Xiq_spectrum-FocusRing--quiet`;
36
- $4564c6c10d1690b3$export$d85dd8b94975f388 = `_9-Xiq_spectrum-Link`;
37
- $4564c6c10d1690b3$export$679b6267148797da = `_9-Xiq_spectrum-Link--overBackground`;
38
- $4564c6c10d1690b3$export$81921ea93435e997 = `_9-Xiq_spectrum-Link--quiet`;
39
- $4564c6c10d1690b3$export$ab09ed292dcb9a79 = `_9-Xiq_spectrum-Link--secondary`;
40
-
41
-
42
- export {$4564c6c10d1690b3$exports as default};
43
- //# sourceMappingURL=link_vars_css.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,2CAA2C;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA6C,CAAC,+BAA+B,CAAC","sources":["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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"link_vars_css.module.js.map"}
package/dist/types.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { JSX } from "react";
2
- import { SpectrumLinkProps } from "@react-types/link";
3
- /**
4
- * Links allow users to navigate to a different location.
5
- * They can be presented inline inside a paragraph or as standalone text.
6
- */
7
- export function Link(props: SpectrumLinkProps): JSX.Element;
8
- export type { SpectrumLinkProps } from '@react-types/link';
9
-
10
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"mappings":";;AAuBA;;;GAGG;AACH,qBAAqB,KAAK,EAAE,iBAAiB,GAAG,IAAI,OAAO,CA8D1D;AC1ED,YAAY,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC","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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/src/Link.tsx DELETED
@@ -1,90 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';
14
- import {FocusRing} from '@react-aria/focus';
15
- import {mergeProps, mergeRefs} from '@react-aria/utils';
16
- import React, {ForwardedRef, JSX, MutableRefObject, useRef} from 'react';
17
- import {SpectrumLinkProps} from '@react-types/link';
18
- import styles from '@adobe/spectrum-css-temp/components/link/vars.css';
19
- import {useHover} from '@react-aria/interactions';
20
- import {useLink} from '@react-aria/link';
21
- import {useProviderProps} from '@react-spectrum/provider';
22
-
23
- let isOldReact = parseInt(React.version, 10) <= 18;
24
- /**
25
- * Links allow users to navigate to a different location.
26
- * They can be presented inline inside a paragraph or as standalone text.
27
- */
28
- export function Link(props: SpectrumLinkProps): JSX.Element {
29
- props = useProviderProps(props);
30
- props = useSlotProps(props, 'link');
31
- let {
32
- variant = 'primary',
33
- isQuiet,
34
- children,
35
- // @ts-ignore
36
- href
37
- } = props;
38
- let {styleProps} = useStyleProps(props);
39
- let {hoverProps, isHovered} = useHover({});
40
-
41
- let ref = useRef(null);
42
- let {linkProps} = useLink({
43
- ...props,
44
- elementType: !href && typeof children === 'string' ? 'span' : 'a'
45
- }, ref);
46
-
47
- let domProps = {
48
- ...styleProps,
49
- ...mergeProps(linkProps, hoverProps),
50
- ref,
51
- className: classNames(
52
- styles,
53
- 'spectrum-Link',
54
- {
55
- 'spectrum-Link--quiet': isQuiet,
56
- [`spectrum-Link--${variant}`]: variant,
57
- 'is-hovered': isHovered
58
- },
59
- styleProps.className
60
- )
61
- };
62
-
63
- let link: JSX.Element;
64
- if (href) {
65
- link = <a {...domProps}>{children}</a>;
66
- } else {
67
- // Backward compatibility.
68
- let wrappedChild = getWrappedElement(children);
69
- let mergedRef: MutableRefObject<any> | ForwardedRef<any> = ref;
70
- if (isOldReact) {
71
- // @ts-ignore
72
- mergedRef = mergeRefs(ref, wrappedChild.ref);
73
- } else {
74
- // @ts-ignore
75
- mergedRef = mergeRefs(ref, wrappedChild.props.ref);
76
- }
77
- link = React.cloneElement(wrappedChild, {
78
- ...mergeProps(wrappedChild.props, domProps),
79
- // @ts-ignore https://github.com/facebook/react/issues/8873
80
- ref: mergedRef
81
- });
82
- }
83
-
84
-
85
- return (
86
- <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>
87
- {link}
88
- </FocusRing>
89
- );
90
- }