@react-spectrum/link 3.4.3 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Link_5a03c7{-webkit-text-decoration-skip:objects;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 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
+ .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)}
package/dist/main.js CHANGED
@@ -15,7 +15,28 @@ function $parcel$interopDefault(a) {
15
15
  }
16
16
 
17
17
  $parcel$export(module.exports, "Link", () => $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a);
18
-
18
+ /*
19
+ * Copyright 2020 Adobe. All rights reserved.
20
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License. You may obtain a copy
22
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
23
+ *
24
+ * Unless required by applicable law or agreed to in writing, software distributed under
25
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
26
+ * OF ANY KIND, either express or implied. See the License for the specific language
27
+ * governing permissions and limitations under the License.
28
+ */ /// <reference types="css-module-types" />
29
+ /*
30
+ * Copyright 2020 Adobe. All rights reserved.
31
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
32
+ * you may not use this file except in compliance with the License. You may obtain a copy
33
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
34
+ *
35
+ * Unless required by applicable law or agreed to in writing, software distributed under
36
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
37
+ * OF ANY KIND, either express or implied. See the License for the specific language
38
+ * governing permissions and limitations under the License.
39
+ */
19
40
 
20
41
 
21
42
 
@@ -48,31 +69,30 @@ $094ce2289235a9fa$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
48
69
 
49
70
 
50
71
  function $1148fb7fc40f1ce2$export$a6c7ac8248d6e38a(props) {
51
- props = $fo5qX$reactspectrumprovider.useProviderProps(props);
52
- props = $fo5qX$reactspectrumutils.useSlotProps(props, 'link');
53
- let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
72
+ props = (0, $fo5qX$reactspectrumprovider.useProviderProps)(props);
73
+ props = (0, $fo5qX$reactspectrumutils.useSlotProps)(props, "link");
74
+ let { variant: variant = "primary" , isQuiet: isQuiet , children: children , href: // @ts-ignore
54
75
  href } = props;
55
- let { styleProps: styleProps } = $fo5qX$reactspectrumutils.useStyleProps(props);
56
- let { hoverProps: hoverProps , isHovered: isHovered } = $fo5qX$reactariainteractions.useHover({
57
- });
58
- if (href) console.warn('href is deprecated, please use an anchor element as children');
59
- let ref = $fo5qX$react.useRef();
60
- let { linkProps: linkProps } = $fo5qX$reactarialink.useLink({
76
+ let { styleProps: styleProps } = (0, $fo5qX$reactspectrumutils.useStyleProps)(props);
77
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $fo5qX$reactariainteractions.useHover)({});
78
+ if (href) console.warn("href is deprecated, please use an anchor element as children");
79
+ let ref = (0, $fo5qX$react.useRef)();
80
+ let { linkProps: linkProps } = (0, $fo5qX$reactarialink.useLink)({
61
81
  ...props,
62
- elementType: typeof children === 'string' ? 'span' : 'a'
82
+ elementType: typeof children === "string" ? "span" : "a"
63
83
  }, ref);
64
- return(/*#__PURE__*/ ($parcel$interopDefault($fo5qX$react)).createElement($fo5qX$reactariafocus.FocusRing, {
65
- focusRingClass: $fo5qX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports)), 'focus-ring')
66
- }, /*#__PURE__*/ ($parcel$interopDefault($fo5qX$react)).cloneElement($fo5qX$reactspectrumutils.getWrappedElement(children), {
84
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($fo5qX$react))).createElement((0, $fo5qX$reactariafocus.FocusRing), {
85
+ focusRingClass: (0, $fo5qX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports))), "focus-ring")
86
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($fo5qX$react))).cloneElement((0, $fo5qX$reactspectrumutils.getWrappedElement)(children), {
67
87
  ...styleProps,
68
- ...$fo5qX$reactariautils.mergeProps(linkProps, hoverProps),
88
+ ...(0, $fo5qX$reactariautils.mergeProps)(linkProps, hoverProps),
69
89
  ref: ref,
70
- className: $fo5qX$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports)), 'spectrum-Link', {
71
- 'spectrum-Link--quiet': isQuiet,
90
+ className: (0, $fo5qX$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($094ce2289235a9fa$exports))), "spectrum-Link", {
91
+ "spectrum-Link--quiet": isQuiet,
72
92
  [`spectrum-Link--${variant}`]: variant,
73
- 'is-hovered': isHovered
93
+ "is-hovered": isHovered
74
94
  }, styleProps.className)
75
- })));
95
+ }));
76
96
  }
77
97
 
78
98
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AANA,4CAAkC;AAClC,4CAA+B;AAC/B,4CAA+B;AAC/B,4CAAgC;AAChC,4CAA6C;AAC7C,4CAAkD;AAClD,4CAAyC;;;;;;ADoBlC,SAAS,0CAAK,KAAwB,EAAE;IAC7C,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,sCAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,WACF,UAAU,qBACV,QAAO,YACP,SAAQ,QACR,aAAa;IACb,KAAI,EACL,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAa,AAAD,EAAE;IACjC,IAAI,cAAC,WAAU,aAAE,UAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE,CAAC;IAExC,IAAI,MACF,QAAQ,IAAI,CAAC;IAGf,IAAI,MAAM,CAAA,GAAA,mBAAM,AAAD;IACf,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,4BAAO,AAAD,EAAE;QACxB,GAAG,KAAK;QACR,aAAa,OAAO,aAAa,WAAW,SAAS,GAAG;IAC1D,GAAG;IAEH,qBACE,0DAAC,CAAA,GAAA,+BAAS,AAAD;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBAC3C,CAAA,GAAA,sCAAK,AAAD,EAAE,YAAY,CACjB,CAAA,GAAA,2CAAgB,EAAE,WAClB;QACE,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,gCAAU,AAAD,EAAE,WAAW,WAAW;aACpC;QACA,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,yDAAM,OAAD,GACL,iBACA;YACE,wBAAwB;YACxB,CAAC,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,EAAE;YAC/B,cAAc;QAChB,GACA,WAAW,SAAS;IAExB;AAIR;;ADzDA","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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/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
@@ -13,7 +13,28 @@ function $parcel$interopDefault(a) {
13
13
  function $parcel$export(e, n, v, s) {
14
14
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
15
  }
16
-
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
+ */
17
38
 
18
39
 
19
40
 
@@ -46,31 +67,30 @@ $4564c6c10d1690b3$export$81921ea93435e997 = "spectrum-Link--quiet_5a03c7";
46
67
 
47
68
 
48
69
  function $3c5235ac12f2c9bb$export$a6c7ac8248d6e38a(props) {
49
- props = $11MUV$useProviderProps(props);
50
- props = $11MUV$useSlotProps(props, 'link');
51
- let { variant: variant = 'primary' , isQuiet: isQuiet , children: children , href: // @ts-ignore
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
52
73
  href } = props;
53
- let { styleProps: styleProps } = $11MUV$useStyleProps(props);
54
- let { hoverProps: hoverProps , isHovered: isHovered } = $11MUV$useHover({
55
- });
56
- if (href) console.warn('href is deprecated, please use an anchor element as children');
57
- let ref = $11MUV$useRef();
58
- let { linkProps: linkProps } = $11MUV$useLink({
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)({
59
79
  ...props,
60
- elementType: typeof children === 'string' ? 'span' : 'a'
80
+ elementType: typeof children === "string" ? "span" : "a"
61
81
  }, ref);
62
- return(/*#__PURE__*/ $11MUV$react.createElement($11MUV$FocusRing, {
63
- focusRingClass: $11MUV$classNames((/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports)), 'focus-ring')
64
- }, /*#__PURE__*/ $11MUV$react.cloneElement($11MUV$getWrappedElement(children), {
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), {
65
85
  ...styleProps,
66
- ...$11MUV$mergeProps(linkProps, hoverProps),
86
+ ...(0, $11MUV$mergeProps)(linkProps, hoverProps),
67
87
  ref: ref,
68
- className: $11MUV$classNames((/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports)), 'spectrum-Link', {
69
- 'spectrum-Link--quiet': isQuiet,
88
+ className: (0, $11MUV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4564c6c10d1690b3$exports))), "spectrum-Link", {
89
+ "spectrum-Link--quiet": isQuiet,
70
90
  [`spectrum-Link--${variant}`]: variant,
71
- 'is-hovered': isHovered
91
+ "is-hovered": isHovered
72
92
  }, styleProps.className)
73
- })));
93
+ }));
74
94
  }
75
95
 
76
96
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA0C;AAC1C,GAA+C;AAC/C,GAAsC;AANtC,yCAA+B,GAAG,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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AANA,4CAAkC;AAClC,4CAA+B;AAC/B,4CAA+B;AAC/B,4CAAgC;AAChC,4CAA6C;AAC7C,4CAAkD;AAClD,4CAAyC;;;;;;ADoBlC,SAAS,0CAAK,KAAwB,EAAE;IAC7C,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAY,AAAD,EAAE,OAAO;IAC5B,IAAI,WACF,UAAU,qBACV,QAAO,YACP,SAAQ,QACR,aAAa;IACb,KAAI,EACL,GAAG;IACJ,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAa,AAAD,EAAE;IACjC,IAAI,cAAC,WAAU,aAAE,UAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE,CAAC;IAExC,IAAI,MACF,QAAQ,IAAI,CAAC;IAGf,IAAI,MAAM,CAAA,GAAA,aAAM,AAAD;IACf,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,cAAO,AAAD,EAAE;QACxB,GAAG,KAAK;QACR,aAAa,OAAO,aAAa,WAAW,SAAS,GAAG;IAC1D,GAAG;IAEH,qBACE,gCAAC,CAAA,GAAA,gBAAS,AAAD;QAAE,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;qBAC3C,CAAA,GAAA,YAAK,AAAD,EAAE,YAAY,CACjB,CAAA,GAAA,wBAAgB,EAAE,WAClB;QACE,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,iBAAU,AAAD,EAAE,WAAW,WAAW;aACpC;QACA,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,yDAAM,OAAD,GACL,iBACA;YACE,wBAAwB;YACxB,CAAC,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,EAAE;YAC/B,cAAc;QAChB,GACA,WAAW,SAAS;IAExB;AAIR;;ADzDA","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 {Link} from './Link';\nexport type {SpectrumLinkProps} from '@react-types/link';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, getWrappedElement, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumLinkProps} from '@react-types/link';\nimport styles from '@adobe/spectrum-css-temp/components/link/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLink} from '@react-aria/link';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Links allow users to navigate to a different location.\n * They can be presented inline inside a paragraph or as standalone text.\n */\nexport function Link(props: SpectrumLinkProps) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'link');\n let {\n variant = 'primary',\n isQuiet,\n children,\n // @ts-ignore\n href\n } = props;\n let {styleProps} = useStyleProps(props);\n let {hoverProps, isHovered} = useHover({});\n\n if (href) {\n console.warn('href is deprecated, please use an anchor element as children');\n }\n\n let ref = useRef();\n let {linkProps} = useLink({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {React.cloneElement(\n getWrappedElement(children),\n {\n ...styleProps,\n ...mergeProps(linkProps, hoverProps),\n ref,\n className: classNames(\n styles,\n 'spectrum-Link',\n {\n 'spectrum-Link--quiet': isQuiet,\n [`spectrum-Link--${variant}`]: variant,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }\n )}\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/link",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -31,13 +31,13 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "^3.10.0",
36
- "@react-aria/interactions": "^3.13.0",
37
- "@react-aria/link": "^3.3.5",
38
- "@react-aria/utils": "^3.14.1",
39
- "@react-spectrum/utils": "^3.8.0",
40
- "@react-types/link": "^3.3.5"
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",
40
+ "@swc/helpers": "^0.4.14"
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": "2954307ddbefe149241685440c81f80ece6b2c83"
52
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
53
53
  }