@fluentui/react-overflow 0.0.0-nightly-20220511-0419.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/CHANGELOG.json +164 -0
  2. package/CHANGELOG.md +54 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +121 -0
  6. package/lib/components/Overflow.d.ts +14 -0
  7. package/lib/components/Overflow.js +73 -0
  8. package/lib/components/Overflow.js.map +1 -0
  9. package/lib/components/OverflowItem/OverflowItem.d.ts +7 -0
  10. package/lib/components/OverflowItem/OverflowItem.js +21 -0
  11. package/lib/components/OverflowItem/OverflowItem.js.map +1 -0
  12. package/lib/components/OverflowItem/OverflowItem.types.d.ts +22 -0
  13. package/lib/components/OverflowItem/OverflowItem.types.js +2 -0
  14. package/lib/components/OverflowItem/OverflowItem.types.js.map +1 -0
  15. package/lib/components/OverflowItem/index.d.ts +2 -0
  16. package/lib/components/OverflowItem/index.js +2 -0
  17. package/lib/components/OverflowItem/index.js.map +1 -0
  18. package/lib/constants.d.ts +3 -0
  19. package/lib/constants.js +4 -0
  20. package/lib/constants.js.map +1 -0
  21. package/lib/index.d.ts +12 -0
  22. package/lib/index.js +10 -0
  23. package/lib/index.js.map +1 -0
  24. package/lib/overflowContext.d.ts +11 -0
  25. package/lib/overflowContext.js +10 -0
  26. package/lib/overflowContext.js.map +1 -0
  27. package/lib/tsdoc-metadata.json +11 -0
  28. package/lib/types.d.ts +16 -0
  29. package/lib/types.js +2 -0
  30. package/lib/types.js.map +1 -0
  31. package/lib/useIsOverflowGroupVisible.d.ts +6 -0
  32. package/lib/useIsOverflowGroupVisible.js +10 -0
  33. package/lib/useIsOverflowGroupVisible.js.map +1 -0
  34. package/lib/useIsOverflowItemVisible.d.ts +5 -0
  35. package/lib/useIsOverflowItemVisible.js +10 -0
  36. package/lib/useIsOverflowItemVisible.js.map +1 -0
  37. package/lib/useOverflowContainer.d.ts +10 -0
  38. package/lib/useOverflowContainer.js +69 -0
  39. package/lib/useOverflowContainer.js.map +1 -0
  40. package/lib/useOverflowCount.d.ts +4 -0
  41. package/lib/useOverflowCount.js +15 -0
  42. package/lib/useOverflowCount.js.map +1 -0
  43. package/lib/useOverflowItem.d.ts +9 -0
  44. package/lib/useOverflowItem.js +27 -0
  45. package/lib/useOverflowItem.js.map +1 -0
  46. package/lib/useOverflowMenu.d.ts +6 -0
  47. package/lib/useOverflowMenu.js +40 -0
  48. package/lib/useOverflowMenu.js.map +1 -0
  49. package/lib-commonjs/components/Overflow.d.ts +14 -0
  50. package/lib-commonjs/components/Overflow.js +85 -0
  51. package/lib-commonjs/components/Overflow.js.map +1 -0
  52. package/lib-commonjs/components/OverflowItem/OverflowItem.d.ts +7 -0
  53. package/lib-commonjs/components/OverflowItem/OverflowItem.js +31 -0
  54. package/lib-commonjs/components/OverflowItem/OverflowItem.js.map +1 -0
  55. package/lib-commonjs/components/OverflowItem/OverflowItem.types.d.ts +22 -0
  56. package/lib-commonjs/components/OverflowItem/OverflowItem.types.js +6 -0
  57. package/lib-commonjs/components/OverflowItem/OverflowItem.types.js.map +1 -0
  58. package/lib-commonjs/components/OverflowItem/index.d.ts +2 -0
  59. package/lib-commonjs/components/OverflowItem/index.js +16 -0
  60. package/lib-commonjs/components/OverflowItem/index.js.map +1 -0
  61. package/lib-commonjs/constants.d.ts +3 -0
  62. package/lib-commonjs/constants.js +10 -0
  63. package/lib-commonjs/constants.js.map +1 -0
  64. package/lib-commonjs/index.d.ts +12 -0
  65. package/lib-commonjs/index.js +106 -0
  66. package/lib-commonjs/index.js.map +1 -0
  67. package/lib-commonjs/overflowContext.d.ts +11 -0
  68. package/lib-commonjs/overflowContext.js +21 -0
  69. package/lib-commonjs/overflowContext.js.map +1 -0
  70. package/lib-commonjs/types.d.ts +16 -0
  71. package/lib-commonjs/types.js +6 -0
  72. package/lib-commonjs/types.js.map +1 -0
  73. package/lib-commonjs/useIsOverflowGroupVisible.d.ts +6 -0
  74. package/lib-commonjs/useIsOverflowGroupVisible.js +20 -0
  75. package/lib-commonjs/useIsOverflowGroupVisible.js.map +1 -0
  76. package/lib-commonjs/useIsOverflowItemVisible.d.ts +5 -0
  77. package/lib-commonjs/useIsOverflowItemVisible.js +20 -0
  78. package/lib-commonjs/useIsOverflowItemVisible.js.map +1 -0
  79. package/lib-commonjs/useOverflowContainer.d.ts +10 -0
  80. package/lib-commonjs/useOverflowContainer.js +85 -0
  81. package/lib-commonjs/useOverflowContainer.js.map +1 -0
  82. package/lib-commonjs/useOverflowCount.d.ts +4 -0
  83. package/lib-commonjs/useOverflowCount.js +25 -0
  84. package/lib-commonjs/useOverflowCount.js.map +1 -0
  85. package/lib-commonjs/useOverflowItem.d.ts +9 -0
  86. package/lib-commonjs/useOverflowItem.js +39 -0
  87. package/lib-commonjs/useOverflowItem.js.map +1 -0
  88. package/lib-commonjs/useOverflowMenu.d.ts +6 -0
  89. package/lib-commonjs/useOverflowMenu.js +54 -0
  90. package/lib-commonjs/useOverflowMenu.js.map +1 -0
  91. package/package.json +53 -0
package/CHANGELOG.json ADDED
@@ -0,0 +1,164 @@
1
+ {
2
+ "name": "@fluentui/react-overflow",
3
+ "entries": [
4
+ {
5
+ "date": "Wed, 11 May 2022 04:31:16 GMT",
6
+ "tag": "@fluentui/react-overflow_v0.0.0-nightly-20220511-0419.1",
7
+ "version": "0.0.0-nightly-20220511-0419.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "email not defined",
12
+ "package": "@fluentui/react-overflow",
13
+ "commit": "not available",
14
+ "comment": "Release nightly v9"
15
+ },
16
+ {
17
+ "author": "lingfangao@hotmail.com",
18
+ "package": "@fluentui/react-overflow",
19
+ "commit": "4ae08d6ecf85ac29593ddc2abb23f8a073711b38",
20
+ "comment": "feat: Initial beta release"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-overflow",
25
+ "comment": "Bump @fluentui/priority-overflow to v0.0.0-nightly-20220511-0419.1",
26
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-overflow",
31
+ "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20220511-0419.1",
32
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-overflow",
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220511-0419.1",
38
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-overflow",
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1",
44
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Thu, 05 May 2022 18:26:30 GMT",
51
+ "tag": "@fluentui/react-overflow_v9.0.0-alpha.0",
52
+ "version": "9.0.0-alpha.0",
53
+ "comments": {
54
+ "prerelease": [
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-overflow",
58
+ "comment": "Bump @fluentui/priority-overflow to v9.0.0-beta.0",
59
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-overflow",
64
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.8",
65
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-overflow",
70
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.7",
71
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-overflow",
76
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
77
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ {
83
+ "date": "Wed, 04 May 2022 13:26:54 GMT",
84
+ "tag": "@fluentui/react-overflow_v9.0.0-alpha.0",
85
+ "version": "9.0.0-alpha.0",
86
+ "comments": {
87
+ "prerelease": [
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui/react-overflow",
91
+ "comment": "Bump @fluentui/priority-overflow to v9.0.0-beta.0",
92
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui/react-overflow",
97
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.7",
98
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@fluentui/react-overflow",
103
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.6",
104
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@fluentui/react-overflow",
109
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.7",
110
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "date": "Mon, 25 Apr 2022 09:32:19 GMT",
117
+ "tag": "@fluentui/react-priority-overflow_v9.0.0-alpha.0",
118
+ "version": "9.0.0-alpha.0",
119
+ "comments": {
120
+ "undefined": [
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-priority-overflow",
124
+ "comment": "Bump @fluentui/priority-overflow to v9.0.0-beta.0",
125
+ "commit": "02ca1d3c198452c1693067f5f18bd01b2ed5d6e6"
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ {
131
+ "date": "Tue, 19 Apr 2022 19:17:29 GMT",
132
+ "tag": "@fluentui/react-overflow_v9.0.0-alpha.0",
133
+ "version": "9.0.0-alpha.0",
134
+ "comments": {
135
+ "prerelease": [
136
+ {
137
+ "author": "beachball",
138
+ "package": "@fluentui/react-overflow",
139
+ "comment": "Bump @fluentui/priority-overflow to v9.0.0-beta.0",
140
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
141
+ },
142
+ {
143
+ "author": "beachball",
144
+ "package": "@fluentui/react-overflow",
145
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.6",
146
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
147
+ },
148
+ {
149
+ "author": "beachball",
150
+ "package": "@fluentui/react-overflow",
151
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.5",
152
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
153
+ },
154
+ {
155
+ "author": "beachball",
156
+ "package": "@fluentui/react-overflow",
157
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.6",
158
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
159
+ }
160
+ ]
161
+ }
162
+ }
163
+ ]
164
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,54 @@
1
+ # Change Log - @fluentui/react-overflow
2
+
3
+ This log was last generated on Wed, 11 May 2022 04:31:16 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20220511-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v0.0.0-nightly-20220511-0419.1)
8
+
9
+ Wed, 11 May 2022 04:31:16 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-overflow_v9.0.0-alpha.0..@fluentui/react-overflow_v0.0.0-nightly-20220511-0419.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
15
+ - feat: Initial beta release ([PR #22913](https://github.com/microsoft/fluentui/pull/22913) by lingfangao@hotmail.com)
16
+ - Bump @fluentui/priority-overflow to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
17
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
20
+
21
+ ## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v9.0.0-alpha.0)
22
+
23
+ Thu, 05 May 2022 18:26:30 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-overflow_v9.0.0-alpha.0..@fluentui/react-overflow_v9.0.0-alpha.0)
25
+
26
+ ### Changes
27
+
28
+ - Bump @fluentui/priority-overflow to v9.0.0-beta.0 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
29
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
30
+ - Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
31
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
32
+
33
+ ## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v9.0.0-alpha.0)
34
+
35
+ Wed, 04 May 2022 13:26:54 GMT
36
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-priority-overflow_v9.0.0-alpha.0..@fluentui/react-overflow_v9.0.0-alpha.0)
37
+
38
+ ### Changes
39
+
40
+ - Bump @fluentui/priority-overflow to v9.0.0-beta.0 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
41
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
42
+ - Bump @fluentui/react-theme to v9.0.0-rc.6 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
43
+ - Bump @fluentui/react-utilities to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
44
+
45
+ ## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-overflow_v9.0.0-alpha.0)
46
+
47
+ Tue, 19 Apr 2022 19:17:29 GMT
48
+
49
+ ### Changes
50
+
51
+ - Bump @fluentui/priority-overflow to v9.0.0-beta.0 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
52
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
53
+ - Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
54
+ - Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-overflow
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui/react-overflow
2
+
3
+ **React Priority Overflow components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
4
+
5
+ These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
@@ -0,0 +1,121 @@
1
+ import type { ObserveOptions } from '@fluentui/priority-overflow';
2
+ import type { OnUpdateItemVisibility } from '@fluentui/priority-overflow';
3
+ import type { OnUpdateOverflow } from '@fluentui/priority-overflow';
4
+ import { OverflowGroupState } from '@fluentui/priority-overflow';
5
+ import type { OverflowItemEntry } from '@fluentui/priority-overflow';
6
+ import * as React_2 from 'react';
7
+
8
+ export declare const DATA_OVERFLOW_ITEM = "data-overflow-item";
9
+
10
+ export declare const DATA_OVERFLOW_MENU = "data-overflow-menu";
11
+
12
+ export declare const DATA_OVERFLOWING = "data-overflowing";
13
+
14
+ /**
15
+ * Provides an OverflowContext for OverflowItem descendants.
16
+ */
17
+ export declare const Overflow: React_2.ForwardRefExoticComponent<Partial<Pick<ObserveOptions, "padding" | "overflowDirection" | "overflowAxis" | "minimumVisible">> & {
18
+ children: React_2.ReactElement;
19
+ } & React_2.RefAttributes<unknown>>;
20
+
21
+ declare interface OverflowContextValue {
22
+ itemVisibility: Record<string, boolean>;
23
+ groupVisibility: Record<string, OverflowGroupState>;
24
+ hasOverflow: boolean;
25
+ registerItem: (item: OverflowItemEntry) => () => void;
26
+ updateOverflow: (padding?: number) => void;
27
+ }
28
+
29
+ /**
30
+ * Attaches overflow item behavior to its child registered with the OverflowContext.
31
+ * It does not render an element of its own.
32
+ */
33
+ export declare const OverflowItem: React_2.ForwardRefExoticComponent<OverflowItemProps & React_2.RefAttributes<unknown>>;
34
+
35
+ /**
36
+ * OverflowItemProps
37
+ */
38
+ export declare type OverflowItemProps = {
39
+ /**
40
+ * The unique identifier for the item used by the overflow manager.
41
+ */
42
+ id: string;
43
+ /**
44
+ * Assigns the item to a group, group visibility can be watched.
45
+ */
46
+ groupId?: string;
47
+ /**
48
+ * A higher priority means the item overflows later.
49
+ */
50
+ priority?: number;
51
+ /**
52
+ * The single child that has overflow item behavior attached.
53
+ */
54
+ children: React_2.ReactElement;
55
+ };
56
+
57
+ /**
58
+ * Overflow Props
59
+ */
60
+ export declare type OverflowProps = Partial<Pick<ObserveOptions, 'overflowAxis' | 'overflowDirection' | 'padding' | 'minimumVisible'>> & {
61
+ children: React_2.ReactElement;
62
+ };
63
+
64
+ export declare const updateVisibilityAttribute: OnUpdateItemVisibility;
65
+
66
+ /**
67
+ * @param id - unique identifier for a group of overflow items
68
+ * @returns visibility state of the group
69
+ */
70
+ export declare function useIsOverflowGroupVisible(id: string): OverflowGroupState;
71
+
72
+ /**
73
+ * @param id - unique identifier for the item used by the overflow manager
74
+ * @returns visibility state of an overflow item
75
+ */
76
+ export declare function useIsOverflowItemVisible(id: string): boolean;
77
+
78
+ /**
79
+ *
80
+ * @param update - Callback when overflow state changes
81
+ * @param options - Options to configure the overflow container
82
+ * @returns - ref to attach to an intrinsic HTML element and imperative functions
83
+ */
84
+ export declare const useOverflowContainer: <TElement extends HTMLElement>(update: OnUpdateOverflow, options: Omit<ObserveOptions, 'onUpdateOverflow'>) => UseOverflowContainerReturn<TElement>;
85
+
86
+ export declare interface UseOverflowContainerReturn<TElement extends HTMLElement> {
87
+ /**
88
+ * Ref to apply to the container that will overflow
89
+ */
90
+ containerRef: React_2.RefObject<TElement>;
91
+ /**
92
+ * Registers and overflow item
93
+ */
94
+ registerItem: OverflowContextValue['registerItem'];
95
+ /**
96
+ * Imperative function to trigger overflow update
97
+ */
98
+ updateOverflow: OverflowContextValue['updateOverflow'];
99
+ }
100
+
101
+ /**
102
+ * @returns Number of items that are overflowing
103
+ */
104
+ export declare const useOverflowCount: () => number;
105
+
106
+ /**
107
+ * Registers an overflow item
108
+ * @param id - unique identifier for the item used by the overflow manager
109
+ * @param priority - higher priority means the item overflows later
110
+ * @param groupId - assigns the item to a group, group visibility can be watched
111
+ * @returns ref to assign to an intrinsic HTML element
112
+ */
113
+ export declare function useOverflowItem<TElement extends HTMLElement>(id: string, priority?: number, groupId?: string): React_2.RefObject<TElement>;
114
+
115
+ export declare function useOverflowMenu<TElement extends HTMLElement>(id?: string): {
116
+ ref: React_2.RefObject<TElement>;
117
+ overflowCount: number;
118
+ isOverflowing: boolean;
119
+ };
120
+
121
+ export { }
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import type { ObserveOptions } from '@fluentui/priority-overflow';
3
+ /**
4
+ * Overflow Props
5
+ */
6
+ export declare type OverflowProps = Partial<Pick<ObserveOptions, 'overflowAxis' | 'overflowDirection' | 'padding' | 'minimumVisible'>> & {
7
+ children: React.ReactElement;
8
+ };
9
+ /**
10
+ * Provides an OverflowContext for OverflowItem descendants.
11
+ */
12
+ export declare const Overflow: React.ForwardRefExoticComponent<Partial<Pick<ObserveOptions, "padding" | "overflowDirection" | "overflowAxis" | "minimumVisible">> & {
13
+ children: React.ReactElement;
14
+ } & React.RefAttributes<unknown>>;
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+ import { __styles, mergeClasses } from '@griffel/react';
3
+ import { applyTriggerPropsToChildren, useMergedRefs } from '@fluentui/react-utilities';
4
+ import { OverflowContext } from '../overflowContext';
5
+ import { updateVisibilityAttribute, useOverflowContainer } from '../useOverflowContainer';
6
+ import { DATA_OVERFLOWING, DATA_OVERFLOW_MENU } from '../constants';
7
+
8
+ const useStyles = /*#__PURE__*/__styles({
9
+ "overflowMenu": {
10
+ "Brvla84": "fyfkpbf"
11
+ },
12
+ "overflowingItems": {
13
+ "Hevnzl": "ftz08xh"
14
+ }
15
+ }, {
16
+ "d": [".fyfkpbf [data-overflow-menu]{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".ftz08xh>[data-overflowing]{display:none;}"]
17
+ });
18
+ /**
19
+ * Provides an OverflowContext for OverflowItem descendants.
20
+ */
21
+
22
+
23
+ export const Overflow = /*#__PURE__*/React.forwardRef((props, ref) => {
24
+ const styles = useStyles();
25
+ const {
26
+ children,
27
+ minimumVisible,
28
+ overflowAxis = 'horizontal',
29
+ overflowDirection,
30
+ padding
31
+ } = props;
32
+ const [hasOverflow, setHasOverflow] = React.useState(false);
33
+ const [itemVisibility, setItemVisibility] = React.useState({});
34
+ const [groupVisibility, setGroupVisibility] = React.useState({}); // useOverflowContainer wraps this method in a useEventCallback.
35
+ // TODO: Do we need a useEventCallback here too?
36
+
37
+ const update = data => {
38
+ setHasOverflow(() => data.invisibleItems.length > 0);
39
+ setItemVisibility(() => {
40
+ const newState = {};
41
+ data.visibleItems.forEach(x => newState[x.id] = true);
42
+ data.invisibleItems.forEach(x => newState[x.id] = false);
43
+ return newState;
44
+ });
45
+ setGroupVisibility(data.groupVisibility);
46
+ };
47
+
48
+ const {
49
+ containerRef,
50
+ registerItem,
51
+ updateOverflow
52
+ } = useOverflowContainer(update, {
53
+ overflowDirection,
54
+ overflowAxis,
55
+ padding,
56
+ minimumVisible,
57
+ onUpdateItemVisibility: updateVisibilityAttribute
58
+ });
59
+ const clonedChild = applyTriggerPropsToChildren(children, {
60
+ ref: useMergedRefs(containerRef, ref),
61
+ className: mergeClasses(styles.overflowMenu, styles.overflowingItems, children.props.className)
62
+ });
63
+ return /*#__PURE__*/React.createElement(OverflowContext.Provider, {
64
+ value: {
65
+ itemVisibility,
66
+ groupVisibility,
67
+ hasOverflow,
68
+ registerItem,
69
+ updateOverflow
70
+ }
71
+ }, clonedChild);
72
+ });
73
+ //# sourceMappingURL=Overflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Overflow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,mBAAqB,YAArB,QAAyC,gBAAzC;AAEA,SAAS,2BAAT,EAAsC,aAAtC,QAA2D,2BAA3D;AAEA,SAAS,eAAT,QAAgC,oBAAhC;AACA,SAAS,yBAAT,EAAoC,oBAApC,QAAgE,yBAAhE;AACA,SAAS,gBAAT,EAA2B,kBAA3B,QAAqD,cAArD;;AAEA,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAuBA;;AAEG;;;AACH,OAAO,MAAM,QAAQ,gBAAG,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAuB,GAAvB,KAA8B;AACrE,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,cAAZ;AAA4B,IAAA,YAAY,GAAG,YAA3C;AAAyD,IAAA,iBAAzD;AAA4E,IAAA;AAA5E,MAAwF,KAA9F;AAEA,QAAM,CAAC,WAAD,EAAc,cAAd,IAAgC,KAAK,CAAC,QAAN,CAAe,KAAf,CAAtC;AACA,QAAM,CAAC,cAAD,EAAiB,iBAAjB,IAAsC,KAAK,CAAC,QAAN,CAAwC,EAAxC,CAA5C;AACA,QAAM,CAAC,eAAD,EAAkB,kBAAlB,IAAwC,KAAK,CAAC,QAAN,CAAmD,EAAnD,CAA9C,CAPqE,CASrE;AACA;;AACA,QAAM,MAAM,GAAqB,IAAI,IAAG;AACtC,IAAA,cAAc,CAAC,MAAM,IAAI,CAAC,cAAL,CAAoB,MAApB,GAA6B,CAApC,CAAd;AACA,IAAA,iBAAiB,CAAC,MAAK;AACrB,YAAM,QAAQ,GAA4B,EAA1C;AACA,MAAA,IAAI,CAAC,YAAL,CAAkB,OAAlB,CAA0B,CAAC,IAAK,QAAQ,CAAC,CAAC,CAAC,EAAH,CAAR,GAAiB,IAAjD;AACA,MAAA,IAAI,CAAC,cAAL,CAAoB,OAApB,CAA4B,CAAC,IAAK,QAAQ,CAAC,CAAC,CAAC,EAAH,CAAR,GAAiB,KAAnD;AACA,aAAO,QAAP;AACD,KALgB,CAAjB;AAMA,IAAA,kBAAkB,CAAC,IAAI,CAAC,eAAN,CAAlB;AACD,GATD;;AAWA,QAAM;AAAE,IAAA,YAAF;AAAgB,IAAA,YAAhB;AAA8B,IAAA;AAA9B,MAAiD,oBAAoB,CAAC,MAAD,EAAS;AAClF,IAAA,iBADkF;AAElF,IAAA,YAFkF;AAGlF,IAAA,OAHkF;AAIlF,IAAA,cAJkF;AAKlF,IAAA,sBAAsB,EAAE;AAL0D,GAAT,CAA3E;AAQA,QAAM,WAAW,GAAG,2BAA2B,CAAC,QAAD,EAAW;AACxD,IAAA,GAAG,EAAE,aAAa,CAAC,YAAD,EAAe,GAAf,CADsC;AAExD,IAAA,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,YAAR,EAAsB,MAAM,CAAC,gBAA7B,EAA+C,QAAQ,CAAC,KAAT,CAAe,SAA9D;AAFiC,GAAX,CAA/C;AAKA,sBACE,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAjB,EAAyB;AACvB,IAAA,KAAK,EAAE;AACL,MAAA,cADK;AAEL,MAAA,eAFK;AAGL,MAAA,WAHK;AAIL,MAAA,YAJK;AAKL,MAAA;AALK;AADgB,GAAzB,EASG,WATH,CADF;AAaD,CAhDuB,CAAjB","sourcesContent":["import * as React from 'react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { OnUpdateOverflow, OverflowGroupState, ObserveOptions } from '@fluentui/priority-overflow';\nimport { applyTriggerPropsToChildren, useMergedRefs } from '@fluentui/react-utilities';\n\nimport { OverflowContext } from '../overflowContext';\nimport { updateVisibilityAttribute, useOverflowContainer } from '../useOverflowContainer';\nimport { DATA_OVERFLOWING, DATA_OVERFLOW_MENU } from '../constants';\n\nconst useStyles = makeStyles({\n overflowMenu: {\n [`& [${DATA_OVERFLOW_MENU}]`]: {\n flexShrink: 0,\n },\n },\n\n overflowingItems: {\n [`& > [${DATA_OVERFLOWING}]`]: {\n display: 'none',\n },\n },\n});\n\n/**\n * Overflow Props\n */\nexport type OverflowProps = Partial<\n Pick<ObserveOptions, 'overflowAxis' | 'overflowDirection' | 'padding' | 'minimumVisible'>\n> & {\n children: React.ReactElement;\n};\n\n/**\n * Provides an OverflowContext for OverflowItem descendants.\n */\nexport const Overflow = React.forwardRef((props: OverflowProps, ref) => {\n const styles = useStyles();\n\n const { children, minimumVisible, overflowAxis = 'horizontal', overflowDirection, padding } = props;\n\n const [hasOverflow, setHasOverflow] = React.useState(false);\n const [itemVisibility, setItemVisibility] = React.useState<Record<string, boolean>>({});\n const [groupVisibility, setGroupVisibility] = React.useState<Record<string, OverflowGroupState>>({});\n\n // useOverflowContainer wraps this method in a useEventCallback.\n // TODO: Do we need a useEventCallback here too?\n const update: OnUpdateOverflow = data => {\n setHasOverflow(() => data.invisibleItems.length > 0);\n setItemVisibility(() => {\n const newState: Record<string, boolean> = {};\n data.visibleItems.forEach(x => (newState[x.id] = true));\n data.invisibleItems.forEach(x => (newState[x.id] = false));\n return newState;\n });\n setGroupVisibility(data.groupVisibility);\n };\n\n const { containerRef, registerItem, updateOverflow } = useOverflowContainer(update, {\n overflowDirection,\n overflowAxis,\n padding,\n minimumVisible,\n onUpdateItemVisibility: updateVisibilityAttribute,\n });\n\n const clonedChild = applyTriggerPropsToChildren(children, {\n ref: useMergedRefs(containerRef, ref),\n className: mergeClasses(styles.overflowMenu, styles.overflowingItems, children.props.className),\n });\n\n return (\n <OverflowContext.Provider\n value={{\n itemVisibility,\n groupVisibility,\n hasOverflow,\n registerItem,\n updateOverflow,\n }}\n >\n {clonedChild}\n </OverflowContext.Provider>\n );\n});\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { OverflowItemProps } from './OverflowItem.types';
3
+ /**
4
+ * Attaches overflow item behavior to its child registered with the OverflowContext.
5
+ * It does not render an element of its own.
6
+ */
7
+ export declare const OverflowItem: React.ForwardRefExoticComponent<OverflowItemProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { applyTriggerPropsToChildren, useMergedRefs } from '@fluentui/react-utilities';
3
+ import { useOverflowItem } from '../../useOverflowItem';
4
+ /**
5
+ * Attaches overflow item behavior to its child registered with the OverflowContext.
6
+ * It does not render an element of its own.
7
+ */
8
+
9
+ export const OverflowItem = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const {
11
+ id,
12
+ groupId,
13
+ priority,
14
+ children
15
+ } = props;
16
+ const containerRef = useOverflowItem(id, priority, groupId);
17
+ return applyTriggerPropsToChildren(children, {
18
+ ref: useMergedRefs(containerRef, ref)
19
+ });
20
+ });
21
+ //# sourceMappingURL=OverflowItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/OverflowItem/OverflowItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,EAAsC,aAAtC,QAA2D,2BAA3D;AACA,SAAS,eAAT,QAAgC,uBAAhC;AAGA;;;AAGG;;AACH,OAAO,MAAM,YAAY,gBAAG,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAA2B,GAA3B,KAAkC;AAC7E,QAAM;AAAE,IAAA,EAAF;AAAM,IAAA,OAAN;AAAe,IAAA,QAAf;AAAyB,IAAA;AAAzB,MAAsC,KAA5C;AAEA,QAAM,YAAY,GAAG,eAAe,CAAC,EAAD,EAAK,QAAL,EAAe,OAAf,CAApC;AACA,SAAO,2BAA2B,CAAC,QAAD,EAAW;AAC3C,IAAA,GAAG,EAAE,aAAa,CAAC,YAAD,EAAe,GAAf;AADyB,GAAX,CAAlC;AAGD,CAP2B,CAArB","sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, useMergedRefs } from '@fluentui/react-utilities';\nimport { useOverflowItem } from '../../useOverflowItem';\nimport { OverflowItemProps } from './OverflowItem.types';\n\n/**\n * Attaches overflow item behavior to its child registered with the OverflowContext.\n * It does not render an element of its own.\n */\nexport const OverflowItem = React.forwardRef((props: OverflowItemProps, ref) => {\n const { id, groupId, priority, children } = props;\n\n const containerRef = useOverflowItem(id, priority, groupId);\n return applyTriggerPropsToChildren(children, {\n ref: useMergedRefs(containerRef, ref),\n });\n});\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * OverflowItemProps
4
+ */
5
+ export declare type OverflowItemProps = {
6
+ /**
7
+ * The unique identifier for the item used by the overflow manager.
8
+ */
9
+ id: string;
10
+ /**
11
+ * Assigns the item to a group, group visibility can be watched.
12
+ */
13
+ groupId?: string;
14
+ /**
15
+ * A higher priority means the item overflows later.
16
+ */
17
+ priority?: number;
18
+ /**
19
+ * The single child that has overflow item behavior attached.
20
+ */
21
+ children: React.ReactElement;
22
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=OverflowItem.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverflowItem.types.js","sourceRoot":"../src/","sources":["components/OverflowItem/OverflowItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\n/**\n * OverflowItemProps\n */\nexport type OverflowItemProps = {\n /**\n * The unique identifier for the item used by the overflow manager.\n */\n id: string;\n /**\n * Assigns the item to a group, group visibility can be watched.\n */\n groupId?: string;\n /**\n * A higher priority means the item overflows later.\n */\n priority?: number;\n /**\n * The single child that has overflow item behavior attached.\n */\n children: React.ReactElement;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export type { OverflowItemProps } from './OverflowItem.types';
2
+ export { OverflowItem } from './OverflowItem';
@@ -0,0 +1,2 @@
1
+ export { OverflowItem } from './OverflowItem';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/OverflowItem/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export type { OverflowItemProps } from './OverflowItem.types';\nexport { OverflowItem } from './OverflowItem';\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const DATA_OVERFLOWING = "data-overflowing";
2
+ export declare const DATA_OVERFLOW_ITEM = "data-overflow-item";
3
+ export declare const DATA_OVERFLOW_MENU = "data-overflow-menu";
@@ -0,0 +1,4 @@
1
+ export const DATA_OVERFLOWING = 'data-overflowing';
2
+ export const DATA_OVERFLOW_ITEM = 'data-overflow-item';
3
+ export const DATA_OVERFLOW_MENU = 'data-overflow-menu';
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"../src/","sources":["constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC","sourcesContent":["export const DATA_OVERFLOWING = 'data-overflowing';\nexport const DATA_OVERFLOW_ITEM = 'data-overflow-item';\nexport const DATA_OVERFLOW_MENU = 'data-overflow-menu';\n"]}
package/lib/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export { Overflow } from './components/Overflow';
2
+ export type { OverflowProps } from './components/Overflow';
3
+ export { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';
4
+ export type { UseOverflowContainerReturn } from './types';
5
+ export { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';
6
+ export { useIsOverflowItemVisible } from './useIsOverflowItemVisible';
7
+ export { updateVisibilityAttribute, useOverflowContainer } from './useOverflowContainer';
8
+ export { useOverflowCount } from './useOverflowCount';
9
+ export { useOverflowItem } from './useOverflowItem';
10
+ export { useOverflowMenu } from './useOverflowMenu';
11
+ export type { OverflowItemProps } from './components/OverflowItem/OverflowItem.types';
12
+ export { OverflowItem } from './components/OverflowItem/OverflowItem';
package/lib/index.js ADDED
@@ -0,0 +1,10 @@
1
+ export { Overflow } from './components/Overflow';
2
+ export { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './constants';
3
+ export { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible';
4
+ export { useIsOverflowItemVisible } from './useIsOverflowItemVisible';
5
+ export { updateVisibilityAttribute, useOverflowContainer } from './useOverflowContainer';
6
+ export { useOverflowCount } from './useOverflowCount';
7
+ export { useOverflowItem } from './useOverflowItem';
8
+ export { useOverflowMenu } from './useOverflowMenu';
9
+ export { OverflowItem } from './components/OverflowItem/OverflowItem';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzF,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 { updateVisibilityAttribute, 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"]}
@@ -0,0 +1,11 @@
1
+ import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';
2
+ import { ContextSelector } from '@fluentui/react-context-selector';
3
+ export interface OverflowContextValue {
4
+ itemVisibility: Record<string, boolean>;
5
+ groupVisibility: Record<string, OverflowGroupState>;
6
+ hasOverflow: boolean;
7
+ registerItem: (item: OverflowItemEntry) => () => void;
8
+ updateOverflow: (padding?: number) => void;
9
+ }
10
+ export declare const OverflowContext: import("@fluentui/react-context-selector").Context<OverflowContextValue>;
11
+ export declare const useOverflowContext: <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) => SelectedValue;
@@ -0,0 +1,10 @@
1
+ import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ export const OverflowContext = /*#__PURE__*/createContext({
3
+ itemVisibility: {},
4
+ groupVisibility: {},
5
+ hasOverflow: false,
6
+ registerItem: () => () => null,
7
+ updateOverflow: () => null
8
+ });
9
+ export const useOverflowContext = selector => useContextSelector(OverflowContext, selector);
10
+ //# sourceMappingURL=overflowContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["overflowContext.ts"],"names":[],"mappings":"AACA,SAA0B,aAA1B,EAAyC,kBAAzC,QAAmE,kCAAnE;AAUA,OAAO,MAAM,eAAe,gBAAG,aAAa,CAAuB;AACjE,EAAA,cAAc,EAAE,EADiD;AAEjE,EAAA,eAAe,EAAE,EAFgD;AAGjE,EAAA,WAAW,EAAE,KAHoD;AAIjE,EAAA,YAAY,EAAE,MAAM,MAAM,IAJuC;AAKjE,EAAA,cAAc,EAAE,MAAM;AAL2C,CAAvB,CAArC;AAQP,OAAO,MAAM,kBAAkB,GAAmB,QAAhB,IAChC,kBAAkB,CAAC,eAAD,EAAkB,QAAlB,CADb","sourcesContent":["import type { OverflowGroupState, OverflowItemEntry } from '@fluentui/priority-overflow';\nimport { ContextSelector, createContext, useContextSelector } 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 updateOverflow: (padding?: number) => void;\n}\n\nexport const OverflowContext = createContext<OverflowContextValue>({\n itemVisibility: {},\n groupVisibility: {},\n hasOverflow: false,\n registerItem: () => () => null,\n updateOverflow: () => null,\n});\n\nexport const useOverflowContext = <SelectedValue>(selector: ContextSelector<OverflowContextValue, SelectedValue>) =>\n useContextSelector(OverflowContext, selector);\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.18.1"
9
+ }
10
+ ]
11
+ }