@fluentui/react-menu 9.14.5 → 9.14.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +161 -132
- package/lib/components/MenuDivider/useMenuDividerStyles.styles.js +15 -9
- package/lib/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.styles.js +3 -3
- package/lib/components/MenuList/useMenuListStyles.styles.js +7 -4
- package/lib/components/MenuList/useMenuListStyles.styles.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +8 -8
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js +35 -22
- package/lib/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js +21 -20
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js +25 -25
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js +9 -4
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +7 -7
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js +45 -76
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
- package/package.json +12 -12
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuListStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles
|
1
|
+
{"version":3,"sources":["useMenuListStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles } from '@griffel/react';\nexport const menuListClassNames = {\n root: 'fui-MenuList'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Beiy3e4: \"f1vx9l62\",\n i8kkvl: 0,\n Belr9w4: 0,\n rmohyg: \"f1t6b6ee\"\n },\n hasMenuContext: {\n Bqenvij: \"f1l02sjl\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f1vx9l62{flex-direction:column;}\", [\".f1t6b6ee{gap:2px;}\", {\n p: -1\n }], \".f1l02sjl{height:100%;}\"]\n});\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuListStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuListClassNames.root, styles.root, state.hasMenuContext && styles.hasMenuContext, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuListStyles.styles.js.map"],"names":["menuListClassNames","useMenuListStyles_unstable","root","useStyles","__styles","mc9l5x","Beiy3e4","i8kkvl","Belr9w4","rmohyg","hasMenuContext","Bqenvij","d","p","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,kBAAkB;eAAlBA;;IAsBAC,0BAA0B;eAA1BA;;;uBAvB0B;AAChC,MAAMD,qBAAqB;IAChCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;IACAC,gBAAgB;QACdC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA2B;QAAqC;YAAC;YAAuB;gBAC1FC,GAAG,CAAC;YACN;SAAE;QAAE;KAA0B;AAChC;AAIO,MAAMZ,6BAA6Ba,CAAAA;IACxC,MAAMC,SAASZ;IACfW,MAAMZ,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACjB,mBAAmBE,IAAI,EAAEa,OAAOb,IAAI,EAAEY,MAAMJ,cAAc,IAAIK,OAAOL,cAAc,EAAEI,MAAMZ,IAAI,CAACc,SAAS;IAC7I,OAAOF;AACT,GACA,oDAAoD"}
|
@@ -25,8 +25,8 @@ const useMenuPopover_unstable = (props, ref)=>{
|
|
25
25
|
const triggerRef = (0, _menuContext.useMenuContext_unstable)((context)=>context.triggerRef);
|
26
26
|
const isSubmenu = (0, _useIsSubmenu.useIsSubmenu)();
|
27
27
|
const canDispatchCustomEventRef = _react.useRef(true);
|
28
|
-
const throttleDispatchTimerRef = _react.useRef(0);
|
29
28
|
const restoreFocusSourceAttributes = (0, _reacttabster.useRestoreFocusSource)();
|
29
|
+
const [setThrottleTimeout, clearThrottleTimeout] = (0, _reactutilities.useTimeout)();
|
30
30
|
const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
|
31
31
|
const CloseArrowKey = dir === 'ltr' ? _keyboardkeys.ArrowLeft : _keyboardkeys.ArrowRight;
|
32
32
|
// use DOM listener since react events propagate up the react tree
|
@@ -40,19 +40,19 @@ const useMenuPopover_unstable = (props, ref)=>{
|
|
40
40
|
if (canDispatchCustomEventRef.current) {
|
41
41
|
canDispatchCustomEventRef.current = false;
|
42
42
|
(0, _index.dispatchMenuEnterEvent)(popoverRef.current, e);
|
43
|
-
|
44
|
-
// @ts-ignore #16889 Node setTimeout type leaking
|
45
|
-
throttleDispatchTimerRef.current = setTimeout(()=>canDispatchCustomEventRef.current = true, 250);
|
43
|
+
setThrottleTimeout(()=>canDispatchCustomEventRef.current = true, 250);
|
46
44
|
}
|
47
45
|
});
|
48
46
|
}
|
49
47
|
}, [
|
50
48
|
popoverRef,
|
51
|
-
|
49
|
+
setThrottleTimeout
|
52
50
|
]);
|
53
51
|
_react.useEffect(()=>{
|
54
|
-
()=>
|
55
|
-
}, [
|
52
|
+
()=>clearThrottleTimeout();
|
53
|
+
}, [
|
54
|
+
clearThrottleTimeout
|
55
|
+
]);
|
56
56
|
var _useMenuContext_unstable;
|
57
57
|
const inline = (_useMenuContext_unstable = (0, _menuContext.useMenuContext_unstable)((context)=>context.inline)) !== null && _useMenuContext_unstable !== void 0 ? _useMenuContext_unstable : false;
|
58
58
|
const mountNode = (0, _menuContext.useMenuContext_unstable)((context)=>context.mountNode);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuPopover.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, Tab, ArrowRight, Escape } from '@fluentui/keyboard-keys';\nimport { getIntrinsicElementProps, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { dispatchMenuEnterEvent } from '../../utils/index';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useRestoreFocusSource } from '@fluentui/react-tabster';\n/**\n * Create the state required to render MenuPopover.\n *\n * The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,\n * before being passed to renderMenuPopover_unstable.\n *\n * @param props - props from this instance of MenuPopover\n * @param ref - reference to root HTMLElement of MenuPopover\n */ export const useMenuPopover_unstable = (props, ref)=>{\n const popoverRef = useMenuContext_unstable((context)=>context.menuPopoverRef);\n const setOpen = useMenuContext_unstable((context)=>context.setOpen);\n const open = useMenuContext_unstable((context)=>context.open);\n const openOnHover = useMenuContext_unstable((context)=>context.openOnHover);\n const triggerRef = useMenuContext_unstable((context)=>context.triggerRef);\n const isSubmenu = useIsSubmenu();\n const canDispatchCustomEventRef = React.useRef(true);\n const
|
1
|
+
{"version":3,"sources":["useMenuPopover.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, Tab, ArrowRight, Escape } from '@fluentui/keyboard-keys';\nimport { getIntrinsicElementProps, useEventCallback, useMergedRefs, slot, useTimeout } from '@fluentui/react-utilities';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { dispatchMenuEnterEvent } from '../../utils/index';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport { useRestoreFocusSource } from '@fluentui/react-tabster';\n/**\n * Create the state required to render MenuPopover.\n *\n * The returned state can be modified with hooks such as useMenuPopoverStyles_unstable,\n * before being passed to renderMenuPopover_unstable.\n *\n * @param props - props from this instance of MenuPopover\n * @param ref - reference to root HTMLElement of MenuPopover\n */ export const useMenuPopover_unstable = (props, ref)=>{\n const popoverRef = useMenuContext_unstable((context)=>context.menuPopoverRef);\n const setOpen = useMenuContext_unstable((context)=>context.setOpen);\n const open = useMenuContext_unstable((context)=>context.open);\n const openOnHover = useMenuContext_unstable((context)=>context.openOnHover);\n const triggerRef = useMenuContext_unstable((context)=>context.triggerRef);\n const isSubmenu = useIsSubmenu();\n const canDispatchCustomEventRef = React.useRef(true);\n const restoreFocusSourceAttributes = useRestoreFocusSource();\n const [setThrottleTimeout, clearThrottleTimeout] = useTimeout();\n const { dir } = useFluent();\n const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;\n // use DOM listener since react events propagate up the react tree\n // no need to do `contains` logic as menus are all positioned in different portals\n const mouseOverListenerCallbackRef = React.useCallback((node)=>{\n if (node) {\n // Dispatches the custom menu mouse enter event with throttling\n // Needs to trigger on mouseover to support keyboard + mouse together\n // i.e. keyboard opens submenus while cursor is still on the parent\n node.addEventListener('mouseover', (e)=>{\n if (canDispatchCustomEventRef.current) {\n canDispatchCustomEventRef.current = false;\n dispatchMenuEnterEvent(popoverRef.current, e);\n setThrottleTimeout(()=>canDispatchCustomEventRef.current = true, 250);\n }\n });\n }\n }, [\n popoverRef,\n setThrottleTimeout\n ]);\n React.useEffect(()=>{\n ()=>clearThrottleTimeout();\n }, [\n clearThrottleTimeout\n ]);\n var _useMenuContext_unstable;\n const inline = (_useMenuContext_unstable = useMenuContext_unstable((context)=>context.inline)) !== null && _useMenuContext_unstable !== void 0 ? _useMenuContext_unstable : false;\n const mountNode = useMenuContext_unstable((context)=>context.mountNode);\n const rootProps = slot.always(getIntrinsicElementProps('div', {\n role: 'presentation',\n ...restoreFocusSourceAttributes,\n ...props,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, popoverRef, mouseOverListenerCallbackRef)\n }), {\n elementType: 'div'\n });\n const { onMouseEnter: onMouseEnterOriginal, onKeyDown: onKeyDownOriginal } = rootProps;\n rootProps.onMouseEnter = useEventCallback((event)=>{\n if (openOnHover || isSubmenu) {\n setOpen(event, {\n open: true,\n keyboard: false,\n type: 'menuPopoverMouseEnter',\n event\n });\n }\n onMouseEnterOriginal === null || onMouseEnterOriginal === void 0 ? void 0 : onMouseEnterOriginal(event);\n });\n rootProps.onKeyDown = useEventCallback((event)=>{\n const key = event.key;\n if (key === Escape || isSubmenu && key === CloseArrowKey) {\n var _popoverRef_current;\n if (open && ((_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(event.target)) && !event.isDefaultPrevented()) {\n setOpen(event, {\n open: false,\n keyboard: true,\n type: 'menuPopoverKeyDown',\n event\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Popover, Menu and Tooltip\n event.preventDefault();\n }\n }\n if (key === Tab) {\n setOpen(event, {\n open: false,\n keyboard: true,\n type: 'menuPopoverKeyDown',\n event\n });\n if (!isSubmenu) {\n var _triggerRef_current;\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n }\n }\n onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(event);\n });\n return {\n inline,\n mountNode,\n components: {\n root: 'div'\n },\n root: rootProps\n };\n};\n"],"names":["useMenuPopover_unstable","props","ref","popoverRef","useMenuContext_unstable","context","menuPopoverRef","setOpen","open","openOnHover","triggerRef","isSubmenu","useIsSubmenu","canDispatchCustomEventRef","React","useRef","restoreFocusSourceAttributes","useRestoreFocusSource","setThrottleTimeout","clearThrottleTimeout","useTimeout","dir","useFluent","CloseArrowKey","ArrowLeft","ArrowRight","mouseOverListenerCallbackRef","useCallback","node","addEventListener","e","current","dispatchMenuEnterEvent","useEffect","_useMenuContext_unstable","inline","mountNode","rootProps","slot","always","getIntrinsicElementProps","role","useMergedRefs","elementType","onMouseEnter","onMouseEnterOriginal","onKeyDown","onKeyDownOriginal","useEventCallback","event","keyboard","type","key","Escape","_popoverRef_current","contains","target","isDefaultPrevented","preventDefault","Tab","_triggerRef_current","focus","components","root"],"mappings":";;;;+BAgBiBA;;;eAAAA;;;;iEAhBM;8BAC4B;gCACyC;6BACpD;uBACD;qCACS;8BACnB;8BACS;AAS3B,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAMC,aAAaC,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQC,cAAc;IAC5E,MAAMC,UAAUH,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQE,OAAO;IAClE,MAAMC,OAAOJ,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQG,IAAI;IAC5D,MAAMC,cAAcL,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQI,WAAW;IAC1E,MAAMC,aAAaN,IAAAA,oCAAuB,EAAC,CAACC,UAAUA,QAAQK,UAAU;IACxE,MAAMC,YAAYC,IAAAA,0BAAY;IAC9B,MAAMC,4BAA4BC,OAAMC,MAAM,CAAC;IAC/C,MAAMC,+BAA+BC,IAAAA,mCAAqB;IAC1D,MAAM,CAACC,oBAAoBC,qBAAqB,GAAGC,IAAAA,0BAAU;IAC7D,MAAM,EAAEC,GAAG,EAAE,GAAGC,IAAAA,uCAAS;IACzB,MAAMC,gBAAgBF,QAAQ,QAAQG,uBAAS,GAAGC,wBAAU;IAC5D,kEAAkE;IAClE,kFAAkF;IAClF,MAAMC,+BAA+BZ,OAAMa,WAAW,CAAC,CAACC;QACpD,IAAIA,MAAM;YACN,+DAA+D;YAC/D,qEAAqE;YACrE,mEAAmE;YACnEA,KAAKC,gBAAgB,CAAC,aAAa,CAACC;gBAChC,IAAIjB,0BAA0BkB,OAAO,EAAE;oBACnClB,0BAA0BkB,OAAO,GAAG;oBACpCC,IAAAA,6BAAsB,E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AAQuB,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBC,QAAQ,CAACN,MAAMO,MAAM,CAAA,KAAM,CAACP,MAAMQ,kBAAkB,IAAI;gBACtLlD,QAAQ0C,OAAO;oBACXzC,MAAM;oBACN0C,UAAU;oBACVC,MAAM;oBACNF;gBACJ;gBACA,qFAAqF;gBACrF,yCAAyC;gBACzCA,MAAMS,cAAc;YACxB;QACJ;QACA,IAAIN,QAAQO,iBAAG,EAAE;YACbpD,QAAQ0C,OAAO;gBACXzC,MAAM;gBACN0C,UAAU;gBACVC,MAAM;gBACNF;YACJ;YACA,IAAI,CAACtC,WAAW;gBACZ,IAAIiD;gBACHA,CAAAA,sBAAsBlD,WAAWqB,OAAO,AAAD,MAAO,QAAQ6B,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBC,KAAK;YAC9H;QACJ;QACAd,sBAAsB,QAAQA,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBE;IAC5F;IACA,OAAO;QACHd;QACAC;QACA0B,YAAY;YACRC,MAAM;QACV;QACAA,MAAM1B;IACV;AACJ"}
|
@@ -22,22 +22,11 @@ const menuPopoverClassNames = {
|
|
22
22
|
};
|
23
23
|
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
24
24
|
root: {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
"f16jpd5f",
|
31
|
-
"f1aa9q02"
|
32
|
-
],
|
33
|
-
B7oj6ja: [
|
34
|
-
"f1jar5jt",
|
35
|
-
"fyu767a"
|
36
|
-
],
|
37
|
-
Btl43ni: [
|
38
|
-
"fyu767a",
|
39
|
-
"f1jar5jt"
|
40
|
-
],
|
25
|
+
Beyfa6y: 0,
|
26
|
+
Bbmb7ep: 0,
|
27
|
+
Btl43ni: 0,
|
28
|
+
B7oj6ja: 0,
|
29
|
+
Dimara: "ft85np5",
|
41
30
|
De3pzq: "fxugw4r",
|
42
31
|
sj55zd: "f19n0e5",
|
43
32
|
B7ck84d: "f1ewtqcl",
|
@@ -46,46 +35,28 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
46
35
|
B68tc82: "f1p9o1ba",
|
47
36
|
a9b677: "f1ahpp82",
|
48
37
|
E5pizo: "f1hg901r",
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
"fcdblym",
|
72
|
-
"fjik90z"
|
73
|
-
],
|
74
|
-
oivjwe: "fg706s2",
|
75
|
-
wvpqe5: [
|
76
|
-
"fjik90z",
|
77
|
-
"fcdblym"
|
78
|
-
],
|
79
|
-
g2u3we: "fghlq4f",
|
80
|
-
h3c5rm: [
|
81
|
-
"f1gn591s",
|
82
|
-
"fjscplz"
|
83
|
-
],
|
84
|
-
B9xav0g: "fb073pr",
|
85
|
-
zhjwy3: [
|
86
|
-
"fjscplz",
|
87
|
-
"f1gn591s"
|
88
|
-
],
|
38
|
+
Byoj8tv: 0,
|
39
|
+
uwmqm3: 0,
|
40
|
+
z189sj: 0,
|
41
|
+
z8tnut: 0,
|
42
|
+
B0ocmuz: "fd3pd8h",
|
43
|
+
Bgfg5da: 0,
|
44
|
+
B9xav0g: 0,
|
45
|
+
oivjwe: 0,
|
46
|
+
Bn0qgzm: 0,
|
47
|
+
B4g9neb: 0,
|
48
|
+
zhjwy3: 0,
|
49
|
+
wvpqe5: 0,
|
50
|
+
ibv6hh: 0,
|
51
|
+
u1mtju: 0,
|
52
|
+
h3c5rm: 0,
|
53
|
+
vrafjx: 0,
|
54
|
+
Bekrc4i: 0,
|
55
|
+
i8vvqc: 0,
|
56
|
+
g2u3we: 0,
|
57
|
+
icvyot: 0,
|
58
|
+
B4j52fo: 0,
|
59
|
+
irswps: "f9ggezi",
|
89
60
|
Bahqtrf: "fk6fouc",
|
90
61
|
Be2twd7: "fkhj508",
|
91
62
|
Bhrd7zp: "figsok6",
|
@@ -108,10 +79,12 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
108
79
|
}
|
109
80
|
}, {
|
110
81
|
d: [
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
82
|
+
[
|
83
|
+
".ft85np5{border-radius:var(--borderRadiusMedium);}",
|
84
|
+
{
|
85
|
+
p: -1
|
86
|
+
}
|
87
|
+
],
|
115
88
|
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
116
89
|
".f19n0e5{color:var(--colorNeutralForeground1);}",
|
117
90
|
".f1ewtqcl{box-sizing:border-box;}",
|
@@ -120,22 +93,18 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
120
93
|
".f1p9o1ba{overflow-x:hidden;}",
|
121
94
|
".f1ahpp82{width:max-content;}",
|
122
95
|
".f1hg901r{box-shadow:var(--shadow16);}",
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
".fghlq4f{border-top-color:var(--colorTransparentStroke);}",
|
136
|
-
".f1gn591s{border-right-color:var(--colorTransparentStroke);}",
|
137
|
-
".fjscplz{border-left-color:var(--colorTransparentStroke);}",
|
138
|
-
".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",
|
96
|
+
[
|
97
|
+
".fd3pd8h{padding:4px;}",
|
98
|
+
{
|
99
|
+
p: -1
|
100
|
+
}
|
101
|
+
],
|
102
|
+
[
|
103
|
+
".f9ggezi{border:1px solid var(--colorTransparentStroke);}",
|
104
|
+
{
|
105
|
+
p: -2
|
106
|
+
}
|
107
|
+
],
|
139
108
|
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
140
109
|
".fkhj508{font-size:var(--fontSizeBase300);}",
|
141
110
|
".figsok6{font-weight:var(--fontWeightRegular);}",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useMenuPopoverStyles.styles.js"],"sourcesContent":["import {
|
1
|
+
{"version":3,"sources":["useMenuPopoverStyles.styles.js"],"sourcesContent":["import { mergeClasses, __styles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { createSlideStyles } from '@fluentui/react-positioning';\nexport const menuPopoverClassNames = {\n root: 'fui-MenuPopover'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\",\n De3pzq: \"fxugw4r\",\n sj55zd: \"f19n0e5\",\n B7ck84d: \"f1ewtqcl\",\n Bf4jedk: \"fl8fusi\",\n B2u0y6b: \"f1kaai3v\",\n B68tc82: \"f1p9o1ba\",\n a9b677: \"f1ahpp82\",\n E5pizo: \"f1hg901r\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fd3pd8h\",\n Bgfg5da: 0,\n B9xav0g: 0,\n oivjwe: 0,\n Bn0qgzm: 0,\n B4g9neb: 0,\n zhjwy3: 0,\n wvpqe5: 0,\n ibv6hh: 0,\n u1mtju: 0,\n h3c5rm: 0,\n vrafjx: 0,\n Bekrc4i: 0,\n i8vvqc: 0,\n g2u3we: 0,\n icvyot: 0,\n B4j52fo: 0,\n irswps: \"f9ggezi\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n B93otf3: \"f18k4bn6\",\n vin17d: \"fo1kyvf\",\n Ezkn3b: \"fetxo7e\",\n nyiy2g: \"f8x1vz1\",\n swvrvq: \"f8g0anz\",\n Bkovbt3: \"fezwn9i\",\n hgjdhn: \"fz5efge\",\n fsy9dk: \"f1ydixl4\",\n B3ogreh: \"f8dgqj5\",\n jv49x5: \"fnyfnr8\",\n Bk7o48c: \"fgw77r4\",\n Bv12yb3: \"ftje0s4\",\n z0t1cu: \"fi19xcv\",\n Bks05zx: \"f1mzajhk\",\n Bvtglag: \"fjp4h9y\"\n }\n}, {\n d: [[\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".fl8fusi{min-width:138px;}\", \".f1kaai3v{max-width:300px;}\", \".f1p9o1ba{overflow-x:hidden;}\", \".f1ahpp82{width:max-content;}\", \".f1hg901r{box-shadow:var(--shadow16);}\", [\".fd3pd8h{padding:4px;}\", {\n p: -1\n }], [\".f9ggezi{border:1px solid var(--colorTransparentStroke);}\", {\n p: -2\n }], \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".f18k4bn6{animation-composition:accumulate;}\", \".fo1kyvf{animation-duration:var(--durationSlower);}\", \".fetxo7e{animation-timing-function:var(--curveDecelerateMid);}\", \".f8x1vz1{--fui-positioning-slide-distance-x:0px;}\", \".f8g0anz{--fui-positioning-slide-distance-y:10px;}\", \".fezwn9i[data-popper-placement^=right]{--fui-positioning-slide-distance-x:-10px;}\", \".fz5efge[data-popper-placement^=right]{--fui-positioning-slide-distance-y:0px;}\", \".f1ydixl4[data-popper-placement^=bottom]{--fui-positioning-slide-distance-x:0px;}\", \".f8dgqj5[data-popper-placement^=bottom]{--fui-positioning-slide-distance-y:-10px;}\", \".fnyfnr8[data-popper-placement^=left]{--fui-positioning-slide-distance-x:10px;}\", \".fgw77r4[data-popper-placement^=left]{--fui-positioning-slide-distance-y:0px;}\", \".ftje0s4{animation-name:f5j8bii,f79suad;}\"],\n k: [\"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@keyframes f79suad{from{transform:translate(var(--fui-positioning-slide-distance-x), var(--fui-positioning-slide-distance-y));}}\"],\n m: [[\"@media (prefers-reduced-motion){.fi19xcv[data-popper-placement]{animation-duration:1ms;}}\", {\n m: \"(prefers-reduced-motion)\"\n }], [\"@media (prefers-reduced-motion){.f1mzajhk[data-popper-placement]{animation-name:f5j8bii;}}\", {\n m: \"(prefers-reduced-motion)\"\n }]],\n t: [\"@supports not (animation-composition: accumulate){.fjp4h9y[data-popper-placement]{animation-name:f5j8bii;}}\"]\n});\n/**\n * Apply styling to the Menu slots based on the state\n */\nexport const useMenuPopoverStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuPopoverClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useMenuPopoverStyles.styles.js.map"],"names":["menuPopoverClassNames","useMenuPopoverStyles_unstable","root","useStyles","__styles","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","De3pzq","sj55zd","B7ck84d","Bf4jedk","B2u0y6b","B68tc82","a9b677","E5pizo","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","B93otf3","vin17d","Ezkn3b","nyiy2g","swvrvq","Bkovbt3","hgjdhn","fsy9dk","B3ogreh","jv49x5","Bk7o48c","Bv12yb3","z0t1cu","Bks05zx","Bvtglag","d","p","k","m","t","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,qBAAqB;eAArBA;;IA+EAC,6BAA6B;eAA7BA;;;uBAlF0B;AAGhC,MAAMD,wBAAwB;IACnCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,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C+D,CAAAA;IAC3C,MAAMC,SAAS9D;IACf6D,MAAM9D,IAAI,CAACgE,SAAS,GAAGC,IAAAA,mBAAY,EAACnE,sBAAsBE,IAAI,EAAE+D,OAAO/D,IAAI,EAAE8D,MAAM9D,IAAI,CAACgE,SAAS;IACjG,OAAOF;AACT,GACA,uDAAuD"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.14.
|
3
|
+
"version": "9.14.7",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -21,13 +21,13 @@
|
|
21
21
|
"just": "just-scripts",
|
22
22
|
"lint": "just-scripts lint",
|
23
23
|
"start": "yarn storybook",
|
24
|
-
"storybook": "
|
24
|
+
"storybook": "yarn --cwd ../stories storybook",
|
25
25
|
"test": "jest --passWithNoTests",
|
26
|
-
"type-check": "
|
27
|
-
"generate-api": "just-scripts generate-api"
|
28
|
-
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
|
26
|
+
"type-check": "just-scripts type-check",
|
27
|
+
"generate-api": "just-scripts generate-api"
|
29
28
|
},
|
30
29
|
"devDependencies": {
|
30
|
+
"@fluentui/react-provider": "*",
|
31
31
|
"@fluentui/eslint-plugin": "*",
|
32
32
|
"@fluentui/react-conformance": "*",
|
33
33
|
"@fluentui/react-conformance-griffel": "*",
|
@@ -37,16 +37,16 @@
|
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"@fluentui/keyboard-keys": "^9.0.7",
|
40
|
-
"@fluentui/react-aria": "^9.
|
41
|
-
"@fluentui/react-context-selector": "^9.1.
|
40
|
+
"@fluentui/react-aria": "^9.12.0",
|
41
|
+
"@fluentui/react-context-selector": "^9.1.61",
|
42
42
|
"@fluentui/react-icons": "^2.0.239",
|
43
|
-
"@fluentui/react-portal": "^9.4.
|
44
|
-
"@fluentui/react-positioning": "^9.15.
|
43
|
+
"@fluentui/react-portal": "^9.4.27",
|
44
|
+
"@fluentui/react-positioning": "^9.15.3",
|
45
45
|
"@fluentui/react-shared-contexts": "^9.19.0",
|
46
|
-
"@fluentui/react-tabster": "^9.21.
|
46
|
+
"@fluentui/react-tabster": "^9.21.5",
|
47
47
|
"@fluentui/react-theme": "^9.1.19",
|
48
|
-
"@fluentui/react-utilities": "^9.18.
|
49
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
48
|
+
"@fluentui/react-utilities": "^9.18.10",
|
49
|
+
"@fluentui/react-jsx-runtime": "^9.0.39",
|
50
50
|
"@griffel/react": "^1.5.22",
|
51
51
|
"@swc/helpers": "^0.5.1"
|
52
52
|
},
|