@react-spectrum/tooltip 3.7.0 → 3.7.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.
- package/dist/Tooltip.main.js +3 -6
- package/dist/Tooltip.main.js.map +1 -1
- package/dist/Tooltip.mjs +3 -6
- package/dist/Tooltip.module.js +3 -6
- package/dist/Tooltip.module.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/{vars.e2a76556.css → vars.adff832d.css} +2 -2
- package/dist/{vars.e2a76556.css.map → vars.adff832d.css.map} +1 -1
- package/package.json +13 -13
- package/src/Tooltip.tsx +5 -8
package/dist/Tooltip.main.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require("./vars.
|
1
|
+
require("./vars.adff832d.css");
|
2
2
|
var $ba73465d6d9b6556$exports = require("./tooltip_vars_css.main.js");
|
3
3
|
var $ed2e56c8503433b4$exports = require("./context.main.js");
|
4
4
|
var $l0Ry0$spectrumiconsuiAlertSmall = require("@spectrum-icons/ui/AlertSmall");
|
@@ -43,7 +43,7 @@ let $55bd11986fcffc6f$var$iconMap = {
|
|
43
43
|
positive: (0, ($parcel$interopDefault($l0Ry0$spectrumiconsuiSuccessSmall))),
|
44
44
|
negative: (0, ($parcel$interopDefault($l0Ry0$spectrumiconsuiAlertSmall)))
|
45
45
|
};
|
46
|
-
|
46
|
+
const $55bd11986fcffc6f$export$28c660c63b792dea = /*#__PURE__*/ (0, ($parcel$interopDefault($l0Ry0$react))).forwardRef(function Tooltip(props, ref) {
|
47
47
|
let { ref: overlayRef, arrowProps: arrowProps, state: state, arrowRef: arrowRef, ...tooltipProviderProps } = (0, $l0Ry0$react.useContext)((0, $ed2e56c8503433b4$exports.TooltipContext));
|
48
48
|
let defaultRef = (0, $l0Ry0$react.useRef)(null);
|
49
49
|
overlayRef = overlayRef || defaultRef;
|
@@ -74,10 +74,7 @@ function $55bd11986fcffc6f$var$Tooltip(props, ref) {
|
|
74
74
|
ref: arrowRef,
|
75
75
|
className: (0, $l0Ry0$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ba73465d6d9b6556$exports))), 'spectrum-Tooltip-tip')
|
76
76
|
}));
|
77
|
-
}
|
78
|
-
/**
|
79
|
-
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
80
|
-
*/ let $55bd11986fcffc6f$export$28c660c63b792dea = /*#__PURE__*/ (0, ($parcel$interopDefault($l0Ry0$react))).forwardRef($55bd11986fcffc6f$var$Tooltip);
|
77
|
+
});
|
81
78
|
|
82
79
|
|
83
80
|
//# sourceMappingURL=Tooltip.main.js.map
|
package/dist/Tooltip.main.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAcD,IAAI,gCAAU;IACZ,MAAM,CAAA,GAAA,yDAAQ;IACd,UAAU,CAAA,GAAA,4DAAW;IACrB,UAAU,CAAA,GAAA,0DAAS;AACrB;
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAcD,IAAI,gCAAU;IACZ,MAAM,CAAA,GAAA,yDAAQ;IACd,UAAU,CAAA,GAAA,4DAAW;IACrB,UAAU,CAAA,GAAA,0DAAS;AACrB;AAKO,MAAM,0DAAU,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,QAAQ,KAA2B,EAAE,GAAW;IAC/F,IAAI,EAAC,KAAK,UAAU,cAAE,UAAU,SAAE,KAAK,YAAE,QAAQ,EAAE,GAAG,sBAAqB,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IACtG,IAAI,aAAa,CAAA,GAAA,mBAAK,EAAE;IACxB,aAAa,cAAc;IAC3B,IAAI,kBAAkB,MAAM,SAAS;IACrC,QAAQ,CAAA,GAAA,gCAAS,EAAE,OAAO;IAC1B,IAAI,WACF,UAAU,sBACV,SAAS,UACT,MAAM,YACN,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,aAAa,MACf,YAAY,4BAAA,6BAAA,kBAAmB;IAEjC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kCAAS,EAAE,OAAO;IAEvC,yCAAyC;IACzC,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAM,CAAA,GAAA,sCAAW,EAAE;IAE5C,IAAI,OAAO,6BAAO,CAAC,QAAQ;IAE3B,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,oBACA,CAAC,kBAAkB,EAAE,SAAS,EAC9B,CAAC,kBAAkB,EAAE,WAAW,EAChC;YACE,WAAW;YACX,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE;QAC7B,GACA,WAAW,SAAS;QAEtB,KAAK;OACJ,YAAY,YAAY,2BAAa,0DAAC;QAAK,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAA8B,eAAA;QAC9G,MAAM,QAAQ,kBACb,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACjC,MAAM,QAAQ,iBAGnB,0DAAC;QAAM,GAAG,UAAU;QAAE,KAAK;QAAU,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;;AAGzE","sources":["packages/@react-spectrum/tooltip/src/Tooltip.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 AlertSmall from '@spectrum-icons/ui/AlertSmall';\nimport {classNames, createDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport InfoSmall from '@spectrum-icons/ui/InfoSmall';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useContext, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTooltipProps} from '@react-types/tooltip';\nimport styles from '@adobe/spectrum-css-temp/components/tooltip/vars.css';\nimport SuccessSmall from '@spectrum-icons/ui/SuccessSmall';\nimport {TooltipContext} from './context';\nimport {useTooltip} from '@react-aria/tooltip';\n\nlet iconMap = {\n info: InfoSmall,\n positive: SuccessSmall,\n negative: AlertSmall\n};\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = React.forwardRef(function Tooltip(props: SpectrumTooltipProps, ref: DOMRef) {\n let {ref: overlayRef, arrowProps, state, arrowRef, ...tooltipProviderProps} = useContext(TooltipContext);\n let defaultRef = useRef(null);\n overlayRef = overlayRef || defaultRef;\n let backupPlacement = props.placement;\n props = mergeProps(props, tooltipProviderProps);\n let {\n variant = 'neutral',\n placement,\n isOpen,\n showIcon,\n ...otherProps\n } = props;\n if (placement == null) {\n placement = backupPlacement ?? 'top';\n }\n let {styleProps} = useStyleProps(otherProps);\n let {tooltipProps} = useTooltip(props, state);\n\n // Sync ref with overlayRef from context.\n useImperativeHandle(ref, () => createDOMRef(overlayRef));\n\n let Icon = iconMap[variant];\n\n return (\n <div\n {...styleProps}\n {...tooltipProps}\n className={classNames(\n styles,\n 'spectrum-Tooltip',\n `spectrum-Tooltip--${variant}`,\n `spectrum-Tooltip--${placement}`,\n {\n 'is-open': isOpen,\n [`is-open--${placement}`]: isOpen\n },\n styleProps.className\n )}\n ref={overlayRef}>\n {showIcon && variant !== 'neutral' && <Icon UNSAFE_className={classNames(styles, 'spectrum-Tooltip-typeIcon')} aria-hidden />}\n {props.children && (\n <span className={classNames(styles, 'spectrum-Tooltip-label')}>\n {props.children}\n </span>\n )}\n <span {...arrowProps} ref={arrowRef} className={classNames(styles, 'spectrum-Tooltip-tip')} />\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Tooltip.main.js.map"}
|
package/dist/Tooltip.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./vars.
|
1
|
+
import "./vars.adff832d.css";
|
2
2
|
import $dcNtB$tooltip_vars_cssmodulejs from "./tooltip_vars_css.mjs";
|
3
3
|
import {TooltipContext as $b8c00169fae46ac7$export$39ae08fa83328b12} from "./context.mjs";
|
4
4
|
import $dcNtB$spectrumiconsuiAlertSmall from "@spectrum-icons/ui/AlertSmall";
|
@@ -37,7 +37,7 @@ let $dc9e2a6f9971fb04$var$iconMap = {
|
|
37
37
|
positive: (0, $dcNtB$spectrumiconsuiSuccessSmall),
|
38
38
|
negative: (0, $dcNtB$spectrumiconsuiAlertSmall)
|
39
39
|
};
|
40
|
-
|
40
|
+
const $dc9e2a6f9971fb04$export$28c660c63b792dea = /*#__PURE__*/ (0, $dcNtB$react).forwardRef(function Tooltip(props, ref) {
|
41
41
|
let { ref: overlayRef, arrowProps: arrowProps, state: state, arrowRef: arrowRef, ...tooltipProviderProps } = (0, $dcNtB$useContext)((0, $b8c00169fae46ac7$export$39ae08fa83328b12));
|
42
42
|
let defaultRef = (0, $dcNtB$useRef)(null);
|
43
43
|
overlayRef = overlayRef || defaultRef;
|
@@ -68,10 +68,7 @@ function $dc9e2a6f9971fb04$var$Tooltip(props, ref) {
|
|
68
68
|
ref: arrowRef,
|
69
69
|
className: (0, $dcNtB$classNames)((0, ($parcel$interopDefault($dcNtB$tooltip_vars_cssmodulejs))), 'spectrum-Tooltip-tip')
|
70
70
|
}));
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
74
|
-
*/ let $dc9e2a6f9971fb04$export$28c660c63b792dea = /*#__PURE__*/ (0, $dcNtB$react).forwardRef($dc9e2a6f9971fb04$var$Tooltip);
|
71
|
+
});
|
75
72
|
|
76
73
|
|
77
74
|
export {$dc9e2a6f9971fb04$export$28c660c63b792dea as Tooltip};
|
package/dist/Tooltip.module.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./vars.
|
1
|
+
import "./vars.adff832d.css";
|
2
2
|
import $dcNtB$tooltip_vars_cssmodulejs from "./tooltip_vars_css.module.js";
|
3
3
|
import {TooltipContext as $b8c00169fae46ac7$export$39ae08fa83328b12} from "./context.module.js";
|
4
4
|
import $dcNtB$spectrumiconsuiAlertSmall from "@spectrum-icons/ui/AlertSmall";
|
@@ -37,7 +37,7 @@ let $dc9e2a6f9971fb04$var$iconMap = {
|
|
37
37
|
positive: (0, $dcNtB$spectrumiconsuiSuccessSmall),
|
38
38
|
negative: (0, $dcNtB$spectrumiconsuiAlertSmall)
|
39
39
|
};
|
40
|
-
|
40
|
+
const $dc9e2a6f9971fb04$export$28c660c63b792dea = /*#__PURE__*/ (0, $dcNtB$react).forwardRef(function Tooltip(props, ref) {
|
41
41
|
let { ref: overlayRef, arrowProps: arrowProps, state: state, arrowRef: arrowRef, ...tooltipProviderProps } = (0, $dcNtB$useContext)((0, $b8c00169fae46ac7$export$39ae08fa83328b12));
|
42
42
|
let defaultRef = (0, $dcNtB$useRef)(null);
|
43
43
|
overlayRef = overlayRef || defaultRef;
|
@@ -68,10 +68,7 @@ function $dc9e2a6f9971fb04$var$Tooltip(props, ref) {
|
|
68
68
|
ref: arrowRef,
|
69
69
|
className: (0, $dcNtB$classNames)((0, ($parcel$interopDefault($dcNtB$tooltip_vars_cssmodulejs))), 'spectrum-Tooltip-tip')
|
70
70
|
}));
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
74
|
-
*/ let $dc9e2a6f9971fb04$export$28c660c63b792dea = /*#__PURE__*/ (0, $dcNtB$react).forwardRef($dc9e2a6f9971fb04$var$Tooltip);
|
71
|
+
});
|
75
72
|
|
76
73
|
|
77
74
|
export {$dc9e2a6f9971fb04$export$28c660c63b792dea as Tooltip};
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAcD,IAAI,gCAAU;IACZ,MAAM,CAAA,GAAA,+BAAQ;IACd,UAAU,CAAA,GAAA,kCAAW;IACrB,UAAU,CAAA,GAAA,gCAAS;AACrB;
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAcD,IAAI,gCAAU;IACZ,MAAM,CAAA,GAAA,+BAAQ;IACd,UAAU,CAAA,GAAA,kCAAW;IACrB,UAAU,CAAA,GAAA,gCAAS;AACrB;AAKO,MAAM,0DAAU,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,QAAQ,KAA2B,EAAE,GAAW;IAC/F,IAAI,EAAC,KAAK,UAAU,cAAE,UAAU,SAAE,KAAK,YAAE,QAAQ,EAAE,GAAG,sBAAqB,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IACtG,IAAI,aAAa,CAAA,GAAA,aAAK,EAAE;IACxB,aAAa,cAAc;IAC3B,IAAI,kBAAkB,MAAM,SAAS;IACrC,QAAQ,CAAA,GAAA,iBAAS,EAAE,OAAO;IAC1B,IAAI,WACF,UAAU,sBACV,SAAS,UACT,MAAM,YACN,QAAQ,EACR,GAAG,YACJ,GAAG;IACJ,IAAI,aAAa,MACf,YAAY,4BAAA,6BAAA,kBAAmB;IAEjC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,OAAO;IAEvC,yCAAyC;IACzC,CAAA,GAAA,0BAAkB,EAAE,KAAK,IAAM,CAAA,GAAA,mBAAW,EAAE;IAE5C,IAAI,OAAO,6BAAO,CAAC,QAAQ;IAE3B,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,yDAAK,GACL,oBACA,CAAC,kBAAkB,EAAE,SAAS,EAC9B,CAAC,kBAAkB,EAAE,WAAW,EAChC;YACE,WAAW;YACX,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE;QAC7B,GACA,WAAW,SAAS;QAEtB,KAAK;OACJ,YAAY,YAAY,2BAAa,gCAAC;QAAK,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yDAAK,GAAG;QAA8B,eAAA;QAC9G,MAAM,QAAQ,kBACb,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yDAAK,GAAG;OACjC,MAAM,QAAQ,iBAGnB,gCAAC;QAAM,GAAG,UAAU;QAAE,KAAK;QAAU,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yDAAK,GAAG;;AAGzE","sources":["packages/@react-spectrum/tooltip/src/Tooltip.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 AlertSmall from '@spectrum-icons/ui/AlertSmall';\nimport {classNames, createDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport InfoSmall from '@spectrum-icons/ui/InfoSmall';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useContext, useImperativeHandle, useRef} from 'react';\nimport {SpectrumTooltipProps} from '@react-types/tooltip';\nimport styles from '@adobe/spectrum-css-temp/components/tooltip/vars.css';\nimport SuccessSmall from '@spectrum-icons/ui/SuccessSmall';\nimport {TooltipContext} from './context';\nimport {useTooltip} from '@react-aria/tooltip';\n\nlet iconMap = {\n info: InfoSmall,\n positive: SuccessSmall,\n negative: AlertSmall\n};\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nexport const Tooltip = React.forwardRef(function Tooltip(props: SpectrumTooltipProps, ref: DOMRef) {\n let {ref: overlayRef, arrowProps, state, arrowRef, ...tooltipProviderProps} = useContext(TooltipContext);\n let defaultRef = useRef(null);\n overlayRef = overlayRef || defaultRef;\n let backupPlacement = props.placement;\n props = mergeProps(props, tooltipProviderProps);\n let {\n variant = 'neutral',\n placement,\n isOpen,\n showIcon,\n ...otherProps\n } = props;\n if (placement == null) {\n placement = backupPlacement ?? 'top';\n }\n let {styleProps} = useStyleProps(otherProps);\n let {tooltipProps} = useTooltip(props, state);\n\n // Sync ref with overlayRef from context.\n useImperativeHandle(ref, () => createDOMRef(overlayRef));\n\n let Icon = iconMap[variant];\n\n return (\n <div\n {...styleProps}\n {...tooltipProps}\n className={classNames(\n styles,\n 'spectrum-Tooltip',\n `spectrum-Tooltip--${variant}`,\n `spectrum-Tooltip--${placement}`,\n {\n 'is-open': isOpen,\n [`is-open--${placement}`]: isOpen\n },\n styleProps.className\n )}\n ref={overlayRef}>\n {showIcon && variant !== 'neutral' && <Icon UNSAFE_className={classNames(styles, 'spectrum-Tooltip-typeIcon')} aria-hidden />}\n {props.children && (\n <span className={classNames(styles, 'spectrum-Tooltip-label')}>\n {props.children}\n </span>\n )}\n <span {...arrowProps} ref={arrowRef} className={classNames(styles, 'spectrum-Tooltip-tip')} />\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Tooltip.module.js.map"}
|
package/dist/types.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { DOMRefValue } from "@react-types/shared";
|
|
4
4
|
/**
|
5
5
|
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
6
6
|
*/
|
7
|
-
export
|
7
|
+
export const Tooltip: React.ForwardRefExoticComponent<SpectrumTooltipProps & React.RefAttributes<DOMRefValue<HTMLElement>>>;
|
8
8
|
/**
|
9
9
|
* TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing
|
10
10
|
* the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;
|
1
|
+
{"mappings":";;;AC8BA;;GAEG;AACH,OAAO,MAAM,8GAiDX,CAAC;ACsCH;;;;GAIG;AAEH,OAAA,IAAI,gBAAoC,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,OAAO,CAAC;AC9G5F,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,sBAAsB,CAAC","sources":["packages/@react-spectrum/tooltip/src/packages/@react-spectrum/tooltip/src/context.ts","packages/@react-spectrum/tooltip/src/packages/@react-spectrum/tooltip/src/Tooltip.tsx","packages/@react-spectrum/tooltip/src/packages/@react-spectrum/tooltip/src/TooltipTrigger.tsx","packages/@react-spectrum/tooltip/src/packages/@react-spectrum/tooltip/src/index.ts","packages/@react-spectrum/tooltip/src/index.ts"],"sourcesContent":[null,null,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 {Tooltip} from './Tooltip';\nexport {TooltipTrigger} from './TooltipTrigger';\nexport type {SpectrumTooltipProps, SpectrumTooltipTriggerProps} from '@react-types/tooltip';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
@@ -111,6 +111,7 @@
|
|
111
111
|
.uv8yQW_spectrum-Tooltip {
|
112
112
|
box-sizing: border-box;
|
113
113
|
vertical-align: top;
|
114
|
+
inline-size: auto;
|
114
115
|
padding: var(--spectrum-tooltip-padding-top, var(--spectrum-global-dimension-size-50)) var(--spectrum-tooltip-padding-x, var(--spectrum-global-dimension-size-125));
|
115
116
|
border-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
116
117
|
min-block-size: var(--spectrum-tooltip-min-height, var(--spectrum-global-dimension-size-300));
|
@@ -124,7 +125,6 @@
|
|
124
125
|
user-select: none;
|
125
126
|
flex-direction: row;
|
126
127
|
align-items: center;
|
127
|
-
inline-size: auto;
|
128
128
|
display: inline-flex;
|
129
129
|
position: relative;
|
130
130
|
}
|
@@ -318,4 +318,4 @@
|
|
318
318
|
--spectrum-tooltip-positive-background-color: Highlight;
|
319
319
|
}
|
320
320
|
}
|
321
|
-
/*# sourceMappingURL=vars.
|
321
|
+
/*# sourceMappingURL=vars.adff832d.css.map */
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AA+BE;;;;AASF;;;;;;;;;;;AAeE;;;;;AAMF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;AASF;;;;AAEE;;;;;AAYA;;;;;AAMF;;;;;;;;;AAWA;;;;;AAOA;;;;;AAIE;;;;;;;;AASA;;;;AAKA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAoBF;;;;;;;;;;;AAgBA;;;;AAIA;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;EACE;;;;EAGA","sources":["packages/@adobe/spectrum-css-temp/components/tooltip/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":"vars.
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AA+BE;;;;AASF;;;;;;;;;;;AAeE;;;;;AAMF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;;AAUF;;;;AAEE;;;;AASF;;;;AAEE;;;;;AAYA;;;;;AAMF;;;;;;;;;AAWA;;;;;AAOA;;;;;AAIE;;;;;;;;AASA;;;;AAKA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAQA;;;;;AAKA;;;;AAIA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAOA;;;;AAoBF;;;;;;;;;;;AAgBA;;;;AAIA;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;;;;AAIE;;;;AAKF;EACE;;;;EAGA","sources":["packages/@adobe/spectrum-css-temp/components/tooltip/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":"vars.adff832d.css.map"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/tooltip",
|
3
|
-
"version": "3.7.
|
3
|
+
"version": "3.7.1",
|
4
4
|
"description": "Spectrum UI components in React",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "dist/main.js",
|
@@ -36,17 +36,17 @@
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@react-aria/focus": "^3.19.
|
40
|
-
"@react-aria/overlays": "^3.
|
41
|
-
"@react-aria/tooltip": "^3.7.
|
42
|
-
"@react-aria/utils": "^3.
|
43
|
-
"@react-spectrum/overlays": "^5.7.
|
44
|
-
"@react-spectrum/utils": "^3.12.
|
45
|
-
"@react-stately/tooltip": "^3.5.
|
46
|
-
"@react-types/overlays": "^3.8.
|
47
|
-
"@react-types/shared": "^3.
|
48
|
-
"@react-types/tooltip": "^3.4.
|
49
|
-
"@spectrum-icons/ui": "^3.6.
|
39
|
+
"@react-aria/focus": "^3.19.1",
|
40
|
+
"@react-aria/overlays": "^3.25.0",
|
41
|
+
"@react-aria/tooltip": "^3.7.11",
|
42
|
+
"@react-aria/utils": "^3.27.0",
|
43
|
+
"@react-spectrum/overlays": "^5.7.1",
|
44
|
+
"@react-spectrum/utils": "^3.12.1",
|
45
|
+
"@react-stately/tooltip": "^3.5.1",
|
46
|
+
"@react-types/overlays": "^3.8.12",
|
47
|
+
"@react-types/shared": "^3.27.0",
|
48
|
+
"@react-types/tooltip": "^3.4.14",
|
49
|
+
"@spectrum-icons/ui": "^3.6.12",
|
50
50
|
"@swc/helpers": "^0.5.0"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
@@ -60,5 +60,5 @@
|
|
60
60
|
"publishConfig": {
|
61
61
|
"access": "public"
|
62
62
|
},
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
|
64
64
|
}
|
package/src/Tooltip.tsx
CHANGED
@@ -28,7 +28,10 @@ let iconMap = {
|
|
28
28
|
negative: AlertSmall
|
29
29
|
};
|
30
30
|
|
31
|
-
|
31
|
+
/**
|
32
|
+
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
33
|
+
*/
|
34
|
+
export const Tooltip = React.forwardRef(function Tooltip(props: SpectrumTooltipProps, ref: DOMRef) {
|
32
35
|
let {ref: overlayRef, arrowProps, state, arrowRef, ...tooltipProviderProps} = useContext(TooltipContext);
|
33
36
|
let defaultRef = useRef(null);
|
34
37
|
overlayRef = overlayRef || defaultRef;
|
@@ -77,10 +80,4 @@ function Tooltip(props: SpectrumTooltipProps, ref: DOMRef) {
|
|
77
80
|
<span {...arrowProps} ref={arrowRef} className={classNames(styles, 'spectrum-Tooltip-tip')} />
|
78
81
|
</div>
|
79
82
|
);
|
80
|
-
}
|
81
|
-
|
82
|
-
/**
|
83
|
-
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|
84
|
-
*/
|
85
|
-
let _Tooltip = React.forwardRef(Tooltip);
|
86
|
-
export {_Tooltip as Tooltip};
|
83
|
+
});
|