@fluentui/react-tooltip 0.0.0-nightlyf8be6a7c6520220106.1 → 0.0.0-nightlyff78d1e27a20220217.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.json +174 -27
  2. package/CHANGELOG.md +43 -14
  3. package/dist/react-tooltip.d.ts +28 -46
  4. package/lib/Tooltip.js.map +1 -1
  5. package/lib/components/Tooltip/Tooltip.d.ts +3 -2
  6. package/lib/components/Tooltip/Tooltip.js +9 -9
  7. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  8. package/lib/components/Tooltip/Tooltip.types.d.ts +22 -38
  9. package/lib/components/Tooltip/Tooltip.types.js.map +1 -1
  10. package/lib/components/Tooltip/index.js.map +1 -1
  11. package/lib/components/Tooltip/private/constants.d.ts +12 -0
  12. package/lib/components/Tooltip/private/constants.js +14 -0
  13. package/lib/components/Tooltip/private/constants.js.map +1 -0
  14. package/lib/components/Tooltip/renderTooltip.d.ts +1 -1
  15. package/lib/components/Tooltip/renderTooltip.js +4 -4
  16. package/lib/components/Tooltip/renderTooltip.js.map +1 -1
  17. package/lib/components/Tooltip/useTooltip.d.ts +3 -5
  18. package/lib/components/Tooltip/useTooltip.js +44 -64
  19. package/lib/components/Tooltip/useTooltip.js.map +1 -1
  20. package/lib/components/Tooltip/useTooltipStyles.d.ts +1 -1
  21. package/lib/components/Tooltip/useTooltipStyles.js +38 -25
  22. package/lib/components/Tooltip/useTooltipStyles.js.map +1 -1
  23. package/lib/index.js.map +1 -1
  24. package/lib-commonjs/Tooltip.js.map +1 -1
  25. package/lib-commonjs/components/Tooltip/Tooltip.d.ts +3 -2
  26. package/lib-commonjs/components/Tooltip/Tooltip.js +8 -7
  27. package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
  28. package/lib-commonjs/components/Tooltip/Tooltip.types.d.ts +22 -38
  29. package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +1 -1
  30. package/lib-commonjs/components/Tooltip/index.js.map +1 -1
  31. package/lib-commonjs/components/Tooltip/private/constants.d.ts +12 -0
  32. package/lib-commonjs/components/Tooltip/private/constants.js +21 -0
  33. package/lib-commonjs/components/Tooltip/private/constants.js.map +1 -0
  34. package/lib-commonjs/components/Tooltip/renderTooltip.d.ts +1 -1
  35. package/lib-commonjs/components/Tooltip/renderTooltip.js +6 -6
  36. package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -1
  37. package/lib-commonjs/components/Tooltip/useTooltip.d.ts +3 -5
  38. package/lib-commonjs/components/Tooltip/useTooltip.js +49 -68
  39. package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -1
  40. package/lib-commonjs/components/Tooltip/useTooltipStyles.d.ts +1 -1
  41. package/lib-commonjs/components/Tooltip/useTooltipStyles.js +43 -28
  42. package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -1
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/package.json +9 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Tooltip/useTooltipStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGa,OAAA,CAAA,gBAAA,GAAmB,aAAnB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,mBAAA,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,EAAlB;AAoCA;;AAEG;;;A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A;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/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourceRoot":""}
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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-tooltip",
3
- "version": "0.0.0-nightlyf8be6a7c6520220106.1",
3
+ "version": "0.0.0-nightlyff78d1e27a20220217.1",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,15 +22,13 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
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": "start-storybook",
25
+ "storybook": "node ../../scripts/storybook/runner",
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
- "@fluentui/babel-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
30
29
  "@fluentui/eslint-plugin": "*",
31
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
32
30
  "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightlyff78d1e27a20220217.1",
34
32
  "@fluentui/scripts": "^1.0.0",
35
33
  "@types/enzyme": "3.10.3",
36
34
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -44,12 +42,12 @@
44
42
  "react-test-renderer": "^16.3.0"
45
43
  },
46
44
  "dependencies": {
47
- "@fluentui/react-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
48
- "@fluentui/react-portal": "0.0.0-nightlyf8be6a7c6520220106.1",
49
- "@fluentui/react-positioning": "0.0.0-nightlyf8be6a7c6520220106.1",
50
- "@fluentui/react-shared-contexts": "0.0.0-nightlyf8be6a7c6520220106.1",
51
- "@fluentui/react-theme": "0.0.0-nightlyf8be6a7c6520220106.1",
52
- "@fluentui/react-utilities": "0.0.0-nightlyf8be6a7c6520220106.1",
45
+ "@fluentui/react-portal": "0.0.0-nightlyff78d1e27a20220217.1",
46
+ "@fluentui/react-positioning": "0.0.0-nightlyff78d1e27a20220217.1",
47
+ "@fluentui/react-shared-contexts": "0.0.0-nightlyff78d1e27a20220217.1",
48
+ "@fluentui/react-theme": "0.0.0-nightlyff78d1e27a20220217.1",
49
+ "@fluentui/react-utilities": "0.0.0-nightlyff78d1e27a20220217.1",
50
+ "@griffel/react": "1.0.0",
53
51
  "tslib": "^2.1.0"
54
52
  },
55
53
  "peerDependencies": {