@fluentui/react-infobutton 9.0.0-beta.8 → 9.0.0-beta.81

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 (73) hide show
  1. package/CHANGELOG.md +893 -2
  2. package/README.md +3 -24
  3. package/dist/index.d.ts +109 -5
  4. package/lib/InfoButton.js +0 -1
  5. package/lib/InfoButton.js.map +1 -1
  6. package/lib/InfoLabel.js +1 -0
  7. package/lib/InfoLabel.js.map +1 -0
  8. package/lib/components/InfoButton/DefaultInfoButtonIcons.js +3 -4
  9. package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  10. package/lib/components/InfoButton/InfoButton.js +8 -8
  11. package/lib/components/InfoButton/InfoButton.js.map +1 -1
  12. package/lib/components/InfoButton/InfoButton.types.js +1 -2
  13. package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
  14. package/lib/components/InfoButton/index.js +1 -2
  15. package/lib/components/InfoButton/index.js.map +1 -1
  16. package/lib/components/InfoButton/renderInfoButton.js +14 -16
  17. package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
  18. package/lib/components/InfoButton/useInfoButton.js +71 -51
  19. package/lib/components/InfoButton/useInfoButton.js.map +1 -1
  20. package/lib/components/InfoButton/useInfoButtonStyles.styles.js +169 -0
  21. package/lib/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
  22. package/lib/components/InfoLabel/InfoLabel.js +14 -0
  23. package/lib/components/InfoLabel/InfoLabel.js.map +1 -0
  24. package/lib/components/InfoLabel/InfoLabel.types.js +1 -0
  25. package/lib/components/InfoLabel/InfoLabel.types.js.map +1 -0
  26. package/lib/components/InfoLabel/index.js +5 -0
  27. package/lib/components/InfoLabel/index.js.map +1 -0
  28. package/lib/components/InfoLabel/renderInfoLabel.js +15 -0
  29. package/lib/components/InfoLabel/renderInfoLabel.js.map +1 -0
  30. package/lib/components/InfoLabel/useInfoLabel.js +79 -0
  31. package/lib/components/InfoLabel/useInfoLabel.js.map +1 -0
  32. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js +48 -0
  33. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
  34. package/lib/index.js +2 -2
  35. package/lib/index.js.map +1 -1
  36. package/lib-commonjs/InfoButton.js +3 -5
  37. package/lib-commonjs/InfoButton.js.map +1 -1
  38. package/lib-commonjs/InfoLabel.js +6 -0
  39. package/lib-commonjs/InfoLabel.js.map +1 -0
  40. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js +22 -8
  41. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  42. package/lib-commonjs/components/InfoButton/InfoButton.js +18 -17
  43. package/lib-commonjs/components/InfoButton/InfoButton.js.map +1 -1
  44. package/lib-commonjs/components/InfoButton/InfoButton.types.js +2 -4
  45. package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +1 -1
  46. package/lib-commonjs/components/InfoButton/index.js +7 -9
  47. package/lib-commonjs/components/InfoButton/index.js.map +1 -1
  48. package/lib-commonjs/components/InfoButton/renderInfoButton.js +21 -24
  49. package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +1 -1
  50. package/lib-commonjs/components/InfoButton/useInfoButton.js +80 -66
  51. package/lib-commonjs/components/InfoButton/useInfoButton.js.map +1 -1
  52. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js +376 -0
  53. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
  54. package/lib-commonjs/components/InfoLabel/InfoLabel.js +21 -0
  55. package/lib-commonjs/components/InfoLabel/InfoLabel.js.map +1 -0
  56. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js +4 -0
  57. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js.map +1 -0
  58. package/lib-commonjs/components/InfoLabel/index.js +10 -0
  59. package/lib-commonjs/components/InfoLabel/index.js.map +1 -0
  60. package/lib-commonjs/components/InfoLabel/renderInfoLabel.js +21 -0
  61. package/lib-commonjs/components/InfoLabel/renderInfoLabel.js.map +1 -0
  62. package/lib-commonjs/components/InfoLabel/useInfoLabel.js +80 -0
  63. package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +1 -0
  64. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js +66 -0
  65. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
  66. package/lib-commonjs/index.js +41 -35
  67. package/lib-commonjs/index.js.map +1 -1
  68. package/package.json +29 -17
  69. package/CHANGELOG.json +0 -273
  70. package/lib/components/InfoButton/useInfoButtonStyles.js +0 -153
  71. package/lib/components/InfoButton/useInfoButtonStyles.js.map +0 -1
  72. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js +0 -160
  73. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js.map +0 -1
@@ -1,27 +1,24 @@
1
- "use strict";
2
-
1
+ /* eslint-disable deprecation/deprecation */ "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.renderInfoButton_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const react_popover_1 = /*#__PURE__*/require("@fluentui/react-popover");
10
- /**
11
- * Render the final JSX of InfoButton
12
- */
13
- const renderInfoButton_unstable = state => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(slots.popover, {
19
- ...slotProps.popover
20
- }, React.createElement(react_popover_1.PopoverTrigger, null, React.createElement(slots.root, {
21
- ...slotProps.root
22
- })), React.createElement(slots.content, {
23
- ...slotProps.content
24
- }));
5
+ Object.defineProperty(exports, "renderInfoButton_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderInfoButton_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
13
+ const _reactpopover = require("@fluentui/react-popover");
14
+ const renderInfoButton_unstable = (state)=>{
15
+ (0, _reactutilities.assertSlots)(state);
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.popover, {
17
+ children: [
18
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactpopover.PopoverTrigger, {
19
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
20
+ }),
21
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.info, {})
22
+ ]
23
+ });
25
24
  };
26
- exports.renderInfoButton_unstable = renderInfoButton_unstable;
27
- //# sourceMappingURL=renderInfoButton.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAIA;;;AAGO,MAAMA,yBAAyB,GAAIC,KAAsB,IAAI;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAkBH,KAAK,CAAC;EAE7D,OACEI,oBAACH,KAAK,CAACI,OAAO;IAAA,GAAMH,SAAS,CAACG;EAAwB,GACpDD,oBAACE,8BAAc,QACbF,oBAACH,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,CACnB,EACjBH,oBAACH,KAAK,CAACO,OAAO;IAAA,GAAKN,SAAS,CAACM;EAAO,EAAI,CAC1B;AAEpB,CAAC;AAXYC,iCAAyB","names":["renderInfoButton_unstable","state","slots","slotProps","react_utilities_1","React","popover","react_popover_1","root","content","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\nimport type { PopoverProps } from '@fluentui/react-popover';\nimport type { InfoButtonState, InfoButtonSlots } from './InfoButton.types';\n\n/**\n * Render the final JSX of InfoButton\n */\nexport const renderInfoButton_unstable = (state: InfoButtonState) => {\n const { slots, slotProps } = getSlots<InfoButtonSlots>(state);\n\n return (\n <slots.popover {...(slotProps.popover as PopoverProps)}>\n <PopoverTrigger>\n <slots.root {...slotProps.root} />\n </PopoverTrigger>\n <slots.content {...slotProps.content} />\n </slots.popover>\n );\n};\n"]}
1
+ {"version":3,"sources":["renderInfoButton.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\n/**\n * Render the final JSX of InfoButton\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const renderInfoButton_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.popover, {\n children: [\n /*#__PURE__*/ _jsx(PopoverTrigger, {\n children: /*#__PURE__*/ _jsx(state.root, {})\n }),\n /*#__PURE__*/ _jsx(state.info, {})\n ]\n });\n};\n"],"names":["renderInfoButton_unstable","state","assertSlots","_jsxs","popover","children","_jsx","PopoverTrigger","root","info"],"mappings":"AAAA,0CAA0C;;;;+BAOzBA;;;eAAAA;;;4BAPyE;gCAC9D;8BACG;AAKpB,MAAMA,4BAA4B,CAACC;IAC1CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,OAAO,EAAE;QACtCC,UAAU;YACN,WAAW,GAAGC,IAAAA,eAAI,EAACC,4BAAc,EAAE;gBAC/BF,UAAU,WAAW,GAAGC,IAAAA,eAAI,EAACL,MAAMO,IAAI,EAAE,CAAC;YAC9C;YACA,WAAW,GAAGF,IAAAA,eAAI,EAACL,MAAMQ,IAAI,EAAE,CAAC;SACnC;IACL;AACJ"}
@@ -1,73 +1,87 @@
1
- "use strict";
2
-
1
+ /* eslint-disable deprecation/deprecation */ "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- exports.useInfoButton_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const DefaultInfoButtonIcons_1 = /*#__PURE__*/require("./DefaultInfoButtonIcons");
9
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
10
- const react_popover_1 = /*#__PURE__*/require("@fluentui/react-popover");
11
- const react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
5
+ Object.defineProperty(exports, "useInfoButton_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useInfoButton_unstable;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _DefaultInfoButtonIcons = require("./DefaultInfoButtonIcons");
14
+ const _reactutilities = require("@fluentui/react-utilities");
15
+ const _reactpopover = require("@fluentui/react-popover");
12
16
  const infoButtonIconMap = {
13
- small: /*#__PURE__*/React.createElement(DefaultInfoButtonIcons_1.DefaultInfoButtonIcon12, null),
14
- medium: /*#__PURE__*/React.createElement(DefaultInfoButtonIcons_1.DefaultInfoButtonIcon16, null),
15
- large: /*#__PURE__*/React.createElement(DefaultInfoButtonIcons_1.DefaultInfoButtonIcon20, null)
17
+ small: /*#__PURE__*/ _react.createElement(_DefaultInfoButtonIcons.DefaultInfoButtonIcon12, null),
18
+ medium: /*#__PURE__*/ _react.createElement(_DefaultInfoButtonIcons.DefaultInfoButtonIcon16, null),
19
+ large: /*#__PURE__*/ _react.createElement(_DefaultInfoButtonIcons.DefaultInfoButtonIcon20, null)
16
20
  };
17
21
  const popoverSizeMap = {
18
- small: 'small',
19
- medium: 'small',
20
- large: 'medium'
22
+ small: 'small',
23
+ medium: 'small',
24
+ large: 'medium'
21
25
  };
22
- /**
23
- * Create the state required to render InfoButton.
24
- *
25
- * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,
26
- * before being passed to renderInfoButton_unstable.
27
- *
28
- * @param props - props from this instance of InfoButton
29
- * @param ref - reference to root HTMLElement of InfoButton
30
- */
31
- const useInfoButton_unstable = (props, ref) => {
32
- const {
33
- size = 'medium'
34
- } = props;
35
- const state = {
36
- size,
37
- components: {
38
- root: 'button',
39
- popover: react_popover_1.Popover,
40
- content: react_popover_1.PopoverSurface
41
- },
42
- root: react_utilities_1.getNativeElementProps('button', {
43
- children: infoButtonIconMap[size],
44
- type: 'button',
45
- ...props,
46
- ref
47
- }),
48
- popover: react_utilities_1.resolveShorthand(props.popover, {
49
- required: true,
50
- defaultProps: {
51
- positioning: 'above-start',
52
- size: popoverSizeMap[size],
53
- withArrow: true
54
- }
55
- }),
56
- content: react_utilities_1.resolveShorthand(props.content, {
57
- required: true,
58
- defaultProps: {
59
- role: 'note'
60
- }
61
- })
62
- };
63
- const [popoverOpen, setPopoverOpen] = react_utilities_2.useControllableState({
64
- state: state.popover.open,
65
- defaultState: state.popover.defaultOpen,
66
- initialState: false
67
- });
68
- state.popover.open = popoverOpen;
69
- state.popover.onOpenChange = react_utilities_1.mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));
70
- return state;
26
+ const useInfoButton_unstable = (props, ref)=>{
27
+ const { size = 'medium', inline = true } = props;
28
+ const state = {
29
+ inline,
30
+ size,
31
+ components: {
32
+ root: 'button',
33
+ popover: _reactpopover.Popover,
34
+ info: _reactpopover.PopoverSurface
35
+ },
36
+ root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('button', {
37
+ children: infoButtonIconMap[size],
38
+ type: 'button',
39
+ 'aria-label': 'information',
40
+ ...props,
41
+ // FIXME:
42
+ // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLButtonElement`
43
+ // but since it would be a breaking change to fix it, we are casting ref to it's proper type
44
+ ref: ref
45
+ }), {
46
+ elementType: 'button'
47
+ }),
48
+ popover: _reactutilities.slot.always(props.popover, {
49
+ defaultProps: {
50
+ inline,
51
+ positioning: 'above-start',
52
+ size: popoverSizeMap[size],
53
+ withArrow: true
54
+ },
55
+ elementType: _reactpopover.Popover
56
+ }),
57
+ info: _reactutilities.slot.always(props.info, {
58
+ defaultProps: {
59
+ role: 'note',
60
+ tabIndex: -1
61
+ },
62
+ elementType: _reactpopover.PopoverSurface
63
+ })
64
+ };
65
+ const [popoverOpen, setPopoverOpen] = (0, _reactutilities.useControllableState)({
66
+ state: state.popover.open,
67
+ defaultState: state.popover.defaultOpen,
68
+ initialState: false
69
+ });
70
+ state.popover.open = popoverOpen;
71
+ state.popover.onOpenChange = (0, _reactutilities.mergeCallbacks)(state.popover.onOpenChange, (e, data)=>setPopoverOpen(data.open));
72
+ const focusOutRef = _react.useCallback((el)=>{
73
+ if (!el) {
74
+ return;
75
+ }
76
+ el.addEventListener('focusout', (e)=>{
77
+ const nextFocused = e.relatedTarget;
78
+ if ((0, _reactutilities.isHTMLElement)(nextFocused) && !(0, _reactutilities.elementContains)(el, nextFocused)) {
79
+ setPopoverOpen(false);
80
+ }
81
+ });
82
+ }, [
83
+ setPopoverOpen
84
+ ]);
85
+ state.info.ref = (0, _reactutilities.useMergedRefs)(state.info.ref, focusOutRef);
86
+ return state;
71
87
  };
72
- exports.useInfoButton_unstable = useInfoButton_unstable;
73
- //# sourceMappingURL=useInfoButton.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAIA,MAAMA,iBAAiB,GAAG;EACxBC,KAAK,eAAEC,oBAACC,gDAAuB,OAAG;EAClCC,MAAM,eAAEF,oBAACC,gDAAuB,OAAG;EACnCE,KAAK,eAAEH,oBAACC,gDAAuB;CACvB;AAEV,MAAMG,cAAc,GAAG;EACrBL,KAAK,EAAE,OAAO;EACdG,MAAM,EAAE,OAAO;EACfC,KAAK,EAAE;CACC;AAEV;;;;;;;;;AASO,MAAME,sBAAsB,GAAG,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;EAC7G,MAAM;IAAEC,IAAI,GAAG;EAAQ,CAAE,GAAGF,KAAK;EAEjC,MAAMG,KAAK,GAAoB;IAC7BD,IAAI;IAEJE,UAAU,EAAE;MACVC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEC,uBAA0C;MACnDC,OAAO,EAAED;KACV;IAEDF,IAAI,EAAEI,uCAAqB,CAAC,QAAQ,EAAE;MACpCC,QAAQ,EAAElB,iBAAiB,CAACU,IAAI,CAAC;MACjCS,IAAI,EAAE,QAAQ;MACd,GAAGX,KAAK;MACRC;KACD,CAAC;IACFK,OAAO,EAAEG,kCAAgB,CAACT,KAAK,CAACM,OAAO,EAAE;MACvCM,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,WAAW,EAAE,aAAa;QAC1BZ,IAAI,EAAEJ,cAAc,CAACI,IAAI,CAAC;QAC1Ba,SAAS,EAAE;;KAEd,CAAC;IACFP,OAAO,EAAEC,kCAAgB,CAACT,KAAK,CAACQ,OAAO,EAAE;MACvCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZG,IAAI,EAAE;;KAET;GACF;EAED,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,sCAAoB,CAAC;IACzDhB,KAAK,EAAEA,KAAK,CAACG,OAAO,CAACc,IAAI;IACzBC,YAAY,EAAElB,KAAK,CAACG,OAAO,CAACgB,WAAW;IACvCC,YAAY,EAAE;GACf,CAAC;EAEFpB,KAAK,CAACG,OAAO,CAACc,IAAI,GAAGH,WAAW;EAChCd,KAAK,CAACG,OAAO,CAACkB,YAAY,GAAGf,gCAAc,CAACN,KAAK,CAACG,OAAO,CAACkB,YAAY,EAAE,CAACC,CAAC,EAAEC,IAAI,KAAKR,cAAc,CAACQ,IAAI,CAACN,IAAI,CAAC,CAAC;EAE/G,OAAOjB,KAAK;AACd,CAAC;AA5CYwB,8BAAsB","names":["infoButtonIconMap","small","React","DefaultInfoButtonIcons_1","medium","large","popoverSizeMap","useInfoButton_unstable","props","ref","size","state","components","root","popover","react_popover_1","content","react_utilities_1","children","type","required","defaultProps","positioning","withArrow","role","popoverOpen","setPopoverOpen","react_utilities_2","open","defaultState","defaultOpen","initialState","onOpenChange","e","data","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, resolveShorthand } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport type { InfoButtonProps, InfoButtonState } from './InfoButton.types';\nimport type { PopoverProps } from '@fluentui/react-popover';\n\nconst infoButtonIconMap = {\n small: <DefaultInfoButtonIcon12 />,\n medium: <DefaultInfoButtonIcon16 />,\n large: <DefaultInfoButtonIcon20 />,\n} as const;\n\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\n/**\n * Create the state required to render InfoButton.\n *\n * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,\n * before being passed to renderInfoButton_unstable.\n *\n * @param props - props from this instance of InfoButton\n * @param ref - reference to root HTMLElement of InfoButton\n */\nexport const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref<HTMLElement>): InfoButtonState => {\n const { size = 'medium' } = props;\n\n const state: InfoButtonState = {\n size,\n\n components: {\n root: 'button',\n popover: Popover as React.FC<Partial<PopoverProps>>,\n content: PopoverSurface,\n },\n\n root: getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n ...props,\n ref,\n }),\n popover: resolveShorthand(props.popover, {\n required: true,\n defaultProps: {\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true,\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n role: 'note',\n },\n }),\n };\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false,\n });\n\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));\n\n return state;\n};\n"]}
1
+ {"version":3,"sources":["useInfoButton.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getIntrinsicElementProps, mergeCallbacks, useControllableState, slot, useMergedRefs, isHTMLElement, elementContains } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nconst infoButtonIconMap = {\n small: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon12, null),\n medium: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon16, null),\n large: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon20, null)\n};\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium'\n};\n/**\n * Create the state required to render InfoButton.\n *\n * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,\n * before being passed to renderInfoButton_unstable.\n *\n * @param props - props from this instance of InfoButton\n * @param ref - reference to root HTMLElement of InfoButton\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const useInfoButton_unstable = (props, ref)=>{\n const { size = 'medium', inline = true } = props;\n const state = {\n inline,\n size,\n components: {\n root: 'button',\n popover: Popover,\n info: PopoverSurface\n },\n root: slot.always(getIntrinsicElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLButtonElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref\n }), {\n elementType: 'button'\n }),\n popover: slot.always(props.popover, {\n defaultProps: {\n inline,\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true\n },\n elementType: Popover\n }),\n info: slot.always(props.info, {\n defaultProps: {\n role: 'note',\n tabIndex: -1\n },\n elementType: PopoverSurface\n })\n };\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false\n });\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data)=>setPopoverOpen(data.open));\n const focusOutRef = React.useCallback((el)=>{\n if (!el) {\n return;\n }\n el.addEventListener('focusout', (e)=>{\n const nextFocused = e.relatedTarget;\n if (isHTMLElement(nextFocused) && !elementContains(el, nextFocused)) {\n setPopoverOpen(false);\n }\n });\n }, [\n setPopoverOpen\n ]);\n state.info.ref = useMergedRefs(state.info.ref, focusOutRef);\n return state;\n};\n"],"names":["useInfoButton_unstable","infoButtonIconMap","small","React","createElement","DefaultInfoButtonIcon12","medium","DefaultInfoButtonIcon16","large","DefaultInfoButtonIcon20","popoverSizeMap","props","ref","size","inline","state","components","root","popover","Popover","info","PopoverSurface","slot","always","getIntrinsicElementProps","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","useControllableState","open","defaultState","defaultOpen","initialState","onOpenChange","mergeCallbacks","e","data","focusOutRef","useCallback","el","addEventListener","nextFocused","relatedTarget","isHTMLElement","elementContains","useMergedRefs"],"mappings":"AAAA,0CAA0C;;;;+BAwBzBA;;;eAAAA;;;;iEAxBmD;wCACsB;gCAC0C;8BAC5F;AACxC,MAAMC,oBAAoB;IACtBC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+CAAuB,EAAE;IAClEC,QAAQ,WAAW,GAAGH,OAAMC,aAAa,CAACG,+CAAuB,EAAE;IACnEC,OAAO,WAAW,GAAGL,OAAMC,aAAa,CAACK,+CAAuB,EAAE;AACtE;AACA,MAAMC,iBAAiB;IACnBR,OAAO;IACPI,QAAQ;IACRE,OAAO;AACX;AAWW,MAAMR,yBAAyB,CAACW,OAAOC;IAC9C,MAAM,EAAEC,OAAO,QAAQ,EAAEC,SAAS,IAAI,EAAE,GAAGH;IAC3C,MAAMI,QAAQ;QACVD;QACAD;QACAG,YAAY;YACRC,MAAM;YACNC,SAASC,qBAAO;YAChBC,MAAMC,4BAAc;QACxB;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,UAAU;YACjDC,UAAUxB,iBAAiB,CAACY,KAAK;YACjCa,MAAM;YACN,cAAc;YACd,GAAGf,KAAK;YACR,SAAS;YACT,+EAA+E;YAC/E,4FAA4F;YAC5FC,KAAKA;QACT,IAAI;YACAe,aAAa;QACjB;QACAT,SAASI,oBAAI,CAACC,MAAM,CAACZ,MAAMO,OAAO,EAAE;YAChCU,cAAc;gBACVd;gBACAe,aAAa;gBACbhB,MAAMH,cAAc,CAACG,KAAK;gBAC1BiB,WAAW;YACf;YACAH,aAAaR,qBAAO;QACxB;QACAC,MAAME,oBAAI,CAACC,MAAM,CAACZ,MAAMS,IAAI,EAAE;YAC1BQ,cAAc;gBACVG,MAAM;gBACNC,UAAU,CAAC;YACf;YACAL,aAAaN,4BAAc;QAC/B;IACJ;IACA,MAAM,CAACY,aAAaC,eAAe,GAAGC,IAAAA,oCAAoB,EAAC;QACvDpB,OAAOA,MAAMG,OAAO,CAACkB,IAAI;QACzBC,cAActB,MAAMG,OAAO,CAACoB,WAAW;QACvCC,cAAc;IAClB;IACAxB,MAAMG,OAAO,CAACkB,IAAI,GAAGH;IACrBlB,MAAMG,OAAO,CAACsB,YAAY,GAAGC,IAAAA,8BAAc,EAAC1B,MAAMG,OAAO,CAACsB,YAAY,EAAE,CAACE,GAAGC,OAAOT,eAAeS,KAAKP,IAAI;IAC3G,MAAMQ,cAAczC,OAAM0C,WAAW,CAAC,CAACC;QACnC,IAAI,CAACA,IAAI;YACL;QACJ;QACAA,GAAGC,gBAAgB,CAAC,YAAY,CAACL;YAC7B,MAAMM,cAAcN,EAAEO,aAAa;YACnC,IAAIC,IAAAA,6BAAa,EAACF,gBAAgB,CAACG,IAAAA,+BAAe,EAACL,IAAIE,cAAc;gBACjEd,eAAe;YACnB;QACJ;IACJ,GAAG;QACCA;KACH;IACDnB,MAAMK,IAAI,CAACR,GAAG,GAAGwC,IAAAA,6BAAa,EAACrC,MAAMK,IAAI,CAACR,GAAG,EAAEgC;IAC/C,OAAO7B;AACX"}
@@ -0,0 +1,376 @@
1
+ /* eslint-disable deprecation/deprecation */ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ infoButtonClassNames: function() {
13
+ return infoButtonClassNames;
14
+ },
15
+ useInfoButtonStyles_unstable: function() {
16
+ return useInfoButtonStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const infoButtonClassNames = {
21
+ root: 'fui-InfoButton',
22
+ // this className won't be used, but it's needed to satisfy the type checker
23
+ popover: 'fui-InfoButton__popover',
24
+ info: 'fui-InfoButton__info'
25
+ };
26
+ /**
27
+ * Styles for the root slot
28
+ *
29
+ * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\@fluentui/react-components` or `\@fluentui/react-infolabel` instead
30
+ */ const useButtonStyles = /*#__PURE__*/ (0, _react.__styles)({
31
+ base: {
32
+ Bt984gj: "f122n59",
33
+ B7ck84d: "f1ewtqcl",
34
+ mc9l5x: "ftuwxu6",
35
+ Brf1p80: "f4d9j23",
36
+ w71qe1: "f1iuv45f",
37
+ ha4doy: "fmrv4ls",
38
+ qhf8xq: "f10pi13n",
39
+ De3pzq: "f1c21dwh",
40
+ sj55zd: "fkfq4zb",
41
+ icvyot: "f1ern45e",
42
+ vrafjx: [
43
+ "f1n71otn",
44
+ "f1deefiw"
45
+ ],
46
+ oivjwe: "f1h8hb77",
47
+ wvpqe5: [
48
+ "f1deefiw",
49
+ "f1n71otn"
50
+ ],
51
+ Bbmb7ep: [
52
+ "f1aa9q02",
53
+ "f16jpd5f"
54
+ ],
55
+ Beyfa6y: [
56
+ "f16jpd5f",
57
+ "f1aa9q02"
58
+ ],
59
+ B7oj6ja: [
60
+ "f1jar5jt",
61
+ "fyu767a"
62
+ ],
63
+ Btl43ni: [
64
+ "fyu767a",
65
+ "f1jar5jt"
66
+ ],
67
+ B6of3ja: "f1hu3pq6",
68
+ t21cq0: [
69
+ "f11qmguv",
70
+ "f1tyq0we"
71
+ ],
72
+ jrapky: "f19f4twv",
73
+ Frg6f3: [
74
+ "f1tyq0we",
75
+ "f11qmguv"
76
+ ],
77
+ z8tnut: "f1ywm7hm",
78
+ z189sj: [
79
+ "f7x41pl",
80
+ "fruq291"
81
+ ],
82
+ Byoj8tv: "f14wxoun",
83
+ uwmqm3: [
84
+ "fruq291",
85
+ "f7x41pl"
86
+ ],
87
+ D0sxk3: "f16u1re",
88
+ t6yez3: "f1rw4040",
89
+ Jwef8y: "fjxutwb",
90
+ Bi91k9c: "f139oj5f",
91
+ eoavqd: "f8491dx",
92
+ Bk3fhr4: "f1jpd6y0",
93
+ Bmfj8id: "fuxngvv",
94
+ iro3zm: "fwiml72",
95
+ B2d53fq: "f1fg1p5m"
96
+ },
97
+ selected: {
98
+ De3pzq: "f1q9pm1r",
99
+ sj55zd: "f1qj7y59",
100
+ D0sxk3: "fgzdkf0",
101
+ t6yez3: "f15q0o9g",
102
+ Bsw6fvg: "f1rirnrt",
103
+ Bbusuzp: "f1cg6951"
104
+ },
105
+ highContrast: {
106
+ Bbusuzp: "fn0tkbb",
107
+ Bs6v0vm: "f1rp3av6",
108
+ B46dtvo: "f1u7gwqv",
109
+ gh1jta: "fl6kagl"
110
+ },
111
+ focusIndicator: {
112
+ Brovlpu: "ftqa4ok",
113
+ B486eqv: "f2hkw1w",
114
+ B8q5s1w: "f8hki3x",
115
+ Bci5o5g: [
116
+ "f1d2448m",
117
+ "ffh67wi"
118
+ ],
119
+ n8qw10: "f1bjia2o",
120
+ Bdrgwmp: [
121
+ "ffh67wi",
122
+ "f1d2448m"
123
+ ],
124
+ Bb7d1vk: "f226i61",
125
+ zhwhgb: [
126
+ "f13kzufm",
127
+ "fsx75g8"
128
+ ],
129
+ dhy2o1: "flujwa2",
130
+ Gfyso: [
131
+ "fsx75g8",
132
+ "f13kzufm"
133
+ ],
134
+ Bm4h7ae: "f15bsgw9",
135
+ B7ys5i9: "f14e48fq",
136
+ Busjfv9: "f18yb2kv",
137
+ Bhk32uz: "fd6o370",
138
+ Bf4ptjt: "fh1cnn4",
139
+ kclons: [
140
+ "fy7oxxb",
141
+ "f184ne2d"
142
+ ],
143
+ Bhdgwq3: "fpukqih",
144
+ Blkhhs4: [
145
+ "f184ne2d",
146
+ "fy7oxxb"
147
+ ],
148
+ Bqtpl0w: "frrh606",
149
+ clg4pj: [
150
+ "f1v5zibi",
151
+ "fo2hd23"
152
+ ],
153
+ hgwjuy: "ful5kiu",
154
+ Bonggc9: [
155
+ "fo2hd23",
156
+ "f1v5zibi"
157
+ ],
158
+ B1tsrr9: [
159
+ "f1jqcqds",
160
+ "ftffrms"
161
+ ],
162
+ Dah5zi: [
163
+ "ftffrms",
164
+ "f1jqcqds"
165
+ ],
166
+ Bkh64rk: [
167
+ "f2e7qr6",
168
+ "fsr1zz6"
169
+ ],
170
+ qqdqy8: [
171
+ "fsr1zz6",
172
+ "f2e7qr6"
173
+ ],
174
+ B6dhp37: "f1dvezut",
175
+ i03rao: [
176
+ "fd0oaoj",
177
+ "f1cwg4i8"
178
+ ],
179
+ Boxcth7: "fjvm52t",
180
+ Bsom6fd: [
181
+ "f1cwg4i8",
182
+ "fd0oaoj"
183
+ ],
184
+ J0r882: "f57olzd",
185
+ Bule8hv: [
186
+ "f4stah7",
187
+ "fs1por5"
188
+ ],
189
+ Bjwuhne: "f480a47",
190
+ Ghsupd: [
191
+ "fs1por5",
192
+ "f4stah7"
193
+ ]
194
+ },
195
+ large: {
196
+ z8tnut: "fclwglc",
197
+ z189sj: [
198
+ "f1w3695s",
199
+ "f1b0r8ql"
200
+ ],
201
+ Byoj8tv: "fywfov9",
202
+ uwmqm3: [
203
+ "f1b0r8ql",
204
+ "f1w3695s"
205
+ ]
206
+ }
207
+ }, {
208
+ d: [
209
+ ".f122n59{align-items:center;}",
210
+ ".f1ewtqcl{box-sizing:border-box;}",
211
+ ".ftuwxu6{display:inline-flex;}",
212
+ ".f4d9j23{justify-content:center;}",
213
+ ".f1iuv45f{text-decoration-line:none;}",
214
+ ".fmrv4ls{vertical-align:middle;}",
215
+ ".f10pi13n{position:relative;}",
216
+ ".f1c21dwh{background-color:var(--colorTransparentBackground);}",
217
+ ".fkfq4zb{color:var(--colorNeutralForeground2);}",
218
+ ".f1ern45e{border-top-style:none;}",
219
+ ".f1n71otn{border-right-style:none;}",
220
+ ".f1deefiw{border-left-style:none;}",
221
+ ".f1h8hb77{border-bottom-style:none;}",
222
+ ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
223
+ ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
224
+ ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
225
+ ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
226
+ ".f1hu3pq6{margin-top:0;}",
227
+ ".f11qmguv{margin-right:0;}",
228
+ ".f1tyq0we{margin-left:0;}",
229
+ ".f19f4twv{margin-bottom:0;}",
230
+ ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}",
231
+ ".f7x41pl{padding-right:var(--spacingHorizontalXS);}",
232
+ ".fruq291{padding-left:var(--spacingHorizontalXS);}",
233
+ ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}",
234
+ ".f16u1re .fui-Icon-filled{display:none;}",
235
+ ".f1rw4040 .fui-Icon-regular{display:inline-flex;}",
236
+ ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}",
237
+ ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}",
238
+ ".fgzdkf0 .fui-Icon-filled{display:inline-flex;}",
239
+ ".f15q0o9g .fui-Icon-regular{display:none;}",
240
+ ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",
241
+ ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",
242
+ ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",
243
+ ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",
244
+ ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}",
245
+ ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}",
246
+ ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}",
247
+ ".fd6o370[data-fui-focus-visible]::after{z-index:1;}",
248
+ ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}",
249
+ ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}",
250
+ ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}",
251
+ ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}",
252
+ ".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}",
253
+ ".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}",
254
+ ".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}",
255
+ ".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}",
256
+ ".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}",
257
+ ".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}",
258
+ ".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}",
259
+ ".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}",
260
+ ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}",
261
+ ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}",
262
+ ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}",
263
+ ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}",
264
+ ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}",
265
+ ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}",
266
+ ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}",
267
+ ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}",
268
+ ".fclwglc{padding-top:var(--spacingVerticalXXS);}",
269
+ ".f1w3695s{padding-right:var(--spacingVerticalXXS);}",
270
+ ".f1b0r8ql{padding-left:var(--spacingVerticalXXS);}",
271
+ ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}"
272
+ ],
273
+ h: [
274
+ ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",
275
+ ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}",
276
+ ".f8491dx:hover{cursor:pointer;}",
277
+ ".f1jpd6y0:hover .fui-Icon-filled{display:inline-flex;}",
278
+ ".fuxngvv:hover .fui-Icon-regular{display:none;}",
279
+ ".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}",
280
+ ".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"
281
+ ],
282
+ m: [
283
+ [
284
+ "@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}",
285
+ {
286
+ m: "(forced-colors: active)"
287
+ }
288
+ ],
289
+ [
290
+ "@media (forced-colors: active){.f1cg6951{color:Canvas;}}",
291
+ {
292
+ m: "(forced-colors: active)"
293
+ }
294
+ ],
295
+ [
296
+ "@media (forced-colors: active){.fn0tkbb{color:CanvasText;}}",
297
+ {
298
+ m: "(forced-colors: active)"
299
+ }
300
+ ],
301
+ [
302
+ "@media (forced-colors: active){.f1rp3av6:hover,.f1rp3av6:hover:active{forced-color-adjust:none;}}",
303
+ {
304
+ m: "(forced-colors: active)"
305
+ }
306
+ ],
307
+ [
308
+ "@media (forced-colors: active){.f1u7gwqv:hover,.f1u7gwqv:hover:active{background-color:Highlight;}}",
309
+ {
310
+ m: "(forced-colors: active)"
311
+ }
312
+ ],
313
+ [
314
+ "@media (forced-colors: active){.fl6kagl:hover,.fl6kagl:hover:active{color:Canvas;}}",
315
+ {
316
+ m: "(forced-colors: active)"
317
+ }
318
+ ],
319
+ [
320
+ "@media (forced-colors: active){.f226i61[data-fui-focus-visible]::after{border-top-color:Highlight;}}",
321
+ {
322
+ m: "(forced-colors: active)"
323
+ }
324
+ ],
325
+ [
326
+ "@media (forced-colors: active){.f13kzufm[data-fui-focus-visible]::after{border-right-color:Highlight;}.fsx75g8[data-fui-focus-visible]::after{border-left-color:Highlight;}}",
327
+ {
328
+ m: "(forced-colors: active)"
329
+ }
330
+ ],
331
+ [
332
+ "@media (forced-colors: active){.flujwa2[data-fui-focus-visible]::after{border-bottom-color:Highlight;}}",
333
+ {
334
+ m: "(forced-colors: active)"
335
+ }
336
+ ]
337
+ ],
338
+ f: [
339
+ ".ftqa4ok:focus{outline-style:none;}"
340
+ ],
341
+ i: [
342
+ ".f2hkw1w:focus-visible{outline-style:none;}"
343
+ ]
344
+ });
345
+ const usePopoverSurfaceStyles = /*#__PURE__*/ (0, _react.__styles)({
346
+ smallMedium: {
347
+ Bahqtrf: "fk6fouc",
348
+ Be2twd7: "fy9rknc",
349
+ Bhrd7zp: "figsok6",
350
+ Bg96gwp: "fwrc4pm"
351
+ },
352
+ large: {
353
+ Bahqtrf: "fk6fouc",
354
+ Be2twd7: "fkhj508",
355
+ Bhrd7zp: "figsok6",
356
+ Bg96gwp: "f1i3iumi"
357
+ }
358
+ }, {
359
+ d: [
360
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
361
+ ".fy9rknc{font-size:var(--fontSizeBase200);}",
362
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
363
+ ".fwrc4pm{line-height:var(--lineHeightBase200);}",
364
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
365
+ ".f1i3iumi{line-height:var(--lineHeightBase300);}"
366
+ ]
367
+ });
368
+ const useInfoButtonStyles_unstable = (state)=>{
369
+ const { size } = state;
370
+ const { open } = state.popover;
371
+ const buttonStyles = useButtonStyles();
372
+ const popoverSurfaceStyles = usePopoverSurfaceStyles();
373
+ state.info.className = (0, _react.mergeClasses)(infoButtonClassNames.info, size === 'large' ? popoverSurfaceStyles.large : popoverSurfaceStyles.smallMedium, state.info.className);
374
+ state.root.className = (0, _react.mergeClasses)(infoButtonClassNames.root, buttonStyles.base, buttonStyles.highContrast, buttonStyles.focusIndicator, open && buttonStyles.selected, size === 'large' && buttonStyles.large, state.root.className);
375
+ return state;
376
+ }; //# sourceMappingURL=useInfoButtonStyles.styles.js.map