@fluentui/react-tooltip 9.1.4 → 9.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +87 -1
- package/CHANGELOG.md +27 -2
- package/lib/components/Tooltip/Tooltip.js +2 -3
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/private/constants.js +0 -1
- package/lib/components/Tooltip/private/constants.js.map +1 -1
- package/lib/components/Tooltip/renderTooltip.js +2 -2
- package/lib/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltip.js +24 -38
- package/lib/components/Tooltip/useTooltip.js.map +1 -1
- package/lib/components/Tooltip/useTooltipStyles.js +67 -70
- package/lib/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Tooltip.js +0 -2
- package/lib-commonjs/Tooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.js +2 -8
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +1 -1
- package/lib-commonjs/components/Tooltip/index.js +0 -6
- package/lib-commonjs/components/Tooltip/index.js.map +1 -1
- package/lib-commonjs/components/Tooltip/private/constants.js +0 -2
- package/lib-commonjs/components/Tooltip/private/constants.js.map +1 -1
- package/lib-commonjs/components/Tooltip/renderTooltip.js +2 -7
- package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltip.js +24 -46
- package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -1
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js +67 -76
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -1
- package/lib-commonjs/index.js +0 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -9
@@ -4,107 +4,98 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.useTooltipStyles_unstable = exports.tooltipClassNames = void 0;
|
7
|
-
|
8
7
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
-
|
10
8
|
const react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
|
11
|
-
|
12
9
|
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
13
|
-
|
14
10
|
const constants_1 = /*#__PURE__*/require("./private/constants");
|
15
|
-
|
16
11
|
exports.tooltipClassNames = {
|
17
12
|
content: 'fui-Tooltip__content'
|
18
13
|
};
|
19
14
|
/**
|
20
15
|
* Styles for the tooltip
|
21
16
|
*/
|
22
|
-
|
23
17
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
18
|
+
root: {
|
19
|
+
mc9l5x: "fjseox",
|
20
|
+
B7ck84d: "f1ewtqcl",
|
21
|
+
B2u0y6b: "f132xexn",
|
22
|
+
Bceei9c: "f158kwzp",
|
23
|
+
Bahqtrf: "fk6fouc",
|
24
|
+
Be2twd7: "fy9rknc",
|
25
|
+
Bg96gwp: "fwrc4pm",
|
26
|
+
Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
|
27
|
+
Beyfa6y: ["f16jpd5f", "f1aa9q02"],
|
28
|
+
B7oj6ja: ["f1jar5jt", "fyu767a"],
|
29
|
+
Btl43ni: ["fyu767a", "f1jar5jt"],
|
30
|
+
B4j52fo: "f5ogflp",
|
31
|
+
Bekrc4i: ["f1hqa2wf", "finvdd3"],
|
32
|
+
Bn0qgzm: "f1f09k3d",
|
33
|
+
ibv6hh: ["finvdd3", "f1hqa2wf"],
|
34
|
+
icvyot: "fzkkow9",
|
35
|
+
vrafjx: ["fcdblym", "fjik90z"],
|
36
|
+
oivjwe: "fg706s2",
|
37
|
+
wvpqe5: ["fjik90z", "fcdblym"],
|
38
|
+
g2u3we: "fghlq4f",
|
39
|
+
h3c5rm: ["f1gn591s", "fjscplz"],
|
40
|
+
B9xav0g: "fb073pr",
|
41
|
+
zhjwy3: ["fjscplz", "f1gn591s"],
|
42
|
+
z8tnut: "f10ra9hq",
|
43
|
+
z189sj: ["fd9xhir", "f1jlaasf"],
|
44
|
+
Byoj8tv: "f1d7kygh",
|
45
|
+
uwmqm3: ["f1jlaasf", "fd9xhir"],
|
46
|
+
De3pzq: "fxugw4r",
|
47
|
+
sj55zd: "f19n0e5",
|
48
|
+
Bhu2qc9: "fxeb0a7"
|
55
49
|
},
|
56
|
-
|
57
|
-
|
50
|
+
visible: {
|
51
|
+
mc9l5x: "ftgm304"
|
58
52
|
},
|
59
|
-
|
60
|
-
|
61
|
-
|
53
|
+
inverted: {
|
54
|
+
De3pzq: "fg3r6xk",
|
55
|
+
sj55zd: "fonrgv7"
|
62
56
|
},
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
57
|
+
arrow: {
|
58
|
+
qhf8xq: "f1euv43f",
|
59
|
+
De3pzq: "f1u2r49w",
|
60
|
+
Bcdw1i0: "fd7fpy0",
|
61
|
+
Bj3rh1h: "f1bsuimh",
|
62
|
+
a9b677: "f1ekdpwm",
|
63
|
+
Bqenvij: "f83vc9z",
|
64
|
+
Ftih45: "f1wl9k8s",
|
65
|
+
B1puzpu: "f1wkw4r9",
|
66
|
+
Brfgrao: "f1j7ml58",
|
67
|
+
Bcvre1j: "fyl8oag",
|
68
|
+
Ccq8qp: "frdoeuz",
|
69
|
+
Baz25je: "fb81m9q",
|
70
|
+
cmx5o7: "f1ljr5q2",
|
71
|
+
B4f6apu: "fyfemzf",
|
72
|
+
m598lv: "focyt6c",
|
73
|
+
Bk5zm6e: "fnhxbxj",
|
74
|
+
y0oebl: "fdw6hkg",
|
75
|
+
qa3bma: "f11yjt3y",
|
76
|
+
Bqjgrrk: "f1172wan",
|
77
|
+
Budzafs: ["f9e5op9", "f112wvtl"],
|
78
|
+
Hv9wc6: ["ftj5xct", "fyavhwi"],
|
79
|
+
hl6cv3: "f1773hnp",
|
80
|
+
Bh2vraf: "f1n8855c",
|
81
|
+
yayu3t: "f1v7783n",
|
82
|
+
wedwtw: "fsw6im5",
|
83
|
+
rhl9o9: "fh2hsk5",
|
84
|
+
Bu8t5uz: "f159pzir",
|
85
|
+
B6q6orb: "f11yvu4",
|
86
|
+
Bwwlvwl: "fm1ycve"
|
93
87
|
}
|
94
88
|
}, {
|
95
|
-
|
89
|
+
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;}", ".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}", ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".f1wl9k8s::before{content:\"\";}", ".f1wkw4r9::before{visibility:visible;}", ".f1j7ml58::before{position:absolute;}", ".fyl8oag::before{box-sizing:border-box;}", ".frdoeuz::before{width:inherit;}", ".fb81m9q::before{height:inherit;}", ".f1ljr5q2::before{background-color:inherit;}", ".fyfemzf::before{border-right-width:1px;}", ".focyt6c::before{border-right-style:solid;}", ".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}", ".fdw6hkg::before{border-bottom-width:1px;}", ".f11yjt3y::before{border-bottom-style:solid;}", ".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}", ".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}", ".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}", ".ftj5xct::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);}", ".fyavhwi::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;}"]
|
96
90
|
});
|
97
91
|
/**
|
98
92
|
* Apply styling to the Tooltip slots based on the state
|
99
93
|
*/
|
100
|
-
|
101
|
-
|
102
94
|
const useTooltipStyles_unstable = state => {
|
103
95
|
const styles = useStyles();
|
104
96
|
state.content.className = react_1.mergeClasses(exports.tooltipClassNames.content, styles.root, state.appearance === 'inverted' && styles.inverted, state.visible && styles.visible, state.content.className);
|
105
97
|
state.arrowClassName = styles.arrow;
|
106
98
|
return state;
|
107
99
|
};
|
108
|
-
|
109
100
|
exports.useTooltipStyles_unstable = useTooltipStyles_unstable;
|
110
101
|
//# sourceMappingURL=useTooltipStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIaA,yBAAiB,GAAiC;EAC7DC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAgC1B;AAEF;;;AAGO,MAAMC,yBAAyB,GAAIC,KAAmB,IAAkB;EAC7E,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAE1BG,KAAK,CAACJ,OAAO,CAACM,SAAS,GAAGJ,oBAAY,CACpCH,yBAAiB,CAACC,OAAO,EACzBK,MAAM,CAACE,IAAI,EACXH,KAAK,CAACI,UAAU,KAAK,UAAU,IAAIH,MAAM,CAACI,QAAQ,EAClDL,KAAK,CAACM,OAAO,IAAIL,MAAM,CAACK,OAAO,EAC/BN,KAAK,CAACJ,OAAO,CAACM,SAAS,CACxB;EAEDF,KAAK,CAACO,cAAc,GAAGN,MAAM,CAACO,KAAK;EAEnC,OAAOR,KAAK;AACd,CAAC;AAdYL,iCAAyB","names":["exports","content","useStyles","react_1","useTooltipStyles_unstable","state","styles","className","root","appearance","inverted","visible","arrowClassName","arrow"],"sourceRoot":"../src/","sources":["packages/react-components/react-tooltip/src/components/Tooltip/useTooltipStyles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens } from '@fluentui/react-theme';\nimport { arrowHeight } from './private/constants';\nimport type { TooltipSlots, TooltipState } from './Tooltip.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tooltipClassNames: SlotClassNames<TooltipSlots> = {\n content: 'fui-Tooltip__content',\n};\n\n/**\n * Styles for the tooltip\n */\nconst useStyles = makeStyles({\n root: {\n display: 'none',\n boxSizing: 'border-box',\n maxWidth: '240px',\n cursor: 'default',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...shorthands.padding('4px', '11px', '6px', '11px'), // '5px 12px 7px 12px' minus the border width '1px'\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n\n // TODO need to add versions of tokens.alias.shadow.shadow8, etc. that work with filter\n filter:\n `drop-shadow(0 0 2px ${tokens.colorNeutralShadowAmbient}) ` +\n `drop-shadow(0 4px 8px ${tokens.colorNeutralShadowKey})`,\n },\n\n visible: {\n display: 'block',\n },\n\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n arrow: createArrowStyles({ arrowHeight }),\n});\n\n/**\n * Apply styling to the Tooltip slots based on the state\n */\nexport const useTooltipStyles_unstable = (state: TooltipState): TooltipState => {\n const styles = useStyles();\n\n state.content.className = mergeClasses(\n tooltipClassNames.content,\n styles.root,\n state.appearance === 'inverted' && styles.inverted,\n state.visible && styles.visible,\n state.content.className,\n );\n\n state.arrowClassName = styles.arrow;\n\n return state;\n};\n"]}
|
package/lib-commonjs/index.js
CHANGED
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.useTooltip_unstable = exports.useTooltipStyles_unstable = exports.tooltipClassNames = exports.renderTooltip_unstable = exports.Tooltip = void 0;
|
7
|
-
|
8
7
|
var Tooltip_1 = /*#__PURE__*/require("./Tooltip");
|
9
|
-
|
10
8
|
Object.defineProperty(exports, "Tooltip", {
|
11
9
|
enumerable: true,
|
12
10
|
get: function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,wBAAO;EAAA;AAAA;AACPF;EAAAC;EAAAC;IAAA,uCAAsB;EAAA;AAAA;AACtBF;EAAAC;EAAAC;IAAA,kCAAiB;EAAA;AAAA;AACjBF;EAAAC;EAAAC;IAAA,0CAAyB;EAAA;AAAA;AACzBF;EAAAC;EAAAC;IAAA,oCAAmB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-tooltip/src/index.ts"],"sourcesContent":["export {\n Tooltip,\n renderTooltip_unstable,\n tooltipClassNames,\n useTooltipStyles_unstable,\n useTooltip_unstable,\n} from './Tooltip';\nexport type {\n OnVisibleChangeData,\n TooltipProps,\n TooltipSlots,\n TooltipState,\n TooltipChildProps as TooltipTriggerProps,\n} from './Tooltip';\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-tooltip",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.6",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -27,17 +27,17 @@
|
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
31
|
-
"@fluentui/scripts": "
|
30
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.19",
|
31
|
+
"@fluentui/scripts": "*"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@fluentui/keyboard-keys": "^9.0.1",
|
35
|
-
"@fluentui/react-portal": "^9.0.
|
36
|
-
"@fluentui/react-positioning": "^9.3.
|
37
|
-
"@fluentui/react-shared-contexts": "^9.1.
|
38
|
-
"@fluentui/react-theme": "^9.1.
|
39
|
-
"@fluentui/react-utilities": "^9.3.
|
40
|
-
"@griffel/react": "^1.
|
35
|
+
"@fluentui/react-portal": "^9.0.15",
|
36
|
+
"@fluentui/react-positioning": "^9.3.6",
|
37
|
+
"@fluentui/react-shared-contexts": "^9.1.4",
|
38
|
+
"@fluentui/react-theme": "^9.1.5",
|
39
|
+
"@fluentui/react-utilities": "^9.3.1",
|
40
|
+
"@griffel/react": "^1.5.2",
|
41
41
|
"tslib": "^2.1.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|