@fluentui/react-tooltip 0.0.0-nightlydd0f007b3f20220119.1 → 0.0.0-nightlye0b8e1fa6920220128.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +43 -25
- package/CHANGELOG.md +16 -14
- package/dist/react-tooltip.d.ts +21 -37
- package/lib/components/Tooltip/Tooltip.d.ts +2 -2
- package/lib/components/Tooltip/Tooltip.js +8 -9
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.types.d.ts +15 -29
- package/lib/components/Tooltip/renderTooltip.d.ts +1 -1
- package/lib/components/Tooltip/renderTooltip.js +3 -3
- package/lib/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltip.d.ts +3 -5
- package/lib/components/Tooltip/useTooltip.js +33 -34
- package/lib/components/Tooltip/useTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltipStyles.d.ts +1 -1
- package/lib/components/Tooltip/useTooltipStyles.js +7 -7
- package/lib/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.d.ts +2 -2
- package/lib-commonjs/components/Tooltip/Tooltip.js +7 -7
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.types.d.ts +15 -29
- package/lib-commonjs/components/Tooltip/renderTooltip.d.ts +1 -1
- package/lib-commonjs/components/Tooltip/renderTooltip.js +5 -5
- package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltip.d.ts +3 -5
- package/lib-commonjs/components/Tooltip/useTooltip.js +34 -35
- package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.d.ts +1 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js +10 -10
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/package.json +8 -10
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,EAA2B,2BAA3B,EAAwD,SAAxD,QAAyE,6BAAzE;AACA,SAAS,cAAT,EAAyB,SAAzB,QAA0C,iCAA1C;AACA,SACE,2BADF,EAEE,
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,EAA2B,2BAA3B,EAAwD,SAAxD,QAAyE,6BAAzE;AACA,SAAS,cAAT,EAAyB,SAAzB,QAA0C,iCAA1C;AACA,SACE,2BADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,KAJF,EAKE,yBALF,EAME,QANF,EAOE,aAPF,EAQE,UARF,QASO,2BATP;AAWA,SAAS,WAAT,EAAsB,mBAAtB,QAAiD,qBAAjD;AAEA;;;;;;;AAOG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAsC;;;AACvE,QAAM,OAAO,GAAG,KAAK,CAAC,UAAN,CAAiB,cAAjB,CAAhB;AACA,QAAM,kBAAkB,GAAG,QAAQ,EAAnC;AACA,QAAM;AAAE,IAAA;AAAF,MAAqB,SAAS,EAApC;AACA,QAAM,CAAC,eAAD,EAAkB,iBAAlB,IAAuC,UAAU,EAAvD;AAEA,QAAM;AACJ,IAAA,UADI;AAEJ,IAAA,QAFI;AAGJ,IAAA,OAHI;AAIJ,IAAA,SAJI;AAKJ,IAAA,WALI;AAMJ,IAAA,eANI;AAOJ,IAAA,YAPI;AAQJ,IAAA,SAAS,GAAG,GARR;AASJ,IAAA,SAAS,GAAG;AATR,MAUF,KAVJ;AAYA,QAAM,CAAC,OAAD,EAAU,kBAAV,IAAgC,oBAAoB,CAAC;AAAE,IAAA,KAAK,EAAE,KAAK,CAAC,OAAf;AAAwB,IAAA,YAAY,EAAE;AAAtC,GAAD,CAA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AAL,EAAyB;AACvB,MAAA,YAAY,CAAC,kBAAD,CAAZ,GAAmC,KAAK,CAAC,OAAN,CAAc,EAAjD,CADuB,CAEvB;;AACA,MAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF,GAnMsE,CAqMvE;;;AACA,EAAA,KAAK,CAAC,QAAN,GAAiB,2BAA2B,CAAC,QAAD,EAAW,YAAX,CAA5C;AACA,SAAO,KAAP;AACD,CAxMM;AA0MP;;AAEG;;AACH,MAAM,kBAAkB,GAAG,CACzB,SADyB,EAEzB,SAFyB,KAGvB;AACF,SAAO,KAAK,CAAC,WAAN,CACJ,EAAD,IAAc;AACZ,IAAA,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAS,KAAA,CAAT,GAAA,SAAS,CAAG,EAAH,CAAT;AACA,IAAA,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAS,KAAA,CAAT,GAAA,SAAS,CAAG,EAAH,CAAT;AACD,GAJI,EAKL,CAAC,SAAD,EAAY,SAAZ,CALK,CAAP;AAOD,CAXD","sourceRoot":""}
|
@@ -3,4 +3,4 @@ export declare const tooltipClassName = "fui-Tooltip";
|
|
3
3
|
/**
|
4
4
|
* Apply styling to the Tooltip slots based on the state
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useTooltipStyles_unstable: (state: TooltipState) => TooltipState;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { shorthands, __styles, mergeClasses } from '@
|
1
|
+
import { shorthands, __styles, mergeClasses } from '@griffel/react';
|
2
2
|
import { createArrowStyles } from '@fluentui/react-positioning';
|
3
3
|
import { tokens } from '@fluentui/react-theme';
|
4
4
|
import { arrowHeight } from './private/constants';
|
@@ -61,9 +61,9 @@ const useStyles = /*#__PURE__*/__styles({
|
|
61
61
|
"Bdn98qo": "f103af6e",
|
62
62
|
"Bbc2r3f": "f15umuo5",
|
63
63
|
"B1dvbpk": "f3wpjpt",
|
64
|
-
"D4ky5z":
|
65
|
-
"cqycoz":
|
66
|
-
"I89eb":
|
64
|
+
"D4ky5z": "f1k3tce7",
|
65
|
+
"cqycoz": "f1dkdgqi",
|
66
|
+
"I89eb": "f5ghsz",
|
67
67
|
"k1i1uq": "fyqop9u",
|
68
68
|
"Epwjcz": "f1m5ya7j",
|
69
69
|
"Bp1vogq": "f3sp63x",
|
@@ -79,16 +79,16 @@ const useStyles = /*#__PURE__*/__styles({
|
|
79
79
|
"Bwwlvwl": "fm1ycve"
|
80
80
|
}
|
81
81
|
}, {
|
82
|
-
"d": [".fjseox{display:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f132xexn{max-width:240px;}", ".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f10ra9hq{padding-top:4px;}", ".fd9xhir{padding-right:11px;}", ".f1jlaasf{padding-left:11px;}", ".f1d7kygh{padding-bottom:6px;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{-webkit-filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".fuzzvh5:before{content:\"\";}", ".fkk33zh:before{visibility:visible;}", ".fxf9f1y:before{position:absolute;}", ".f170vdtw:before{box-sizing:border-box;}", ".f103af6e:before{width:inherit;}", ".f15umuo5:before{height:inherit;}", ".f3wpjpt:before{background-color:inherit;}", ".
|
82
|
+
"d": [".fjseox{display:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f132xexn{max-width:240px;}", ".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f10ra9hq{padding-top:4px;}", ".fd9xhir{padding-right:11px;}", ".f1jlaasf{padding-left:11px;}", ".f1d7kygh{padding-bottom:6px;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{-webkit-filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".fuzzvh5:before{content:\"\";}", ".fkk33zh:before{visibility:visible;}", ".fxf9f1y:before{position:absolute;}", ".f170vdtw:before{box-sizing:border-box;}", ".f103af6e:before{width:inherit;}", ".f15umuo5:before{height:inherit;}", ".f3wpjpt:before{background-color:inherit;}", ".f1k3tce7:before{border-right-width:1px;}", ".f1dkdgqi:before{border-right-style:solid;}", ".f5ghsz:before{border-right-color:var(--colorTransparentStroke);}", ".fyqop9u:before{border-bottom-width:1px;}", ".f1m5ya7j:before{border-bottom-style:solid;}", ".f3sp63x:before{border-bottom-color:var(--colorTransparentStroke);}", ".f5bg3dr:before{border-bottom-right-radius:var(--borderRadiusSmall);}", ".f1rfdd74:before{border-bottom-left-radius:var(--borderRadiusSmall);}", ".fzd2j21:before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}", "[data-popper-placement^=\"top\"] .f1773hnp{bottom:-1px;}", "[data-popper-placement^=\"top\"] .f1n8855c{--angle:0;}", "[data-popper-placement^=\"right\"] .f1v7783n{left:-1px;}", "[data-popper-placement^=\"right\"] .fsw6im5{--angle:90deg;}", "[data-popper-placement^=\"bottom\"] .fh2hsk5{top:-1px;}", "[data-popper-placement^=\"bottom\"] .f159pzir{--angle:180deg;}", "[data-popper-placement^=\"left\"] .f11yvu4{right:-1px;}", "[data-popper-placement^=\"left\"] .fm1ycve{--angle:270deg;}"]
|
83
83
|
});
|
84
84
|
/**
|
85
85
|
* Apply styling to the Tooltip slots based on the state
|
86
86
|
*/
|
87
87
|
|
88
88
|
|
89
|
-
export const
|
89
|
+
export const useTooltipStyles_unstable = state => {
|
90
90
|
const styles = useStyles();
|
91
|
-
state.
|
91
|
+
state.content.className = mergeClasses(tooltipClassName, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
|
92
92
|
state.arrowClassName = styles.arrow;
|
93
93
|
return state;
|
94
94
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltipStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/useTooltipStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,iBAAT,QAAkC,6BAAlC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,WAAT,QAA4B,qBAA5B;AAGA,OAAO,MAAM,gBAAgB,GAAG,aAAzB;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAkCA;;AAEG;;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CACpC,gBADoC,EAEpC,MAAM,CAAC,IAF6B,EAGpC,KAAK,CAAC,UAAN,KAAqB,UAArB,IAAmC,MAAM,CAAC,QAHN,EAIpC,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,OAJY,EAKpC,KAAK,CAAC,OAAN,CAAc,SALsB,CAAtC;AAQA,EAAA,KAAK,CAAC,cAAN,GAAuB,MAAM,CAAC,KAA9B;AAEA,SAAO,KAAP;AACD,CAdM","sourceRoot":""}
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import * as React from 'react';
|
1
2
|
import type { TooltipProps } from './Tooltip.types';
|
2
|
-
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
4
|
* A tooltip provides light weight contextual information on top of its target element.
|
5
5
|
*/
|
6
|
-
export declare const Tooltip:
|
6
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Tooltip = void 0;
|
7
7
|
|
8
|
-
const React = /*#__PURE__*/require("react");
|
9
|
-
|
10
8
|
const useTooltip_1 = /*#__PURE__*/require("./useTooltip");
|
11
9
|
|
12
10
|
const renderTooltip_1 = /*#__PURE__*/require("./renderTooltip");
|
@@ -17,10 +15,12 @@ const useTooltipStyles_1 = /*#__PURE__*/require("./useTooltipStyles");
|
|
17
15
|
*/
|
18
16
|
|
19
17
|
|
20
|
-
|
21
|
-
const state = useTooltip_1.
|
22
|
-
useTooltipStyles_1.
|
23
|
-
return renderTooltip_1.
|
24
|
-
}
|
18
|
+
const Tooltip = props => {
|
19
|
+
const state = useTooltip_1.useTooltip_unstable(props);
|
20
|
+
useTooltipStyles_1.useTooltipStyles_unstable(state);
|
21
|
+
return renderTooltip_1.renderTooltip_unstable(state);
|
22
|
+
};
|
23
|
+
|
24
|
+
exports.Tooltip = Tooltip;
|
25
25
|
exports.Tooltip.displayName = 'Tooltip';
|
26
26
|
//# sourceMappingURL=Tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,OAAO,GAA2B,KAAK,IAAG;AACrD,QAAM,KAAK,GAAG,YAAA,CAAA,mBAAA,CAAoB,KAApB,CAAd;AAEA,EAAA,kBAAA,CAAA,yBAAA,CAA0B,KAA1B;AACA,SAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAOb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","sourceRoot":""}
|
@@ -1,21 +1,11 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
3
|
-
import type { ComponentProps, ComponentState,
|
3
|
+
import type { ComponentProps, ComponentState, IntrinsicSlotProps } from '@fluentui/react-utilities';
|
4
4
|
/**
|
5
5
|
* Slot properties for Tooltip
|
6
6
|
*/
|
7
7
|
export declare type TooltipSlots = {
|
8
|
-
|
9
|
-
/**
|
10
|
-
* The child is the element that triggers the Tooltip. It will have additional properties added,
|
11
|
-
* including events and aria properties.
|
12
|
-
* Alternatively, children can be a render function that takes the props and adds
|
13
|
-
* them to the appropriate elements.
|
14
|
-
*/
|
15
|
-
children?: (React.ReactElement<React.HTMLAttributes<HTMLElement>> & {
|
16
|
-
ref?: React.Ref<unknown>;
|
17
|
-
}) | ((props: TooltipTriggerProps) => React.ReactNode) | null;
|
18
|
-
};
|
8
|
+
content: IntrinsicSlotProps<'div'>;
|
19
9
|
};
|
20
10
|
/**
|
21
11
|
* Properties and state for Tooltip
|
@@ -29,10 +19,6 @@ export declare type TooltipCommons = {
|
|
29
19
|
* @defaultvalue normal
|
30
20
|
*/
|
31
21
|
appearance?: 'normal' | 'inverted';
|
32
|
-
/**
|
33
|
-
* The content displayed inside the tooltip.
|
34
|
-
*/
|
35
|
-
content: React.ReactNode;
|
36
22
|
/**
|
37
23
|
* Render an arrow pointing to the target element
|
38
24
|
*
|
@@ -59,15 +45,15 @@ export declare type TooltipCommons = {
|
|
59
45
|
*/
|
60
46
|
onVisibleChange?: (event: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => void;
|
61
47
|
/**
|
62
|
-
* Specifies
|
63
|
-
* * `label` - Set aria-label to the tooltip's content. Requires content to be a string; if not, uses `labelledby`.
|
64
|
-
* * `labelledby` - Set aria-labelledby to the tooltip's id. The id is generated if not provided.
|
65
|
-
* * `describedby` - Set aria-describedby to the tooltip's id. The id is generated if not provided.
|
66
|
-
* * null - Do not set any aria attributes on the trigger element.
|
48
|
+
* (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.
|
67
49
|
*
|
68
|
-
*
|
50
|
+
* * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons
|
51
|
+
* displaying only an icon, for example.
|
52
|
+
* * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.
|
53
|
+
* * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to
|
54
|
+
* screen readers, and should only be used if the tooltip's text is available by some other means.
|
69
55
|
*/
|
70
|
-
|
56
|
+
relationship: 'label' | 'description' | 'inaccessible';
|
71
57
|
/**
|
72
58
|
* Delay before the tooltip is shown, in milliseconds.
|
73
59
|
*
|
@@ -96,18 +82,18 @@ export declare type OnVisibleChangeData = {
|
|
96
82
|
/**
|
97
83
|
* Properties for Tooltip
|
98
84
|
*/
|
99
|
-
export declare type TooltipProps = ComponentProps<TooltipSlots> & Partial<Omit<TooltipCommons, '
|
85
|
+
export declare type TooltipProps = Omit<ComponentProps<TooltipSlots>, 'content'> & Required<Pick<ComponentProps<TooltipSlots>, 'content'>> & Partial<Omit<TooltipCommons, 'relationship'>> & Pick<TooltipCommons, 'relationship'> & {
|
86
|
+
children?: (React.ReactElement & {
|
87
|
+
ref?: React.Ref<unknown>;
|
88
|
+
}) | ((props: TooltipTriggerProps) => React.ReactNode) | null;
|
89
|
+
};
|
100
90
|
/**
|
101
91
|
* State used in rendering Tooltip
|
102
92
|
*/
|
103
93
|
export declare type TooltipState = ComponentState<TooltipSlots> & TooltipCommons & {
|
94
|
+
children?: React.ReactNode;
|
104
95
|
/**
|
105
96
|
* Whether the tooltip should be rendered to the DOM.
|
106
|
-
*
|
107
|
-
* Normally the tooltip will only be rendered when visible. However, if
|
108
|
-
* triggerAriaAttribute is labelledby or describedby, the tooltip will
|
109
|
-
* always be rendered even when hidden so that those aria attributes
|
110
|
-
* to always refer to a valid DOM element.
|
111
97
|
*/
|
112
98
|
shouldRenderTooltip?: boolean;
|
113
99
|
/**
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderTooltip_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
@@ -15,17 +15,17 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
|
18
|
-
const
|
18
|
+
const renderTooltip_unstable = state => {
|
19
19
|
const {
|
20
20
|
slots,
|
21
21
|
slotProps
|
22
22
|
} = react_utilities_1.getSlots(state);
|
23
|
-
return React.createElement(React.Fragment, null, state.
|
23
|
+
return React.createElement(React.Fragment, null, state.children, state.shouldRenderTooltip && React.createElement(react_portal_1.Portal, null, React.createElement(slots.content, { ...slotProps.content
|
24
24
|
}, state.withArrow && React.createElement("div", {
|
25
25
|
ref: state.arrowRef,
|
26
26
|
className: state.arrowClassName
|
27
|
-
}), state.content)));
|
27
|
+
}), state.content.children)));
|
28
28
|
};
|
29
29
|
|
30
|
-
exports.
|
30
|
+
exports.renderTooltip_unstable = renderTooltip_unstable;
|
31
31
|
//# sourceMappingURL=renderTooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/renderTooltip.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/renderTooltip.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB;AAC5D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAuB,KAAvB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACG,KAAK,CAAC,QADT,EAEG,KAAK,CAAC,mBAAN,IACC,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,MAAD,EAAO,IAAP,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,EACG,KAAK,CAAC,SAAN,IAAmB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,GAAG,EAAE,KAAK,CAAC,QAAhB;AAA0B,IAAA,SAAS,EAAE,KAAK,CAAC;AAA3C,GAAA,CADtB,EAEG,KAAK,CAAC,OAAN,CAAc,QAFjB,CADF,CAHJ,CADF;AAaD,CAhBM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
@@ -1,12 +1,10 @@
|
|
1
|
-
import * as React from 'react';
|
2
1
|
import type { TooltipProps, TooltipState } from './Tooltip.types';
|
3
2
|
/**
|
4
3
|
* Create the state required to render Tooltip.
|
5
4
|
*
|
6
|
-
* The returned state can be modified with hooks such as
|
7
|
-
* before being passed to
|
5
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
6
|
+
* before being passed to renderTooltip_unstable.
|
8
7
|
*
|
9
8
|
* @param props - props from this instance of Tooltip
|
10
|
-
* @param ref - reference to root HTMLElement of Tooltip
|
11
9
|
*/
|
12
|
-
export declare const
|
10
|
+
export declare const useTooltip_unstable: (props: TooltipProps) => TooltipState;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useTooltip_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
@@ -17,15 +17,14 @@ const constants_1 = /*#__PURE__*/require("./private/constants");
|
|
17
17
|
/**
|
18
18
|
* Create the state required to render Tooltip.
|
19
19
|
*
|
20
|
-
* The returned state can be modified with hooks such as
|
21
|
-
* before being passed to
|
20
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
21
|
+
* before being passed to renderTooltip_unstable.
|
22
22
|
*
|
23
23
|
* @param props - props from this instance of Tooltip
|
24
|
-
* @param ref - reference to root HTMLElement of Tooltip
|
25
24
|
*/
|
26
25
|
|
27
26
|
|
28
|
-
const
|
27
|
+
const useTooltip_unstable = props => {
|
29
28
|
var _a, _b, _c, _d;
|
30
29
|
|
31
30
|
const context = React.useContext(react_shared_contexts_1.TooltipContext);
|
@@ -35,12 +34,13 @@ const useTooltip = (props, ref) => {
|
|
35
34
|
} = react_shared_contexts_1.useFluent();
|
36
35
|
const [setDelayTimeout, clearDelayTimeout] = react_utilities_1.useTimeout();
|
37
36
|
const {
|
38
|
-
content,
|
39
37
|
appearance,
|
38
|
+
children,
|
39
|
+
content,
|
40
40
|
withArrow,
|
41
41
|
positioning,
|
42
42
|
onVisibleChange,
|
43
|
-
|
43
|
+
relationship,
|
44
44
|
showDelay = 250,
|
45
45
|
hideDelay = 250
|
46
46
|
} = props;
|
@@ -61,26 +61,26 @@ const useTooltip = (props, ref) => {
|
|
61
61
|
});
|
62
62
|
}, [clearDelayTimeout, setVisibleInternal, onVisibleChange]);
|
63
63
|
const state = {
|
64
|
-
content,
|
65
64
|
withArrow,
|
66
65
|
positioning,
|
67
66
|
showDelay,
|
68
67
|
hideDelay,
|
69
|
-
|
68
|
+
relationship,
|
70
69
|
visible,
|
71
70
|
shouldRenderTooltip: visible,
|
72
71
|
appearance,
|
73
72
|
// Slots
|
74
73
|
components: {
|
75
|
-
|
74
|
+
content: 'div'
|
76
75
|
},
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
76
|
+
content: react_utilities_1.resolveShorthand(content, {
|
77
|
+
defaultProps: {
|
78
|
+
role: 'tooltip'
|
79
|
+
},
|
80
|
+
required: true
|
82
81
|
})
|
83
82
|
};
|
83
|
+
state.content.id = react_utilities_1.useId('tooltip-', state.content.id);
|
84
84
|
const popperOptions = {
|
85
85
|
enabled: state.visible,
|
86
86
|
arrowPadding: 2 * constants_1.tooltipBorderRadius,
|
@@ -99,7 +99,7 @@ const useTooltip = (props, ref) => {
|
|
99
99
|
containerRef,
|
100
100
|
arrowRef
|
101
101
|
} = react_positioning_1.usePopper(popperOptions);
|
102
|
-
state.
|
102
|
+
state.content.ref = react_utilities_1.useMergedRefs(state.content.ref, containerRef);
|
103
103
|
state.arrowRef = arrowRef; // When this tooltip is visible, hide any other tooltips, and register it
|
104
104
|
// as the visibleTooltip with the TooltipContext.
|
105
105
|
// Also add a listener on document to hide the tooltip if Escape is pressed
|
@@ -167,9 +167,9 @@ const useTooltip = (props, ref) => {
|
|
167
167
|
}, [setDelayTimeout, setVisible, state.hideDelay, targetDocument]); // Cancel the hide timer when the pointer enters the tooltip, and restart it when the mouse leaves.
|
168
168
|
// This keeps the tooltip visible when the pointer is moved over it.
|
169
169
|
|
170
|
-
state.
|
171
|
-
state.
|
172
|
-
const child = React.isValidElement(
|
170
|
+
state.content.onPointerEnter = useMergedCallbacks(state.content.onPointerEnter, clearDelayTimeout);
|
171
|
+
state.content.onPointerLeave = useMergedCallbacks(state.content.onPointerLeave, onLeaveTrigger);
|
172
|
+
const child = React.isValidElement(children) ? children : undefined; // The props to add to the trigger element (child)
|
173
173
|
|
174
174
|
const triggerProps = {
|
175
175
|
onPointerEnter: useMergedCallbacks((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.onPointerEnter, onEnterTrigger),
|
@@ -185,30 +185,29 @@ const useTooltip = (props, ref) => {
|
|
185
185
|
triggerProps.ref = childTargetRef;
|
186
186
|
}
|
187
187
|
|
188
|
-
if (
|
189
|
-
// aria-label only works if the content is a string. Otherwise, need to use labelledby.
|
190
|
-
if (typeof state.content === 'string') {
|
191
|
-
triggerProps['aria-label'] = state.content;
|
192
|
-
} else {
|
193
|
-
state.
|
194
|
-
}
|
195
|
-
}
|
188
|
+
if (relationship === 'label') {
|
189
|
+
// aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.
|
190
|
+
if (typeof state.content.children === 'string') {
|
191
|
+
triggerProps['aria-label'] = state.content.children;
|
192
|
+
} else if (!isServerSideRender) {
|
193
|
+
triggerProps['aria-labelledby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
196
194
|
|
197
|
-
|
198
|
-
|
195
|
+
state.shouldRenderTooltip = true;
|
196
|
+
}
|
197
|
+
} else if (relationship === 'description') {
|
198
|
+
if (!isServerSideRender) {
|
199
|
+
triggerProps['aria-describedby'] = state.content.id; // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element
|
199
200
|
|
200
|
-
|
201
|
-
|
202
|
-
triggerProps['aria-describedby'] = state.root.id;
|
203
|
-
state.shouldRenderTooltip = true;
|
201
|
+
state.shouldRenderTooltip = true;
|
202
|
+
}
|
204
203
|
} // Apply the trigger props to the child, either by calling the render function, or cloning with the new props
|
205
204
|
|
206
205
|
|
207
|
-
state.
|
206
|
+
state.children = react_utilities_1.applyTriggerPropsToChildren(children, triggerProps);
|
208
207
|
return state;
|
209
208
|
};
|
210
209
|
|
211
|
-
exports.
|
210
|
+
exports.useTooltip_unstable = useTooltip_unstable;
|
212
211
|
/**
|
213
212
|
* Combine up to two event callbacks into a single function that calls them in order
|
214
213
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltip.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,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vB,MAAA,YAAY,CAAC,kBAAD,CAAZ,GAAmC,KAAK,CAAC,OAAN,CAAc,EAAjD,CADuB,CAEvB;;AACA,MAAA,KAAK,CAAC,mBAAN,GAA4B,IAA5B;AACD;AACF,GAnMsE,CAqMvE;;;AACA,EAAA,KAAK,CAAC,QAAN,GAAiB,iBAAA,CAAA,2BAAA,CAA4B,QAA5B,EAAsC,YAAtC,CAAjB;AACA,SAAO,KAAP;AACD,CAxMM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB;AA0Mb;;AAEG;;AACH,MAAM,kBAAkB,GAAG,CACzB,SADyB,EAEzB,SAFyB,KAGvB;AACF,SAAO,KAAK,CAAC,WAAN,CACJ,EAAD,IAAc;AACZ,IAAA,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAS,KAAA,CAAT,GAAA,SAAS,CAAG,EAAH,CAAT;AACA,IAAA,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAS,KAAA,CAAT,GAAA,SAAS,CAAG,EAAH,CAAT;AACD,GAJI,EAKL,CAAC,SAAD,EAAY,SAAZ,CALK,CAAP;AAOD,CAXD","sourceRoot":""}
|
@@ -3,4 +3,4 @@ export declare const tooltipClassName = "fui-Tooltip";
|
|
3
3
|
/**
|
4
4
|
* Apply styling to the Tooltip slots based on the state
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useTooltipStyles_unstable: (state: TooltipState) => TooltipState;
|
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useTooltipStyles_unstable = exports.tooltipClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
const react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
|
11
11
|
|
@@ -18,7 +18,7 @@ exports.tooltipClassName = 'fui-Tooltip';
|
|
18
18
|
* Styles for the tooltip
|
19
19
|
*/
|
20
20
|
|
21
|
-
const useStyles = /*#__PURE__*/
|
21
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
22
22
|
"root": {
|
23
23
|
"mc9l5x": "fjseox",
|
24
24
|
"B7ck84d": "f1ewtqcl",
|
@@ -72,9 +72,9 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
72
72
|
"Bdn98qo": "f103af6e",
|
73
73
|
"Bbc2r3f": "f15umuo5",
|
74
74
|
"B1dvbpk": "f3wpjpt",
|
75
|
-
"D4ky5z":
|
76
|
-
"cqycoz":
|
77
|
-
"I89eb":
|
75
|
+
"D4ky5z": "f1k3tce7",
|
76
|
+
"cqycoz": "f1dkdgqi",
|
77
|
+
"I89eb": "f5ghsz",
|
78
78
|
"k1i1uq": "fyqop9u",
|
79
79
|
"Epwjcz": "f1m5ya7j",
|
80
80
|
"Bp1vogq": "f3sp63x",
|
@@ -90,19 +90,19 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
90
90
|
"Bwwlvwl": "fm1ycve"
|
91
91
|
}
|
92
92
|
}, {
|
93
|
-
"d": [".fjseox{display:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f132xexn{max-width:240px;}", ".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f10ra9hq{padding-top:4px;}", ".fd9xhir{padding-right:11px;}", ".f1jlaasf{padding-left:11px;}", ".f1d7kygh{padding-bottom:6px;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{-webkit-filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".fuzzvh5:before{content:\"\";}", ".fkk33zh:before{visibility:visible;}", ".fxf9f1y:before{position:absolute;}", ".f170vdtw:before{box-sizing:border-box;}", ".f103af6e:before{width:inherit;}", ".f15umuo5:before{height:inherit;}", ".f3wpjpt:before{background-color:inherit;}", ".
|
93
|
+
"d": [".fjseox{display:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f132xexn{max-width:240px;}", ".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f10ra9hq{padding-top:4px;}", ".fd9xhir{padding-right:11px;}", ".f1jlaasf{padding-left:11px;}", ".f1d7kygh{padding-bottom:6px;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxeb0a7{-webkit-filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}", ".ftgm304{display:block;}", ".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".fuzzvh5:before{content:\"\";}", ".fkk33zh:before{visibility:visible;}", ".fxf9f1y:before{position:absolute;}", ".f170vdtw:before{box-sizing:border-box;}", ".f103af6e:before{width:inherit;}", ".f15umuo5:before{height:inherit;}", ".f3wpjpt:before{background-color:inherit;}", ".f1k3tce7:before{border-right-width:1px;}", ".f1dkdgqi:before{border-right-style:solid;}", ".f5ghsz:before{border-right-color:var(--colorTransparentStroke);}", ".fyqop9u:before{border-bottom-width:1px;}", ".f1m5ya7j:before{border-bottom-style:solid;}", ".f3sp63x:before{border-bottom-color:var(--colorTransparentStroke);}", ".f5bg3dr:before{border-bottom-right-radius:var(--borderRadiusSmall);}", ".f1rfdd74:before{border-bottom-left-radius:var(--borderRadiusSmall);}", ".fzd2j21:before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}", "[data-popper-placement^=\"top\"] .f1773hnp{bottom:-1px;}", "[data-popper-placement^=\"top\"] .f1n8855c{--angle:0;}", "[data-popper-placement^=\"right\"] .f1v7783n{left:-1px;}", "[data-popper-placement^=\"right\"] .fsw6im5{--angle:90deg;}", "[data-popper-placement^=\"bottom\"] .fh2hsk5{top:-1px;}", "[data-popper-placement^=\"bottom\"] .f159pzir{--angle:180deg;}", "[data-popper-placement^=\"left\"] .f11yvu4{right:-1px;}", "[data-popper-placement^=\"left\"] .fm1ycve{--angle:270deg;}"]
|
94
94
|
});
|
95
95
|
/**
|
96
96
|
* Apply styling to the Tooltip slots based on the state
|
97
97
|
*/
|
98
98
|
|
99
99
|
|
100
|
-
const
|
100
|
+
const useTooltipStyles_unstable = state => {
|
101
101
|
const styles = useStyles();
|
102
|
-
state.
|
102
|
+
state.content.className = react_1.mergeClasses(exports.tooltipClassName, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
|
103
103
|
state.arrowClassName = styles.arrow;
|
104
104
|
return state;
|
105
105
|
};
|
106
106
|
|
107
|
-
exports.
|
107
|
+
exports.useTooltipStyles_unstable = useTooltipStyles_unstable;
|
108
108
|
//# sourceMappingURL=useTooltipStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Tooltip/useTooltipStyles.ts"],"names":[],"mapp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