@fluentui/react-tooltip 0.0.0-nightly-20230317-0436.1 → 0.0.0-nightly-20230317-1454.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 (40) hide show
  1. package/.swcrc +39 -0
  2. package/CHANGELOG.json +17 -17
  3. package/CHANGELOG.md +11 -11
  4. package/lib/Tooltip.js +1 -1
  5. package/lib/Tooltip.js.map +1 -1
  6. package/lib/components/Tooltip/Tooltip.js +6 -5
  7. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  8. package/lib/components/Tooltip/Tooltip.types.js +1 -1
  9. package/lib/components/Tooltip/Tooltip.types.js.map +1 -1
  10. package/lib/components/Tooltip/index.js +5 -5
  11. package/lib/components/Tooltip/index.js.map +1 -1
  12. package/lib/components/Tooltip/private/constants.js +1 -2
  13. package/lib/components/Tooltip/private/constants.js.map +1 -1
  14. package/lib/components/Tooltip/renderTooltip.js +4 -6
  15. package/lib/components/Tooltip/renderTooltip.js.map +1 -1
  16. package/lib/components/Tooltip/useTooltip.js +33 -35
  17. package/lib/components/Tooltip/useTooltip.js.map +1 -1
  18. package/lib/components/Tooltip/useTooltipStyles.js +6 -6
  19. package/lib/components/Tooltip/useTooltipStyles.js.map +1 -1
  20. package/lib/index.js +1 -1
  21. package/lib/index.js.map +1 -1
  22. package/lib-commonjs/Tooltip.js +5 -4
  23. package/lib-commonjs/Tooltip.js.map +1 -1
  24. package/lib-commonjs/components/Tooltip/Tooltip.js +20 -21
  25. package/lib-commonjs/components/Tooltip/Tooltip.js.map +1 -1
  26. package/lib-commonjs/components/Tooltip/Tooltip.types.js +5 -2
  27. package/lib-commonjs/components/Tooltip/Tooltip.types.js.map +1 -1
  28. package/lib-commonjs/components/Tooltip/index.js +9 -8
  29. package/lib-commonjs/components/Tooltip/index.js.map +1 -1
  30. package/lib-commonjs/components/Tooltip/private/constants.js +17 -16
  31. package/lib-commonjs/components/Tooltip/private/constants.js.map +1 -1
  32. package/lib-commonjs/components/Tooltip/renderTooltip.js +19 -24
  33. package/lib-commonjs/components/Tooltip/renderTooltip.js.map +1 -1
  34. package/lib-commonjs/components/Tooltip/useTooltip.js +189 -194
  35. package/lib-commonjs/components/Tooltip/useTooltip.js.map +1 -1
  36. package/lib-commonjs/components/Tooltip/useTooltipStyles.js +200 -92
  37. package/lib-commonjs/components/Tooltip/useTooltipStyles.js.map +1 -1
  38. package/lib-commonjs/index.js +16 -33
  39. package/lib-commonjs/index.js.map +1 -1
  40. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"names":["shorthands","__styles","mergeClasses","createArrowStyles","tokens","arrowHeight","tooltipClassNames","content","useStyles","root","mc9l5x","B7ck84d","B2u0y6b","Bceei9c","Bahqtrf","Be2twd7","Bg96gwp","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","sj55zd","Bhu2qc9","visible","inverted","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","a9b677","Bqenvij","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","d","useTooltipStyles_unstable","state","styles","className","appearance","arrowClassName"],"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"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,qBAAqB;AAIjD,OAAO,MAAMC,iBAAiB,GAAiC;EAC7DC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAGP,QAAA;EAAAQ,I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IkC,MAAM,CAAClC,OAAO,EAC/BiC,KAAK,CAAClE,OAAO,CAACoE,SAAS,CACxB;EAEDF,KAAK,CAACI,cAAc,GAAGH,MAAM,CAAChC,KAAK;EAEnC,OAAO+B,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["shorthands","__styles","mergeClasses","createArrowStyles","tokens","arrowHeight","tooltipClassNames","content","useStyles","root","mc9l5x","B7ck84d","B2u0y6b","Bceei9c","Bahqtrf","Be2twd7","Bg96gwp","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","z8tnut","z189sj","Byoj8tv","uwmqm3","De3pzq","sj55zd","Bhu2qc9","visible","inverted","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","a9b677","Bqenvij","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","d","useTooltipStyles_unstable","state","styles","className","appearance","arrowClassName"],"sources":["../../../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"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ;AACrD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,MAAM,QAAQ;AACvB,SAASC,WAAW,QAAQ;AAI5B,OAAO,MAAMC,iBAAA,GAAkD;EAC7DC,OAAA,EAAS;AACX;AAEA;;;AAGA,MAAMC,SAAA,gBAAYP,QAAA;EAAAQ,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;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able } from './Tooltip';
1
+ export { Tooltip, renderTooltip_unstable, tooltipClassNames, useTooltipStyles_unstable, useTooltip_unstable } from "./Tooltip";
2
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Tooltip","renderTooltip_unstable","tooltipClassNames","useTooltipStyles_unstable","useTooltip_unstable"],"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"],"mappings":"AAAA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,QACd,WAAW"}
1
+ {"version":3,"names":["Tooltip","renderTooltip_unstable","tooltipClassNames","useTooltipStyles_unstable","useTooltip_unstable"],"sources":["../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"],"mappings":"AAAA,SACEA,OAAO,EACPC,sBAAsB,EACtBC,iBAAiB,EACjBC,yBAAyB,EACzBC,mBAAmB,QACd"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/Tooltip/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/Tooltip/index"), exports);
7
+ //# sourceMappingURL=Tooltip.js.map
8
+
8
9
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../packages/react-components/react-tooltip/src/Tooltip.ts"],"sourcesContent":["export * from './components/Tooltip/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,gCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/Tooltip.js"],"sourcesContent":["export * from \"./components/Tooltip/index\";\n//# sourceMappingURL=Tooltip.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,mCAAmC"}
@@ -1,27 +1,26 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Tooltip", {
6
+ enumerable: true,
7
+ get: ()=>Tooltip
5
8
  });
6
- exports.Tooltip = void 0;
7
- const useTooltip_1 = /*#__PURE__*/require("./useTooltip");
8
- const renderTooltip_1 = /*#__PURE__*/require("./renderTooltip");
9
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
10
- const useTooltipStyles_1 = /*#__PURE__*/require("./useTooltipStyles");
11
- /**
12
- * A tooltip provides light weight contextual information on top of its target element.
13
- */
14
- const Tooltip = props => {
15
- const state = useTooltip_1.useTooltip_unstable(props);
16
- useTooltipStyles_1.useTooltipStyles_unstable(state);
17
- const {
18
- useTooltipStyles_unstable: useCustomStyles
19
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
20
- useCustomStyles(state);
21
- return renderTooltip_1.renderTooltip_unstable(state);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useTooltip = require("./useTooltip");
12
+ const _renderTooltip = require("./renderTooltip");
13
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
14
+ const _useTooltipStyles = require("./useTooltipStyles");
15
+ const Tooltip = (props)=>{
16
+ const state = (0, _useTooltip.useTooltip_unstable)(props);
17
+ (0, _useTooltipStyles.useTooltipStyles_unstable)(state);
18
+ const { useTooltipStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
19
+ useCustomStyles(state);
20
+ return (0, _renderTooltip.renderTooltip_unstable)(state);
22
21
  };
23
- exports.Tooltip = Tooltip;
24
- exports.Tooltip.displayName = 'Tooltip';
22
+ Tooltip.displayName = "Tooltip";
25
23
  // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
26
- exports.Tooltip.isFluentTriggerComponent = true;
24
+ Tooltip.isFluentTriggerComponent = true; //# sourceMappingURL=Tooltip.js.map
25
+
27
26
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useTooltip_1","require","renderTooltip_1","react_shared_contexts_1","useTooltipStyles_1","Tooltip","props","state","useTooltip_unstable","useTooltipStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderTooltip_unstable","exports","displayName","isFluentTriggerComponent"],"sources":["../../../../../../../../../packages/react-components/react-tooltip/src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTooltip_unstable } from './useTooltip';\nimport { renderTooltip_unstable } from './renderTooltip';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\nimport { useTooltipStyles_unstable } from './useTooltipStyles';\nimport type { TooltipProps } from './Tooltip.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A tooltip provides light weight contextual information on top of its target element.\n */\nexport const Tooltip: React.FC<TooltipProps> = props => {\n const state = useTooltip_unstable(props);\n\n useTooltipStyles_unstable(state);\n\n const { useTooltipStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderTooltip_unstable(state);\n};\n\nTooltip.displayName = 'Tooltip';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(Tooltip as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"mappings":";;;;;;AACA,MAAAA,YAAA,gBAAAC,OAAA;AACA,MAAAC,eAAA,gBAAAD,OAAA;AACA,MAAAE,uBAAA,gBAAAF,OAAA;AACA,MAAAG,kBAAA,gBAAAH,OAAA;AAIA;;;AAGO,MAAMI,OAAO,GAA2BC,KAAK,IAAG;EACrD,MAAMC,KAAK,GAAGP,YAAA,CAAAQ,mBAAmB,CAACF,KAAK,CAAC;EAExCF,kBAAA,CAAAK,yBAAyB,CAACF,KAAK,CAAC;EAEhC,MAAM;IAAEE,yBAAyB,EAAEC;EAAe,CAAE,GAAGP,uBAAA,CAAAQ,4BAA4B,EAAE;EACrFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOL,eAAA,CAAAU,sBAAsB,CAACL,KAAK,CAAC;AACtC,CAAC;AATYM,OAAA,CAAAR,OAAO,GAAAA,OAAA;AAWpBQ,OAAA,CAAAR,OAAO,CAACS,WAAW,GAAG,SAAS;AAC/B;AACCD,OAAA,CAAAR,OAAkC,CAACU,wBAAwB,GAAG,IAAI"}
1
+ {"version":3,"sources":["../../../lib/components/Tooltip/Tooltip.js"],"sourcesContent":["import * as React from \"react\";\nimport { useTooltip_unstable } from \"./useTooltip\";\nimport { renderTooltip_unstable } from \"./renderTooltip\";\nimport { useCustomStyleHooks_unstable } from \"@fluentui/react-shared-contexts\";\nimport { useTooltipStyles_unstable } from \"./useTooltipStyles\";\n/**\n * A tooltip provides light weight contextual information on top of its target element.\n */\nexport const Tooltip = props => {\n const state = useTooltip_unstable(props);\n useTooltipStyles_unstable(state);\n const {\n useTooltipStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderTooltip_unstable(state);\n};\nTooltip.displayName = \"Tooltip\";\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nTooltip.isFluentTriggerComponent = true;\n//# sourceMappingURL=Tooltip.js.map"],"names":["Tooltip","props","state","useTooltip_unstable","useTooltipStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderTooltip_unstable","displayName","isFluentTriggerComponent"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;4BACa;+BACG;qCACM;kCACH;AAInC,MAAMA,UAAUC,CAAAA,QAAS;IAC9B,MAAMC,QAAQC,IAAAA,+BAAmB,EAACF;IAClCG,IAAAA,2CAAyB,EAACF;IAC1B,MAAM,EACJE,2BAA2BC,gBAAe,EAC3C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBH;IAChB,OAAOK,IAAAA,qCAAsB,EAACL;AAChC;AACAF,QAAQQ,WAAW,GAAG;AACtB,6FAA6F;AAC7FR,QAAQS,wBAAwB,GAAG,IAAI,EACvC,mCAAmC"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=Tooltip.types.js.map
8
+
6
9
  //# sourceMappingURL=Tooltip.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-tooltip/src/components/Tooltip/Tooltip.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { PositioningShorthand } from '@fluentui/react-positioning';\nimport type { ComponentProps, ComponentState, Slot, TriggerProps } from '@fluentui/react-utilities';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Slot properties for Tooltip\n */\nexport type TooltipSlots = {\n /**\n * The text or JSX content of the tooltip.\n */\n content: NonNullable<Slot<'div'>>;\n};\n\n/**\n * The properties that are added to the child of the Tooltip\n */\nexport type TooltipChildProps = {\n ref?: React.Ref<unknown>;\n} & Pick<\n React.HTMLAttributes<HTMLElement>,\n 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave'\n>;\n\n/**\n * Data for the Tooltip's onVisibleChange event.\n */\nexport type OnVisibleChangeData = {\n visible: boolean;\n};\n\n/**\n * Properties for Tooltip\n */\nexport type TooltipProps = ComponentProps<TooltipSlots> &\n TriggerProps<TooltipChildProps> &\n Pick<PortalProps, 'mountNode'> & {\n /**\n * The tooltip's visual appearance.\n * * `normal` - Uses the theme's background and text colors.\n * * `inverted` - Higher contrast variant that uses the theme's inverted colors.\n *\n * @default normal\n */\n appearance?: 'normal' | 'inverted';\n /**\n * Delay before the tooltip is hidden, in milliseconds.\n *\n * @default 250\n */\n hideDelay?: number;\n\n /**\n * Notification when the visibility of the tooltip is changing\n */\n onVisibleChange?: (\n event: React.PointerEvent<HTMLElement> | React.FocusEvent<HTMLElement> | undefined,\n data: OnVisibleChangeData,\n ) => void;\n\n /**\n * Configure the positioning of the tooltip\n *\n * @default above\n */\n positioning?: PositioningShorthand;\n\n /**\n * (Required) Specifies whether this tooltip is acting as the description or label of its trigger element.\n *\n * * `label` - The tooltip sets the trigger's aria-label or aria-labelledby attribute. This is useful for buttons\n * displaying only an icon, for example.\n * * `description` - The tooltip sets the trigger's aria-description or aria-describedby attribute.\n * * `inaccessible` - No aria attributes are set on the trigger. This makes the tooltip's content inaccessible to\n * screen readers, and should only be used if the tooltip's text is available by some other means.\n */\n relationship: 'label' | 'description' | 'inaccessible';\n\n /**\n * Delay before the tooltip is shown, in milliseconds.\n *\n * @default 250\n */\n showDelay?: number;\n\n /**\n * Control the tooltip's visibility programatically.\n *\n * This can be used in conjunction with onVisibleChange to modify the tooltip's show and hide behavior.\n *\n * If not provided, the visibility will be controlled by the tooltip itself, based on hover and focus events on the\n * trigger (child) element.\n *\n * @default false\n */\n visible?: boolean;\n\n /**\n * Render an arrow pointing to the target element\n *\n * @default false\n */\n withArrow?: boolean;\n };\n\n/**\n * State used in rendering Tooltip\n */\nexport type TooltipState = ComponentState<TooltipSlots> &\n Pick<TooltipProps, 'mountNode' | 'relationship'> &\n Required<Pick<TooltipProps, 'appearance' | 'hideDelay' | 'positioning' | 'showDelay' | 'visible' | 'withArrow'>> & {\n children?: React.ReactElement | null;\n\n /**\n * Whether the tooltip should be rendered to the DOM.\n */\n shouldRenderTooltip?: boolean;\n\n /**\n * Ref to the arrow element\n */\n arrowRef?: React.Ref<HTMLDivElement>;\n\n /**\n * CSS class for the arrow element\n */\n arrowClassName?: string;\n };\n"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/Tooltip/Tooltip.types.js"],"sourcesContent":["import * as React from \"react\";\n//# sourceMappingURL=Tooltip.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,yCAAyC"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./Tooltip"), exports);
8
- tslib_1.__exportStar(require("./Tooltip.types"), exports);
9
- tslib_1.__exportStar(require("./renderTooltip"), exports);
10
- tslib_1.__exportStar(require("./useTooltip"), exports);
11
- tslib_1.__exportStar(require("./useTooltipStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./Tooltip"), exports);
7
+ _exportStar(require("./Tooltip.types"), exports);
8
+ _exportStar(require("./renderTooltip"), exports);
9
+ _exportStar(require("./useTooltip"), exports);
10
+ _exportStar(require("./useTooltipStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../../packages/react-components/react-tooltip/src/components/Tooltip/index.ts"],"sourcesContent":["export * from './Tooltip';\nexport * from './Tooltip.types';\nexport * from './renderTooltip';\nexport * from './useTooltip';\nexport * from './useTooltipStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,eAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Tooltip/index.js"],"sourcesContent":["export * from \"./Tooltip\";\nexport * from \"./Tooltip.types\";\nexport * from \"./renderTooltip\";\nexport * from \"./useTooltip\";\nexport * from \"./useTooltipStyles\";\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,19 +1,20 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.tooltipBorderRadius = exports.arrowHeight = void 0;
7
1
  /**
8
2
  * The height of the tooltip's arrow in pixels.
9
- */
10
- exports.arrowHeight = 6;
11
- /**
12
- * The default value of the tooltip's border radius (borderRadiusMedium).
13
- *
14
- * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.
15
- * While we could use getComputedStyle, that adds a performance penalty for something that
16
- * will likely never change.
17
- */
18
- exports.tooltipBorderRadius = 4;
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ function _export(target, all) {
8
+ for(var name in all)Object.defineProperty(target, name, {
9
+ enumerable: true,
10
+ get: all[name]
11
+ });
12
+ }
13
+ _export(exports, {
14
+ arrowHeight: ()=>arrowHeight,
15
+ tooltipBorderRadius: ()=>tooltipBorderRadius
16
+ });
17
+ const arrowHeight = 6;
18
+ const tooltipBorderRadius = 4; //# sourceMappingURL=constants.js.map
19
+
19
20
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["exports","arrowHeight","tooltipBorderRadius"],"sources":["../../../../../../../../../../packages/react-components/react-tooltip/src/components/Tooltip/private/constants.ts"],"sourcesContent":["/**\n * The height of the tooltip's arrow in pixels.\n */\nexport const arrowHeight = 6;\n\n/**\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const tooltipBorderRadius = 4;\n"],"mappings":";;;;;;AAAA;;;AAGaA,OAAA,CAAAC,WAAW,GAAG,CAAC;AAE5B;;;;;;;AAOaD,OAAA,CAAAE,mBAAmB,GAAG,CAAC"}
1
+ {"version":3,"sources":["../../../../lib/components/Tooltip/private/constants.js"],"sourcesContent":["/**\n * The height of the tooltip's arrow in pixels.\n */export const arrowHeight = 6;\n/**\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const tooltipBorderRadius = 4;\n//# sourceMappingURL=constants.js.map"],"names":["arrowHeight","tooltipBorderRadius"],"mappings":"AAAA;;CAEC;;;;;;;;;;;IAAeA,WAAW,MAAXA;IAQHC,mBAAmB,MAAnBA;;AARH,MAAMD,cAAc;AAQvB,MAAMC,sBAAsB,GACnC,qCAAqC"}
@@ -1,28 +1,23 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderTooltip_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderTooltip_unstable
5
8
  });
6
- exports.renderTooltip_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
9
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
10
- /**
11
- * Render the final JSX of Tooltip
12
- */
13
- const renderTooltip_unstable = state => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(React.Fragment, null, state.children, state.shouldRenderTooltip && React.createElement(react_portal_1.Portal, {
19
- mountNode: state.mountNode
20
- }, React.createElement(slots.content, {
21
- ...slotProps.content
22
- }, state.withArrow && React.createElement("div", {
23
- ref: state.arrowRef,
24
- className: state.arrowClassName
25
- }), state.content.children)));
26
- };
27
- exports.renderTooltip_unstable = renderTooltip_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactPortal = require("@fluentui/react-portal");
12
+ const _reactUtilities = require("@fluentui/react-utilities");
13
+ const renderTooltip_unstable = (state)=>{
14
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
15
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, state.children, state.shouldRenderTooltip && /*#__PURE__*/ _react.createElement(_reactPortal.Portal, {
16
+ mountNode: state.mountNode
17
+ }, /*#__PURE__*/ _react.createElement(slots.content, slotProps.content, state.withArrow && /*#__PURE__*/ _react.createElement("div", {
18
+ ref: state.arrowRef,
19
+ className: state.arrowClassName
20
+ }), state.content.children)));
21
+ }; //# sourceMappingURL=renderTooltip.js.map
22
+
28
23
  //# sourceMappingURL=renderTooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_portal_1","react_utilities_1","renderTooltip_unstable","state","slots","slotProps","getSlots","createElement","Fragment","children","shouldRenderTooltip","Portal","mountNode","content","withArrow","ref","arrowRef","className","arrowClassName","exports"],"sources":["../../../../../../../../../packages/react-components/react-tooltip/src/components/Tooltip/renderTooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Portal } from '@fluentui/react-portal';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TooltipSlots, TooltipState } from './Tooltip.types';\n\n/**\n * Render the final JSX of Tooltip\n */\nexport const renderTooltip_unstable = (state: TooltipState) => {\n const { slots, slotProps } = getSlots<TooltipSlots>(state);\n\n return (\n <>\n {state.children}\n {state.shouldRenderTooltip && (\n <Portal mountNode={state.mountNode}>\n <slots.content {...slotProps.content}>\n {state.withArrow && <div ref={state.arrowRef} className={state.arrowClassName} />}\n {state.content.children}\n </slots.content>\n </Portal>\n )}\n </>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,cAAA,gBAAAD,OAAA;AACA,MAAAE,iBAAA,gBAAAF,OAAA;AAGA;;;AAGO,MAAMG,sBAAsB,GAAIC,KAAmB,IAAI;EAC5D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAeH,KAAK,CAAC;EAE1D,OACEL,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,QACGL,KAAK,CAACM,QAAQ,EACdN,KAAK,CAACO,mBAAmB,IACxBZ,KAAA,CAAAS,aAAA,CAACP,cAAA,CAAAW,MAAM;IAACC,SAAS,EAAET,KAAK,CAACS;EAAS,GAChCd,KAAA,CAAAS,aAAA,CAACH,KAAK,CAACS,OAAO;IAAA,GAAKR,SAAS,CAACQ;EAAO,GACjCV,KAAK,CAACW,SAAS,IAAIhB,KAAA,CAAAS,aAAA;IAAKQ,GAAG,EAAEZ,KAAK,CAACa,QAAQ;IAAEC,SAAS,EAAEd,KAAK,CAACe;EAAc,EAAI,EAChFf,KAAK,CAACU,OAAO,CAACJ,QAAQ,CACT,CAEnB,CACA;AAEP,CAAC;AAhBYU,OAAA,CAAAjB,sBAAsB,GAAAA,sBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Tooltip/renderTooltip.js"],"sourcesContent":["import * as React from \"react\";\nimport { Portal } from \"@fluentui/react-portal\";\nimport { getSlots } from \"@fluentui/react-utilities\";\n/**\n * Render the final JSX of Tooltip\n */\nexport const renderTooltip_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(React.Fragment, null, state.children, state.shouldRenderTooltip && /*#__PURE__*/React.createElement(Portal, {\n mountNode: state.mountNode\n }, /*#__PURE__*/React.createElement(slots.content, slotProps.content, state.withArrow && /*#__PURE__*/React.createElement(\"div\", {\n ref: state.arrowRef,\n className: state.arrowClassName\n }), state.content.children)));\n};\n//# sourceMappingURL=renderTooltip.js.map"],"names":["renderTooltip_unstable","state","slots","slotProps","getSlots","React","createElement","Fragment","children","shouldRenderTooltip","Portal","mountNode","content","withArrow","ref","arrowRef","className","arrowClassName"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;6BACA;gCACE;AAIlB,MAAMA,yBAAyBC,CAAAA,QAAS;IAC7C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACD,OAAME,QAAQ,EAAE,IAAI,EAAEN,MAAMO,QAAQ,EAAEP,MAAMQ,mBAAmB,IAAI,WAAW,GAAEJ,OAAMC,aAAa,CAACI,mBAAM,EAAE;QAClJC,WAAWV,MAAMU,SAAS;IAC5B,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMU,OAAO,EAAET,UAAUS,OAAO,EAAEX,MAAMY,SAAS,IAAI,WAAW,GAAER,OAAMC,aAAa,CAAC,OAAO;QAC/HQ,KAAKb,MAAMc,QAAQ;QACnBC,WAAWf,MAAMgB,cAAc;IACjC,IAAIhB,MAAMW,OAAO,CAACJ,QAAQ;AAC5B,GACA,yCAAyC"}