@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.
Files changed (63) hide show
  1. package/CHANGELOG.json +3319 -0
  2. package/CHANGELOG.md +1147 -0
  3. package/LICENSE +15 -0
  4. package/MIGRATION.md +68 -0
  5. package/README.md +5 -0
  6. package/Spec.md +374 -0
  7. package/dist/react-tooltip.d.ts +154 -0
  8. package/lib/Tooltip.d.ts +1 -0
  9. package/lib/Tooltip.js +2 -0
  10. package/lib/Tooltip.js.map +1 -0
  11. package/lib/components/Tooltip/Tooltip.d.ts +7 -0
  12. package/lib/components/Tooltip/Tooltip.js +15 -0
  13. package/lib/components/Tooltip/Tooltip.js.map +1 -0
  14. package/lib/components/Tooltip/Tooltip.types.d.ts +117 -0
  15. package/lib/components/Tooltip/Tooltip.types.js +2 -0
  16. package/lib/components/Tooltip/Tooltip.types.js.map +1 -0
  17. package/lib/components/Tooltip/index.d.ts +5 -0
  18. package/lib/components/Tooltip/index.js +6 -0
  19. package/lib/components/Tooltip/index.js.map +1 -0
  20. package/lib/components/Tooltip/private/constants.d.ts +12 -0
  21. package/lib/components/Tooltip/private/constants.js +14 -0
  22. package/lib/components/Tooltip/private/constants.js.map +1 -0
  23. package/lib/components/Tooltip/renderTooltip.d.ts +5 -0
  24. package/lib/components/Tooltip/renderTooltip.js +19 -0
  25. package/lib/components/Tooltip/renderTooltip.js.map +1 -0
  26. package/lib/components/Tooltip/useTooltip.d.ts +10 -0
  27. package/lib/components/Tooltip/useTooltip.js +193 -0
  28. package/lib/components/Tooltip/useTooltip.js.map +1 -0
  29. package/lib/components/Tooltip/useTooltipStyles.d.ts +6 -0
  30. package/lib/components/Tooltip/useTooltipStyles.js +95 -0
  31. package/lib/components/Tooltip/useTooltipStyles.js.map +1 -0
  32. package/lib/index.d.ts +1 -0
  33. package/lib/index.js +2 -0
  34. package/lib/index.js.map +1 -0
  35. package/lib/tsdoc-metadata.json +11 -0
  36. package/lib-commonjs/Tooltip.d.ts +1 -0
  37. package/lib-commonjs/Tooltip.js +10 -0
  38. package/lib-commonjs/Tooltip.js.map +1 -0
  39. package/lib-commonjs/components/Tooltip/Tooltip.d.ts +7 -0
  40. package/lib-commonjs/components/Tooltip/Tooltip.js +27 -0
  41. package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -0
  42. package/lib-commonjs/components/Tooltip/Tooltip.types.d.ts +117 -0
  43. package/lib-commonjs/components/Tooltip/Tooltip.types.js +6 -0
  44. package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +1 -0
  45. package/lib-commonjs/components/Tooltip/index.d.ts +5 -0
  46. package/lib-commonjs/components/Tooltip/index.js +18 -0
  47. package/lib-commonjs/components/Tooltip/index.js.map +1 -0
  48. package/lib-commonjs/components/Tooltip/private/constants.d.ts +12 -0
  49. package/lib-commonjs/components/Tooltip/private/constants.js +21 -0
  50. package/lib-commonjs/components/Tooltip/private/constants.js.map +1 -0
  51. package/lib-commonjs/components/Tooltip/renderTooltip.d.ts +5 -0
  52. package/lib-commonjs/components/Tooltip/renderTooltip.js +31 -0
  53. package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -0
  54. package/lib-commonjs/components/Tooltip/useTooltip.d.ts +10 -0
  55. package/lib-commonjs/components/Tooltip/useTooltip.js +207 -0
  56. package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -0
  57. package/lib-commonjs/components/Tooltip/useTooltipStyles.d.ts +6 -0
  58. package/lib-commonjs/components/Tooltip/useTooltipStyles.js +108 -0
  59. package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -0
  60. package/lib-commonjs/index.d.ts +1 -0
  61. package/lib-commonjs/index.js +10 -0
  62. package/lib-commonjs/index.js.map +1 -0
  63. package/package.json +66 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Tooltip/useTooltipStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,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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,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./Tooltip"), exports);
10
+ //# sourceMappingURL=index.js.map
@@ -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
+ }