@fluentui/react-menu-grid-preview 0.2.2 → 0.2.3
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 +19 -5
- package/lib/components/MenuGridCell/useMenuGridCell.js +2 -2
- package/lib/components/MenuGridCell/useMenuGridCell.js.map +1 -1
- package/lib/components/MenuGridCell/useMenuGridCellStyles.styles.js +9 -3
- package/lib/components/MenuGridCell/useMenuGridCellStyles.styles.js.map +1 -1
- package/lib/components/MenuGridCell/useMenuGridCellStyles.styles.raw.js +8 -2
- package/lib/components/MenuGridCell/useMenuGridCellStyles.styles.raw.js.map +1 -1
- package/lib/components/MenuGridItem/useMenuGridItemStyles.styles.js +14 -1
- package/lib/components/MenuGridItem/useMenuGridItemStyles.styles.js.map +1 -1
- package/lib/components/MenuGridItem/useMenuGridItemStyles.styles.raw.js +11 -1
- package/lib/components/MenuGridItem/useMenuGridItemStyles.styles.raw.js.map +1 -1
- package/lib/components/MenuGridRow/useMenuGridRowStyles.styles.js +14 -2
- package/lib/components/MenuGridRow/useMenuGridRowStyles.styles.js.map +1 -1
- package/lib/components/MenuGridRow/useMenuGridRowStyles.styles.raw.js +54 -2
- package/lib/components/MenuGridRow/useMenuGridRowStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js +2 -2
- package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js.map +1 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCellStyles.styles.js +11 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCellStyles.styles.raw.js +7 -1
- package/lib-commonjs/components/MenuGridCell/useMenuGridCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/MenuGridItem/useMenuGridItemStyles.styles.js +14 -0
- package/lib-commonjs/components/MenuGridItem/useMenuGridItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGridItem/useMenuGridItemStyles.styles.raw.js +10 -0
- package/lib-commonjs/components/MenuGridItem/useMenuGridItemStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/MenuGridRow/useMenuGridRowStyles.styles.js +33 -1
- package/lib-commonjs/components/MenuGridRow/useMenuGridRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGridRow/useMenuGridRowStyles.styles.raw.js +53 -1
- package/lib-commonjs/components/MenuGridRow/useMenuGridRowStyles.styles.raw.js.map +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-menu-grid-preview
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 31 Oct 2025 16:17:37 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.2.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.2.3)
|
|
8
|
+
|
|
9
|
+
Fri, 31 Oct 2025 16:17:37 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.2.2..@fluentui/react-menu-grid-preview_v0.2.3)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- feat: add styles for MenuGridRow ([PR #34948](https://github.com/microsoft/fluentui/pull/34948) by jukapsia@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-menu to v9.20.3 ([PR #35402](https://github.com/microsoft/fluentui/pull/35402) by beachball)
|
|
16
|
+
- Bump @fluentui/react-table to v9.19.3 ([PR #35402](https://github.com/microsoft/fluentui/pull/35402) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.26.8 ([PR #35402](https://github.com/microsoft/fluentui/pull/35402) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.3.1 ([PR #35402](https://github.com/microsoft/fluentui/pull/35402) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v9.25.2 ([PR #35402](https://github.com/microsoft/fluentui/pull/35402) by beachball)
|
|
20
|
+
|
|
7
21
|
## [0.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.2.2)
|
|
8
22
|
|
|
9
|
-
Tue, 21 Oct 2025 14:
|
|
23
|
+
Tue, 21 Oct 2025 14:16:59 GMT
|
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.2.1..@fluentui/react-menu-grid-preview_v0.2.2)
|
|
11
25
|
|
|
12
26
|
### Patches
|
|
13
27
|
|
|
14
|
-
- Bump @fluentui/react-menu to v9.20.2 ([PR #
|
|
15
|
-
- Bump @fluentui/react-table to v9.19.2 ([PR #
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v9.3.0 ([PR #
|
|
28
|
+
- Bump @fluentui/react-menu to v9.20.2 ([PR #35343](https://github.com/microsoft/fluentui/pull/35343) by beachball)
|
|
29
|
+
- Bump @fluentui/react-table to v9.19.2 ([PR #35343](https://github.com/microsoft/fluentui/pull/35343) by beachball)
|
|
30
|
+
- Bump @fluentui/react-jsx-runtime to v9.3.0 ([PR #35343](https://github.com/microsoft/fluentui/pull/35343) by beachball)
|
|
17
31
|
|
|
18
32
|
## [0.2.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.2.1)
|
|
19
33
|
|
|
@@ -8,10 +8,10 @@ import { useValidateNesting } from '../../utils/useValidateNesting';
|
|
|
8
8
|
* Given user props, returns state and render function for a MenuGridCell.
|
|
9
9
|
*/ export function useMenuGridCell_unstable(props, ref) {
|
|
10
10
|
const { visuallyHidden } = props;
|
|
11
|
-
const validateNestingRef = useValidateNesting('MenuGridCell');
|
|
12
11
|
const { dir } = useFluent();
|
|
13
|
-
const
|
|
12
|
+
const validateNestingRef = useValidateNesting('MenuGridCell');
|
|
14
13
|
const onKeyDownWithPrevent = useEventCallback((event)=>{
|
|
14
|
+
const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;
|
|
15
15
|
if (event.key === CloseArrowKey) {
|
|
16
16
|
event.preventDefault();
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n\n const { dir } = useFluent();\n const validateNestingRef = useValidateNesting('MenuGridCell');\n\n const onKeyDownWithPrevent = useEventCallback((event: React.KeyboardEvent<HTMLElement>) => {\n const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;\n\n if (event.key === CloseArrowKey) {\n event.preventDefault();\n }\n });\n const onKeyDown = useEventCallback(mergeCallbacks(props.onKeyDown, onKeyDownWithPrevent));\n\n return {\n visuallyHidden,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef),\n role: 'gridcell',\n ...props,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowLeft","ArrowRight","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useValidateNesting","useMenuGridCell_unstable","props","ref","visuallyHidden","dir","validateNestingRef","onKeyDownWithPrevent","event","CloseArrowKey","key","preventDefault","onKeyDown","components","root","always","role","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,SAAS,EAAEC,UAAU,QAAQ,0BAA0B;AAChE,SACEC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,wBAAwB,EACxBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;CAEC,GACD,OAAO,SAASC,yBAAyBC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EAAEC,cAAc,EAAE,GAAGF;IAE3B,MAAM,EAAEG,GAAG,EAAE,GAAGb;IAChB,MAAMc,qBAAqBN,mBAAmB;IAE9C,MAAMO,uBAAuBX,iBAAiB,CAACY;QAC7C,MAAMC,gBAAgBJ,QAAQ,QAAQZ,YAAYC;QAElD,IAAIc,MAAME,GAAG,KAAKD,eAAe;YAC/BD,MAAMG,cAAc;QACtB;IACF;IACA,MAAMC,YAAYhB,iBAAiBC,eAAeK,MAAMU,SAAS,EAAEL;IAEnE,OAAO;QACLH;QACAS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMf,KAAKgB,MAAM,CACfjB,yBAAyB,OAAO;YAC9BK,KAAKR,cAAcQ,KAAKG;YACxBU,MAAM;YACN,GAAGd,KAAK;YACRU;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF"}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
4
4
|
export const menuGridCellClassNames = {
|
|
5
5
|
root: 'fui-MenuGridCell'
|
|
6
6
|
};
|
|
7
7
|
const useRootStyles = /*#__PURE__*/__styles({
|
|
8
|
+
root: {
|
|
9
|
+
mc9l5x: "f22iagw",
|
|
10
|
+
Bt984gj: "f122n59",
|
|
11
|
+
B7ck84d: "f1ewtqcl",
|
|
12
|
+
sshi5w: "f1pha7fy"
|
|
13
|
+
},
|
|
8
14
|
visuallyHidden: {
|
|
9
15
|
qhf8xq: "f1euv43f"
|
|
10
16
|
}
|
|
11
17
|
}, {
|
|
12
|
-
d: [".f1euv43f{position:absolute;}"]
|
|
18
|
+
d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1pha7fy{min-height:24px;}", ".f1euv43f{position:absolute;}"]
|
|
13
19
|
});
|
|
14
20
|
export const useMenuGridCellStyles_unstable = state => {
|
|
15
21
|
'use no memo';
|
|
16
22
|
|
|
17
23
|
const rootStyles = useRootStyles();
|
|
18
|
-
state.root.className = mergeClasses(menuGridCellClassNames.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
24
|
+
state.root.className = mergeClasses(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
19
25
|
return state;
|
|
20
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","menuGridCellClassNames","root","useRootStyles","mc9l5x","Bt984gj","B7ck84d","sshi5w","visuallyHidden","qhf8xq","d","useMenuGridCellStyles_unstable","state","rootStyles","className"],"sources":["useMenuGridCellStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const menuGridCellClassNames = {\n root: 'fui-MenuGridCell'\n};\nconst useRootStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n boxSizing: 'border-box',\n minHeight: '24px'\n },\n visuallyHidden: {\n position: 'absolute'\n }\n});\nexport const useMenuGridCellStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,aAAa,gBAAGJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,cAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAUrB,CAAC;AACF,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACnD,aAAa;;EACb,MAAMC,UAAU,GAAGV,aAAa,CAAC,CAAC;EAClCS,KAAK,CAACV,IAAI,CAACY,SAAS,GAAGd,YAAY,CAACC,sBAAsB,CAACC,IAAI,EAAEW,UAAU,CAACX,IAAI,EAAEU,KAAK,CAACJ,cAAc,IAAIK,UAAU,CAACL,cAAc,EAAEI,KAAK,CAACV,IAAI,CAACY,SAAS,CAAC;EAC1J,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
3
3
|
export const menuGridCellClassNames = {
|
|
4
4
|
root: 'fui-MenuGridCell'
|
|
5
5
|
};
|
|
6
6
|
const useRootStyles = makeStyles({
|
|
7
|
+
root: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
minHeight: '24px'
|
|
12
|
+
},
|
|
7
13
|
visuallyHidden: {
|
|
8
14
|
position: 'absolute'
|
|
9
15
|
}
|
|
@@ -11,6 +17,6 @@ const useRootStyles = makeStyles({
|
|
|
11
17
|
export const useMenuGridCellStyles_unstable = (state)=>{
|
|
12
18
|
'use no memo';
|
|
13
19
|
const rootStyles = useRootStyles();
|
|
14
|
-
state.root.className = mergeClasses(menuGridCellClassNames.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
20
|
+
state.root.className = mergeClasses(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
15
21
|
return state;
|
|
16
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCellStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCellStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\nexport const menuGridCellClassNames: SlotClassNames<MenuGridCellSlots> = {\n root: 'fui-MenuGridCell',\n};\n\nconst useRootStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n\n boxSizing: 'border-box',\n minHeight: '24px', // To match small button size\n },\n visuallyHidden: {\n position: 'absolute',\n },\n});\n\nexport const useMenuGridCellStyles_unstable = (state: MenuGridCellState): MenuGridCellState => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n menuGridCellClassNames.root,\n rootStyles.root,\n state.visuallyHidden && rootStyles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","menuGridCellClassNames","root","useRootStyles","display","alignItems","boxSizing","minHeight","visuallyHidden","position","useMenuGridCellStyles_unstable","state","rootStyles","className"],"mappings":"AAAA;AAGA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF,MAAMC,gBAAgBJ,WAAW;IAC/BG,MAAM;QACJE,SAAS;QACTC,YAAY;QAEZC,WAAW;QACXC,WAAW;IACb;IACAC,gBAAgB;QACdC,UAAU;IACZ;AACF;AAEA,OAAO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,aAAaT;IACnBQ,MAAMT,IAAI,CAACW,SAAS,GAAGb,aACrBC,uBAAuBC,IAAI,EAC3BU,WAAWV,IAAI,EACfS,MAAMH,cAAc,IAAII,WAAWJ,cAAc,EACjDG,MAAMT,IAAI,CAACW,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
4
|
export const menuGridItemClassNames = {
|
|
3
5
|
root: 'fui-MenuGridItem',
|
|
4
6
|
icon: 'fui-MenuGridRow__icon',
|
|
@@ -7,9 +9,20 @@ export const menuGridItemClassNames = {
|
|
|
7
9
|
firstSubAction: 'fui-MenuGridRow__firstSubAction',
|
|
8
10
|
secondSubAction: 'fui-MenuGridRow__secondSubAction'
|
|
9
11
|
};
|
|
12
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
13
|
+
content: {
|
|
14
|
+
Bh6795r: "fqerorx"
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
d: [".fqerorx{flex-grow:1;}"]
|
|
18
|
+
});
|
|
10
19
|
export const useMenuGridItemStyles_unstable = state => {
|
|
11
20
|
'use no memo';
|
|
12
21
|
|
|
22
|
+
const rootStyles = useStyles();
|
|
13
23
|
state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);
|
|
24
|
+
if (state.content) {
|
|
25
|
+
state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);
|
|
26
|
+
}
|
|
14
27
|
return state;
|
|
15
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeClasses","menuGridItemClassNames","root","icon","content","subText","firstSubAction","secondSubAction","useMenuGridItemStyles_unstable","state","className"],"sources":["useMenuGridItemStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","menuGridItemClassNames","root","icon","content","subText","firstSubAction","secondSubAction","useStyles","Bh6795r","d","useMenuGridItemStyles_unstable","state","rootStyles","className"],"sources":["useMenuGridItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const menuGridItemClassNames = {\n root: 'fui-MenuGridItem',\n icon: 'fui-MenuGridRow__icon',\n content: 'fui-MenuGridRow__content',\n subText: 'fui-MenuGridRow__subText',\n firstSubAction: 'fui-MenuGridRow__firstSubAction',\n secondSubAction: 'fui-MenuGridRow__secondSubAction'\n};\nconst useStyles = makeStyles({\n content: {\n flexGrow: 1\n }\n});\nexport const useMenuGridItemStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useStyles();\n state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE,kBAAkB;EACxBC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,0BAA0B;EACnCC,OAAO,EAAE,0BAA0B;EACnCC,cAAc,EAAE,iCAAiC;EACjDC,eAAe,EAAE;AACrB,CAAC;AACD,MAAMC,SAAS,gBAAGT,QAAA;EAAAK,OAAA;IAAAK,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAIjB,CAAC;AACF,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACnD,aAAa;;EACb,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;EAC9BI,KAAK,CAACV,IAAI,CAACY,SAAS,GAAGd,YAAY,CAACC,sBAAsB,CAACC,IAAI,EAAEU,KAAK,CAACV,IAAI,CAACY,SAAS,CAAC;EACtF,IAAIF,KAAK,CAACR,OAAO,EAAE;IACfQ,KAAK,CAACR,OAAO,CAACU,SAAS,GAAGd,YAAY,CAACC,sBAAsB,CAACG,OAAO,EAAES,UAAU,CAACT,OAAO,EAAEQ,KAAK,CAACR,OAAO,CAACU,SAAS,CAAC;EACvH;EACA,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import { makeStyles, mergeClasses } from '@griffel/react';
|
|
2
3
|
export const menuGridItemClassNames = {
|
|
3
4
|
root: 'fui-MenuGridItem',
|
|
4
5
|
icon: 'fui-MenuGridRow__icon',
|
|
@@ -7,8 +8,17 @@ export const menuGridItemClassNames = {
|
|
|
7
8
|
firstSubAction: 'fui-MenuGridRow__firstSubAction',
|
|
8
9
|
secondSubAction: 'fui-MenuGridRow__secondSubAction'
|
|
9
10
|
};
|
|
11
|
+
const useStyles = makeStyles({
|
|
12
|
+
content: {
|
|
13
|
+
flexGrow: 1
|
|
14
|
+
}
|
|
15
|
+
});
|
|
10
16
|
export const useMenuGridItemStyles_unstable = (state)=>{
|
|
11
17
|
'use no memo';
|
|
18
|
+
const rootStyles = useStyles();
|
|
12
19
|
state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);
|
|
20
|
+
if (state.content) {
|
|
21
|
+
state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);
|
|
22
|
+
}
|
|
13
23
|
return state;
|
|
14
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItemStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\nexport const menuGridItemClassNames: SlotClassNames<MenuGridItemSlots> = {\n root: 'fui-MenuGridItem',\n icon: 'fui-MenuGridRow__icon',\n content: 'fui-MenuGridRow__content',\n subText: 'fui-MenuGridRow__subText',\n firstSubAction: 'fui-MenuGridRow__firstSubAction',\n secondSubAction: 'fui-MenuGridRow__secondSubAction',\n};\n\nconst useStyles = makeStyles({\n content: {\n flexGrow: 1,\n },\n});\n\nexport const useMenuGridItemStyles_unstable = (state: MenuGridItemState): MenuGridItemState => {\n 'use no memo';\n\n const rootStyles = useStyles();\n\n state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);\n }\n return state;\n};\n"],"names":["makeStyles","mergeClasses","menuGridItemClassNames","root","icon","content","subText","firstSubAction","secondSubAction","useStyles","flexGrow","useMenuGridItemStyles_unstable","state","rootStyles","className"],"mappings":"AAAA;AAGA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG1D,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;IACNC,MAAM;IACNC,SAAS;IACTC,SAAS;IACTC,gBAAgB;IAChBC,iBAAiB;AACnB,EAAE;AAEF,MAAMC,YAAYT,WAAW;IAC3BK,SAAS;QACPK,UAAU;IACZ;AACF;AAEA,OAAO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,aAAaJ;IAEnBG,MAAMT,IAAI,CAACW,SAAS,GAAGb,aAAaC,uBAAuBC,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAErF,IAAIF,MAAMP,OAAO,EAAE;QACjBO,MAAMP,OAAO,CAACS,SAAS,GAAGb,aAAaC,uBAAuBG,OAAO,EAAEQ,WAAWR,OAAO,EAAEO,MAAMP,OAAO,CAACS,SAAS;IACpH;IACA,OAAOF;AACT,EAAE"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { mergeClasses, __resetStyles } from '@griffel/react';
|
|
4
|
+
import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
|
|
5
|
+
import { tokens } from '@fluentui/react-theme';
|
|
6
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
|
2
7
|
export const menuGridRowClassNames = {
|
|
3
8
|
root: 'fui-MenuGridRow'
|
|
4
9
|
};
|
|
10
|
+
// Base styles similar to regular menu item
|
|
11
|
+
// Right now ecludes icon color, hover active style for secondary text
|
|
12
|
+
const useRootBaseStyles = /*#__PURE__*/__resetStyles("r1j5mkl8", "ro8804w", {
|
|
13
|
+
r: [".r1j5mkl8{border-radius:var(--borderRadiusMedium);position:relative;color:var(--colorNeutralForeground2);background-color:var(--colorNeutralBackground1);padding:var(--spacingVerticalXS) var(--spacingVerticalSNudge);box-sizing:border-box;max-width:290px;min-height:32px;flex-shrink:0;display:flex;align-items:start;font-size:var(--fontSizeBase300);cursor:pointer;gap:4px;-webkit-user-select:none;-moz-user-select:none;user-select:none;}", ".r1j5mkl8:focus{outline-style:none;}", ".r1j5mkl8:focus-visible{outline-style:none;}", ".r1j5mkl8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}", ".r1j5mkl8[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}", ".r1j5mkl8:hover{background-color:var(--colorNeutralBackground1Hover);color:var(--colorNeutralForeground2Hover);}", ".r1j5mkl8:hover .fui-Icon-filled{display:inline;}", ".r1j5mkl8:hover .fui-Icon-regular{display:none;}", ".r1j5mkl8:hover:active{background-color:var(--colorNeutralBackground1Pressed);color:var(--colorNeutralForeground2Pressed);}", ".ro8804w{border-radius:var(--borderRadiusMedium);position:relative;color:var(--colorNeutralForeground2);background-color:var(--colorNeutralBackground1);padding:var(--spacingVerticalXS) var(--spacingVerticalSNudge);box-sizing:border-box;max-width:290px;min-height:32px;flex-shrink:0;display:flex;align-items:start;font-size:var(--fontSizeBase300);cursor:pointer;gap:4px;-webkit-user-select:none;-moz-user-select:none;user-select:none;}", ".ro8804w:focus{outline-style:none;}", ".ro8804w:focus-visible{outline-style:none;}", ".ro8804w[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}", ".ro8804w[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}", ".ro8804w:hover{background-color:var(--colorNeutralBackground1Hover);color:var(--colorNeutralForeground2Hover);}", ".ro8804w:hover .fui-Icon-filled{display:inline;}", ".ro8804w:hover .fui-Icon-regular{display:none;}", ".ro8804w:hover:active{background-color:var(--colorNeutralBackground1Pressed);color:var(--colorNeutralForeground2Pressed);}"],
|
|
14
|
+
s: ["@media (forced-colors: active){.r1j5mkl8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}", "@media (forced-colors: active){.r1j5mkl8:hover{background-color:Canvas;border-color:Highlight;color:Highlight;}.r1j5mkl8:focus{outline-style:none;}.r1j5mkl8:focus-visible{outline-style:none;}.r1j5mkl8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}@media (forced-colors: active){.r1j5mkl8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}.r1j5mkl8[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid Highlight;border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}}", "@media (forced-colors: active){.ro8804w[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}", "@media (forced-colors: active){.ro8804w:hover{background-color:Canvas;border-color:Highlight;color:Highlight;}.ro8804w:focus{outline-style:none;}.ro8804w:focus-visible{outline-style:none;}.ro8804w[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}@media (forced-colors: active){.ro8804w[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}.ro8804w[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid Highlight;border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}}"]
|
|
15
|
+
});
|
|
5
16
|
export const useMenuGridRowStyles_unstable = state => {
|
|
6
17
|
'use no memo';
|
|
7
18
|
|
|
8
|
-
|
|
19
|
+
const rootBaseStyles = useRootBaseStyles();
|
|
20
|
+
state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);
|
|
9
21
|
return state;
|
|
10
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeClasses","menuGridRowClassNames","root","useMenuGridRowStyles_unstable","state","className"],"sources":["useMenuGridRowStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["mergeClasses","__resetStyles","iconFilledClassName","iconRegularClassName","tokens","createFocusOutlineStyle","menuGridRowClassNames","root","useRootBaseStyles","r","s","useMenuGridRowStyles_unstable","state","rootBaseStyles","className"],"sources":["useMenuGridRowStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nexport const menuGridRowClassNames = {\n root: 'fui-MenuGridRow'\n};\n// Base styles similar to regular menu item\n// Right now ecludes icon color, hover active style for secondary text\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalSNudge}`,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n },\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'Canvas',\n borderColor: 'Highlight',\n color: 'Highlight'\n },\n ...createFocusOutlineStyle({\n style: {\n outlineColor: 'Highlight'\n }\n })\n }\n});\nexport const useMenuGridRowStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseStyles = useRootBaseStyles();\n state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,YAAY,EAAAC,aAAA,QAAyB,gBAAgB;AAC9D,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,uBAAuB;AACjF,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA,MAAMC,iBAAiB,gBAAGP,aAAA;EAAAQ,CAAA;EAAAC,CAAA;AAAA,CA4CzB,CAAC;AACF,OAAO,MAAMC,6BAA6B,GAAIC,KAAK,IAAG;EAClD,aAAa;;EACb,MAAMC,cAAc,GAAGL,iBAAiB,CAAC,CAAC;EAC1CI,KAAK,CAACL,IAAI,CAACO,SAAS,GAAGd,YAAY,CAACM,qBAAqB,CAACC,IAAI,EAAEM,cAAc,EAAED,KAAK,CAACL,IAAI,CAACO,SAAS,CAAC;EACrG,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses, makeResetStyles } from '@griffel/react';
|
|
3
|
+
import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
|
|
4
|
+
import { tokens } from '@fluentui/react-theme';
|
|
5
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
|
2
6
|
export const menuGridRowClassNames = {
|
|
3
7
|
root: 'fui-MenuGridRow'
|
|
4
8
|
};
|
|
9
|
+
// Base styles similar to regular menu item
|
|
10
|
+
// Right now ecludes icon color, hover active style for secondary text
|
|
11
|
+
const useRootBaseStyles = makeResetStyles({
|
|
12
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
13
|
+
position: 'relative',
|
|
14
|
+
color: tokens.colorNeutralForeground2,
|
|
15
|
+
backgroundColor: tokens.colorNeutralBackground1,
|
|
16
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalSNudge}`,
|
|
17
|
+
boxSizing: 'border-box',
|
|
18
|
+
maxWidth: '290px',
|
|
19
|
+
minHeight: '32px',
|
|
20
|
+
flexShrink: 0,
|
|
21
|
+
display: 'flex',
|
|
22
|
+
alignItems: 'start',
|
|
23
|
+
fontSize: tokens.fontSizeBase300,
|
|
24
|
+
cursor: 'pointer',
|
|
25
|
+
gap: '4px',
|
|
26
|
+
userSelect: 'none',
|
|
27
|
+
...createFocusOutlineStyle(),
|
|
28
|
+
':hover': {
|
|
29
|
+
backgroundColor: tokens.colorNeutralBackground1Hover,
|
|
30
|
+
color: tokens.colorNeutralForeground2Hover,
|
|
31
|
+
[`& .${iconFilledClassName}`]: {
|
|
32
|
+
display: 'inline'
|
|
33
|
+
},
|
|
34
|
+
[`& .${iconRegularClassName}`]: {
|
|
35
|
+
display: 'none'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
':hover:active': {
|
|
39
|
+
backgroundColor: tokens.colorNeutralBackground1Pressed,
|
|
40
|
+
color: tokens.colorNeutralForeground2Pressed
|
|
41
|
+
},
|
|
42
|
+
// High contrast styles
|
|
43
|
+
'@media (forced-colors: active)': {
|
|
44
|
+
':hover': {
|
|
45
|
+
backgroundColor: 'Canvas',
|
|
46
|
+
borderColor: 'Highlight',
|
|
47
|
+
color: 'Highlight'
|
|
48
|
+
},
|
|
49
|
+
...createFocusOutlineStyle({
|
|
50
|
+
style: {
|
|
51
|
+
outlineColor: 'Highlight'
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
});
|
|
5
56
|
export const useMenuGridRowStyles_unstable = (state)=>{
|
|
6
57
|
'use no memo';
|
|
7
|
-
|
|
58
|
+
const rootBaseStyles = useRootBaseStyles();
|
|
59
|
+
state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);
|
|
8
60
|
return state;
|
|
9
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRowStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRowStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport type { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const menuGridRowClassNames: SlotClassNames<MenuGridRowSlots> = {\n root: 'fui-MenuGridRow',\n};\n\n// Base styles similar to regular menu item\n// Right now ecludes icon color, hover active style for secondary text\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalSNudge}`,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'Canvas',\n borderColor: 'Highlight',\n color: 'Highlight',\n },\n ...createFocusOutlineStyle({ style: { outlineColor: 'Highlight' } }),\n },\n});\n\nexport const useMenuGridRowStyles_unstable = (state: MenuGridRowState): MenuGridRowState => {\n 'use no memo';\n\n const rootBaseStyles = useRootBaseStyles();\n state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);\n\n return state;\n};\n"],"names":["mergeClasses","makeResetStyles","iconFilledClassName","iconRegularClassName","tokens","createFocusOutlineStyle","menuGridRowClassNames","root","useRootBaseStyles","borderRadius","borderRadiusMedium","position","color","colorNeutralForeground2","backgroundColor","colorNeutralBackground1","padding","spacingVerticalXS","spacingVerticalSNudge","boxSizing","maxWidth","minHeight","flexShrink","display","alignItems","fontSize","fontSizeBase300","cursor","gap","userSelect","colorNeutralBackground1Hover","colorNeutralForeground2Hover","colorNeutralBackground1Pressed","colorNeutralForeground2Pressed","borderColor","style","outlineColor","useMenuGridRowStyles_unstable","state","rootBaseStyles","className"],"mappings":"AAAA;AAGA,SAASA,YAAY,EAAEC,eAAe,QAAQ,iBAAiB;AAC/D,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,wBAAwB;AAElF,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAElE,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;AACR,EAAE;AAEF,2CAA2C;AAC3C,sEAAsE;AACtE,MAAMC,oBAAoBP,gBAAgB;IACxCQ,cAAcL,OAAOM,kBAAkB;IACvCC,UAAU;IACVC,OAAOR,OAAOS,uBAAuB;IACrCC,iBAAiBV,OAAOW,uBAAuB;IAC/CC,SAAS,GAAGZ,OAAOa,iBAAiB,CAAC,CAAC,EAAEb,OAAOc,qBAAqB,EAAE;IACtEC,WAAW;IACXC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,UAAUrB,OAAOsB,eAAe;IAChCC,QAAQ;IACRC,KAAK;IACLC,YAAY;IACZ,GAAGxB,yBAAyB;IAE5B,UAAU;QACRS,iBAAiBV,OAAO0B,4BAA4B;QACpDlB,OAAOR,OAAO2B,4BAA4B;QAE1C,CAAC,CAAC,GAAG,EAAE7B,qBAAqB,CAAC,EAAE;YAC7BqB,SAAS;QACX;QACA,CAAC,CAAC,GAAG,EAAEpB,sBAAsB,CAAC,EAAE;YAC9BoB,SAAS;QACX;IACF;IAEA,iBAAiB;QACfT,iBAAiBV,OAAO4B,8BAA8B;QACtDpB,OAAOR,OAAO6B,8BAA8B;IAC9C;IAEA,uBAAuB;IACvB,kCAAkC;QAChC,UAAU;YACRnB,iBAAiB;YACjBoB,aAAa;YACbtB,OAAO;QACT;QACA,GAAGP,wBAAwB;YAAE8B,OAAO;gBAAEC,cAAc;YAAY;QAAE,EAAE;IACtE;AACF;AAEA,OAAO,MAAMC,gCAAgC,CAACC;IAC5C;IAEA,MAAMC,iBAAiB/B;IACvB8B,MAAM/B,IAAI,CAACiC,SAAS,GAAGxC,aAAaM,sBAAsBC,IAAI,EAAEgC,gBAAgBD,MAAM/B,IAAI,CAACiC,SAAS;IAEpG,OAAOF;AACT,EAAE"}
|
|
@@ -17,10 +17,10 @@ const _reactutilities = require("@fluentui/react-utilities");
|
|
|
17
17
|
const _useValidateNesting = require("../../utils/useValidateNesting");
|
|
18
18
|
function useMenuGridCell_unstable(props, ref) {
|
|
19
19
|
const { visuallyHidden } = props;
|
|
20
|
-
const validateNestingRef = (0, _useValidateNesting.useValidateNesting)('MenuGridCell');
|
|
21
20
|
const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
22
|
-
const
|
|
21
|
+
const validateNestingRef = (0, _useValidateNesting.useValidateNesting)('MenuGridCell');
|
|
23
22
|
const onKeyDownWithPrevent = (0, _reactutilities.useEventCallback)((event)=>{
|
|
23
|
+
const CloseArrowKey = dir === 'ltr' ? _keyboardkeys.ArrowLeft : _keyboardkeys.ArrowRight;
|
|
24
24
|
if (event.key === CloseArrowKey) {
|
|
25
25
|
event.preventDefault();
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\nimport { MenuGridCellProps, MenuGridCellState } from './MenuGridCell.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridCell.\n */\nexport function useMenuGridCell_unstable(props: MenuGridCellProps, ref: React.Ref<HTMLDivElement>): MenuGridCellState {\n const { visuallyHidden } = props;\n\n const { dir } = useFluent();\n const validateNestingRef = useValidateNesting('MenuGridCell');\n\n const onKeyDownWithPrevent = useEventCallback((event: React.KeyboardEvent<HTMLElement>) => {\n const CloseArrowKey = dir === 'ltr' ? ArrowLeft : ArrowRight;\n\n if (event.key === CloseArrowKey) {\n event.preventDefault();\n }\n });\n const onKeyDown = useEventCallback(mergeCallbacks(props.onKeyDown, onKeyDownWithPrevent));\n\n return {\n visuallyHidden,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef),\n role: 'gridcell',\n ...props,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","ArrowLeft","ArrowRight","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useValidateNesting","useMenuGridCell_unstable","props","ref","visuallyHidden","dir","validateNestingRef","onKeyDownWithPrevent","event","CloseArrowKey","key","preventDefault","onKeyDown","components","root","always","role","elementType"],"mappings":"AAAA;;;;;+BAkBgBW;;;;;;;iEAhBO,QAAQ;qCACiB,kCAAkC;8BAC5C,0BAA0B;gCAOzD,4BAA4B;oCAEA,iCAAiC;AAK7D,kCAAkCC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EAAEC,cAAc,EAAE,GAAGF;IAE3B,MAAM,EAAEG,GAAG,EAAE,OAAGb,uCAAAA;IAChB,MAAMc,qBAAqBN,0CAAAA,EAAmB;IAE9C,MAAMO,2BAAuBX,gCAAAA,EAAiB,CAACY;QAC7C,MAAMC,gBAAgBJ,QAAQ,QAAQZ,uBAAAA,GAAYC,wBAAAA;QAElD,IAAIc,MAAME,GAAG,KAAKD,eAAe;YAC/BD,MAAMG,cAAc;QACtB;IACF;IACA,MAAMC,gBAAYhB,gCAAAA,MAAiBC,8BAAAA,EAAeK,MAAMU,SAAS,EAAEL;IAEnE,OAAO;QACLH;QACAS,YAAY;YACVC,MAAM;QACR;QACAA,MAAMf,oBAAAA,CAAKgB,MAAM,KACfjB,wCAAAA,EAAyB,OAAO;YAC9BK,SAAKR,6BAAAA,EAAcQ,KAAKG;YACxBU,MAAM;YACN,GAAGd,KAAK;YACRU;QACF,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF"}
|
|
@@ -22,17 +22,27 @@ const menuGridCellClassNames = {
|
|
|
22
22
|
root: 'fui-MenuGridCell'
|
|
23
23
|
};
|
|
24
24
|
const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
25
|
+
root: {
|
|
26
|
+
mc9l5x: "f22iagw",
|
|
27
|
+
Bt984gj: "f122n59",
|
|
28
|
+
B7ck84d: "f1ewtqcl",
|
|
29
|
+
sshi5w: "f1pha7fy"
|
|
30
|
+
},
|
|
25
31
|
visuallyHidden: {
|
|
26
32
|
qhf8xq: "f1euv43f"
|
|
27
33
|
}
|
|
28
34
|
}, {
|
|
29
35
|
d: [
|
|
36
|
+
".f22iagw{display:flex;}",
|
|
37
|
+
".f122n59{align-items:center;}",
|
|
38
|
+
".f1ewtqcl{box-sizing:border-box;}",
|
|
39
|
+
".f1pha7fy{min-height:24px;}",
|
|
30
40
|
".f1euv43f{position:absolute;}"
|
|
31
41
|
]
|
|
32
42
|
});
|
|
33
43
|
const useMenuGridCellStyles_unstable = (state)=>{
|
|
34
44
|
'use no memo';
|
|
35
45
|
const rootStyles = useRootStyles();
|
|
36
|
-
state.root.className = (0, _react.mergeClasses)(menuGridCellClassNames.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
46
|
+
state.root.className = (0, _react.mergeClasses)(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
37
47
|
return state;
|
|
38
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMenuGridCellStyles.styles.js"],"sourcesContent":["'use client';\nimport {
|
|
1
|
+
{"version":3,"sources":["useMenuGridCellStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const menuGridCellClassNames = {\n root: 'fui-MenuGridCell'\n};\nconst useRootStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n boxSizing: 'border-box',\n minHeight: '24px'\n },\n visuallyHidden: {\n position: 'absolute'\n }\n});\nexport const useMenuGridCellStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","menuGridCellClassNames","root","useRootStyles","mc9l5x","Bt984gj","B7ck84d","sshi5w","visuallyHidden","qhf8xq","d","useMenuGridCellStyles_unstable","state","rootStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,sBAAsB;;;kCAcQ;eAA9BU;;;uBAf4B,gBAAgB;AAClD,+BAA+B;IAClCT,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,aAAa,GAAA,WAAA,OAAGJ,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAE,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,cAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAUrB,CAAC;AACK,wCAAwCE,KAAK,IAAG;IACnD,aAAa;IACb,MAAMC,UAAU,GAAGV,aAAa,CAAC,CAAC;IAClCS,KAAK,CAACV,IAAI,CAACY,SAAS,OAAGd,mBAAY,EAACC,sBAAsB,CAACC,IAAI,EAAEW,UAAU,CAACX,IAAI,EAAEU,KAAK,CAACJ,cAAc,IAAIK,UAAU,CAACL,cAAc,EAAEI,KAAK,CAACV,IAAI,CAACY,SAAS,CAAC;IAC1J,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -22,6 +22,12 @@ const menuGridCellClassNames = {
|
|
|
22
22
|
root: 'fui-MenuGridCell'
|
|
23
23
|
};
|
|
24
24
|
const useRootStyles = (0, _react.makeStyles)({
|
|
25
|
+
root: {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
boxSizing: 'border-box',
|
|
29
|
+
minHeight: '24px'
|
|
30
|
+
},
|
|
25
31
|
visuallyHidden: {
|
|
26
32
|
position: 'absolute'
|
|
27
33
|
}
|
|
@@ -29,6 +35,6 @@ const useRootStyles = (0, _react.makeStyles)({
|
|
|
29
35
|
const useMenuGridCellStyles_unstable = (state)=>{
|
|
30
36
|
'use no memo';
|
|
31
37
|
const rootStyles = useRootStyles();
|
|
32
|
-
state.root.className = (0, _react.mergeClasses)(menuGridCellClassNames.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
38
|
+
state.root.className = (0, _react.mergeClasses)(menuGridCellClassNames.root, rootStyles.root, state.visuallyHidden && rootStyles.visuallyHidden, state.root.className);
|
|
33
39
|
return state;
|
|
34
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCellStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCellStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\nexport const menuGridCellClassNames: SlotClassNames<MenuGridCellSlots> = {\n root: 'fui-MenuGridCell',\n};\n\nconst useRootStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n\n boxSizing: 'border-box',\n minHeight: '24px', // To match small button size\n },\n visuallyHidden: {\n position: 'absolute',\n },\n});\n\nexport const useMenuGridCellStyles_unstable = (state: MenuGridCellState): MenuGridCellState => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n menuGridCellClassNames.root,\n rootStyles.root,\n state.visuallyHidden && rootStyles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","menuGridCellClassNames","root","useRootStyles","display","alignItems","boxSizing","minHeight","visuallyHidden","position","useMenuGridCellStyles_unstable","state","rootStyles","className"],"mappings":"AAAA;;;;;;;;;;;;IAMaE,sBAAAA;;;IAiBAS,8BAAAA;;;;uBApB4B,iBAAiB;AAGnD,+BAAkE;IACvER,MAAM;AACR,EAAE;AAEF,MAAMC,oBAAgBJ,iBAAAA,EAAW;IAC/BG,MAAM;QACJE,SAAS;QACTC,YAAY;QAEZC,WAAW;QACXC,WAAW;IACb;IACAC,gBAAgB;QACdC,UAAU;IACZ;AACF;AAEO,uCAAuC,CAACE;IAC7C;IAEA,MAAMC,aAAaT;IACnBQ,MAAMT,IAAI,CAACW,SAAS,OAAGb,mBAAAA,EACrBC,uBAAuBC,IAAI,EAC3BU,WAAWV,IAAI,EACfS,MAAMH,cAAc,IAAII,WAAWJ,cAAc,EACjDG,MAAMT,IAAI,CAACW,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -25,8 +26,21 @@ const menuGridItemClassNames = {
|
|
|
25
26
|
firstSubAction: 'fui-MenuGridRow__firstSubAction',
|
|
26
27
|
secondSubAction: 'fui-MenuGridRow__secondSubAction'
|
|
27
28
|
};
|
|
29
|
+
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
30
|
+
content: {
|
|
31
|
+
Bh6795r: "fqerorx"
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
d: [
|
|
35
|
+
".fqerorx{flex-grow:1;}"
|
|
36
|
+
]
|
|
37
|
+
});
|
|
28
38
|
const useMenuGridItemStyles_unstable = (state)=>{
|
|
29
39
|
'use no memo';
|
|
40
|
+
const rootStyles = useStyles();
|
|
30
41
|
state.root.className = (0, _react.mergeClasses)(menuGridItemClassNames.root, state.root.className);
|
|
42
|
+
if (state.content) {
|
|
43
|
+
state.content.className = (0, _react.mergeClasses)(menuGridItemClassNames.content, rootStyles.content, state.content.className);
|
|
44
|
+
}
|
|
31
45
|
return state;
|
|
32
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMenuGridItemStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["useMenuGridItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const menuGridItemClassNames = {\n root: 'fui-MenuGridItem',\n icon: 'fui-MenuGridRow__icon',\n content: 'fui-MenuGridRow__content',\n subText: 'fui-MenuGridRow__subText',\n firstSubAction: 'fui-MenuGridRow__firstSubAction',\n secondSubAction: 'fui-MenuGridRow__secondSubAction'\n};\nconst useStyles = makeStyles({\n content: {\n flexGrow: 1\n }\n});\nexport const useMenuGridItemStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useStyles();\n state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);\n if (state.content) {\n state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","menuGridItemClassNames","root","icon","content","subText","firstSubAction","secondSubAction","useStyles","Bh6795r","d","useMenuGridItemStyles_unstable","state","rootStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,sBAAsB;;;kCAaQ;;;;uBAdF,gBAAgB;AAClD,+BAA+B;IAClCC,IAAI,EAAE,kBAAkB;IACxBC,IAAI,EAAE,uBAAuB;IAC7BC,OAAO,EAAE,0BAA0B;IACnCC,OAAO,EAAE,0BAA0B;IACnCC,cAAc,EAAE,iCAAiC;IACjDC,eAAe,EAAE;AACrB,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGT,eAAA,EAAA;IAAAK,OAAA,EAAA;QAAAK,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAIjB,CAAC;AACK,MAAMC,kCAAkCC,KAAK,IAAG;IACnD,aAAa;IACb,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;IAC9BI,KAAK,CAACV,IAAI,CAACY,SAAS,OAAGd,mBAAY,EAACC,sBAAsB,CAACC,IAAI,EAAEU,KAAK,CAACV,IAAI,CAACY,SAAS,CAAC;IACtF,IAAIF,KAAK,CAACR,OAAO,EAAE;QACfQ,KAAK,CAACR,OAAO,CAACU,SAAS,OAAGd,mBAAY,EAACC,sBAAsB,CAACG,OAAO,EAAES,UAAU,CAACT,OAAO,EAAEQ,KAAK,CAACR,OAAO,CAACU,SAAS,CAAC;IACvH;IACA,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -25,8 +26,17 @@ const menuGridItemClassNames = {
|
|
|
25
26
|
firstSubAction: 'fui-MenuGridRow__firstSubAction',
|
|
26
27
|
secondSubAction: 'fui-MenuGridRow__secondSubAction'
|
|
27
28
|
};
|
|
29
|
+
const useStyles = (0, _react.makeStyles)({
|
|
30
|
+
content: {
|
|
31
|
+
flexGrow: 1
|
|
32
|
+
}
|
|
33
|
+
});
|
|
28
34
|
const useMenuGridItemStyles_unstable = (state)=>{
|
|
29
35
|
'use no memo';
|
|
36
|
+
const rootStyles = useStyles();
|
|
30
37
|
state.root.className = (0, _react.mergeClasses)(menuGridItemClassNames.root, state.root.className);
|
|
38
|
+
if (state.content) {
|
|
39
|
+
state.content.className = (0, _react.mergeClasses)(menuGridItemClassNames.content, rootStyles.content, state.content.className);
|
|
40
|
+
}
|
|
31
41
|
return state;
|
|
32
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItemStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\nexport const menuGridItemClassNames: SlotClassNames<MenuGridItemSlots> = {\n root: 'fui-MenuGridItem',\n icon: 'fui-MenuGridRow__icon',\n content: 'fui-MenuGridRow__content',\n subText: 'fui-MenuGridRow__subText',\n firstSubAction: 'fui-MenuGridRow__firstSubAction',\n secondSubAction: 'fui-MenuGridRow__secondSubAction',\n};\n\nconst useStyles = makeStyles({\n content: {\n flexGrow: 1,\n },\n});\n\nexport const useMenuGridItemStyles_unstable = (state: MenuGridItemState): MenuGridItemState => {\n 'use no memo';\n\n const rootStyles = useStyles();\n\n state.root.className = mergeClasses(menuGridItemClassNames.root, state.root.className);\n\n if (state.content) {\n state.content.className = mergeClasses(menuGridItemClassNames.content, rootStyles.content, state.content.className);\n }\n return state;\n};\n"],"names":["makeStyles","mergeClasses","menuGridItemClassNames","root","icon","content","subText","firstSubAction","secondSubAction","useStyles","flexGrow","useMenuGridItemStyles_unstable","state","rootStyles","className"],"mappings":"AAAA;;;;;;;;;;;;IAMaE,sBAAAA;;;kCAeAS;;;;uBAlB4B,iBAAiB;AAGnD,+BAAkE;IACvER,MAAM;IACNC,MAAM;IACNC,SAAS;IACTC,SAAS;IACTC,gBAAgB;IAChBC,iBAAiB;AACnB,EAAE;AAEF,MAAMC,gBAAYT,iBAAAA,EAAW;IAC3BK,SAAS;QACPK,UAAU;IACZ;AACF;AAEO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,aAAaJ;IAEnBG,MAAMT,IAAI,CAACW,SAAS,GAAGb,uBAAAA,EAAaC,uBAAuBC,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAErF,IAAIF,MAAMP,OAAO,EAAE;QACjBO,MAAMP,OAAO,CAACS,SAAS,OAAGb,mBAAAA,EAAaC,uBAAuBG,OAAO,EAAEQ,WAAWR,OAAO,EAAEO,MAAMP,OAAO,CAACS,SAAS;IACpH;IACA,OAAOF;AACT,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -20,8 +21,39 @@ const _react = require("@griffel/react");
|
|
|
20
21
|
const menuGridRowClassNames = {
|
|
21
22
|
root: 'fui-MenuGridRow'
|
|
22
23
|
};
|
|
24
|
+
// Base styles similar to regular menu item
|
|
25
|
+
// Right now ecludes icon color, hover active style for secondary text
|
|
26
|
+
const useRootBaseStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r1j5mkl8", "ro8804w", {
|
|
27
|
+
r: [
|
|
28
|
+
".r1j5mkl8{border-radius:var(--borderRadiusMedium);position:relative;color:var(--colorNeutralForeground2);background-color:var(--colorNeutralBackground1);padding:var(--spacingVerticalXS) var(--spacingVerticalSNudge);box-sizing:border-box;max-width:290px;min-height:32px;flex-shrink:0;display:flex;align-items:start;font-size:var(--fontSizeBase300);cursor:pointer;gap:4px;-webkit-user-select:none;-moz-user-select:none;user-select:none;}",
|
|
29
|
+
".r1j5mkl8:focus{outline-style:none;}",
|
|
30
|
+
".r1j5mkl8:focus-visible{outline-style:none;}",
|
|
31
|
+
".r1j5mkl8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
|
|
32
|
+
".r1j5mkl8[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
|
|
33
|
+
".r1j5mkl8:hover{background-color:var(--colorNeutralBackground1Hover);color:var(--colorNeutralForeground2Hover);}",
|
|
34
|
+
".r1j5mkl8:hover .fui-Icon-filled{display:inline;}",
|
|
35
|
+
".r1j5mkl8:hover .fui-Icon-regular{display:none;}",
|
|
36
|
+
".r1j5mkl8:hover:active{background-color:var(--colorNeutralBackground1Pressed);color:var(--colorNeutralForeground2Pressed);}",
|
|
37
|
+
".ro8804w{border-radius:var(--borderRadiusMedium);position:relative;color:var(--colorNeutralForeground2);background-color:var(--colorNeutralBackground1);padding:var(--spacingVerticalXS) var(--spacingVerticalSNudge);box-sizing:border-box;max-width:290px;min-height:32px;flex-shrink:0;display:flex;align-items:start;font-size:var(--fontSizeBase300);cursor:pointer;gap:4px;-webkit-user-select:none;-moz-user-select:none;user-select:none;}",
|
|
38
|
+
".ro8804w:focus{outline-style:none;}",
|
|
39
|
+
".ro8804w:focus-visible{outline-style:none;}",
|
|
40
|
+
".ro8804w[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
|
|
41
|
+
".ro8804w[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}",
|
|
42
|
+
".ro8804w:hover{background-color:var(--colorNeutralBackground1Hover);color:var(--colorNeutralForeground2Hover);}",
|
|
43
|
+
".ro8804w:hover .fui-Icon-filled{display:inline;}",
|
|
44
|
+
".ro8804w:hover .fui-Icon-regular{display:none;}",
|
|
45
|
+
".ro8804w:hover:active{background-color:var(--colorNeutralBackground1Pressed);color:var(--colorNeutralForeground2Pressed);}"
|
|
46
|
+
],
|
|
47
|
+
s: [
|
|
48
|
+
"@media (forced-colors: active){.r1j5mkl8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}",
|
|
49
|
+
"@media (forced-colors: active){.r1j5mkl8:hover{background-color:Canvas;border-color:Highlight;color:Highlight;}.r1j5mkl8:focus{outline-style:none;}.r1j5mkl8:focus-visible{outline-style:none;}.r1j5mkl8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}@media (forced-colors: active){.r1j5mkl8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}.r1j5mkl8[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid Highlight;border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}}",
|
|
50
|
+
"@media (forced-colors: active){.ro8804w[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}",
|
|
51
|
+
"@media (forced-colors: active){.ro8804w:hover{background-color:Canvas;border-color:Highlight;color:Highlight;}.ro8804w:focus{outline-style:none;}.ro8804w:focus-visible{outline-style:none;}.ro8804w[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}@media (forced-colors: active){.ro8804w[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}.ro8804w[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid Highlight;border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}}"
|
|
52
|
+
]
|
|
53
|
+
});
|
|
23
54
|
const useMenuGridRowStyles_unstable = (state)=>{
|
|
24
55
|
'use no memo';
|
|
25
|
-
|
|
56
|
+
const rootBaseStyles = useRootBaseStyles();
|
|
57
|
+
state.root.className = (0, _react.mergeClasses)(menuGridRowClassNames.root, rootBaseStyles, state.root.className);
|
|
26
58
|
return state;
|
|
27
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMenuGridRowStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["useMenuGridRowStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nexport const menuGridRowClassNames = {\n root: 'fui-MenuGridRow'\n};\n// Base styles similar to regular menu item\n// Right now ecludes icon color, hover active style for secondary text\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalSNudge}`,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n },\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'Canvas',\n borderColor: 'Highlight',\n color: 'Highlight'\n },\n ...createFocusOutlineStyle({\n style: {\n outlineColor: 'Highlight'\n }\n })\n }\n});\nexport const useMenuGridRowStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseStyles = useRootBaseStyles();\n state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);\n return state;\n};\n"],"names":["mergeClasses","__resetStyles","iconFilledClassName","iconRegularClassName","tokens","createFocusOutlineStyle","menuGridRowClassNames","root","useRootBaseStyles","r","s","useMenuGridRowStyles_unstable","state","rootBaseStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKCM,qBAAqB;;;iCAkDQ;eAA7BK;;;uBAtDiC,gBAAgB;AAIvD,8BAA8B;IACjCJ,IAAI,EAAE;AACV,CAAC;AACD,2CAAA;AACA,sEAAA;AACA,MAAMC,iBAAiB,GAAA,WAAA,OAAGP,oBAAA,EAAA,YAAA,WAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CA4CzB,CAAC;AACK,uCAAuCE,KAAK,IAAG;IAClD,aAAa;IACb,MAAMC,cAAc,GAAGL,iBAAiB,CAAC,CAAC;IAC1CI,KAAK,CAACL,IAAI,CAACO,SAAS,OAAGd,mBAAY,EAACM,qBAAqB,CAACC,IAAI,EAAEM,cAAc,EAAED,KAAK,CAACL,IAAI,CAACO,SAAS,CAAC;IACrG,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -17,11 +18,62 @@ _export(exports, {
|
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
20
|
const _react = require("@griffel/react");
|
|
21
|
+
const _reacticons = require("@fluentui/react-icons");
|
|
22
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
23
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
20
24
|
const menuGridRowClassNames = {
|
|
21
25
|
root: 'fui-MenuGridRow'
|
|
22
26
|
};
|
|
27
|
+
// Base styles similar to regular menu item
|
|
28
|
+
// Right now ecludes icon color, hover active style for secondary text
|
|
29
|
+
const useRootBaseStyles = (0, _react.makeResetStyles)({
|
|
30
|
+
borderRadius: _reacttheme.tokens.borderRadiusMedium,
|
|
31
|
+
position: 'relative',
|
|
32
|
+
color: _reacttheme.tokens.colorNeutralForeground2,
|
|
33
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
|
|
34
|
+
padding: `${_reacttheme.tokens.spacingVerticalXS} ${_reacttheme.tokens.spacingVerticalSNudge}`,
|
|
35
|
+
boxSizing: 'border-box',
|
|
36
|
+
maxWidth: '290px',
|
|
37
|
+
minHeight: '32px',
|
|
38
|
+
flexShrink: 0,
|
|
39
|
+
display: 'flex',
|
|
40
|
+
alignItems: 'start',
|
|
41
|
+
fontSize: _reacttheme.tokens.fontSizeBase300,
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
gap: '4px',
|
|
44
|
+
userSelect: 'none',
|
|
45
|
+
...(0, _reacttabster.createFocusOutlineStyle)(),
|
|
46
|
+
':hover': {
|
|
47
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1Hover,
|
|
48
|
+
color: _reacttheme.tokens.colorNeutralForeground2Hover,
|
|
49
|
+
[`& .${_reacticons.iconFilledClassName}`]: {
|
|
50
|
+
display: 'inline'
|
|
51
|
+
},
|
|
52
|
+
[`& .${_reacticons.iconRegularClassName}`]: {
|
|
53
|
+
display: 'none'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
':hover:active': {
|
|
57
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1Pressed,
|
|
58
|
+
color: _reacttheme.tokens.colorNeutralForeground2Pressed
|
|
59
|
+
},
|
|
60
|
+
// High contrast styles
|
|
61
|
+
'@media (forced-colors: active)': {
|
|
62
|
+
':hover': {
|
|
63
|
+
backgroundColor: 'Canvas',
|
|
64
|
+
borderColor: 'Highlight',
|
|
65
|
+
color: 'Highlight'
|
|
66
|
+
},
|
|
67
|
+
...(0, _reacttabster.createFocusOutlineStyle)({
|
|
68
|
+
style: {
|
|
69
|
+
outlineColor: 'Highlight'
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
});
|
|
23
74
|
const useMenuGridRowStyles_unstable = (state)=>{
|
|
24
75
|
'use no memo';
|
|
25
|
-
|
|
76
|
+
const rootBaseStyles = useRootBaseStyles();
|
|
77
|
+
state.root.className = (0, _react.mergeClasses)(menuGridRowClassNames.root, rootBaseStyles, state.root.className);
|
|
26
78
|
return state;
|
|
27
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRowStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRowStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport type { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const menuGridRowClassNames: SlotClassNames<MenuGridRowSlots> = {\n root: 'fui-MenuGridRow',\n};\n\n// Base styles similar to regular menu item\n// Right now ecludes icon color, hover active style for secondary text\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalSNudge}`,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'Canvas',\n borderColor: 'Highlight',\n color: 'Highlight',\n },\n ...createFocusOutlineStyle({ style: { outlineColor: 'Highlight' } }),\n },\n});\n\nexport const useMenuGridRowStyles_unstable = (state: MenuGridRowState): MenuGridRowState => {\n 'use no memo';\n\n const rootBaseStyles = useRootBaseStyles();\n state.root.className = mergeClasses(menuGridRowClassNames.root, rootBaseStyles, state.root.className);\n\n return state;\n};\n"],"names":["mergeClasses","makeResetStyles","iconFilledClassName","iconRegularClassName","tokens","createFocusOutlineStyle","menuGridRowClassNames","root","useRootBaseStyles","borderRadius","borderRadiusMedium","position","color","colorNeutralForeground2","backgroundColor","colorNeutralBackground1","padding","spacingVerticalXS","spacingVerticalSNudge","boxSizing","maxWidth","minHeight","flexShrink","display","alignItems","fontSize","fontSizeBase300","cursor","gap","userSelect","colorNeutralBackground1Hover","colorNeutralForeground2Hover","colorNeutralBackground1Pressed","colorNeutralForeground2Pressed","borderColor","style","outlineColor","useMenuGridRowStyles_unstable","state","rootBaseStyles","className"],"mappings":"AAAA;;;;;;;;;;;;IASaM,qBAAAA;;;iCAoDA+B;eAAAA;;;uBA1DiC,iBAAiB;4BACL,wBAAwB;4BAE3D,wBAAwB;8BACP,0BAA0B;AAE3D,8BAAgE;IACrE9B,MAAM;AACR,EAAE;AAEF,2CAA2C;AAC3C,sEAAsE;AACtE,MAAMC,wBAAoBP,sBAAAA,EAAgB;IACxCQ,cAAcL,kBAAAA,CAAOM,kBAAkB;IACvCC,UAAU;IACVC,OAAOR,kBAAAA,CAAOS,uBAAuB;IACrCC,iBAAiBV,kBAAAA,CAAOW,uBAAuB;IAC/CC,SAAS,GAAGZ,kBAAAA,CAAOa,iBAAiB,CAAC,CAAC,EAAEb,kBAAAA,CAAOc,qBAAqB,EAAE;IACtEC,WAAW;IACXC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,UAAUrB,kBAAAA,CAAOsB,eAAe;IAChCC,QAAQ;IACRC,KAAK;IACLC,YAAY;IACZ,OAAGxB,qCAAAA,GAAyB;IAE5B,UAAU;QACRS,iBAAiBV,kBAAAA,CAAO0B,4BAA4B;QACpDlB,OAAOR,kBAAAA,CAAO2B,4BAA4B;QAE1C,CAAC,CAAC,GAAG,EAAE7B,+BAAAA,EAAqB,CAAC,EAAE;YAC7BqB,SAAS;QACX;QACA,CAAC,CAAC,GAAG,EAAEpB,gCAAAA,EAAsB,CAAC,EAAE;YAC9BoB,SAAS;QACX;IACF;IAEA,iBAAiB;QACfT,iBAAiBV,kBAAAA,CAAO4B,8BAA8B;QACtDpB,OAAOR,kBAAAA,CAAO6B,8BAA8B;IAC9C;IAEA,uBAAuB;IACvB,kCAAkC;QAChC,UAAU;YACRnB,iBAAiB;YACjBoB,aAAa;YACbtB,OAAO;QACT;QACA,OAAGP,qCAAAA,EAAwB;YAAE8B,OAAO;gBAAEC,cAAc;YAAY;QAAE,EAAE;IACtE;AACF;AAEO,sCAAsC,CAACE;IAC5C;IAEA,MAAMC,iBAAiB/B;IACvB8B,MAAM/B,IAAI,CAACiC,SAAS,OAAGxC,mBAAAA,EAAaM,sBAAsBC,IAAI,EAAEgC,gBAAgBD,MAAM/B,IAAI,CAACiC,SAAS;IAEpG,OAAOF;AACT,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-menu-grid-preview",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "New fluentui react package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -25,13 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fluentui/keyboard-keys": "^9.0.8",
|
|
28
|
-
"@fluentui/react-menu": "^9.20.
|
|
29
|
-
"@fluentui/react-
|
|
30
|
-
"@fluentui/react-
|
|
31
|
-
"@fluentui/react-
|
|
28
|
+
"@fluentui/react-menu": "^9.20.3",
|
|
29
|
+
"@fluentui/react-icons": "^2.0.245",
|
|
30
|
+
"@fluentui/react-table": "^9.19.3",
|
|
31
|
+
"@fluentui/react-tabster": "^9.26.8",
|
|
32
|
+
"@fluentui/react-jsx-runtime": "^9.3.1",
|
|
32
33
|
"@fluentui/react-shared-contexts": "^9.25.2",
|
|
33
34
|
"@fluentui/react-theme": "^9.2.0",
|
|
34
|
-
"@fluentui/react-utilities": "^9.25.
|
|
35
|
+
"@fluentui/react-utilities": "^9.25.2",
|
|
35
36
|
"@griffel/react": "^1.5.22",
|
|
36
37
|
"@swc/helpers": "^0.5.1"
|
|
37
38
|
},
|