@react-spectrum/link 3.4.4 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,100 @@
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";
9
+
10
+ function $parcel$interopDefault(a) {
11
+ return a && a.__esModule ? a.default : a;
12
+ }
13
+ function $parcel$export(e, n, v, s) {
14
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
+ }
16
+ /*
17
+ * Copyright 2020 Adobe. All rights reserved.
18
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
+ * you may not use this file except in compliance with the License. You may obtain a copy
20
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
+ *
22
+ * Unless required by applicable law or agreed to in writing, software distributed under
23
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
+ * OF ANY KIND, either express or implied. See the License for the specific language
25
+ * governing permissions and limitations under the License.
26
+ */ /// <reference types="css-module-types" />
27
+ /*
28
+ * Copyright 2020 Adobe. All rights reserved.
29
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
30
+ * you may not use this file except in compliance with the License. You may obtain a copy
31
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software distributed under
34
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
35
+ * OF ANY KIND, either express or implied. See the License for the specific language
36
+ * governing permissions and limitations under the License.
37
+ */
38
+
39
+
40
+
41
+ var $4564c6c10d1690b3$exports = {};
42
+
43
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link", () => $4564c6c10d1690b3$export$d85dd8b94975f388, (v) => $4564c6c10d1690b3$export$d85dd8b94975f388 = v);
44
+ $parcel$export($4564c6c10d1690b3$exports, "is-hovered", () => $4564c6c10d1690b3$export$b8813cd5d7824ce7, (v) => $4564c6c10d1690b3$export$b8813cd5d7824ce7 = v);
45
+ $parcel$export($4564c6c10d1690b3$exports, "focus-ring", () => $4564c6c10d1690b3$export$f39a09f249340e2a, (v) => $4564c6c10d1690b3$export$f39a09f249340e2a = v);
46
+ $parcel$export($4564c6c10d1690b3$exports, "is-disabled", () => $4564c6c10d1690b3$export$d35bc1e505d1ebbf, (v) => $4564c6c10d1690b3$export$d35bc1e505d1ebbf = v);
47
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--secondary", () => $4564c6c10d1690b3$export$ab09ed292dcb9a79, (v) => $4564c6c10d1690b3$export$ab09ed292dcb9a79 = v);
48
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--overBackground", () => $4564c6c10d1690b3$export$679b6267148797da, (v) => $4564c6c10d1690b3$export$679b6267148797da = v);
49
+ $parcel$export($4564c6c10d1690b3$exports, "spectrum-Link--quiet", () => $4564c6c10d1690b3$export$81921ea93435e997, (v) => $4564c6c10d1690b3$export$81921ea93435e997 = v);
50
+ var $4564c6c10d1690b3$export$d85dd8b94975f388;
51
+ var $4564c6c10d1690b3$export$b8813cd5d7824ce7;
52
+ var $4564c6c10d1690b3$export$f39a09f249340e2a;
53
+ var $4564c6c10d1690b3$export$d35bc1e505d1ebbf;
54
+ var $4564c6c10d1690b3$export$ab09ed292dcb9a79;
55
+ var $4564c6c10d1690b3$export$679b6267148797da;
56
+ var $4564c6c10d1690b3$export$81921ea93435e997;
57
+ $4564c6c10d1690b3$export$d85dd8b94975f388 = "spectrum-Link_5a03c7";
58
+ $4564c6c10d1690b3$export$b8813cd5d7824ce7 = "is-hovered_5a03c7";
59
+ $4564c6c10d1690b3$export$f39a09f249340e2a = "focus-ring_5a03c7";
60
+ $4564c6c10d1690b3$export$d35bc1e505d1ebbf = "is-disabled_5a03c7";
61
+ $4564c6c10d1690b3$export$ab09ed292dcb9a79 = "spectrum-Link--secondary_5a03c7";
62
+ $4564c6c10d1690b3$export$679b6267148797da = "spectrum-Link--overBackground_5a03c7";
63
+ $4564c6c10d1690b3$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
64
+
65
+
66
+
67
+
68
+
69
+ function $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a(props) {
70
+ props = (0, $11MUV$useProviderProps)(props);
71
+ props = (0, $11MUV$useSlotProps)(props, "link");
72
+ let { variant: variant = "primary" , isQuiet: isQuiet , children: children , href: // @ts-ignore
73
+ href } = props;
74
+ let { styleProps: styleProps } = (0, $11MUV$useStyleProps)(props);
75
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $11MUV$useHover)({});
76
+ if (href) console.warn("href is deprecated, please use an anchor element as children");
77
+ let ref = (0, $11MUV$useRef)();
78
+ let { linkProps: linkProps } = (0, $11MUV$useLink)({
79
+ ...props,
80
+ elementType: typeof children === "string" ? "span" : "a"
81
+ }, ref);
82
+ return /*#__PURE__*/ (0, $11MUV$react).createElement((0, $11MUV$FocusRing), {
83
+ focusRingClass: (0, $11MUV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports))), "focus-ring")
84
+ }, /*#__PURE__*/ (0, $11MUV$react).cloneElement((0, $11MUV$getWrappedElement)(children), {
85
+ ...styleProps,
86
+ ...(0, $11MUV$mergeProps)(linkProps, hoverProps),
87
+ ref: ref,
88
+ className: (0, $11MUV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports))), "spectrum-Link", {
89
+ "spectrum-Link--quiet": isQuiet,
90
+ [`spectrum-Link--${variant}`]: variant,
91
+ "is-hovered": isHovered
92
+ }, styleProps.className)
93
+ }));
94
+ }
95
+
96
+
97
+
98
+
99
+ export {$3c5235ac12f2c9bb$export$a6c7ac8248d6e38a as Link};
100
+ //# sourceMappingURL=module.js.map
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Link_5a03c7{-webkit-text-decoration-skip:objects;transition:color var(--spectrum-global-animation-duration-100,.13s)ease-in-out;cursor:pointer;background-color:#0000;outline:none;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 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,.spectrum-Link_5a03c7.is-hovered_5a03c7{color:var(--spectrum-accent-color-1000)}.spectrum-Link_5a03c7:active{color:var(--spectrum-accent-color-1100)}.spectrum-Link_5a03c7.focus-ring_5a03c7{color:var(--spectrum-accent-color-1000)}.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)}
1
+ :root{font-synthesis:weight}.spectrum-Link_5a03c7{-webkit-text-decoration-skip:objects;transition:color var(--spectrum-global-animation-duration-100,.13s)ease-in-out;cursor:pointer;background-color:#0000;outline:none;text-decoration:underline}.spectrum-Link_5a03c7.is-hovered_5a03c7,.spectrum-Link_5a03c7.focus-ring_5a03c7{text-decoration:underline}.spectrum-Link_5a03c7.focus-ring_5a03c7{-webkit-text-decoration:underline double;text-decoration:underline 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,.spectrum-Link_5a03c7.is-hovered_5a03c7{color:var(--spectrum-accent-color-1000)}.spectrum-Link_5a03c7:active{color:var(--spectrum-accent-color-1100)}.spectrum-Link_5a03c7.focus-ring_5a03c7{color:var(--spectrum-accent-color-1000)}.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/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/link",
3
- "version": "3.4.4",
3
+ "version": "3.5.1",
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
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
8
13
  "types": "dist/types.d.ts",
9
14
  "source": "src/index.ts",
10
15
  "files": [
@@ -31,12 +36,12 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@react-aria/focus": "^3.10.1",
35
- "@react-aria/interactions": "^3.13.1",
36
- "@react-aria/link": "^3.3.6",
37
- "@react-aria/utils": "^3.14.2",
38
- "@react-spectrum/utils": "^3.8.1",
39
- "@react-types/link": "^3.3.6",
39
+ "@react-aria/focus": "^3.12.0",
40
+ "@react-aria/interactions": "^3.15.0",
41
+ "@react-aria/link": "^3.5.0",
42
+ "@react-aria/utils": "^3.16.0",
43
+ "@react-spectrum/utils": "^3.9.1",
44
+ "@react-types/link": "^3.4.1",
40
45
  "@swc/helpers": "^0.4.14"
41
46
  },
42
47
  "devDependencies": {
@@ -49,5 +54,5 @@
49
54
  "publishConfig": {
50
55
  "access": "public"
51
56
  },
52
- "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
57
+ "gitHead": "9d1ba9bd8ebcd63bf3495ade16d349bcb71795ce"
53
58
  }