@fluentui/react-tooltip 0.0.0-nightly-20220302-0405.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 +3319 -0
- package/CHANGELOG.md +1147 -0
- package/LICENSE +15 -0
- package/MIGRATION.md +68 -0
- package/README.md +5 -0
- package/Spec.md +374 -0
- package/dist/react-tooltip.d.ts +154 -0
- package/lib/Tooltip.d.ts +1 -0
- package/lib/Tooltip.js +2 -0
- package/lib/Tooltip.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.d.ts +7 -0
- package/lib/components/Tooltip/Tooltip.js +15 -0
- package/lib/components/Tooltip/Tooltip.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.types.d.ts +117 -0
- package/lib/components/Tooltip/Tooltip.types.js +2 -0
- package/lib/components/Tooltip/Tooltip.types.js.map +1 -0
- package/lib/components/Tooltip/index.d.ts +5 -0
- package/lib/components/Tooltip/index.js +6 -0
- package/lib/components/Tooltip/index.js.map +1 -0
- 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 +5 -0
- package/lib/components/Tooltip/renderTooltip.js +19 -0
- package/lib/components/Tooltip/renderTooltip.js.map +1 -0
- package/lib/components/Tooltip/useTooltip.d.ts +10 -0
- package/lib/components/Tooltip/useTooltip.js +193 -0
- package/lib/components/Tooltip/useTooltip.js.map +1 -0
- package/lib/components/Tooltip/useTooltipStyles.d.ts +6 -0
- package/lib/components/Tooltip/useTooltipStyles.js +95 -0
- package/lib/components/Tooltip/useTooltipStyles.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib-commonjs/Tooltip.d.ts +1 -0
- package/lib-commonjs/Tooltip.js +10 -0
- package/lib-commonjs/Tooltip.js.map +1 -0
- package/lib-commonjs/components/Tooltip/Tooltip.d.ts +7 -0
- package/lib-commonjs/components/Tooltip/Tooltip.js +27 -0
- package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -0
- package/lib-commonjs/components/Tooltip/Tooltip.types.d.ts +117 -0
- package/lib-commonjs/components/Tooltip/Tooltip.types.js +6 -0
- package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +1 -0
- package/lib-commonjs/components/Tooltip/index.d.ts +5 -0
- package/lib-commonjs/components/Tooltip/index.js +18 -0
- package/lib-commonjs/components/Tooltip/index.js.map +1 -0
- 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 +5 -0
- package/lib-commonjs/components/Tooltip/renderTooltip.js +31 -0
- package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -0
- package/lib-commonjs/components/Tooltip/useTooltip.d.ts +10 -0
- package/lib-commonjs/components/Tooltip/useTooltip.js +207 -0
- package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -0
- package/lib-commonjs/components/Tooltip/useTooltipStyles.d.ts +6 -0
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js +108 -0
- package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -0
- package/lib-commonjs/index.d.ts +1 -0
- package/lib-commonjs/index.js +10 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +66 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Tooltip/useTooltipStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AAGa,OAAA,CAAA,gBAAA,GAAmB,aAAnB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;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;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CACxB,OAAA,CAAA,gBADwB,EAExB,MAAM,CAAC,IAFiB,EAGxB,KAAK,CAAC,UAAN,KAAqB,UAArB,IAAmC,MAAM,CAAC,QAHlB,EAIxB,KAAK,CAAC,OAAN,IAAiB,MAAM,CAAC,OAJA,EAKxB,KAAK,CAAC,OAAN,CAAc,SALU,CAA1B;AAQA,EAAA,KAAK,CAAC,cAAN,GAAuB,MAAM,CAAC,KAA9B;AAEA,SAAO,KAAP;AACD,CAdM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","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 { TooltipState } from './Tooltip.types';\n\nexport const tooltipClassName = 'fui-Tooltip';\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.colorNeutralBackgroundInverted,\n color: tokens.colorNeutralForegroundInverted,\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 tooltipClassName,\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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Tooltip';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Tooltip';\n"],"sourceRoot":"../src/"}
|
package/package.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"name": "@fluentui/react-tooltip",
|
3
|
+
"version": "0.0.0-nightly-20220302-0405.1",
|
4
|
+
"description": "React components for building web experiences",
|
5
|
+
"main": "lib-commonjs/index.js",
|
6
|
+
"module": "lib/index.js",
|
7
|
+
"typings": "lib/index.d.ts",
|
8
|
+
"sideEffects": false,
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "https://github.com/microsoft/fluentui"
|
12
|
+
},
|
13
|
+
"license": "MIT",
|
14
|
+
"scripts": {
|
15
|
+
"build": "just-scripts build",
|
16
|
+
"bundle-size": "bundle-size measure",
|
17
|
+
"clean": "just-scripts clean",
|
18
|
+
"code-style": "just-scripts code-style",
|
19
|
+
"just": "just-scripts",
|
20
|
+
"lint": "just-scripts lint",
|
21
|
+
"start": "yarn storybook",
|
22
|
+
"test": "jest --passWithNoTests",
|
23
|
+
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-tooltip/src && yarn docs",
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
|
+
"type-check": "tsc -b tsconfig.json"
|
27
|
+
},
|
28
|
+
"devDependencies": {
|
29
|
+
"@fluentui/eslint-plugin": "*",
|
30
|
+
"@fluentui/react-conformance": "*",
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220302-0405.1",
|
32
|
+
"@fluentui/scripts": "^1.0.0",
|
33
|
+
"@types/enzyme": "3.10.3",
|
34
|
+
"@types/enzyme-adapter-react-16": "1.0.3",
|
35
|
+
"@types/react": "16.9.42",
|
36
|
+
"@types/react-dom": "16.9.10",
|
37
|
+
"@types/react-test-renderer": "^16.0.0",
|
38
|
+
"enzyme": "~3.10.0",
|
39
|
+
"enzyme-adapter-react-16": "^1.15.0",
|
40
|
+
"react": "16.8.6",
|
41
|
+
"react-dom": "16.8.6",
|
42
|
+
"react-test-renderer": "^16.3.0"
|
43
|
+
},
|
44
|
+
"dependencies": {
|
45
|
+
"@fluentui/react-portal": "0.0.0-nightly-20220302-0405.1",
|
46
|
+
"@fluentui/react-positioning": "0.0.0-nightly-20220302-0405.1",
|
47
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20220302-0405.1",
|
48
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220302-0405.1",
|
49
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220302-0405.1",
|
50
|
+
"@griffel/react": "1.0.0",
|
51
|
+
"tslib": "^2.1.0"
|
52
|
+
},
|
53
|
+
"peerDependencies": {
|
54
|
+
"@types/react": ">=16.8.0 <18.0.0",
|
55
|
+
"@types/react-dom": ">=16.8.0 <18.0.0",
|
56
|
+
"react": ">=16.8.0 <18.0.0",
|
57
|
+
"react-dom": ">=16.8.0 <18.0.0"
|
58
|
+
},
|
59
|
+
"beachball": {
|
60
|
+
"disallowedChangeTypes": [
|
61
|
+
"major",
|
62
|
+
"minor",
|
63
|
+
"patch"
|
64
|
+
]
|
65
|
+
}
|
66
|
+
}
|