@fluentui/react-tooltip 0.0.0-nightly442708a36520211209.1 → 0.0.0-nightly4e6470c86320220127.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/CHANGELOG.json +73 -25
- package/CHANGELOG.md +19 -14
- package/dist/react-tooltip.d.ts +19 -28
- package/lib/components/Tooltip/Tooltip.js +6 -6
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.types.d.ts +14 -22
- package/lib/components/Tooltip/private/constants.d.ts +12 -0
- package/lib/components/Tooltip/private/constants.js +14 -0
- package/lib/components/Tooltip/private/constants.js.map +1 -0
- package/lib/components/Tooltip/renderTooltip.d.ts +1 -1
- package/lib/components/Tooltip/renderTooltip.js +4 -3
- package/lib/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltip.d.ts +3 -4
- package/lib/components/Tooltip/useTooltip.js +20 -27
- package/lib/components/Tooltip/useTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltipStyles.d.ts +1 -1
- package/lib/components/Tooltip/useTooltipStyles.js +37 -24
- package/lib/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.js +3 -3
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.types.d.ts +14 -22
- package/lib-commonjs/components/Tooltip/private/constants.d.ts +12 -0
- package/lib-commonjs/components/Tooltip/private/constants.js +21 -0
- package/lib-commonjs/components/Tooltip/private/constants.js.map +1 -0
- package/lib-commonjs/components/Tooltip/renderTooltip.d.ts +1 -1
- package/lib-commonjs/components/Tooltip/renderTooltip.js +6 -5
- package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltip.d.ts +3 -4
- package/lib-commonjs/components/Tooltip/useTooltip.js +25 -31
- 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 +43 -28
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/package.json +9 -11
@@ -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,5 +1,7 @@
|
|
1
|
-
import { shorthands, __styles, mergeClasses } from '@
|
1
|
+
import { shorthands, __styles, mergeClasses } from '@griffel/react';
|
2
2
|
import { createArrowStyles } from '@fluentui/react-positioning';
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
4
|
+
import { arrowHeight } from './private/constants';
|
3
5
|
export const tooltipClassName = 'fui-Tooltip';
|
4
6
|
/**
|
5
7
|
* Styles for the tooltip
|
@@ -8,10 +10,7 @@ export const tooltipClassName = 'fui-Tooltip';
|
|
8
10
|
const useStyles = /*#__PURE__*/__styles({
|
9
11
|
"root": {
|
10
12
|
"mc9l5x": "fjseox",
|
11
|
-
"
|
12
|
-
"z189sj": ["f11qrl6u", "fjlbh76"],
|
13
|
-
"Byoj8tv": "fy7v416",
|
14
|
-
"uwmqm3": ["fjlbh76", "f11qrl6u"],
|
13
|
+
"B7ck84d": "f1ewtqcl",
|
15
14
|
"B2u0y6b": "f132xexn",
|
16
15
|
"Bceei9c": "f158kwzp",
|
17
16
|
"Bahqtrf": "fk6fouc",
|
@@ -21,6 +20,22 @@ const useStyles = /*#__PURE__*/__styles({
|
|
21
20
|
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
22
21
|
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
23
22
|
"Btl43ni": ["fyu767a", "f1jar5jt"],
|
23
|
+
"B4j52fo": "f5ogflp",
|
24
|
+
"Bekrc4i": ["f1hqa2wf", "finvdd3"],
|
25
|
+
"Bn0qgzm": "f1f09k3d",
|
26
|
+
"ibv6hh": ["finvdd3", "f1hqa2wf"],
|
27
|
+
"icvyot": "fzkkow9",
|
28
|
+
"vrafjx": ["fcdblym", "fjik90z"],
|
29
|
+
"oivjwe": "fg706s2",
|
30
|
+
"wvpqe5": ["fjik90z", "fcdblym"],
|
31
|
+
"g2u3we": "fghlq4f",
|
32
|
+
"h3c5rm": ["f1gn591s", "fjscplz"],
|
33
|
+
"B9xav0g": "fb073pr",
|
34
|
+
"zhjwy3": ["fjscplz", "f1gn591s"],
|
35
|
+
"z8tnut": "f10ra9hq",
|
36
|
+
"z189sj": ["fd9xhir", "f1jlaasf"],
|
37
|
+
"Byoj8tv": "f1d7kygh",
|
38
|
+
"uwmqm3": ["f1jlaasf", "fd9xhir"],
|
24
39
|
"De3pzq": "fxugw4r",
|
25
40
|
"sj55zd": "f19n0e5",
|
26
41
|
"Bhu2qc9": "fxeb0a7"
|
@@ -37,43 +52,41 @@ const useStyles = /*#__PURE__*/__styles({
|
|
37
52
|
"De3pzq": "f1u2r49w",
|
38
53
|
"Bcdw1i0": "fd7fpy0",
|
39
54
|
"Bj3rh1h": "f1bsuimh",
|
40
|
-
"
|
41
|
-
"
|
55
|
+
"a9b677": "f1ekdpwm",
|
56
|
+
"Bqenvij": "f83vc9z",
|
42
57
|
"rurcny": "fuzzvh5",
|
43
|
-
"
|
44
|
-
"B5c9fhp": ["fijcjxk", "f11y671q"],
|
45
|
-
"Bhe99jt": ["f1vtdej5", "f7y375m"],
|
46
|
-
"B2r1szc": ["f7y375m", "f1vtdej5"],
|
58
|
+
"Bex5imi": "fkk33zh",
|
47
59
|
"xx9plb": "fxf9f1y",
|
60
|
+
"Bmqnesq": "f170vdtw",
|
48
61
|
"Bdn98qo": "f103af6e",
|
49
62
|
"Bbc2r3f": "f15umuo5",
|
50
63
|
"B1dvbpk": "f3wpjpt",
|
51
|
-
"
|
64
|
+
"D4ky5z": "f1k3tce7",
|
65
|
+
"cqycoz": "f1dkdgqi",
|
66
|
+
"I89eb": "f5ghsz",
|
67
|
+
"k1i1uq": "fyqop9u",
|
68
|
+
"Epwjcz": "f1m5ya7j",
|
69
|
+
"Bp1vogq": "f3sp63x",
|
70
|
+
"px8gyy": ["f5bg3dr", "f1rfdd74"],
|
52
71
|
"h6z6rw": "fzd2j21",
|
53
|
-
"
|
54
|
-
"F42hee": ["f1jq8eg5", "f12n7c5j"],
|
55
|
-
"Blxsnla": ["f1wv7y6t", "fi4qyh6"],
|
56
|
-
"t2scew": "fcvru7r",
|
57
|
-
"Emsed9": "f7ybgnc",
|
58
|
-
"E11wbp": "f16xtfle",
|
59
|
-
"hl6cv3": "fotnskf",
|
72
|
+
"hl6cv3": "f1773hnp",
|
60
73
|
"Bh2vraf": "f1n8855c",
|
61
|
-
"yayu3t": "
|
74
|
+
"yayu3t": "f1v7783n",
|
62
75
|
"wedwtw": "fsw6im5",
|
63
|
-
"rhl9o9": "
|
76
|
+
"rhl9o9": "fh2hsk5",
|
64
77
|
"Bu8t5uz": "f159pzir",
|
65
|
-
"B6q6orb": "
|
78
|
+
"B6q6orb": "f11yvu4",
|
66
79
|
"Bwwlvwl": "fm1ycve"
|
67
80
|
}
|
68
81
|
}, {
|
69
|
-
"d": [".fjseox{display:none;}", ".
|
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;}"]
|
70
83
|
});
|
71
84
|
/**
|
72
85
|
* Apply styling to the Tooltip slots based on the state
|
73
86
|
*/
|
74
87
|
|
75
88
|
|
76
|
-
export const
|
89
|
+
export const useTooltipStyles_unstable = state => {
|
77
90
|
const styles = useStyles();
|
78
91
|
state.root.className = mergeClasses(tooltipClassName, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.root.className);
|
79
92
|
state.arrowClassName = styles.arrow;
|
@@ -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,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,gBADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,UAAN,KAAqB,UAArB,IAAmC,MAAM,CAAC,QAHT,EAIjC,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,OAJS,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;AAQA,EAAA,KAAK,CAAC,cAAN,GAAuB,MAAM,CAAC,KAA9B;AAEA,SAAO,KAAP;AACD,CAdM","sourceRoot":""}
|
@@ -18,9 +18,9 @@ const useTooltipStyles_1 = /*#__PURE__*/require("./useTooltipStyles");
|
|
18
18
|
|
19
19
|
|
20
20
|
exports.Tooltip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
-
const state = useTooltip_1.
|
22
|
-
useTooltipStyles_1.
|
23
|
-
return renderTooltip_1.
|
21
|
+
const state = useTooltip_1.useTooltip_unstable(props, ref);
|
22
|
+
useTooltipStyles_1.useTooltipStyles_unstable(state);
|
23
|
+
return renderTooltip_1.renderTooltip_unstable(state);
|
24
24
|
});
|
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":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,OAAA,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxF,QAAM,KAAK,GAAG,YAAA,CAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,OAAA,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxF,QAAM,KAAK,GAAG,YAAA,CAAA,mBAAA,CAAoB,KAApB,EAA2B,GAA3B,CAAd;AAEA,EAAA,kBAAA,CAAA,yBAAA,CAA0B,KAA1B;AACA,SAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CALyD,CAA7C;AAOb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","sourceRoot":""}
|
@@ -22,20 +22,17 @@ export declare type TooltipSlots = {
|
|
22
22
|
*/
|
23
23
|
export declare type TooltipCommons = {
|
24
24
|
/**
|
25
|
-
*
|
26
|
-
*
|
25
|
+
* The tooltip's visual appearance.
|
26
|
+
* * `normal` - Uses the theme's background and text colors.
|
27
|
+
* * `inverted` - Higher contrast variant that uses the theme's inverted colors.
|
28
|
+
*
|
29
|
+
* @defaultvalue normal
|
27
30
|
*/
|
28
|
-
appearance?: 'inverted';
|
31
|
+
appearance?: 'normal' | 'inverted';
|
29
32
|
/**
|
30
33
|
* The content displayed inside the tooltip.
|
31
34
|
*/
|
32
35
|
content: React.ReactNode;
|
33
|
-
/**
|
34
|
-
* Color variant with inverted colors
|
35
|
-
*
|
36
|
-
* @defaultvalue false
|
37
|
-
*/
|
38
|
-
inverted?: boolean;
|
39
36
|
/**
|
40
37
|
* Render an arrow pointing to the target element
|
41
38
|
*
|
@@ -62,15 +59,15 @@ export declare type TooltipCommons = {
|
|
62
59
|
*/
|
63
60
|
onVisibleChange?: (event: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => void;
|
64
61
|
/**
|
65
|
-
* Specifies
|
66
|
-
* * `label` - Set aria-label to the tooltip's content. Requires content to be a string; if not, uses `labelledby`.
|
67
|
-
* * `labelledby` - Set aria-labelledby to the tooltip's id. The id is generated if not provided.
|
68
|
-
* * `describedby` - Set aria-describedby to the tooltip's id. The id is generated if not provided.
|
69
|
-
* * null - Do not set any aria attributes on the trigger element.
|
62
|
+
* (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.
|
70
63
|
*
|
71
|
-
*
|
64
|
+
* * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons
|
65
|
+
* displaying only an icon, for example.
|
66
|
+
* * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.
|
67
|
+
* * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to
|
68
|
+
* screen readers, and should only be used if the tooltip's text is available by some other means.
|
72
69
|
*/
|
73
|
-
|
70
|
+
relationship: 'label' | 'description' | 'inaccessible';
|
74
71
|
/**
|
75
72
|
* Delay before the tooltip is shown, in milliseconds.
|
76
73
|
*
|
@@ -99,18 +96,13 @@ export declare type OnVisibleChangeData = {
|
|
99
96
|
/**
|
100
97
|
* Properties for Tooltip
|
101
98
|
*/
|
102
|
-
export declare type TooltipProps = ComponentProps<TooltipSlots> & Partial<Omit<TooltipCommons, 'content'>> & Pick<TooltipCommons, 'content'>;
|
99
|
+
export declare type TooltipProps = ComponentProps<TooltipSlots> & Partial<Omit<TooltipCommons, 'content' | 'relationship'>> & Pick<TooltipCommons, 'content' | 'relationship'>;
|
103
100
|
/**
|
104
101
|
* State used in rendering Tooltip
|
105
102
|
*/
|
106
103
|
export declare type TooltipState = ComponentState<TooltipSlots> & TooltipCommons & {
|
107
104
|
/**
|
108
105
|
* Whether the tooltip should be rendered to the DOM.
|
109
|
-
*
|
110
|
-
* Normally the tooltip will only be rendered when visible. However, if
|
111
|
-
* triggerAriaAttribute is labelledby or describedby, the tooltip will
|
112
|
-
* always be rendered even when hidden so that those aria attributes
|
113
|
-
* to always refer to a valid DOM element.
|
114
106
|
*/
|
115
107
|
shouldRenderTooltip?: boolean;
|
116
108
|
/**
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* The height of the tooltip's arrow in pixels.
|
3
|
+
*/
|
4
|
+
export declare const arrowHeight = 6;
|
5
|
+
/**
|
6
|
+
* The default value of the tooltip's border radius (borderRadiusMedium).
|
7
|
+
*
|
8
|
+
* Unfortunately, Popper requires it to be specified as a variable instead of using CSS.
|
9
|
+
* While we could use getComputedStyle, that adds a performance penalty for something that
|
10
|
+
* will likely never change.
|
11
|
+
*/
|
12
|
+
export declare const tooltipBorderRadius = 4;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.tooltipBorderRadius = exports.arrowHeight = void 0;
|
7
|
+
/**
|
8
|
+
* The height of the tooltip's arrow in pixels.
|
9
|
+
*/
|
10
|
+
|
11
|
+
exports.arrowHeight = 6;
|
12
|
+
/**
|
13
|
+
* The default value of the tooltip's border radius (borderRadiusMedium).
|
14
|
+
*
|
15
|
+
* Unfortunately, Popper requires it to be specified as a variable instead of using CSS.
|
16
|
+
* While we could use getComputedStyle, that adds a performance penalty for something that
|
17
|
+
* will likely never change.
|
18
|
+
*/
|
19
|
+
|
20
|
+
exports.tooltipBorderRadius = 4;
|
21
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Tooltip/private/constants.ts"],"names":[],"mappings":";;;;;;AAAA;;AAEG;;AACU,OAAA,CAAA,WAAA,GAAc,CAAd;AAEb;;;;;;AAMG;;AACU,OAAA,CAAA,mBAAA,GAAsB,CAAtB","sourceRoot":""}
|
@@ -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,16 +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
|
-
} = react_utilities_1.getSlots(state
|
23
|
-
return React.createElement(React.Fragment, null, state.root.children, state.shouldRenderTooltip && React.createElement(react_portal_1.Portal, null, React.createElement(slots.root,
|
22
|
+
} = react_utilities_1.getSlots(state);
|
23
|
+
return React.createElement(React.Fragment, null, state.root.children, state.shouldRenderTooltip && React.createElement(react_portal_1.Portal, null, React.createElement(slots.root, { ...slotProps.root
|
24
|
+
}, state.withArrow && React.createElement("div", {
|
24
25
|
ref: state.arrowRef,
|
25
26
|
className: state.arrowClassName
|
26
27
|
}), state.content)));
|
27
28
|
};
|
28
29
|
|
29
|
-
exports.
|
30
|
+
exports.renderTooltip_unstable = renderTooltip_unstable;
|
30
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,IAAN,CAAW,QADd,EAEG,KAAK,CAAC,mBAAN,IACC,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,MAAD,EAAO,IAAP,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,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,OAFT,CADF,CAHJ,CADF;AAaD,CAhBM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
@@ -3,11 +3,10 @@ import type { TooltipProps, TooltipState } from './Tooltip.types';
|
|
3
3
|
/**
|
4
4
|
* Create the state required to render Tooltip.
|
5
5
|
*
|
6
|
-
* The returned state can be modified with hooks such as
|
7
|
-
* before being passed to
|
6
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
7
|
+
* before being passed to renderTooltip_unstable.
|
8
8
|
*
|
9
9
|
* @param props - props from this instance of Tooltip
|
10
10
|
* @param ref - reference to root HTMLElement of Tooltip
|
11
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
12
11
|
*/
|
13
|
-
export declare const
|
12
|
+
export declare const useTooltip_unstable: (props: TooltipProps, ref: React.Ref<HTMLDivElement>) => 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
|
|
@@ -11,25 +11,21 @@ const react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
|
|
11
11
|
|
12
12
|
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
13
13
|
|
14
|
-
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
15
|
-
|
16
|
-
|
17
|
-
const tooltipBorderRadius = 4; // Update the root's borderRadius in useTooltipStyles.ts if this changes
|
18
|
-
|
19
|
-
const arrowHeight = 6; // Update the arrow's width/height in useTooltipStyles.ts if this changes
|
14
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
20
15
|
|
16
|
+
const constants_1 = /*#__PURE__*/require("./private/constants");
|
21
17
|
/**
|
22
18
|
* Create the state required to render Tooltip.
|
23
19
|
*
|
24
|
-
* The returned state can be modified with hooks such as
|
25
|
-
* before being passed to
|
20
|
+
* The returned state can be modified with hooks such as useTooltipStyles_unstable,
|
21
|
+
* before being passed to renderTooltip_unstable.
|
26
22
|
*
|
27
23
|
* @param props - props from this instance of Tooltip
|
28
24
|
* @param ref - reference to root HTMLElement of Tooltip
|
29
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
30
25
|
*/
|
31
26
|
|
32
|
-
|
27
|
+
|
28
|
+
const useTooltip_unstable = (props, ref) => {
|
33
29
|
var _a, _b, _c, _d;
|
34
30
|
|
35
31
|
const context = React.useContext(react_shared_contexts_1.TooltipContext);
|
@@ -40,11 +36,11 @@ const useTooltip = (props, ref) => {
|
|
40
36
|
const [setDelayTimeout, clearDelayTimeout] = react_utilities_1.useTimeout();
|
41
37
|
const {
|
42
38
|
content,
|
43
|
-
|
39
|
+
appearance,
|
44
40
|
withArrow,
|
45
41
|
positioning,
|
46
42
|
onVisibleChange,
|
47
|
-
|
43
|
+
relationship,
|
48
44
|
showDelay = 250,
|
49
45
|
hideDelay = 250
|
50
46
|
} = props;
|
@@ -66,15 +62,14 @@ const useTooltip = (props, ref) => {
|
|
66
62
|
}, [clearDelayTimeout, setVisibleInternal, onVisibleChange]);
|
67
63
|
const state = {
|
68
64
|
content,
|
69
|
-
inverted,
|
70
65
|
withArrow,
|
71
66
|
positioning,
|
72
67
|
showDelay,
|
73
68
|
hideDelay,
|
74
|
-
|
69
|
+
relationship,
|
75
70
|
visible,
|
76
71
|
shouldRenderTooltip: visible,
|
77
|
-
appearance
|
72
|
+
appearance,
|
78
73
|
// Slots
|
79
74
|
components: {
|
80
75
|
root: 'div'
|
@@ -88,7 +83,7 @@ const useTooltip = (props, ref) => {
|
|
88
83
|
};
|
89
84
|
const popperOptions = {
|
90
85
|
enabled: state.visible,
|
91
|
-
arrowPadding: 2 * tooltipBorderRadius,
|
86
|
+
arrowPadding: 2 * constants_1.tooltipBorderRadius,
|
92
87
|
position: 'above',
|
93
88
|
align: 'center',
|
94
89
|
offset: [0, 4],
|
@@ -96,7 +91,7 @@ const useTooltip = (props, ref) => {
|
|
96
91
|
};
|
97
92
|
|
98
93
|
if (state.withArrow) {
|
99
|
-
popperOptions.offset = react_positioning_1.mergeArrowOffset(popperOptions.offset, arrowHeight);
|
94
|
+
popperOptions.offset = react_positioning_1.mergeArrowOffset(popperOptions.offset, constants_1.arrowHeight);
|
100
95
|
}
|
101
96
|
|
102
97
|
const {
|
@@ -190,22 +185,21 @@ const useTooltip = (props, ref) => {
|
|
190
185
|
triggerProps.ref = childTargetRef;
|
191
186
|
}
|
192
187
|
|
193
|
-
if (
|
194
|
-
// aria-label only works if the content is a string. Otherwise, need to use labelledby.
|
188
|
+
if (relationship === 'label') {
|
189
|
+
// aria-label only works if the content is a string. Otherwise, need to use aria-labelledby.
|
195
190
|
if (typeof state.content === 'string') {
|
196
191
|
triggerProps['aria-label'] = state.content;
|
197
|
-
} else {
|
198
|
-
state.
|
199
|
-
}
|
200
|
-
}
|
192
|
+
} else if (!isServerSideRender) {
|
193
|
+
triggerProps['aria-labelledby'] = state.root.id; // Always render the tooltip even if hidden, so that aria-labelledby refers to a valid element
|
201
194
|
|
202
|
-
|
203
|
-
|
195
|
+
state.shouldRenderTooltip = true;
|
196
|
+
}
|
197
|
+
} else if (relationship === 'description') {
|
198
|
+
if (!isServerSideRender) {
|
199
|
+
triggerProps['aria-describedby'] = state.root.id; // Always render the tooltip even if hidden, so that aria-describedby refers to a valid element
|
204
200
|
|
205
|
-
|
206
|
-
|
207
|
-
triggerProps['aria-describedby'] = state.root.id;
|
208
|
-
state.shouldRenderTooltip = true;
|
201
|
+
state.shouldRenderTooltip = true;
|
202
|
+
}
|
209
203
|
} // Apply the trigger props to the child, either by calling the render function, or cloning with the new props
|
210
204
|
|
211
205
|
|
@@ -213,7 +207,7 @@ const useTooltip = (props, ref) => {
|
|
213
207
|
return state;
|
214
208
|
};
|
215
209
|
|
216
|
-
exports.
|
210
|
+
exports.useTooltip_unstable = useTooltip_unstable;
|
217
211
|
/**
|
218
212
|
* Combine up to two event callbacks into a single function that calls them in order
|
219
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,CAAA,
|
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,CAAA;;AAWA,MAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAsE;;;AACvG,QAAM,OAAO,GAAG,KAAK,CAAC,UAAN,CAAiB,uBAAA,CAAA,cAAjB,CAAhB;AACA,QAAM,kBAAkB,GAAG,iBAAA,CAAA,QAAA,EAA3B;AACA,QAAM;AAAE,IAAA;AAAF,MAAqB,uBAAA,CAAA,SAAA,EAA3B;AACA,QAAM,CAAC,eAAD,EAAkB,iBAAlB,IAAuC,iBAAA,CAAA,UAAA,EAA7C;AAEA,QAAM;AACJ,IAAA,OADI;AAEJ,IAAA,UAFI;AAGJ,IAAA,SAHI;AAIJ,IAAA,WAJI;AAKJ,IAAA,eALI;AAMJ,IAAA,YANI;AAOJ,IAAA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|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useTooltipStyles_unstable: (state: TooltipState) => TooltipState;
|