@fluentui/react-tooltip 9.1.5 → 9.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +54 -1
- package/CHANGELOG.md +15 -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 +7 -7
@@ -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.
|
35
|
+
"@fluentui/react-portal": "^9.0.15",
|
36
|
+
"@fluentui/react-positioning": "^9.3.6",
|
37
37
|
"@fluentui/react-shared-contexts": "^9.1.4",
|
38
38
|
"@fluentui/react-theme": "^9.1.5",
|
39
|
-
"@fluentui/react-utilities": "^9.3.
|
40
|
-
"@griffel/react": "^1.
|
39
|
+
"@fluentui/react-utilities": "^9.3.1",
|
40
|
+
"@griffel/react": "^1.5.2",
|
41
41
|
"tslib": "^2.1.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|