@fluentui/react-menu-grid-preview 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/dist/index.d.ts +1 -1
  3. package/lib/components/MenuGrid/MenuGrid.types.js +1 -1
  4. package/lib/components/MenuGrid/MenuGrid.types.js.map +1 -1
  5. package/lib/components/MenuGrid/renderMenuGrid.js.map +1 -1
  6. package/lib/components/MenuGridCell/renderMenuGridCell.js.map +1 -1
  7. package/lib/components/MenuGridCell/useMenuGridCell.js +0 -1
  8. package/lib/components/MenuGridCell/useMenuGridCell.js.map +1 -1
  9. package/lib/components/MenuGridGroup/renderMenuGridGroup.js.map +1 -1
  10. package/lib/components/MenuGridGroup/useMenuGridGroup.js +0 -1
  11. package/lib/components/MenuGridGroup/useMenuGridGroup.js.map +1 -1
  12. package/lib/components/MenuGridGroupHeader/renderMenuGridGroupHeader.js.map +1 -1
  13. package/lib/components/MenuGridGroupHeader/useMenuGridGroupHeader.js +0 -1
  14. package/lib/components/MenuGridGroupHeader/useMenuGridGroupHeader.js.map +1 -1
  15. package/lib/components/MenuGridItem/MenuGridItem.types.js.map +1 -1
  16. package/lib/components/MenuGridItem/renderMenuGridItem.js.map +1 -1
  17. package/lib/components/MenuGridItem/useMenuGridItem.js +0 -1
  18. package/lib/components/MenuGridItem/useMenuGridItem.js.map +1 -1
  19. package/lib/components/MenuGridRow/renderMenuGridRow.js.map +1 -1
  20. package/lib/components/MenuGridRow/useMenuGridRow.js.map +1 -1
  21. package/lib/contexts/menuGridContext.js.map +1 -1
  22. package/lib-commonjs/components/MenuGrid/MenuGrid.types.js +0 -2
  23. package/lib-commonjs/components/MenuGrid/MenuGrid.types.js.map +1 -1
  24. package/lib-commonjs/components/MenuGrid/renderMenuGrid.js.map +1 -1
  25. package/lib-commonjs/components/MenuGridCell/renderMenuGridCell.js.map +1 -1
  26. package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js +0 -2
  27. package/lib-commonjs/components/MenuGridCell/useMenuGridCell.js.map +1 -1
  28. package/lib-commonjs/components/MenuGridGroup/renderMenuGridGroup.js.map +1 -1
  29. package/lib-commonjs/components/MenuGridGroup/useMenuGridGroup.js +0 -2
  30. package/lib-commonjs/components/MenuGridGroup/useMenuGridGroup.js.map +1 -1
  31. package/lib-commonjs/components/MenuGridGroupHeader/renderMenuGridGroupHeader.js.map +1 -1
  32. package/lib-commonjs/components/MenuGridGroupHeader/useMenuGridGroupHeader.js +0 -2
  33. package/lib-commonjs/components/MenuGridGroupHeader/useMenuGridGroupHeader.js.map +1 -1
  34. package/lib-commonjs/components/MenuGridItem/MenuGridItem.types.js.map +1 -1
  35. package/lib-commonjs/components/MenuGridItem/renderMenuGridItem.js.map +1 -1
  36. package/lib-commonjs/components/MenuGridItem/useMenuGridItem.js +0 -2
  37. package/lib-commonjs/components/MenuGridItem/useMenuGridItem.js.map +1 -1
  38. package/lib-commonjs/components/MenuGridRow/renderMenuGridRow.js.map +1 -1
  39. package/lib-commonjs/components/MenuGridRow/useMenuGridRow.js.map +1 -1
  40. package/lib-commonjs/contexts/menuGridContext.js.map +1 -1
  41. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Change Log - @fluentui/react-menu-grid-preview
2
2
 
3
- This log was last generated on Wed, 01 Apr 2026 15:50:21 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Apr 2026 11:59:25 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.5.1)
8
+
9
+ Thu, 23 Apr 2026 11:59:25 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.5.0..@fluentui/react-menu-grid-preview_v0.5.1)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-menu to v9.24.1 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
15
+ - Bump @fluentui/react-table to v9.19.15 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
16
+ - Bump @fluentui/react-tabster to v9.26.14 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.26.3 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
19
+
7
20
  ## [0.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu-grid-preview_v0.5.0)
8
21
 
9
- Wed, 01 Apr 2026 15:50:21 GMT
22
+ Wed, 01 Apr 2026 15:52:41 GMT
10
23
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu-grid-preview_v0.4.1..@fluentui/react-menu-grid-preview_v0.5.0)
11
24
 
12
25
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import type { MenuListContextValue } from '@fluentui/react-menu';
6
6
  import * as React_2 from 'react';
7
7
  import type { Slot } from '@fluentui/react-utilities';
8
8
  import type { SlotClassNames } from '@fluentui/react-utilities';
9
- import { TabsterDOMAttribute } from '@fluentui/react-tabster';
9
+ import type { TabsterDOMAttribute } from '@fluentui/react-tabster';
10
10
 
11
11
  /**
12
12
  * Define a styled MenuGrid, using the `useMenuGrid_unstable` hook.
@@ -1 +1 @@
1
- import * as React from 'react';
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGrid/MenuGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { MenuListContextValue } from '@fluentui/react-menu';\n\nimport type { MenuGridContextValue } from '../../contexts/menuGridContext';\n\nexport type MenuGridSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGridProps = ComponentProps<MenuGridSlots> & {\n /**\n * Whether keyboard navigation wraps from the last row to the first and vice versa.\n *\n * @default true\n */\n circular?: boolean;\n};\n\nexport type MenuGridState = ComponentState<MenuGridSlots> & {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport type MenuGridContextValues = {\n menuGrid: MenuGridContextValue;\n menuList: MenuListContextValue;\n};\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/MenuGrid/MenuGrid.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { MenuListContextValue } from '@fluentui/react-menu';\n\nimport type { MenuGridContextValue } from '../../contexts/menuGridContext';\n\nexport type MenuGridSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGridProps = ComponentProps<MenuGridSlots> & {\n /**\n * Whether keyboard navigation wraps from the last row to the first and vice versa.\n *\n * @default true\n */\n circular?: boolean;\n};\n\nexport type MenuGridState = ComponentState<MenuGridSlots> & {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport type MenuGridContextValues = {\n menuGrid: MenuGridContextValue;\n menuList: MenuListContextValue;\n};\n"],"names":[],"mappings":"AAgCA,WAGE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGrid/renderMenuGrid.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '@fluentui/react-menu';\nimport { MenuGridContextValues, MenuGridSlots, MenuGridState } from './MenuGrid.types';\nimport { MenuGridContextProvider } from '../../contexts/menuGridContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGrid_unstable = (state: MenuGridState, contextValues: MenuGridContextValues): JSXElement => {\n assertSlots<MenuGridSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <MenuGridContextProvider value={contextValues.menuGrid}>\n <state.root />\n </MenuGridContextProvider>\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","MenuGridContextProvider","renderMenuGrid_unstable","state","contextValues","value","menuList","menuGrid","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5DL,YAA2BI;IAE3B,qBACE,KAACH;QAAiBK,OAAOD,cAAcE,QAAQ;kBAC7C,cAAA,KAACL;YAAwBI,OAAOD,cAAcG,QAAQ;sBACpD,cAAA,KAACJ,MAAMK,IAAI;;;AAInB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGrid/renderMenuGrid.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '@fluentui/react-menu';\nimport type { MenuGridContextValues, MenuGridSlots, MenuGridState } from './MenuGrid.types';\nimport { MenuGridContextProvider } from '../../contexts/menuGridContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGrid_unstable = (state: MenuGridState, contextValues: MenuGridContextValues): JSXElement => {\n assertSlots<MenuGridSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <MenuGridContextProvider value={contextValues.menuGrid}>\n <state.root />\n </MenuGridContextProvider>\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","MenuGridContextProvider","renderMenuGrid_unstable","state","contextValues","value","menuList","menuGrid","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5DL,YAA2BI;IAE3B,qBACE,KAACH;QAAiBK,OAAOD,cAAcE,QAAQ;kBAC7C,cAAA,KAACL;YAAwBI,OAAOD,cAAcG,QAAQ;sBACpD,cAAA,KAACJ,MAAMK,IAAI;;;AAInB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridCell/renderMenuGridCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridCell_unstable = (state: MenuGridCellState): JSXElement => {\n assertSlots<MenuGridCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridCell_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridCell/renderMenuGridCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridCell_unstable = (state: MenuGridCellState): JSXElement => {\n assertSlots<MenuGridCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridCell_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
4
3
  import { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';
5
4
  import { useMergedRefs, useEventCallback, mergeCallbacks, getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
@@ -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\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
+ {"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport type * 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 type { 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":["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;AAGA,SAASA,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 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroup/renderMenuGridGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridGroupContextValues, MenuGridGroupSlots, MenuGridGroupState } from './MenuGridGroup.types';\nimport { MenuGridGroupContextProvider } from '../../contexts/menuGridGroupContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroup_unstable = (\n state: MenuGridGroupState,\n contextValues: MenuGridGroupContextValues,\n): JSXElement => {\n assertSlots<MenuGridGroupSlots>(state);\n\n return (\n <MenuGridGroupContextProvider value={contextValues.menuGridGroup}>\n <state.root />\n </MenuGridGroupContextProvider>\n );\n};\n"],"names":["assertSlots","MenuGridGroupContextProvider","renderMenuGridGroup_unstable","state","contextValues","value","menuGridGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,4BAA4B,QAAQ,sCAAsC;AAEnF;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEAJ,YAAgCG;IAEhC,qBACE,KAACF;QAA6BI,OAAOD,cAAcE,aAAa;kBAC9D,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroup/renderMenuGridGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridGroupContextValues, MenuGridGroupSlots, MenuGridGroupState } from './MenuGridGroup.types';\nimport { MenuGridGroupContextProvider } from '../../contexts/menuGridGroupContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroup_unstable = (\n state: MenuGridGroupState,\n contextValues: MenuGridGroupContextValues,\n): JSXElement => {\n assertSlots<MenuGridGroupSlots>(state);\n\n return (\n <MenuGridGroupContextProvider value={contextValues.menuGridGroup}>\n <state.root />\n </MenuGridGroupContextProvider>\n );\n};\n"],"names":["assertSlots","MenuGridGroupContextProvider","renderMenuGridGroup_unstable","state","contextValues","value","menuGridGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,4BAA4B,QAAQ,sCAAsC;AAEnF;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEAJ,YAAgCG;IAEhC,qBACE,KAACF;QAA6BI,OAAOD,cAAcE,aAAa;kBAC9D,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Given user props, returns state and render function for a MenuGridGroup.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroup/useMenuGridGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { MenuGridGroupProps, MenuGridGroupState } from './MenuGridGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroup.\n */\nexport function useMenuGridGroup_unstable(\n props: MenuGridGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupState {\n const headerId = useId('menu-grid-group-header');\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'rowgroup',\n 'aria-labelledby': headerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["React","getIntrinsicElementProps","useId","slot","useMenuGridGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGlF;;CAEC,GACD,OAAO,SAASC,0BACdC,KAAyB,EACzBC,GAA8B;IAE9B,MAAMC,WAAWL,MAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfT,yBAAyB,OAAO;YAC9BK;YACAK,MAAM;YACN,mBAAmBJ;YACnB,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroup/useMenuGridGroup.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { MenuGridGroupProps, MenuGridGroupState } from './MenuGridGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroup.\n */\nexport function useMenuGridGroup_unstable(\n props: MenuGridGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupState {\n const headerId = useId('menu-grid-group-header');\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'rowgroup',\n 'aria-labelledby': headerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["getIntrinsicElementProps","useId","slot","useMenuGridGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGlF;;CAEC,GACD,OAAO,SAASC,0BACdC,KAAyB,EACzBC,GAA8B;IAE9B,MAAMC,WAAWL,MAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,KAAKO,MAAM,CACfT,yBAAyB,OAAO;YAC9BK;YACAK,MAAM;YACN,mBAAmBJ;YACnB,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroupHeader/renderMenuGridGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridGroupHeaderSlots, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroupHeader_unstable = (state: MenuGridGroupHeaderState): JSXElement => {\n assertSlots<MenuGridGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridGroupHeader_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjDF,YAAsCE;IAEtC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroupHeader/renderMenuGridGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridGroupHeaderSlots, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroupHeader_unstable = (state: MenuGridGroupHeaderState): JSXElement => {\n assertSlots<MenuGridGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridGroupHeader_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjDF,YAAsCE;IAEtC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
4
3
  import { useMenuGridGroupContext_unstable } from '../../contexts/menuGridGroupContext';
5
4
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroupHeader/useMenuGridGroupHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useMenuGridGroupContext_unstable } from '../../contexts/menuGridGroupContext';\nimport { MenuGridGroupHeaderProps, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroupHeader.\n */\nexport function useMenuGridGroupHeader_unstable(\n props: MenuGridGroupHeaderProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupHeaderState {\n const { headerId: id } = useMenuGridGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'presentation',\n id,\n 'aria-hidden': true,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","getIntrinsicElementProps","slot","useMenuGridGroupContext_unstable","useMenuGridGroupHeader_unstable","props","ref","headerId","id","components","root","always","role","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,gCAAgC,QAAQ,sCAAsC;AAGvF;;CAEC,GACD,OAAO,SAASC,gCACdC,KAA+B,EAC/BC,GAA8B;IAE9B,MAAM,EAAEC,UAAUC,EAAE,EAAE,GAAGL;IAEzB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfV,yBAAyB,OAAO;YAC9BK;YACAM,MAAM;YACNJ;YACA,eAAe;YACf,GAAGH,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroupHeader/useMenuGridGroupHeader.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useMenuGridGroupContext_unstable } from '../../contexts/menuGridGroupContext';\nimport type { MenuGridGroupHeaderProps, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroupHeader.\n */\nexport function useMenuGridGroupHeader_unstable(\n props: MenuGridGroupHeaderProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupHeaderState {\n const { headerId: id } = useMenuGridGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'presentation',\n id,\n 'aria-hidden': true,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["getIntrinsicElementProps","slot","useMenuGridGroupContext_unstable","useMenuGridGroupHeader_unstable","props","ref","headerId","id","components","root","always","role","elementType"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,gCAAgC,QAAQ,sCAAsC;AAGvF;;CAEC,GACD,OAAO,SAASC,gCACdC,KAA+B,EAC/BC,GAA8B;IAE9B,MAAM,EAAEC,UAAUC,EAAE,EAAE,GAAGL;IAEzB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfV,yBAAyB,OAAO;YAC9BK;YACAM,MAAM;YACNJ;YACA,eAAe;YACf,GAAGH,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/MenuGridItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { MenuGridCellProps } from './../MenuGridCell/MenuGridCell.types';\nimport { MenuGridRowProps } from './../MenuGridRow/MenuGridRow.types';\n\nexport type MenuGridItemSlots = {\n root: Slot<MenuGridRowProps>;\n\n /**\n * Icon slot rendered as cell before content cell\n */\n icon?: Slot<MenuGridCellProps>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<MenuGridCellProps>;\n\n /**\n * Additional descriptor to main content that creates a multiline layout\n */\n subText?: Slot<'span'>;\n\n /**\n * Firstd sub-action slot rendered as cell after content cell\n */\n firstSubAction?: Slot<MenuGridCellProps>;\n\n /**\n * Second sub-action slot rendered as cell after first sub-action cell\n */\n secondSubAction?: Slot<MenuGridCellProps>;\n};\n\nexport type MenuGridItemProps = Omit<ComponentProps<Partial<MenuGridItemSlots>>, 'content'> &\n Pick<Partial<MenuGridItemSlots>, 'content'>;\n\nexport type MenuGridItemState = ComponentState<MenuGridItemSlots>;\n"],"names":[],"mappings":"AAqCA,WAAkE"}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/MenuGridItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuGridCellProps } from './../MenuGridCell/MenuGridCell.types';\nimport type { MenuGridRowProps } from './../MenuGridRow/MenuGridRow.types';\n\nexport type MenuGridItemSlots = {\n root: Slot<MenuGridRowProps>;\n\n /**\n * Icon slot rendered as cell before content cell\n */\n icon?: Slot<MenuGridCellProps>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<MenuGridCellProps>;\n\n /**\n * Additional descriptor to main content that creates a multiline layout\n */\n subText?: Slot<'span'>;\n\n /**\n * Firstd sub-action slot rendered as cell after content cell\n */\n firstSubAction?: Slot<MenuGridCellProps>;\n\n /**\n * Second sub-action slot rendered as cell after first sub-action cell\n */\n secondSubAction?: Slot<MenuGridCellProps>;\n};\n\nexport type MenuGridItemProps = Omit<ComponentProps<Partial<MenuGridItemSlots>>, 'content'> &\n Pick<Partial<MenuGridItemSlots>, 'content'>;\n\nexport type MenuGridItemState = ComponentState<MenuGridItemSlots>;\n"],"names":[],"mappings":"AAqCA,WAAkE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/renderMenuGridItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridItem_unstable = (state: MenuGridItemState): JSXElement => {\n assertSlots<MenuGridItemSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.firstSubAction && <state.firstSubAction />}\n {state.secondSubAction && <state.secondSubAction />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuGridItem_unstable","state","root","icon","content","children","subText","firstSubAction","secondSubAction"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,OAAO,kBACZ,MAACH,MAAMG,OAAO;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,kBAAI,KAACL,MAAMK,OAAO;;;YAGnCL,MAAMM,cAAc,kBAAI,KAACN,MAAMM,cAAc;YAC7CN,MAAMO,eAAe,kBAAI,KAACP,MAAMO,eAAe;;;AAGtD,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/renderMenuGridItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridItem_unstable = (state: MenuGridItemState): JSXElement => {\n assertSlots<MenuGridItemSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.firstSubAction && <state.firstSubAction />}\n {state.secondSubAction && <state.secondSubAction />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuGridItem_unstable","state","root","icon","content","children","subText","firstSubAction","secondSubAction"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,OAAO,kBACZ,MAACH,MAAMG,OAAO;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,kBAAI,KAACL,MAAMK,OAAO;;;YAGnCL,MAAMM,cAAc,kBAAI,KAACN,MAAMM,cAAc;YAC7CN,MAAMO,eAAe,kBAAI,KAACP,MAAMO,eAAe;;;AAGtD,EAAE"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { useMergedRefs, slot } from '@fluentui/react-utilities';
4
3
  import { MenuGridCell } from './../MenuGridCell/MenuGridCell';
5
4
  import { MenuGridRow } from './../MenuGridRow/MenuGridRow';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItem.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs, slot } from '@fluentui/react-utilities';\n\nimport { MenuGridItemProps, MenuGridItemState } from './MenuGridItem.types';\nimport { MenuGridCell } from './../MenuGridCell/MenuGridCell';\nimport { MenuGridRow } from './../MenuGridRow/MenuGridRow';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridItem.\n */\nexport function useMenuGridItem_unstable(props: MenuGridItemProps, ref: React.Ref<HTMLDivElement>): MenuGridItemState {\n const {\n icon,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n subText,\n firstSubAction,\n secondSubAction,\n ...rest\n } = props;\n const validateNestingRef = useValidateNesting('MenuGridItem');\n\n return {\n components: {\n root: MenuGridRow,\n icon: MenuGridCell,\n content: MenuGridCell,\n subText: 'span',\n firstSubAction: MenuGridCell,\n secondSubAction: MenuGridCell,\n },\n root: slot.always(\n {\n ref: useMergedRefs(ref, validateNestingRef),\n ...rest,\n },\n { elementType: MenuGridRow },\n ),\n icon: slot.optional(props.icon, { elementType: MenuGridCell }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.children,\n defaultProps: { children: props.children },\n elementType: MenuGridCell,\n }),\n subText: slot.optional(props.subText, { elementType: 'span' }),\n firstSubAction: slot.optional(props.firstSubAction, { elementType: MenuGridCell }),\n secondSubAction: slot.optional(props.secondSubAction, { elementType: MenuGridCell }),\n };\n}\n"],"names":["React","useMergedRefs","slot","MenuGridCell","MenuGridRow","useValidateNesting","useMenuGridItem_unstable","props","ref","icon","content","_content","subText","firstSubAction","secondSubAction","rest","validateNestingRef","components","root","always","elementType","optional","renderByDefault","children","defaultProps"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAGhE,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;CAEC,GACD,OAAO,SAASC,yBAAyBC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EACJC,IAAI,EACJC,SAASC,QAAQ,EACjBC,OAAO,EACPC,cAAc,EACdC,eAAe,EACf,GAAGC,MACJ,GAAGR;IACJ,MAAMS,qBAAqBX,mBAAmB;IAE9C,OAAO;QACLY,YAAY;YACVC,MAAMd;YACNK,MAAMN;YACNO,SAASP;YACTS,SAAS;YACTC,gBAAgBV;YAChBW,iBAAiBX;QACnB;QACAe,MAAMhB,KAAKiB,MAAM,CACf;YACEX,KAAKP,cAAcO,KAAKQ;YACxB,GAAGD,IAAI;QACT,GACA;YAAEK,aAAahB;QAAY;QAE7BK,MAAMP,KAAKmB,QAAQ,CAACd,MAAME,IAAI,EAAE;YAAEW,aAAajB;QAAa;QAC5DO,SAASR,KAAKmB,QAAQ,CAACd,MAAMG,OAAO,EAAE;YACpCY,iBAAiB,CAAC,CAACf,MAAMgB,QAAQ;YACjCC,cAAc;gBAAED,UAAUhB,MAAMgB,QAAQ;YAAC;YACzCH,aAAajB;QACf;QACAS,SAASV,KAAKmB,QAAQ,CAACd,MAAMK,OAAO,EAAE;YAAEQ,aAAa;QAAO;QAC5DP,gBAAgBX,KAAKmB,QAAQ,CAACd,MAAMM,cAAc,EAAE;YAAEO,aAAajB;QAAa;QAChFW,iBAAiBZ,KAAKmB,QAAQ,CAACd,MAAMO,eAAe,EAAE;YAAEM,aAAajB;QAAa;IACpF;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItem.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useMergedRefs, slot } from '@fluentui/react-utilities';\n\nimport type { MenuGridItemProps, MenuGridItemState } from './MenuGridItem.types';\nimport { MenuGridCell } from './../MenuGridCell/MenuGridCell';\nimport { MenuGridRow } from './../MenuGridRow/MenuGridRow';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridItem.\n */\nexport function useMenuGridItem_unstable(props: MenuGridItemProps, ref: React.Ref<HTMLDivElement>): MenuGridItemState {\n const {\n icon,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n subText,\n firstSubAction,\n secondSubAction,\n ...rest\n } = props;\n const validateNestingRef = useValidateNesting('MenuGridItem');\n\n return {\n components: {\n root: MenuGridRow,\n icon: MenuGridCell,\n content: MenuGridCell,\n subText: 'span',\n firstSubAction: MenuGridCell,\n secondSubAction: MenuGridCell,\n },\n root: slot.always(\n {\n ref: useMergedRefs(ref, validateNestingRef),\n ...rest,\n },\n { elementType: MenuGridRow },\n ),\n icon: slot.optional(props.icon, { elementType: MenuGridCell }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.children,\n defaultProps: { children: props.children },\n elementType: MenuGridCell,\n }),\n subText: slot.optional(props.subText, { elementType: 'span' }),\n firstSubAction: slot.optional(props.firstSubAction, { elementType: MenuGridCell }),\n secondSubAction: slot.optional(props.secondSubAction, { elementType: MenuGridCell }),\n };\n}\n"],"names":["useMergedRefs","slot","MenuGridCell","MenuGridRow","useValidateNesting","useMenuGridItem_unstable","props","ref","icon","content","_content","subText","firstSubAction","secondSubAction","rest","validateNestingRef","components","root","always","elementType","optional","renderByDefault","children","defaultProps"],"mappings":"AAAA;AAGA,SAASA,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAGhE,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;CAEC,GACD,OAAO,SAASC,yBAAyBC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EACJC,IAAI,EACJC,SAASC,QAAQ,EACjBC,OAAO,EACPC,cAAc,EACdC,eAAe,EACf,GAAGC,MACJ,GAAGR;IACJ,MAAMS,qBAAqBX,mBAAmB;IAE9C,OAAO;QACLY,YAAY;YACVC,MAAMd;YACNK,MAAMN;YACNO,SAASP;YACTS,SAAS;YACTC,gBAAgBV;YAChBW,iBAAiBX;QACnB;QACAe,MAAMhB,KAAKiB,MAAM,CACf;YACEX,KAAKP,cAAcO,KAAKQ;YACxB,GAAGD,IAAI;QACT,GACA;YAAEK,aAAahB;QAAY;QAE7BK,MAAMP,KAAKmB,QAAQ,CAACd,MAAME,IAAI,EAAE;YAAEW,aAAajB;QAAa;QAC5DO,SAASR,KAAKmB,QAAQ,CAACd,MAAMG,OAAO,EAAE;YACpCY,iBAAiB,CAAC,CAACf,MAAMgB,QAAQ;YACjCC,cAAc;gBAAED,UAAUhB,MAAMgB,QAAQ;YAAC;YACzCH,aAAajB;QACf;QACAS,SAASV,KAAKmB,QAAQ,CAACd,MAAMK,OAAO,EAAE;YAAEQ,aAAa;QAAO;QAC5DP,gBAAgBX,KAAKmB,QAAQ,CAACd,MAAMM,cAAc,EAAE;YAAEO,aAAajB;QAAa;QAChFW,iBAAiBZ,KAAKmB,QAAQ,CAACd,MAAMO,eAAe,EAAE;YAAEM,aAAajB;QAAa;IACpF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridRow/renderMenuGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridRow_unstable = (state: MenuGridRowState): JSXElement => {\n assertSlots<MenuGridRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridRow_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAE9B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridRow/renderMenuGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridRow_unstable = (state: MenuGridRowState): JSXElement => {\n assertSlots<MenuGridRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridRow_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAE9B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRow.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\n\nimport { useMenuGridContext_unstable } from '../../contexts/menuGridContext';\nimport { MenuGridRowProps, MenuGridRowState } from './MenuGridRow.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\nimport { useCharacterSearch } from './useCharacterSearch';\n\n/**\n * Given user props, returns state and render function for a MenuGridRow.\n */\nexport function useMenuGridRow_unstable(props: MenuGridRowProps, ref: React.Ref<HTMLDivElement>): MenuGridRowState {\n const validateNestingRef = useValidateNesting('MenuGridRow');\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { tableRowTabsterAttribute } = useMenuGridContext_unstable();\n\n const { characterSearchOnKeyDown, characterSearchRef } = useCharacterSearch();\n\n const onKeyDownToClick = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.isDefaultPrevented() &&\n (event.key === Enter || event.key === Space) &&\n event.target === event.currentTarget\n ) {\n event.currentTarget.click();\n }\n });\n\n const onKeyDown = useEventCallback(\n mergeCallbacks(props.onKeyDown, mergeCallbacks(onKeyDownToClick, characterSearchOnKeyDown)),\n );\n\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n let element = event.target as HTMLElement | null;\n while (element && element !== event.currentTarget) {\n if (element.tabIndex >= 0) {\n return;\n }\n element = element.parentElement;\n }\n props.onClick?.(event);\n });\n\n const state: MenuGridRowState = {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef, innerRef, characterSearchRef),\n role: 'row',\n tabIndex: 0,\n ...tableRowTabsterAttribute,\n ...props,\n onKeyDown,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n\n return state;\n}\n"],"names":["React","Enter","Space","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useMenuGridContext_unstable","useValidateNesting","useCharacterSearch","useMenuGridRow_unstable","props","ref","validateNestingRef","innerRef","useRef","tableRowTabsterAttribute","characterSearchOnKeyDown","characterSearchRef","onKeyDownToClick","event","isDefaultPrevented","key","target","currentTarget","click","onKeyDown","onClick","element","tabIndex","parentElement","state","components","root","always","role","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AACvD,SACEC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,wBAAwB,EACxBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,2BAA2B,QAAQ,iCAAiC;AAE7E,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D;;CAEC,GACD,OAAO,SAASC,wBAAwBC,KAAuB,EAAEC,GAA8B;IAC7F,MAAMC,qBAAqBL,mBAAmB;IAC9C,MAAMM,WAAWf,MAAMgB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,wBAAwB,EAAE,GAAGT;IAErC,MAAM,EAAEU,wBAAwB,EAAEC,kBAAkB,EAAE,GAAGT;IAEzD,MAAMU,mBAAmBhB,iBAAiB,CAACiB;QACzC,IACE,CAACA,MAAMC,kBAAkB,MACxBD,CAAAA,MAAME,GAAG,KAAKtB,SAASoB,MAAME,GAAG,KAAKrB,KAAI,KAC1CmB,MAAMG,MAAM,KAAKH,MAAMI,aAAa,EACpC;YACAJ,MAAMI,aAAa,CAACC,KAAK;QAC3B;IACF;IAEA,MAAMC,YAAYvB,iBAChBC,eAAeO,MAAMe,SAAS,EAAEtB,eAAee,kBAAkBF;IAGnE,MAAMU,UAAUxB,iBAAiB,CAACiB;YAQhCT;QAPA,IAAIiB,UAAUR,MAAMG,MAAM;QAC1B,MAAOK,WAAWA,YAAYR,MAAMI,aAAa,CAAE;YACjD,IAAII,QAAQC,QAAQ,IAAI,GAAG;gBACzB;YACF;YACAD,UAAUA,QAAQE,aAAa;QACjC;SACAnB,iBAAAA,MAAMgB,OAAO,cAAbhB,qCAAAA,oBAAAA,OAAgBS;IAClB;IAEA,MAAMW,QAA0B;QAC9BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM3B,KAAK4B,MAAM,CACf7B,yBAAyB,OAAO;YAC9BO,KAAKV,cAAcU,KAAKC,oBAAoBC,UAAUI;YACtDiB,MAAM;YACNN,UAAU;YACV,GAAGb,wBAAwB;YAC3B,GAAGL,KAAK;YACRe;YACAC;QACF,IACA;YAAES,aAAa;QAAM;IAEzB;IAEA,OAAOL;AACT"}
1
+ {"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRow.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\n\nimport { useMenuGridContext_unstable } from '../../contexts/menuGridContext';\nimport type { MenuGridRowProps, MenuGridRowState } from './MenuGridRow.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\nimport { useCharacterSearch } from './useCharacterSearch';\n\n/**\n * Given user props, returns state and render function for a MenuGridRow.\n */\nexport function useMenuGridRow_unstable(props: MenuGridRowProps, ref: React.Ref<HTMLDivElement>): MenuGridRowState {\n const validateNestingRef = useValidateNesting('MenuGridRow');\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { tableRowTabsterAttribute } = useMenuGridContext_unstable();\n\n const { characterSearchOnKeyDown, characterSearchRef } = useCharacterSearch();\n\n const onKeyDownToClick = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.isDefaultPrevented() &&\n (event.key === Enter || event.key === Space) &&\n event.target === event.currentTarget\n ) {\n event.currentTarget.click();\n }\n });\n\n const onKeyDown = useEventCallback(\n mergeCallbacks(props.onKeyDown, mergeCallbacks(onKeyDownToClick, characterSearchOnKeyDown)),\n );\n\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n let element = event.target as HTMLElement | null;\n while (element && element !== event.currentTarget) {\n if (element.tabIndex >= 0) {\n return;\n }\n element = element.parentElement;\n }\n props.onClick?.(event);\n });\n\n const state: MenuGridRowState = {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef, innerRef, characterSearchRef),\n role: 'row',\n tabIndex: 0,\n ...tableRowTabsterAttribute,\n ...props,\n onKeyDown,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n\n return state;\n}\n"],"names":["React","Enter","Space","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useMenuGridContext_unstable","useValidateNesting","useCharacterSearch","useMenuGridRow_unstable","props","ref","validateNestingRef","innerRef","useRef","tableRowTabsterAttribute","characterSearchOnKeyDown","characterSearchRef","onKeyDownToClick","event","isDefaultPrevented","key","target","currentTarget","click","onKeyDown","onClick","element","tabIndex","parentElement","state","components","root","always","role","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AACvD,SACEC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,wBAAwB,EACxBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,2BAA2B,QAAQ,iCAAiC;AAE7E,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D;;CAEC,GACD,OAAO,SAASC,wBAAwBC,KAAuB,EAAEC,GAA8B;IAC7F,MAAMC,qBAAqBL,mBAAmB;IAC9C,MAAMM,WAAWf,MAAMgB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,wBAAwB,EAAE,GAAGT;IAErC,MAAM,EAAEU,wBAAwB,EAAEC,kBAAkB,EAAE,GAAGT;IAEzD,MAAMU,mBAAmBhB,iBAAiB,CAACiB;QACzC,IACE,CAACA,MAAMC,kBAAkB,MACxBD,CAAAA,MAAME,GAAG,KAAKtB,SAASoB,MAAME,GAAG,KAAKrB,KAAI,KAC1CmB,MAAMG,MAAM,KAAKH,MAAMI,aAAa,EACpC;YACAJ,MAAMI,aAAa,CAACC,KAAK;QAC3B;IACF;IAEA,MAAMC,YAAYvB,iBAChBC,eAAeO,MAAMe,SAAS,EAAEtB,eAAee,kBAAkBF;IAGnE,MAAMU,UAAUxB,iBAAiB,CAACiB;YAQhCT;QAPA,IAAIiB,UAAUR,MAAMG,MAAM;QAC1B,MAAOK,WAAWA,YAAYR,MAAMI,aAAa,CAAE;YACjD,IAAII,QAAQC,QAAQ,IAAI,GAAG;gBACzB;YACF;YACAD,UAAUA,QAAQE,aAAa;QACjC;SACAnB,iBAAAA,MAAMgB,OAAO,cAAbhB,qCAAAA,oBAAAA,OAAgBS;IAClB;IAEA,MAAMW,QAA0B;QAC9BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM3B,KAAK4B,MAAM,CACf7B,yBAAyB,OAAO;YAC9BO,KAAKV,cAAcU,KAAKC,oBAAoBC,UAAUI;YACtDiB,MAAM;YACNN,UAAU;YACV,GAAGb,wBAAwB;YAC3B,GAAGL,KAAK;YACRe;YACAC;QACF,IACA;YAAES,aAAa;QAAM;IAEzB;IAEA,OAAOL;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/menuGridContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\n\nexport const MenuGridContext = React.createContext<MenuGridContextValue | undefined>(\n undefined,\n) as React.Context<MenuGridContextValue>;\n\nconst menuGridContextDefaultValue: MenuGridContextValue = {\n tableRowTabsterAttribute: null,\n setFocusByFirstCharacter: undefined,\n};\n\n/**\n * Context shared between MenuGrid and its children components\n */\nexport type MenuGridContextValue = {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport const MenuGridContextProvider = MenuGridContext.Provider;\n\nexport const useMenuGridContext_unstable = (): MenuGridContextValue =>\n React.useContext(MenuGridContext) ?? menuGridContextDefaultValue;\n"],"names":["React","MenuGridContext","createContext","undefined","menuGridContextDefaultValue","tableRowTabsterAttribute","setFocusByFirstCharacter","MenuGridContextProvider","Provider","useMenuGridContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,MAAMC,kBAAkBD,MAAME,aAAa,CAChDC,WACuC;AAEzC,MAAMC,8BAAoD;IACxDC,0BAA0B;IAC1BC,0BAA0BH;AAC5B;AAiBA,OAAO,MAAMI,0BAA0BN,gBAAgBO,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B;QACzCT;WAAAA,CAAAA,oBAAAA,MAAMU,UAAU,CAACT,8BAAjBD,+BAAAA,oBAAqCI;EAA4B"}
1
+ {"version":3,"sources":["../src/contexts/menuGridContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { TabsterDOMAttribute } from '@fluentui/react-tabster';\n\nexport const MenuGridContext = React.createContext<MenuGridContextValue | undefined>(\n undefined,\n) as React.Context<MenuGridContextValue>;\n\nconst menuGridContextDefaultValue: MenuGridContextValue = {\n tableRowTabsterAttribute: null,\n setFocusByFirstCharacter: undefined,\n};\n\n/**\n * Context shared between MenuGrid and its children components\n */\nexport type MenuGridContextValue = {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport const MenuGridContextProvider = MenuGridContext.Provider;\n\nexport const useMenuGridContext_unstable = (): MenuGridContextValue =>\n React.useContext(MenuGridContext) ?? menuGridContextDefaultValue;\n"],"names":["React","MenuGridContext","createContext","undefined","menuGridContextDefaultValue","tableRowTabsterAttribute","setFocusByFirstCharacter","MenuGridContextProvider","Provider","useMenuGridContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,MAAMC,kBAAkBD,MAAME,aAAa,CAChDC,WACuC;AAEzC,MAAMC,8BAAoD;IACxDC,0BAA0B;IAC1BC,0BAA0BH;AAC5B;AAiBA,OAAO,MAAMI,0BAA0BN,gBAAgBO,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B;QACzCT;WAAAA,CAAAA,oBAAAA,MAAMU,UAAU,CAACT,8BAAjBD,+BAAAA,oBAAqCI;EAA4B"}
@@ -2,5 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGrid/MenuGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { MenuListContextValue } from '@fluentui/react-menu';\n\nimport type { MenuGridContextValue } from '../../contexts/menuGridContext';\n\nexport type MenuGridSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGridProps = ComponentProps<MenuGridSlots> & {\n /**\n * Whether keyboard navigation wraps from the last row to the first and vice versa.\n *\n * @default true\n */\n circular?: boolean;\n};\n\nexport type MenuGridState = ComponentState<MenuGridSlots> & {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport type MenuGridContextValues = {\n menuGrid: MenuGridContextValue;\n menuList: MenuListContextValue;\n};\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
1
+ {"version":3,"sources":["../src/components/MenuGrid/MenuGrid.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { MenuListContextValue } from '@fluentui/react-menu';\n\nimport type { MenuGridContextValue } from '../../contexts/menuGridContext';\n\nexport type MenuGridSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGridProps = ComponentProps<MenuGridSlots> & {\n /**\n * Whether keyboard navigation wraps from the last row to the first and vice versa.\n *\n * @default true\n */\n circular?: boolean;\n};\n\nexport type MenuGridState = ComponentState<MenuGridSlots> & {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport type MenuGridContextValues = {\n menuGrid: MenuGridContextValue;\n menuList: MenuListContextValue;\n};\n"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGrid/renderMenuGrid.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '@fluentui/react-menu';\nimport { MenuGridContextValues, MenuGridSlots, MenuGridState } from './MenuGrid.types';\nimport { MenuGridContextProvider } from '../../contexts/menuGridContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGrid_unstable = (state: MenuGridState, contextValues: MenuGridContextValues): JSXElement => {\n assertSlots<MenuGridSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <MenuGridContextProvider value={contextValues.menuGrid}>\n <state.root />\n </MenuGridContextProvider>\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","MenuGridContextProvider","renderMenuGrid_unstable","state","contextValues","value","menuList","menuGrid","root"],"mappings":";;;;+BAWaG;;;;;;4BAVb,gDAAiD;gCACrB,4BAA4B;2BAEvB,uBAAuB;iCAEhB,iCAAiC;AAKlE,gCAAgC,CAACC,OAAsBC;QAC5DL,2BAAAA,EAA2BI;IAE3B,OAAA,WAAA,OACE,eAAA,EAACH,2BAAAA,EAAAA;QAAiBK,OAAOD,cAAcE,QAAQ;kBAC7C,WAAA,OAAA,eAAA,EAACL,wCAAAA,EAAAA;YAAwBI,OAAOD,cAAcG,QAAQ;sBACpD,WAAA,OAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA,CAAA;;;AAInB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGrid/renderMenuGrid.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuListProvider } from '@fluentui/react-menu';\nimport type { MenuGridContextValues, MenuGridSlots, MenuGridState } from './MenuGrid.types';\nimport { MenuGridContextProvider } from '../../contexts/menuGridContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGrid_unstable = (state: MenuGridState, contextValues: MenuGridContextValues): JSXElement => {\n assertSlots<MenuGridSlots>(state);\n\n return (\n <MenuListProvider value={contextValues.menuList}>\n <MenuGridContextProvider value={contextValues.menuGrid}>\n <state.root />\n </MenuGridContextProvider>\n </MenuListProvider>\n );\n};\n"],"names":["assertSlots","MenuListProvider","MenuGridContextProvider","renderMenuGrid_unstable","state","contextValues","value","menuList","menuGrid","root"],"mappings":";;;;+BAWaG;;;;;;4BAVb,gDAAiD;gCACrB,4BAA4B;2BAEvB,uBAAuB;iCAEhB,iCAAiC;AAKlE,gCAAgC,CAACC,OAAsBC;QAC5DL,2BAAAA,EAA2BI;IAE3B,OAAA,WAAA,OACE,eAAA,EAACH,2BAAAA,EAAAA;QAAiBK,OAAOD,cAAcE,QAAQ;kBAC7C,WAAA,OAAA,eAAA,EAACL,wCAAAA,EAAAA;YAAwBI,OAAOD,cAAcG,QAAQ;sBACpD,WAAA,OAAA,eAAA,EAACJ,MAAMK,IAAI,EAAA,CAAA;;;AAInB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridCell/renderMenuGridCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridCell_unstable = (state: MenuGridCellState): JSXElement => {\n assertSlots<MenuGridCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridCell_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,8BAA8B,CAACC;QAC1CF,2BAAAA,EAA+BE;IAE/B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridCell/renderMenuGridCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridCellSlots, MenuGridCellState } from './MenuGridCell.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridCell_unstable = (state: MenuGridCellState): JSXElement => {\n assertSlots<MenuGridCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridCell_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,8BAA8B,CAACC;QAC1CF,2BAAAA,EAA+BE;IAE/B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useMenuGridCell_unstable", {
9
9
  return useMenuGridCell_unstable;
10
10
  }
11
11
  });
12
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
12
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
13
  const _keyboardkeys = require("@fluentui/keyboard-keys");
16
14
  const _reactutilities = require("@fluentui/react-utilities");
@@ -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\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"}
1
+ {"version":3,"sources":["../src/components/MenuGridCell/useMenuGridCell.ts"],"sourcesContent":["'use client';\n\nimport type * 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 type { 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":["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;;;;;+BAkBgBU;;;;;;qCAfgC,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,yBAAqBN,sCAAAA,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"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroup/renderMenuGridGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridGroupContextValues, MenuGridGroupSlots, MenuGridGroupState } from './MenuGridGroup.types';\nimport { MenuGridGroupContextProvider } from '../../contexts/menuGridGroupContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroup_unstable = (\n state: MenuGridGroupState,\n contextValues: MenuGridGroupContextValues,\n): JSXElement => {\n assertSlots<MenuGridGroupSlots>(state);\n\n return (\n <MenuGridGroupContextProvider value={contextValues.menuGridGroup}>\n <state.root />\n </MenuGridGroupContextProvider>\n );\n};\n"],"names":["assertSlots","MenuGridGroupContextProvider","renderMenuGridGroup_unstable","state","contextValues","value","menuGridGroup","root"],"mappings":";;;;+BAUaE;;;;;;4BATb,gDAAiD;gCACrB,4BAA4B;sCAGX,sCAAsC;AAK5E,qCAAqC,CAC1CC,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,eAAA,EAACF,kDAAAA,EAAAA;QAA6BI,OAAOD,cAAcE,aAAa;kBAC9D,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroup/renderMenuGridGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridGroupContextValues, MenuGridGroupSlots, MenuGridGroupState } from './MenuGridGroup.types';\nimport { MenuGridGroupContextProvider } from '../../contexts/menuGridGroupContext';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroup_unstable = (\n state: MenuGridGroupState,\n contextValues: MenuGridGroupContextValues,\n): JSXElement => {\n assertSlots<MenuGridGroupSlots>(state);\n\n return (\n <MenuGridGroupContextProvider value={contextValues.menuGridGroup}>\n <state.root />\n </MenuGridGroupContextProvider>\n );\n};\n"],"names":["assertSlots","MenuGridGroupContextProvider","renderMenuGridGroup_unstable","state","contextValues","value","menuGridGroup","root"],"mappings":";;;;+BAUaE;;;;;;4BATb,gDAAiD;gCACrB,4BAA4B;sCAGX,sCAAsC;AAK5E,qCAAqC,CAC1CC,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,eAAA,EAACF,kDAAAA,EAAAA;QAA6BI,OAAOD,cAAcE,aAAa;kBAC9D,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
@@ -8,8 +8,6 @@ Object.defineProperty(exports, "useMenuGridGroup_unstable", {
8
8
  return useMenuGridGroup_unstable;
9
9
  }
10
10
  });
11
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
11
  const _reactutilities = require("@fluentui/react-utilities");
14
12
  function useMenuGridGroup_unstable(props, ref) {
15
13
  const headerId = (0, _reactutilities.useId)('menu-grid-group-header');
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroup/useMenuGridGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { MenuGridGroupProps, MenuGridGroupState } from './MenuGridGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroup.\n */\nexport function useMenuGridGroup_unstable(\n props: MenuGridGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupState {\n const headerId = useId('menu-grid-group-header');\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'rowgroup',\n 'aria-labelledby': headerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["React","getIntrinsicElementProps","useId","slot","useMenuGridGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":";;;;+BAOgBI;;;;;;;iEAPO,QAAQ;gCACuB,4BAA4B;AAM3E,mCACLC,KAAyB,EACzBC,GAA8B;IAE9B,MAAMC,eAAWL,qBAAAA,EAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,oBAAAA,CAAKO,MAAM,KACfT,wCAAAA,EAAyB,OAAO;YAC9BK;YACAK,MAAM;YACN,mBAAmBJ;YACnB,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroup/useMenuGridGroup.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { MenuGridGroupProps, MenuGridGroupState } from './MenuGridGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroup.\n */\nexport function useMenuGridGroup_unstable(\n props: MenuGridGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupState {\n const headerId = useId('menu-grid-group-header');\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'rowgroup',\n 'aria-labelledby': headerId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n headerId,\n };\n}\n"],"names":["getIntrinsicElementProps","useId","slot","useMenuGridGroup_unstable","props","ref","headerId","components","root","always","role","elementType"],"mappings":";;;;+BAOgBG;;;;;;gCANsC,4BAA4B;AAM3E,mCACLC,KAAyB,EACzBC,GAA8B;IAE9B,MAAMC,eAAWL,qBAAAA,EAAM;IAEvB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMN,oBAAAA,CAAKO,MAAM,KACfT,wCAAAA,EAAyB,OAAO;YAC9BK;YACAK,MAAM;YACN,mBAAmBJ;YACnB,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;QAEvBL;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroupHeader/renderMenuGridGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridGroupHeaderSlots, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroupHeader_unstable = (state: MenuGridGroupHeaderState): JSXElement => {\n assertSlots<MenuGridGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridGroupHeader_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,qCAAqC,CAACC;QACjDF,2BAAAA,EAAsCE;IAEtC,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroupHeader/renderMenuGridGroupHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridGroupHeaderSlots, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridGroupHeader_unstable = (state: MenuGridGroupHeaderState): JSXElement => {\n assertSlots<MenuGridGroupHeaderSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridGroupHeader_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,qCAAqC,CAACC;QACjDF,2BAAAA,EAAsCE;IAEtC,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useMenuGridGroupHeader_unstable", {
9
9
  return useMenuGridGroupHeader_unstable;
10
10
  }
11
11
  });
12
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
12
  const _reactutilities = require("@fluentui/react-utilities");
15
13
  const _menuGridGroupContext = require("../../contexts/menuGridGroupContext");
16
14
  function useMenuGridGroupHeader_unstable(props, ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridGroupHeader/useMenuGridGroupHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useMenuGridGroupContext_unstable } from '../../contexts/menuGridGroupContext';\nimport { MenuGridGroupHeaderProps, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroupHeader.\n */\nexport function useMenuGridGroupHeader_unstable(\n props: MenuGridGroupHeaderProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupHeaderState {\n const { headerId: id } = useMenuGridGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'presentation',\n id,\n 'aria-hidden': true,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["React","getIntrinsicElementProps","slot","useMenuGridGroupContext_unstable","useMenuGridGroupHeader_unstable","props","ref","headerId","id","components","root","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACgB,4BAA4B;sCAE1B,sCAAsC;AAMhF,SAASI,gCACdC,KAA+B,EAC/BC,GAA8B;IAE9B,MAAM,EAAEC,UAAUC,EAAE,EAAE,OAAGL,sDAAAA;IAEzB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,oBAAAA,CAAKS,MAAM,KACfV,wCAAAA,EAAyB,OAAO;YAC9BK;YACAM,MAAM;YACNJ;YACA,eAAe;YACf,GAAGH,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridGroupHeader/useMenuGridGroupHeader.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useMenuGridGroupContext_unstable } from '../../contexts/menuGridGroupContext';\nimport type { MenuGridGroupHeaderProps, MenuGridGroupHeaderState } from './MenuGridGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGridGroupHeader.\n */\nexport function useMenuGridGroupHeader_unstable(\n props: MenuGridGroupHeaderProps,\n ref: React.Ref<HTMLDivElement>,\n): MenuGridGroupHeaderState {\n const { headerId: id } = useMenuGridGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'presentation',\n id,\n 'aria-hidden': true,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n}\n"],"names":["getIntrinsicElementProps","slot","useMenuGridGroupContext_unstable","useMenuGridGroupHeader_unstable","props","ref","headerId","id","components","root","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;gCAG+C,4BAA4B;sCAE1B,sCAAsC;AAMhF,SAASG,gCACdC,KAA+B,EAC/BC,GAA8B;IAE9B,MAAM,EAAEC,UAAUC,EAAE,EAAE,OAAGL,sDAAAA;IAEzB,OAAO;QACLM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,oBAAAA,CAAKS,MAAM,KACfV,wCAAAA,EAAyB,OAAO;YAC9BK;YACAM,MAAM;YACNJ;YACA,eAAe;YACf,GAAGH,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/MenuGridItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { MenuGridCellProps } from './../MenuGridCell/MenuGridCell.types';\nimport { MenuGridRowProps } from './../MenuGridRow/MenuGridRow.types';\n\nexport type MenuGridItemSlots = {\n root: Slot<MenuGridRowProps>;\n\n /**\n * Icon slot rendered as cell before content cell\n */\n icon?: Slot<MenuGridCellProps>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<MenuGridCellProps>;\n\n /**\n * Additional descriptor to main content that creates a multiline layout\n */\n subText?: Slot<'span'>;\n\n /**\n * Firstd sub-action slot rendered as cell after content cell\n */\n firstSubAction?: Slot<MenuGridCellProps>;\n\n /**\n * Second sub-action slot rendered as cell after first sub-action cell\n */\n secondSubAction?: Slot<MenuGridCellProps>;\n};\n\nexport type MenuGridItemProps = Omit<ComponentProps<Partial<MenuGridItemSlots>>, 'content'> &\n Pick<Partial<MenuGridItemSlots>, 'content'>;\n\nexport type MenuGridItemState = ComponentState<MenuGridItemSlots>;\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/MenuGridItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuGridCellProps } from './../MenuGridCell/MenuGridCell.types';\nimport type { MenuGridRowProps } from './../MenuGridRow/MenuGridRow.types';\n\nexport type MenuGridItemSlots = {\n root: Slot<MenuGridRowProps>;\n\n /**\n * Icon slot rendered as cell before content cell\n */\n icon?: Slot<MenuGridCellProps>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible\n */\n content?: Slot<MenuGridCellProps>;\n\n /**\n * Additional descriptor to main content that creates a multiline layout\n */\n subText?: Slot<'span'>;\n\n /**\n * Firstd sub-action slot rendered as cell after content cell\n */\n firstSubAction?: Slot<MenuGridCellProps>;\n\n /**\n * Second sub-action slot rendered as cell after first sub-action cell\n */\n secondSubAction?: Slot<MenuGridCellProps>;\n};\n\nexport type MenuGridItemProps = Omit<ComponentProps<Partial<MenuGridItemSlots>>, 'content'> &\n Pick<Partial<MenuGridItemSlots>, 'content'>;\n\nexport type MenuGridItemState = ComponentState<MenuGridItemSlots>;\n"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/renderMenuGridItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridItem_unstable = (state: MenuGridItemState): JSXElement => {\n assertSlots<MenuGridItemSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.firstSubAction && <state.firstSubAction />}\n {state.secondSubAction && <state.secondSubAction />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuGridItem_unstable","state","root","icon","content","children","subText","firstSubAction","secondSubAction"],"mappings":";;;;+BASaC;;;;;;4BARb,iCAAiD;gCACrB,4BAA4B;AAOjD,oCAAoC,CAACC;QAC1CF,2BAAAA,EAA+BE;IAE/B,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,IAAI,IAAA,WAAA,OAAI,eAAA,EAACF,MAAME,IAAI,EAAA,CAAA;YACzBF,MAAMG,OAAO,IAAA,WAAA,OACZ,gBAAA,EAACH,MAAMG,OAAO,EAAA;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,IAAA,WAAA,OAAI,eAAA,EAACL,MAAMK,OAAO,EAAA,CAAA;;;YAGnCL,MAAMM,cAAc,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,cAAc,EAAA,CAAA;YAC7CN,MAAMO,eAAe,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,eAAe,EAAA,CAAA;;;AAGtD,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/renderMenuGridItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridItemSlots, MenuGridItemState } from './MenuGridItem.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridItem_unstable = (state: MenuGridItemState): JSXElement => {\n assertSlots<MenuGridItemSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {state.content && (\n <state.content>\n {state.content.children}\n {state.subText && <state.subText />}\n </state.content>\n )}\n {state.firstSubAction && <state.firstSubAction />}\n {state.secondSubAction && <state.secondSubAction />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuGridItem_unstable","state","root","icon","content","children","subText","firstSubAction","secondSubAction"],"mappings":";;;;+BASaC;;;;;;4BARb,iCAAiD;gCACrB,4BAA4B;AAOjD,oCAAoC,CAACC;QAC1CF,2BAAAA,EAA+BE;IAE/B,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,IAAI,IAAA,WAAA,OAAI,eAAA,EAACF,MAAME,IAAI,EAAA,CAAA;YACzBF,MAAMG,OAAO,IAAA,WAAA,OACZ,gBAAA,EAACH,MAAMG,OAAO,EAAA;;oBACXH,MAAMG,OAAO,CAACC,QAAQ;oBACtBJ,MAAMK,OAAO,IAAA,WAAA,OAAI,eAAA,EAACL,MAAMK,OAAO,EAAA,CAAA;;;YAGnCL,MAAMM,cAAc,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,cAAc,EAAA,CAAA;YAC7CN,MAAMO,eAAe,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,eAAe,EAAA,CAAA;;;AAGtD,EAAE"}
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useMenuGridItem_unstable", {
9
9
  return useMenuGridItem_unstable;
10
10
  }
11
11
  });
12
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
12
  const _reactutilities = require("@fluentui/react-utilities");
15
13
  const _MenuGridCell = require("./../MenuGridCell/MenuGridCell");
16
14
  const _MenuGridRow = require("./../MenuGridRow/MenuGridRow");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItem.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs, slot } from '@fluentui/react-utilities';\n\nimport { MenuGridItemProps, MenuGridItemState } from './MenuGridItem.types';\nimport { MenuGridCell } from './../MenuGridCell/MenuGridCell';\nimport { MenuGridRow } from './../MenuGridRow/MenuGridRow';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridItem.\n */\nexport function useMenuGridItem_unstable(props: MenuGridItemProps, ref: React.Ref<HTMLDivElement>): MenuGridItemState {\n const {\n icon,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n subText,\n firstSubAction,\n secondSubAction,\n ...rest\n } = props;\n const validateNestingRef = useValidateNesting('MenuGridItem');\n\n return {\n components: {\n root: MenuGridRow,\n icon: MenuGridCell,\n content: MenuGridCell,\n subText: 'span',\n firstSubAction: MenuGridCell,\n secondSubAction: MenuGridCell,\n },\n root: slot.always(\n {\n ref: useMergedRefs(ref, validateNestingRef),\n ...rest,\n },\n { elementType: MenuGridRow },\n ),\n icon: slot.optional(props.icon, { elementType: MenuGridCell }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.children,\n defaultProps: { children: props.children },\n elementType: MenuGridCell,\n }),\n subText: slot.optional(props.subText, { elementType: 'span' }),\n firstSubAction: slot.optional(props.firstSubAction, { elementType: MenuGridCell }),\n secondSubAction: slot.optional(props.secondSubAction, { elementType: MenuGridCell }),\n };\n}\n"],"names":["React","useMergedRefs","slot","MenuGridCell","MenuGridRow","useValidateNesting","useMenuGridItem_unstable","props","ref","icon","content","_content","subText","firstSubAction","secondSubAction","rest","validateNestingRef","components","root","always","elementType","optional","renderByDefault","children","defaultProps"],"mappings":"AAAA;;;;;+BAagBM;;;;;;;iEAXO,QAAQ;gCACK,4BAA4B;8BAGnC,iCAAiC;6BAClC,+BAA+B;oCACxB,iCAAiC;AAK7D,kCAAkCC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EACJC,IAAI,EACJC,SAASC,QAAQ,EACjBC,OAAO,EACPC,cAAc,EACdC,eAAe,EACf,GAAGC,MACJ,GAAGR;IACJ,MAAMS,yBAAqBX,sCAAAA,EAAmB;IAE9C,OAAO;QACLY,YAAY;YACVC,MAAMd,wBAAAA;YACNK,MAAMN,0BAAAA;YACNO,SAASP,0BAAAA;YACTS,SAAS;YACTC,gBAAgBV,0BAAAA;YAChBW,iBAAiBX,0BAAAA;QACnB;QACAe,MAAMhB,oBAAAA,CAAKiB,MAAM,CACf;YACEX,SAAKP,6BAAAA,EAAcO,KAAKQ;YACxB,GAAGD,IAAI;QACT,GACA;YAAEK,aAAahB,wBAAAA;QAAY;QAE7BK,MAAMP,oBAAAA,CAAKmB,QAAQ,CAACd,MAAME,IAAI,EAAE;YAAEW,aAAajB,0BAAAA;QAAa;QAC5DO,SAASR,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMG,OAAO,EAAE;YACpCY,iBAAiB,CAAC,CAACf,MAAMgB,QAAQ;YACjCC,cAAc;gBAAED,UAAUhB,MAAMgB,QAAQ;YAAC;YACzCH,aAAajB,0BAAAA;QACf;QACAS,SAASV,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMK,OAAO,EAAE;YAAEQ,aAAa;QAAO;QAC5DP,gBAAgBX,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMM,cAAc,EAAE;YAAEO,aAAajB,0BAAAA;QAAa;QAChFW,iBAAiBZ,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMO,eAAe,EAAE;YAAEM,aAAajB,0BAAAA;QAAa;IACpF;AACF"}
1
+ {"version":3,"sources":["../src/components/MenuGridItem/useMenuGridItem.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useMergedRefs, slot } from '@fluentui/react-utilities';\n\nimport type { MenuGridItemProps, MenuGridItemState } from './MenuGridItem.types';\nimport { MenuGridCell } from './../MenuGridCell/MenuGridCell';\nimport { MenuGridRow } from './../MenuGridRow/MenuGridRow';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\n\n/**\n * Given user props, returns state and render function for a MenuGridItem.\n */\nexport function useMenuGridItem_unstable(props: MenuGridItemProps, ref: React.Ref<HTMLDivElement>): MenuGridItemState {\n const {\n icon,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n subText,\n firstSubAction,\n secondSubAction,\n ...rest\n } = props;\n const validateNestingRef = useValidateNesting('MenuGridItem');\n\n return {\n components: {\n root: MenuGridRow,\n icon: MenuGridCell,\n content: MenuGridCell,\n subText: 'span',\n firstSubAction: MenuGridCell,\n secondSubAction: MenuGridCell,\n },\n root: slot.always(\n {\n ref: useMergedRefs(ref, validateNestingRef),\n ...rest,\n },\n { elementType: MenuGridRow },\n ),\n icon: slot.optional(props.icon, { elementType: MenuGridCell }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.children,\n defaultProps: { children: props.children },\n elementType: MenuGridCell,\n }),\n subText: slot.optional(props.subText, { elementType: 'span' }),\n firstSubAction: slot.optional(props.firstSubAction, { elementType: MenuGridCell }),\n secondSubAction: slot.optional(props.secondSubAction, { elementType: MenuGridCell }),\n };\n}\n"],"names":["useMergedRefs","slot","MenuGridCell","MenuGridRow","useValidateNesting","useMenuGridItem_unstable","props","ref","icon","content","_content","subText","firstSubAction","secondSubAction","rest","validateNestingRef","components","root","always","elementType","optional","renderByDefault","children","defaultProps"],"mappings":"AAAA;;;;;+BAagBK;;;;;;gCAVoB,4BAA4B;8BAGnC,iCAAiC;6BAClC,+BAA+B;oCACxB,iCAAiC;AAK7D,kCAAkCC,KAAwB,EAAEC,GAA8B;IAC/F,MAAM,EACJC,IAAI,EACJC,SAASC,QAAQ,EACjBC,OAAO,EACPC,cAAc,EACdC,eAAe,EACf,GAAGC,MACJ,GAAGR;IACJ,MAAMS,yBAAqBX,sCAAAA,EAAmB;IAE9C,OAAO;QACLY,YAAY;YACVC,MAAMd,wBAAAA;YACNK,MAAMN,0BAAAA;YACNO,SAASP,0BAAAA;YACTS,SAAS;YACTC,gBAAgBV,0BAAAA;YAChBW,iBAAiBX,0BAAAA;QACnB;QACAe,MAAMhB,oBAAAA,CAAKiB,MAAM,CACf;YACEX,SAAKP,6BAAAA,EAAcO,KAAKQ;YACxB,GAAGD,IAAI;QACT,GACA;YAAEK,aAAahB,wBAAAA;QAAY;QAE7BK,MAAMP,oBAAAA,CAAKmB,QAAQ,CAACd,MAAME,IAAI,EAAE;YAAEW,aAAajB,0BAAAA;QAAa;QAC5DO,SAASR,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMG,OAAO,EAAE;YACpCY,iBAAiB,CAAC,CAACf,MAAMgB,QAAQ;YACjCC,cAAc;gBAAED,UAAUhB,MAAMgB,QAAQ;YAAC;YACzCH,aAAajB,0BAAAA;QACf;QACAS,SAASV,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMK,OAAO,EAAE;YAAEQ,aAAa;QAAO;QAC5DP,gBAAgBX,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMM,cAAc,EAAE;YAAEO,aAAajB,0BAAAA;QAAa;QAChFW,iBAAiBZ,oBAAAA,CAAKmB,QAAQ,CAACd,MAAMO,eAAe,EAAE;YAAEM,aAAajB,0BAAAA;QAAa;IACpF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridRow/renderMenuGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridRow_unstable = (state: MenuGridRowState): JSXElement => {\n assertSlots<MenuGridRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridRow_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,6BAA6B,CAACC;QACzCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/MenuGridRow/renderMenuGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuGridRowSlots, MenuGridRowState } from './MenuGridRow.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderMenuGridRow_unstable = (state: MenuGridRowState): JSXElement => {\n assertSlots<MenuGridRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderMenuGridRow_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,6BAA6B,CAACC;QACzCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRow.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\n\nimport { useMenuGridContext_unstable } from '../../contexts/menuGridContext';\nimport { MenuGridRowProps, MenuGridRowState } from './MenuGridRow.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\nimport { useCharacterSearch } from './useCharacterSearch';\n\n/**\n * Given user props, returns state and render function for a MenuGridRow.\n */\nexport function useMenuGridRow_unstable(props: MenuGridRowProps, ref: React.Ref<HTMLDivElement>): MenuGridRowState {\n const validateNestingRef = useValidateNesting('MenuGridRow');\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { tableRowTabsterAttribute } = useMenuGridContext_unstable();\n\n const { characterSearchOnKeyDown, characterSearchRef } = useCharacterSearch();\n\n const onKeyDownToClick = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.isDefaultPrevented() &&\n (event.key === Enter || event.key === Space) &&\n event.target === event.currentTarget\n ) {\n event.currentTarget.click();\n }\n });\n\n const onKeyDown = useEventCallback(\n mergeCallbacks(props.onKeyDown, mergeCallbacks(onKeyDownToClick, characterSearchOnKeyDown)),\n );\n\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n let element = event.target as HTMLElement | null;\n while (element && element !== event.currentTarget) {\n if (element.tabIndex >= 0) {\n return;\n }\n element = element.parentElement;\n }\n props.onClick?.(event);\n });\n\n const state: MenuGridRowState = {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef, innerRef, characterSearchRef),\n role: 'row',\n tabIndex: 0,\n ...tableRowTabsterAttribute,\n ...props,\n onKeyDown,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n\n return state;\n}\n"],"names":["React","Enter","Space","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useMenuGridContext_unstable","useValidateNesting","useCharacterSearch","useMenuGridRow_unstable","props","ref","validateNestingRef","innerRef","useRef","tableRowTabsterAttribute","characterSearchOnKeyDown","characterSearchRef","onKeyDownToClick","event","isDefaultPrevented","key","target","currentTarget","click","onKeyDown","onClick","element","tabIndex","parentElement","state","components","root","always","role","elementType"],"mappings":"AAAA;;;;;+BAoBgBW;;;;;;;iEAlBO,QAAQ;8BACF,0BAA0B;gCAOhD,4BAA4B;iCAES,iCAAiC;oCAE1C,iCAAiC;oCACjC,uBAAuB;AAKnD,iCAAiCC,KAAuB,EAAEC,GAA8B;IAC7F,MAAMC,yBAAqBL,sCAAAA,EAAmB;IAC9C,MAAMM,WAAWf,OAAMgB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,wBAAwB,EAAE,GAAGT,gDAAAA;IAErC,MAAM,EAAEU,wBAAwB,EAAEC,kBAAkB,EAAE,OAAGT,sCAAAA;IAEzD,MAAMU,uBAAmBhB,gCAAAA,EAAiB,CAACiB;QACzC,IACE,CAACA,MAAMC,kBAAkB,MACxBD,CAAAA,MAAME,GAAG,KAAKtB,mBAAAA,IAASoB,MAAME,GAAG,KAAKrB,mBAAAA,AAAI,KAC1CmB,MAAMG,MAAM,KAAKH,MAAMI,aAAa,EACpC;YACAJ,MAAMI,aAAa,CAACC,KAAK;QAC3B;IACF;IAEA,MAAMC,gBAAYvB,gCAAAA,MAChBC,8BAAAA,EAAeO,MAAMe,SAAS,MAAEtB,8BAAAA,EAAee,kBAAkBF;IAGnE,MAAMU,cAAUxB,gCAAAA,EAAiB,CAACiB;YAQhCT;QAPA,IAAIiB,UAAUR,MAAMG,MAAM;QAC1B,MAAOK,WAAWA,YAAYR,MAAMI,aAAa,CAAE;YACjD,IAAII,QAAQC,QAAQ,IAAI,GAAG;gBACzB;YACF;YACAD,UAAUA,QAAQE,aAAa;QACjC;QACAnB,kBAAAA,MAAMgB,OAAAA,AAAO,MAAA,QAAbhB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBS;IAClB;IAEA,MAAMW,QAA0B;QAC9BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM3B,oBAAAA,CAAK4B,MAAM,KACf7B,wCAAAA,EAAyB,OAAO;YAC9BO,SAAKV,6BAAAA,EAAcU,KAAKC,oBAAoBC,UAAUI;YACtDiB,MAAM;YACNN,UAAU;YACV,GAAGb,wBAAwB;YAC3B,GAAGL,KAAK;YACRe;YACAC;QACF,IACA;YAAES,aAAa;QAAM;IAEzB;IAEA,OAAOL;AACT"}
1
+ {"version":3,"sources":["../src/components/MenuGridRow/useMenuGridRow.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport {\n useMergedRefs,\n useEventCallback,\n mergeCallbacks,\n getIntrinsicElementProps,\n slot,\n} from '@fluentui/react-utilities';\n\nimport { useMenuGridContext_unstable } from '../../contexts/menuGridContext';\nimport type { MenuGridRowProps, MenuGridRowState } from './MenuGridRow.types';\nimport { useValidateNesting } from '../../utils/useValidateNesting';\nimport { useCharacterSearch } from './useCharacterSearch';\n\n/**\n * Given user props, returns state and render function for a MenuGridRow.\n */\nexport function useMenuGridRow_unstable(props: MenuGridRowProps, ref: React.Ref<HTMLDivElement>): MenuGridRowState {\n const validateNestingRef = useValidateNesting('MenuGridRow');\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { tableRowTabsterAttribute } = useMenuGridContext_unstable();\n\n const { characterSearchOnKeyDown, characterSearchRef } = useCharacterSearch();\n\n const onKeyDownToClick = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n !event.isDefaultPrevented() &&\n (event.key === Enter || event.key === Space) &&\n event.target === event.currentTarget\n ) {\n event.currentTarget.click();\n }\n });\n\n const onKeyDown = useEventCallback(\n mergeCallbacks(props.onKeyDown, mergeCallbacks(onKeyDownToClick, characterSearchOnKeyDown)),\n );\n\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n let element = event.target as HTMLElement | null;\n while (element && element !== event.currentTarget) {\n if (element.tabIndex >= 0) {\n return;\n }\n element = element.parentElement;\n }\n props.onClick?.(event);\n });\n\n const state: MenuGridRowState = {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, validateNestingRef, innerRef, characterSearchRef),\n role: 'row',\n tabIndex: 0,\n ...tableRowTabsterAttribute,\n ...props,\n onKeyDown,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n\n return state;\n}\n"],"names":["React","Enter","Space","useMergedRefs","useEventCallback","mergeCallbacks","getIntrinsicElementProps","slot","useMenuGridContext_unstable","useValidateNesting","useCharacterSearch","useMenuGridRow_unstable","props","ref","validateNestingRef","innerRef","useRef","tableRowTabsterAttribute","characterSearchOnKeyDown","characterSearchRef","onKeyDownToClick","event","isDefaultPrevented","key","target","currentTarget","click","onKeyDown","onClick","element","tabIndex","parentElement","state","components","root","always","role","elementType"],"mappings":"AAAA;;;;;+BAoBgBW;;;;;;;iEAlBO,QAAQ;8BACF,0BAA0B;gCAOhD,4BAA4B;iCAES,iCAAiC;oCAE1C,iCAAiC;oCACjC,uBAAuB;AAKnD,iCAAiCC,KAAuB,EAAEC,GAA8B;IAC7F,MAAMC,yBAAqBL,sCAAAA,EAAmB;IAC9C,MAAMM,WAAWf,OAAMgB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,wBAAwB,EAAE,GAAGT,gDAAAA;IAErC,MAAM,EAAEU,wBAAwB,EAAEC,kBAAkB,EAAE,OAAGT,sCAAAA;IAEzD,MAAMU,uBAAmBhB,gCAAAA,EAAiB,CAACiB;QACzC,IACE,CAACA,MAAMC,kBAAkB,MACxBD,CAAAA,MAAME,GAAG,KAAKtB,mBAAAA,IAASoB,MAAME,GAAG,KAAKrB,mBAAAA,AAAI,KAC1CmB,MAAMG,MAAM,KAAKH,MAAMI,aAAa,EACpC;YACAJ,MAAMI,aAAa,CAACC,KAAK;QAC3B;IACF;IAEA,MAAMC,gBAAYvB,gCAAAA,MAChBC,8BAAAA,EAAeO,MAAMe,SAAS,MAAEtB,8BAAAA,EAAee,kBAAkBF;IAGnE,MAAMU,cAAUxB,gCAAAA,EAAiB,CAACiB;YAQhCT;QAPA,IAAIiB,UAAUR,MAAMG,MAAM;QAC1B,MAAOK,WAAWA,YAAYR,MAAMI,aAAa,CAAE;YACjD,IAAII,QAAQC,QAAQ,IAAI,GAAG;gBACzB;YACF;YACAD,UAAUA,QAAQE,aAAa;QACjC;QACAnB,kBAAAA,MAAMgB,OAAAA,AAAO,MAAA,QAAbhB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBS;IAClB;IAEA,MAAMW,QAA0B;QAC9BC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM3B,oBAAAA,CAAK4B,MAAM,KACf7B,wCAAAA,EAAyB,OAAO;YAC9BO,SAAKV,6BAAAA,EAAcU,KAAKC,oBAAoBC,UAAUI;YACtDiB,MAAM;YACNN,UAAU;YACV,GAAGb,wBAAwB;YAC3B,GAAGL,KAAK;YACRe;YACAC;QACF,IACA;YAAES,aAAa;QAAM;IAEzB;IAEA,OAAOL;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/menuGridContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\n\nexport const MenuGridContext = React.createContext<MenuGridContextValue | undefined>(\n undefined,\n) as React.Context<MenuGridContextValue>;\n\nconst menuGridContextDefaultValue: MenuGridContextValue = {\n tableRowTabsterAttribute: null,\n setFocusByFirstCharacter: undefined,\n};\n\n/**\n * Context shared between MenuGrid and its children components\n */\nexport type MenuGridContextValue = {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport const MenuGridContextProvider = MenuGridContext.Provider;\n\nexport const useMenuGridContext_unstable = (): MenuGridContextValue =>\n React.useContext(MenuGridContext) ?? menuGridContextDefaultValue;\n"],"names":["React","MenuGridContext","createContext","undefined","menuGridContextDefaultValue","tableRowTabsterAttribute","setFocusByFirstCharacter","MenuGridContextProvider","Provider","useMenuGridContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;mBAKaC;;;2BAwBAM;;;+BAEAE;;;;;iEA7BU,QAAQ;AAGxB,MAAMR,gCAAkBD,OAAME,aAAa,CAChDC,WACuC;AAEzC,MAAMC,8BAAoD;IACxDC,0BAA0B;IAC1BC,0BAA0BH;AAC5B;AAiBO,MAAMI,0BAA0BN,gBAAgBO,QAAQ,CAAC;AAEzD,MAAMC,8BAA8B;QACzCT;WAAAA,CAAAA,oBAAAA,OAAMU,UAAU,CAACT,gBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAqCI;EAA4B"}
1
+ {"version":3,"sources":["../src/contexts/menuGridContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { TabsterDOMAttribute } from '@fluentui/react-tabster';\n\nexport const MenuGridContext = React.createContext<MenuGridContextValue | undefined>(\n undefined,\n) as React.Context<MenuGridContextValue>;\n\nconst menuGridContextDefaultValue: MenuGridContextValue = {\n tableRowTabsterAttribute: null,\n setFocusByFirstCharacter: undefined,\n};\n\n/**\n * Context shared between MenuGrid and its children components\n */\nexport type MenuGridContextValue = {\n /**\n * Tabster row attributes applied to the `MenuGridRow` components\n */\n tableRowTabsterAttribute: TabsterDOMAttribute | null;\n\n /**\n * Callback to focus the first row in the grid whose text content starts with the given character.\n */\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n};\n\nexport const MenuGridContextProvider = MenuGridContext.Provider;\n\nexport const useMenuGridContext_unstable = (): MenuGridContextValue =>\n React.useContext(MenuGridContext) ?? menuGridContextDefaultValue;\n"],"names":["React","MenuGridContext","createContext","undefined","menuGridContextDefaultValue","tableRowTabsterAttribute","setFocusByFirstCharacter","MenuGridContextProvider","Provider","useMenuGridContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;mBAKaC;;;2BAwBAM;;;+BAEAE;;;;;iEA7BU,QAAQ;AAGxB,MAAMR,gCAAkBD,OAAME,aAAa,CAChDC,WACuC;AAEzC,MAAMC,8BAAoD;IACxDC,0BAA0B;IAC1BC,0BAA0BH;AAC5B;AAiBO,MAAMI,0BAA0BN,gBAAgBO,QAAQ,CAAC;AAEzD,MAAMC,8BAA8B;QACzCT;WAAAA,CAAAA,oBAAAA,OAAMU,UAAU,CAACT,gBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAqCI;EAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-menu-grid-preview",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "New fluentui react package",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -19,14 +19,14 @@
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
21
  "@fluentui/keyboard-keys": "^9.0.8",
22
- "@fluentui/react-menu": "^9.24.0",
22
+ "@fluentui/react-menu": "^9.24.1",
23
23
  "@fluentui/react-icons": "^2.0.245",
24
- "@fluentui/react-table": "^9.19.14",
25
- "@fluentui/react-tabster": "^9.26.13",
26
- "@fluentui/react-jsx-runtime": "^9.4.1",
24
+ "@fluentui/react-table": "^9.19.15",
25
+ "@fluentui/react-tabster": "^9.26.14",
26
+ "@fluentui/react-jsx-runtime": "^9.4.2",
27
27
  "@fluentui/react-shared-contexts": "^9.26.2",
28
28
  "@fluentui/react-theme": "^9.2.1",
29
- "@fluentui/react-utilities": "^9.26.2",
29
+ "@fluentui/react-utilities": "^9.26.3",
30
30
  "@griffel/react": "^1.5.32",
31
31
  "@swc/helpers": "^0.5.1"
32
32
  },