@fluentui/react-overflow 0.0.0-nightly-20230202-0421.1 → 0.0.0-nightly-20230206-0422.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.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-overflow",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 02 Feb 2023 04:28:26 GMT",
6
- "tag": "@fluentui/react-overflow_v0.0.0-nightly-20230202-0421.1",
7
- "version": "0.0.0-nightly-20230202-0421.1",
5
+ "date": "Mon, 06 Feb 2023 04:29:56 GMT",
6
+ "tag": "@fluentui/react-overflow_v0.0.0-nightly-20230206-0422.1",
7
+ "version": "0.0.0-nightly-20230206-0422.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,26 +16,26 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-overflow",
19
- "comment": "Bump @fluentui/priority-overflow to v0.0.0-nightly-20230202-0421.1",
20
- "commit": "60d99d15463b2f3f6be1c898cf2d74a59c4af5ac"
19
+ "comment": "Bump @fluentui/priority-overflow to v0.0.0-nightly-20230206-0422.1",
20
+ "commit": "5d0660848e215f429135c1593cfacd37f9eb1c9e"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-overflow",
25
- "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20230202-0421.1",
26
- "commit": "60d99d15463b2f3f6be1c898cf2d74a59c4af5ac"
25
+ "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20230206-0422.1",
26
+ "commit": "5d0660848e215f429135c1593cfacd37f9eb1c9e"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-overflow",
31
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230202-0421.1",
32
- "commit": "60d99d15463b2f3f6be1c898cf2d74a59c4af5ac"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230206-0422.1",
32
+ "commit": "5d0660848e215f429135c1593cfacd37f9eb1c9e"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-overflow",
37
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230202-0421.1",
38
- "commit": "60d99d15463b2f3f6be1c898cf2d74a59c4af5ac"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230206-0422.1",
38
+ "commit": "5d0660848e215f429135c1593cfacd37f9eb1c9e"
39
39
  }
40
40
  ]
41
41
  }
package/CHANGELOG.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # Change Log - @fluentui/react-overflow
2
2
 
3
- This log was last generated on Thu, 02 Feb 2023 04:28:26 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 06 Feb 2023 04:29:56 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230202-0421.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v0.0.0-nightly-20230202-0421.1)
7
+ ## [0.0.0-nightly-20230206-0422.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v0.0.0-nightly-20230206-0422.1)
8
8
 
9
- Thu, 02 Feb 2023 04:28:26 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-overflow_v9.0.2..@fluentui/react-overflow_v0.0.0-nightly-20230202-0421.1)
9
+ Mon, 06 Feb 2023 04:29:56 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-overflow_v9.0.2..@fluentui/react-overflow_v0.0.0-nightly-20230206-0422.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/priority-overflow to v0.0.0-nightly-20230202-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/60d99d15463b2f3f6be1c898cf2d74a59c4af5ac) by beachball)
16
- - Bump @fluentui/react-context-selector to v0.0.0-nightly-20230202-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/60d99d15463b2f3f6be1c898cf2d74a59c4af5ac) by beachball)
17
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230202-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/60d99d15463b2f3f6be1c898cf2d74a59c4af5ac) by beachball)
18
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230202-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/60d99d15463b2f3f6be1c898cf2d74a59c4af5ac) by beachball)
15
+ - Bump @fluentui/priority-overflow to v0.0.0-nightly-20230206-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5d0660848e215f429135c1593cfacd37f9eb1c9e) by beachball)
16
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20230206-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5d0660848e215f429135c1593cfacd37f9eb1c9e) by beachball)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230206-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5d0660848e215f429135c1593cfacd37f9eb1c9e) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230206-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/5d0660848e215f429135c1593cfacd37f9eb1c9e) by beachball)
19
19
 
20
20
  ## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v9.0.2)
21
21
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ContextSelector } from '@fluentui/react-context-selector';
1
2
  import type { ObserveOptions } from '@fluentui/priority-overflow';
2
3
  import type { OnUpdateOverflow } from '@fluentui/priority-overflow';
3
4
  import { OverflowGroupState } from '@fluentui/priority-overflow';
@@ -17,6 +18,9 @@ export declare const Overflow: React_2.ForwardRefExoticComponent<Partial<Pick<Ob
17
18
  children: React_2.ReactElement;
18
19
  } & React_2.RefAttributes<unknown>>;
19
20
 
21
+ /**
22
+ * @internal
23
+ */
20
24
  declare interface OverflowContextValue {
21
25
  itemVisibility: Record<string, boolean>;
22
26
  groupVisibility: Record<string, OverflowGroupState>;
@@ -91,6 +95,11 @@ export declare interface UseOverflowContainerReturn<TElement extends HTMLElement
91
95
  containerRef: React_2.RefObject<TElement>;
92
96
  }
93
97
 
98
+ /**
99
+ * @internal
100
+ */
101
+ export declare const useOverflowContext: <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) => SelectedValue;
102
+
94
103
  /**
95
104
  * @returns Number of items that are overflowing
96
105
  */
package/lib/index.js CHANGED
@@ -6,5 +6,6 @@ export { useOverflowContainer } from './useOverflowContainer';
6
6
  export { useOverflowCount } from './useOverflowCount';
7
7
  export { useOverflowItem } from './useOverflowItem';
8
8
  export { useOverflowMenu } from './useOverflowMenu';
9
+ export { useOverflowContext } from './overflowContext';
9
10
  export { OverflowItem } from './components/OverflowItem/OverflowItem';
10
11
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export { Overflow } from './components/Overflow';\nexport type { OverflowProps } from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export { Overflow } from './components/Overflow';\nexport type { OverflowProps } from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\n\nexport { useOverflowContext } from './overflowContext';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\n"]}
@@ -8,5 +8,8 @@ const overflowContextDefaultValue = {
8
8
  updateOverflow: () => null,
9
9
  registerOverflowMenu: () => () => null
10
10
  };
11
+ /**
12
+ * @internal
13
+ */
11
14
  export const useOverflowContext = selector => useContextSelector(OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));
12
15
  //# sourceMappingURL=overflowContext.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAA0BA,aAAa,EAAEC,kBAAkB,QAAiB,kCAAkC;AAW9G,OAAO,MAAMC,eAAe,gBAAGF,aAAa,CAC1CG,SAAS,CACuB;AAElC,MAAMC,2BAA2B,GAAyB;EACxDC,cAAc,EAAE,EAAE;EAClBC,eAAe,EAAE,EAAE;EACnBC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,MAAM,MAAM,IAAI;EAC9BC,cAAc,EAAE,MAAM,IAAI;EAC1BC,oBAAoB,EAAE,MAAM,MAAM;CACnC;AAED,OAAO,MAAMC,kBAAkB,GAAmBC,QAA8D,IAC9GX,kBAAkB,CAACC,eAAe,EAAE,CAACW,GAAG,GAAGT,2BAA2B,KAAKQ,QAAQ,CAACC,GAAG,CAAC,CAAC","names":["createContext","useContextSelector","OverflowContext","undefined","overflowContextDefaultValue","itemVisibility","groupVisibility","hasOverflow","registerItem","updateOverflow","registerOverflowMenu","useOverflowContext","selector","ctx"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/overflowContext.ts"],"sourcesContent":["import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';\nimport { ContextSelector, createContext, useContextSelector, Context } from '@fluentui/react-context-selector';\n\nexport interface OverflowContextValue {\n itemVisibility: Record<string, boolean>;\n groupVisibility: Record<string, OverflowGroupState>;\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n updateOverflow: (padding?: number) => void;\n}\n\nexport const OverflowContext = createContext<OverflowContextValue | undefined>(\n undefined,\n) as Context<OverflowContextValue>;\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n itemVisibility: {},\n groupVisibility: {},\n hasOverflow: false,\n registerItem: () => () => null,\n updateOverflow: () => null,\n registerOverflowMenu: () => () => null,\n};\n\nexport const useOverflowContext = <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) =>\n useContextSelector(OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));\n"]}
1
+ {"version":3,"mappings":"AACA,SAA0BA,aAAa,EAAEC,kBAAkB,QAAiB,kCAAkC;AAc9G,OAAO,MAAMC,eAAe,gBAAGF,aAAa,CAC1CG,SAAS,CACuB;AAElC,MAAMC,2BAA2B,GAAyB;EACxDC,cAAc,EAAE,EAAE;EAClBC,eAAe,EAAE,EAAE;EACnBC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,MAAM,MAAM,IAAI;EAC9BC,cAAc,EAAE,MAAM,IAAI;EAC1BC,oBAAoB,EAAE,MAAM,MAAM;CACnC;AAED;;;AAGA,OAAO,MAAMC,kBAAkB,GAAmBC,QAA8D,IAC9GX,kBAAkB,CAACC,eAAe,EAAE,CAACW,GAAG,GAAGT,2BAA2B,KAAKQ,QAAQ,CAACC,GAAG,CAAC,CAAC","names":["createContext","useContextSelector","OverflowContext","undefined","overflowContextDefaultValue","itemVisibility","groupVisibility","hasOverflow","registerItem","updateOverflow","registerOverflowMenu","useOverflowContext","selector","ctx"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/overflowContext.ts"],"sourcesContent":["import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';\nimport { ContextSelector, createContext, useContextSelector, Context } from '@fluentui/react-context-selector';\n\n/**\n * @internal\n */\nexport interface OverflowContextValue {\n itemVisibility: Record<string, boolean>;\n groupVisibility: Record<string, OverflowGroupState>;\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n updateOverflow: (padding?: number) => void;\n}\n\nexport const OverflowContext = createContext<OverflowContextValue | undefined>(\n undefined,\n) as Context<OverflowContextValue>;\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n itemVisibility: {},\n groupVisibility: {},\n hasOverflow: false,\n registerItem: () => () => null,\n updateOverflow: () => null,\n registerOverflowMenu: () => () => null,\n};\n\n/**\n * @internal\n */\nexport const useOverflowContext = <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) =>\n useContextSelector(OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));\n"]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.OverflowItem = exports.useOverflowMenu = exports.useOverflowItem = exports.useOverflowCount = exports.useOverflowContainer = exports.useIsOverflowItemVisible = exports.useIsOverflowGroupVisible = exports.DATA_OVERFLOW_MENU = exports.DATA_OVERFLOW_ITEM = exports.DATA_OVERFLOWING = exports.Overflow = void 0;
6
+ exports.OverflowItem = exports.useOverflowContext = exports.useOverflowMenu = exports.useOverflowItem = exports.useOverflowCount = exports.useOverflowContainer = exports.useIsOverflowItemVisible = exports.useIsOverflowGroupVisible = exports.DATA_OVERFLOW_MENU = exports.DATA_OVERFLOW_ITEM = exports.DATA_OVERFLOWING = exports.Overflow = void 0;
7
7
  var Overflow_1 = /*#__PURE__*/require("./components/Overflow");
8
8
  Object.defineProperty(exports, "Overflow", {
9
9
  enumerable: true,
@@ -72,6 +72,13 @@ Object.defineProperty(exports, "useOverflowMenu", {
72
72
  return useOverflowMenu_1.useOverflowMenu;
73
73
  }
74
74
  });
75
+ var overflowContext_1 = /*#__PURE__*/require("./overflowContext");
76
+ Object.defineProperty(exports, "useOverflowContext", {
77
+ enumerable: true,
78
+ get: function () {
79
+ return overflowContext_1.useOverflowContext;
80
+ }
81
+ });
75
82
  var OverflowItem_1 = /*#__PURE__*/require("./components/OverflowItem/OverflowItem");
76
83
  Object.defineProperty(exports, "OverflowItem", {
77
84
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,0BAAQ;EAAA;AAAA;AAEjB;AAASF;EAAAC;EAAAC;IAAA,mCAAgB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,qCAAkB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,qCAAkB;EAAA;AAAA;AAEjE;AAASF;EAAAC;EAAAC;IAAA,4DAAyB;EAAA;AAAA;AAClC;AAASF;EAAAC;EAAAC;IAAA,0DAAwB;EAAA;AAAA;AACjC;AAASF;EAAAC;EAAAC;IAAA,kDAAoB;EAAA;AAAA;AAC7B;AAASF;EAAAC;EAAAC;IAAA,0CAAgB;EAAA;AAAA;AACzB;AAASF;EAAAC;EAAAC;IAAA,wCAAe;EAAA;AAAA;AACxB;AAASF;EAAAC;EAAAC;IAAA,wCAAe;EAAA;AAAA;AAGxB;AAASF;EAAAC;EAAAC;IAAA,kCAAY;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/index.ts"],"sourcesContent":["export { Overflow } from './components/Overflow';\nexport type { OverflowProps } from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\n"]}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,0BAAQ;EAAA;AAAA;AAEjB;AAASF;EAAAC;EAAAC;IAAA,mCAAgB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,qCAAkB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,qCAAkB;EAAA;AAAA;AAEjE;AAASF;EAAAC;EAAAC;IAAA,4DAAyB;EAAA;AAAA;AAClC;AAASF;EAAAC;EAAAC;IAAA,0DAAwB;EAAA;AAAA;AACjC;AAASF;EAAAC;EAAAC;IAAA,kDAAoB;EAAA;AAAA;AAC7B;AAASF;EAAAC;EAAAC;IAAA,0CAAgB;EAAA;AAAA;AACzB;AAASF;EAAAC;EAAAC;IAAA,wCAAe;EAAA;AAAA;AACxB;AAASF;EAAAC;EAAAC;IAAA,wCAAe;EAAA;AAAA;AAExB;AAASF;EAAAC;EAAAC;IAAA,2CAAkB;EAAA;AAAA;AAG3B;AAASF;EAAAC;EAAAC;IAAA,kCAAY;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/index.ts"],"sourcesContent":["export { Overflow } from './components/Overflow';\nexport type { OverflowProps } from './components/Overflow';\nexport { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';\nexport type { UseOverflowContainerReturn } from './types';\nexport { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';\nexport { useIsOverflowItemVisible } from './useIsOverflowItemVisible';\nexport { useOverflowContainer } from './useOverflowContainer';\nexport { useOverflowCount } from './useOverflowCount';\nexport { useOverflowItem } from './useOverflowItem';\nexport { useOverflowMenu } from './useOverflowMenu';\n\nexport { useOverflowContext } from './overflowContext';\n\nexport type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';\nexport { OverflowItem } from './components/OverflowItem/OverflowItem';\n"]}
@@ -14,6 +14,9 @@ const overflowContextDefaultValue = {
14
14
  updateOverflow: () => null,
15
15
  registerOverflowMenu: () => () => null
16
16
  };
17
+ /**
18
+ * @internal
19
+ */
17
20
  const useOverflowContext = selector => react_context_selector_1.useContextSelector(exports.OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));
18
21
  exports.useOverflowContext = useOverflowContext;
19
22
  //# sourceMappingURL=overflowContext.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AACA;AAWaA,uBAAe,gBAAGC,sCAAa,CAC1CC,SAAS,CACuB;AAElC,MAAMC,2BAA2B,GAAyB;EACxDC,cAAc,EAAE,EAAE;EAClBC,eAAe,EAAE,EAAE;EACnBC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,MAAM,MAAM,IAAI;EAC9BC,cAAc,EAAE,MAAM,IAAI;EAC1BC,oBAAoB,EAAE,MAAM,MAAM;CACnC;AAEM,MAAMC,kBAAkB,GAAmBC,QAA8D,IAC9GV,2CAAkB,CAACD,uBAAe,EAAE,CAACY,GAAG,GAAGT,2BAA2B,KAAKQ,QAAQ,CAACC,GAAG,CAAC,CAAC;AAD9EZ,0BAAkB","names":["exports","react_context_selector_1","undefined","overflowContextDefaultValue","itemVisibility","groupVisibility","hasOverflow","registerItem","updateOverflow","registerOverflowMenu","useOverflowContext","selector","ctx"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/overflowContext.ts"],"sourcesContent":["import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';\nimport { ContextSelector, createContext, useContextSelector, Context } from '@fluentui/react-context-selector';\n\nexport interface OverflowContextValue {\n itemVisibility: Record<string, boolean>;\n groupVisibility: Record<string, OverflowGroupState>;\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n updateOverflow: (padding?: number) => void;\n}\n\nexport const OverflowContext = createContext<OverflowContextValue | undefined>(\n undefined,\n) as Context<OverflowContextValue>;\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n itemVisibility: {},\n groupVisibility: {},\n hasOverflow: false,\n registerItem: () => () => null,\n updateOverflow: () => null,\n registerOverflowMenu: () => () => null,\n};\n\nexport const useOverflowContext = <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) =>\n useContextSelector(OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));\n"]}
1
+ {"version":3,"mappings":";;;;;;AACA;AAcaA,uBAAe,gBAAGC,sCAAa,CAC1CC,SAAS,CACuB;AAElC,MAAMC,2BAA2B,GAAyB;EACxDC,cAAc,EAAE,EAAE;EAClBC,eAAe,EAAE,EAAE;EACnBC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,MAAM,MAAM,IAAI;EAC9BC,cAAc,EAAE,MAAM,IAAI;EAC1BC,oBAAoB,EAAE,MAAM,MAAM;CACnC;AAED;;;AAGO,MAAMC,kBAAkB,GAAmBC,QAA8D,IAC9GV,2CAAkB,CAACD,uBAAe,EAAE,CAACY,GAAG,GAAGT,2BAA2B,KAAKQ,QAAQ,CAACC,GAAG,CAAC,CAAC;AAD9EZ,0BAAkB","names":["exports","react_context_selector_1","undefined","overflowContextDefaultValue","itemVisibility","groupVisibility","hasOverflow","registerItem","updateOverflow","registerOverflowMenu","useOverflowContext","selector","ctx"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-overflow/src/overflowContext.ts"],"sourcesContent":["import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';\nimport { ContextSelector, createContext, useContextSelector, Context } from '@fluentui/react-context-selector';\n\n/**\n * @internal\n */\nexport interface OverflowContextValue {\n itemVisibility: Record<string, boolean>;\n groupVisibility: Record<string, OverflowGroupState>;\n hasOverflow: boolean;\n registerItem: (item: OverflowItemEntry) => () => void;\n registerOverflowMenu: (el: HTMLElement) => () => void;\n updateOverflow: (padding?: number) => void;\n}\n\nexport const OverflowContext = createContext<OverflowContextValue | undefined>(\n undefined,\n) as Context<OverflowContextValue>;\n\nconst overflowContextDefaultValue: OverflowContextValue = {\n itemVisibility: {},\n groupVisibility: {},\n hasOverflow: false,\n registerItem: () => () => null,\n updateOverflow: () => null,\n registerOverflowMenu: () => () => null,\n};\n\n/**\n * @internal\n */\nexport const useOverflowContext = <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) =>\n useContextSelector(OverflowContext, (ctx = overflowContextDefaultValue) => selector(ctx));\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-overflow",
3
- "version": "0.0.0-nightly-20230202-0421.1",
3
+ "version": "0.0.0-nightly-20230206-0422.1",
4
4
  "description": "React bindings for @fluentui/priority-overflow",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,10 +33,10 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/priority-overflow": "0.0.0-nightly-20230202-0421.1",
37
- "@fluentui/react-context-selector": "0.0.0-nightly-20230202-0421.1",
38
- "@fluentui/react-theme": "0.0.0-nightly-20230202-0421.1",
39
- "@fluentui/react-utilities": "0.0.0-nightly-20230202-0421.1",
36
+ "@fluentui/priority-overflow": "0.0.0-nightly-20230206-0422.1",
37
+ "@fluentui/react-context-selector": "0.0.0-nightly-20230206-0422.1",
38
+ "@fluentui/react-theme": "0.0.0-nightly-20230206-0422.1",
39
+ "@fluentui/react-utilities": "0.0.0-nightly-20230206-0422.1",
40
40
  "@griffel/react": "^1.5.2",
41
41
  "tslib": "^2.1.0"
42
42
  },