@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.
- package/CHANGELOG.md +893 -2
- package/README.md +3 -24
- package/dist/index.d.ts +109 -5
- package/lib/InfoButton.js +0 -1
- package/lib/InfoButton.js.map +1 -1
- package/lib/InfoLabel.js +1 -0
- package/lib/InfoLabel.js.map +1 -0
- package/lib/components/InfoButton/DefaultInfoButtonIcons.js +3 -4
- package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
- package/lib/components/InfoButton/InfoButton.js +8 -8
- package/lib/components/InfoButton/InfoButton.js.map +1 -1
- package/lib/components/InfoButton/InfoButton.types.js +1 -2
- package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
- package/lib/components/InfoButton/index.js +1 -2
- package/lib/components/InfoButton/index.js.map +1 -1
- package/lib/components/InfoButton/renderInfoButton.js +14 -16
- package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
- package/lib/components/InfoButton/useInfoButton.js +71 -51
- package/lib/components/InfoButton/useInfoButton.js.map +1 -1
- package/lib/components/InfoButton/useInfoButtonStyles.styles.js +169 -0
- package/lib/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
- package/lib/components/InfoLabel/InfoLabel.js +14 -0
- package/lib/components/InfoLabel/InfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/InfoLabel.types.js +1 -0
- package/lib/components/InfoLabel/InfoLabel.types.js.map +1 -0
- package/lib/components/InfoLabel/index.js +5 -0
- package/lib/components/InfoLabel/index.js.map +1 -0
- package/lib/components/InfoLabel/renderInfoLabel.js +15 -0
- package/lib/components/InfoLabel/renderInfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/useInfoLabel.js +79 -0
- package/lib/components/InfoLabel/useInfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/useInfoLabelStyles.styles.js +48 -0
- package/lib/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib-commonjs/InfoButton.js +3 -5
- package/lib-commonjs/InfoButton.js.map +1 -1
- package/lib-commonjs/InfoLabel.js +6 -0
- package/lib-commonjs/InfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js +22 -8
- package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
- package/lib-commonjs/components/InfoButton/InfoButton.js +18 -17
- package/lib-commonjs/components/InfoButton/InfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/InfoButton.types.js +2 -4
- package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +1 -1
- package/lib-commonjs/components/InfoButton/index.js +7 -9
- package/lib-commonjs/components/InfoButton/index.js.map +1 -1
- package/lib-commonjs/components/InfoButton/renderInfoButton.js +21 -24
- package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/useInfoButton.js +80 -66
- package/lib-commonjs/components/InfoButton/useInfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js +376 -0
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.js +21 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.types.js +4 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.types.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/index.js +10 -0
- package/lib-commonjs/components/InfoLabel/index.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/renderInfoLabel.js +21 -0
- package/lib-commonjs/components/InfoLabel/renderInfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js +80 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js +66 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +41 -35
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +29 -17
- package/CHANGELOG.json +0 -273
- package/lib/components/InfoButton/useInfoButtonStyles.js +0 -153
- package/lib/components/InfoButton/useInfoButtonStyles.js.map +0 -1
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js +0 -160
- 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
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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,"
|
|
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
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
small: 'small',
|
|
23
|
+
medium: 'small',
|
|
24
|
+
large: 'medium'
|
|
21
25
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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,"
|
|
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
|