@fluentui-copilot/react-attachments 0.0.0-nightly-20240404-0406-2afa9891.1 → 0.0.0-nightly-20240405-0406-15f86c74.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 (44) hide show
  1. package/CHANGELOG.json +5 -5
  2. package/CHANGELOG.md +5 -5
  3. package/dist/index.d.ts +55 -0
  4. package/lib/AttachmentOverflowMenu.js +2 -0
  5. package/lib/AttachmentOverflowMenu.js.map +1 -0
  6. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
  7. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  8. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
  9. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  10. package/lib/components/AttachmentOverflowMenu/index.js +6 -0
  11. package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
  12. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
  13. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  14. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
  15. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  16. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
  17. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  18. package/lib/components/index.js +1 -0
  19. package/lib/components/index.js.map +1 -1
  20. package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
  21. package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
  22. package/lib/index.js +2 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
  25. package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
  26. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
  27. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  28. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
  29. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  30. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
  31. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
  32. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
  33. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  34. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
  35. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  36. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
  37. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  38. package/lib-commonjs/components/index.js +1 -0
  39. package/lib-commonjs/components/index.js.map +1 -1
  40. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
  41. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
  42. package/lib-commonjs/index.js +20 -0
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/package.json +2 -2
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 04 Apr 2024 04:11:43 GMT",
6
- "tag": "@fluentui-copilot/react-attachments_v0.0.0-nightly-20240404-0406-2afa9891.1",
7
- "version": "0.0.0-nightly-20240404-0406-2afa9891.1",
5
+ "date": "Fri, 05 Apr 2024 04:11:31 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.0.0-nightly-20240405-0406-15f86c74.1",
7
+ "version": "0.0.0-nightly-20240405-0406-15f86c74.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,8 +16,8 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui-copilot/react-attachments",
19
- "comment": "Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240404-0406-2afa9891.1",
20
- "commit": "3449a8e8731e9b9dee01156614d56a496e64dd11"
19
+ "comment": "Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240405-0406-15f86c74.1",
20
+ "commit": "7c2db8a7d209d0ba423bea7703b4f2c15b75cff3"
21
21
  }
22
22
  ]
23
23
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Thu, 04 Apr 2024 04:11:43 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 05 Apr 2024 04:11:31 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20240404-0406-2afa9891.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.0.0-nightly-20240404-0406-2afa9891.1)
7
+ ## [0.0.0-nightly-20240405-0406-15f86c74.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.0.0-nightly-20240405-0406-15f86c74.1)
8
8
 
9
- Thu, 04 Apr 2024 04:11:43 GMT
10
- [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.3..@fluentui-copilot/react-attachments_v0.0.0-nightly-20240404-0406-2afa9891.1)
9
+ Fri, 05 Apr 2024 04:11:31 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.3..@fluentui-copilot/react-attachments_v0.0.0-nightly-20240405-0406-15f86c74.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240404-0406-2afa9891.1 ([commit](https://github.com/microsoft/fluentai/commit/3449a8e8731e9b9dee01156614d56a496e64dd11) by beachball)
15
+ - Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240405-0406-15f86c74.1 ([commit](https://github.com/microsoft/fluentai/commit/7c2db8a7d209d0ba423bea7703b4f2c15b75cff3) by beachball)
16
16
 
17
17
  ## [0.8.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.3)
18
18
 
package/dist/index.d.ts CHANGED
@@ -6,6 +6,10 @@ import type { Context } from '@fluentui/react-context-selector';
6
6
  import type { ContextSelector } from '@fluentui/react-context-selector';
7
7
  import { FC } from 'react';
8
8
  import type { ForwardRefComponent } from '@fluentui/react-components';
9
+ import type { MenuContextValues } from '@fluentui/react-components';
10
+ import type { MenuProps } from '@fluentui/react-components';
11
+ import type { MenuSlots } from '@fluentui/react-components';
12
+ import type { MenuState } from '@fluentui/react-components';
9
13
  import { Provider } from 'react';
10
14
  import { ProviderProps } from 'react';
11
15
  import * as React_2 from 'react';
@@ -53,6 +57,37 @@ export declare type AttachmentListSlots = {
53
57
  */
54
58
  export declare type AttachmentListState = ComponentState<AttachmentListSlots> & Pick<AttachmentListProps, 'onAttachmentDismiss'>;
55
59
 
60
+ export declare const AttachmentOverflowMenu: React_2.FC<AttachmentOverflowMenuProps>;
61
+
62
+ export declare const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue>;
63
+
64
+ /**
65
+ * Context shared between AttachmentOverflowMenu and its children components
66
+ */
67
+ export declare type AttachmentOverflowMenuContextValue = Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'>;
68
+
69
+ declare type AttachmentOverflowMenuContextValues = {
70
+ attachmentOverflowMenu: AttachmentOverflowMenuContextValue;
71
+ };
72
+
73
+ /**
74
+ * AttachmentOverflowMenu Props
75
+ */
76
+ export declare type AttachmentOverflowMenuProps = MenuProps;
77
+
78
+ export declare const AttachmentOverflowMenuProvider: Provider<AttachmentOverflowMenuContextValue> & FC<ProviderProps<AttachmentOverflowMenuContextValue>>;
79
+
80
+ export declare type AttachmentOverflowMenuSlots = MenuSlots;
81
+
82
+ /**
83
+ * State used in rendering AttachmentOverflowMenu
84
+ */
85
+ export declare type AttachmentOverflowMenuState = MenuState & {
86
+ isOverflowing: boolean;
87
+ overflowButtonRef?: React.RefObject<HTMLButtonElement>;
88
+ overflowCount: number;
89
+ };
90
+
56
91
  /**
57
92
  * Attachment Props
58
93
  */
@@ -160,6 +195,14 @@ export declare const renderAttachment_unstable: (state: AttachmentState) => JSX.
160
195
  */
161
196
  export declare const renderAttachmentList_unstable: (state: AttachmentListState, contextValues: AttachmentListContextValues) => JSX.Element;
162
197
 
198
+ /**
199
+ * Render the final JSX of AttachmentOverflowMenu
200
+ */
201
+ export declare const renderAttachmentOverflowMenu_unstable: (state: AttachmentOverflowMenuState, contextValues: {
202
+ menuContextValues: MenuContextValues;
203
+ attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;
204
+ }) => JSX.Element | null;
205
+
163
206
  /**
164
207
  * Render the final JSX of AttachmentTag
165
208
  */
@@ -204,6 +247,18 @@ export declare const useAttachmentListContext_unstable: <T>(selector: ContextSel
204
247
  */
205
248
  export declare const useAttachmentListStyles_unstable: (state: AttachmentListState) => AttachmentListState;
206
249
 
250
+ /**
251
+ * Create the state required to render AttachmentOverflowMenu.
252
+ *
253
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,
254
+ * before being passed to renderAttachmentOverflowMenu_unstable.
255
+ *
256
+ * @param props - props from this instance of AttachmentOverflowMenu
257
+ */
258
+ export declare const useAttachmentOverflowMenu_unstable: (props: AttachmentOverflowMenuProps) => AttachmentOverflowMenuState;
259
+
260
+ export declare const useAttachmentOverflowMenuContext_unstable: <T>(selector: ContextSelector<AttachmentOverflowMenuContextValue, T>) => T;
261
+
207
262
  /**
208
263
  * Apply styling to the Attachment slots based on the state
209
264
  */
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenu/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenu/index';\n"],"names":[],"mappings":"AAAA,cAAc,4CAA4C"}
@@ -0,0 +1,15 @@
1
+ import { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';
2
+ import { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';
3
+ import { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';
4
+ import { useMenuContextValues_unstable } from '@fluentui/react-components';
5
+ export const AttachmentOverflowMenu = props => {
6
+ const state = useAttachmentOverflowMenu_unstable(props);
7
+ const menuContextValues = useMenuContextValues_unstable(state);
8
+ const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);
9
+ return renderAttachmentOverflowMenu_unstable(state, {
10
+ menuContextValues,
11
+ attachmentOverflowMenuContextValues
12
+ });
13
+ };
14
+ AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';
15
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps } from './AttachmentOverflowMenu.types';\n\nexport const AttachmentOverflowMenu: React.FC<AttachmentOverflowMenuProps> = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n\n return renderAttachmentOverflowMenu_unstable(state, { menuContextValues, attachmentOverflowMenuContextValues });\n};\n\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n"],"names":["useAttachmentOverflowMenu_unstable","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenuContextValues_unstable","useMenuContextValues_unstable","AttachmentOverflowMenu","props","state","menuContextValues","attachmentOverflowMenuContextValues","displayName"],"mappings":"AACA,SAASA,kCAAkC,QAAQ,8BAA8B;AACjF,SAASC,qCAAqC,QAAQ,iCAAiC;AACvF,SAASC,+CAA+C,QAAQ,2CAA2C;AAC3G,SAASC,6BAA6B,QAAQ,6BAA6B;AAG3E,OAAO,MAAMC,yBAAgEC,CAAAA;IAC3E,MAAMC,QAAQN,mCAAmCK;IACjD,MAAME,oBAAoBJ,8BAA8BG;IACxD,MAAME,sCAAsCN,gDAAgDI;IAE5F,OAAOL,sCAAsCK,OAAO;QAAEC;QAAmBC;IAAoC;AAC/G,EAAE;AAEFJ,uBAAuBK,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentOverflowMenu.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.types.ts"],"sourcesContent":["import type { MenuProps, MenuSlots, MenuState } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuContextValue } from '../../contexts/attachmentOverflowMenuContext';\n\nexport type AttachmentOverflowMenuSlots = MenuSlots;\n\n/**\n * AttachmentOverflowMenu Props\n */\nexport type AttachmentOverflowMenuProps = MenuProps;\n\n/**\n * State used in rendering AttachmentOverflowMenu\n */\nexport type AttachmentOverflowMenuState = MenuState & {\n isOverflowing: boolean;\n overflowButtonRef?: React.RefObject<HTMLButtonElement>;\n overflowCount: number;\n};\n\nexport type AttachmentOverflowMenuContextValues = {\n attachmentOverflowMenu: AttachmentOverflowMenuContextValue;\n};\n"],"names":[],"mappings":"AAAA,WAqBE"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentOverflowMenu';
2
+ export * from './AttachmentOverflowMenu.types';
3
+ export * from './renderAttachmentOverflowMenu';
4
+ export * from './useAttachmentOverflowMenu';
5
+ export * from './useAttachmentOverflowMenuContextValues';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenu.types';\nexport * from './renderAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenuContextValues';\n"],"names":[],"mappings":"AAAA,cAAc,2BAA2B;AACzC,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C,cAAc,8BAA8B;AAC5C,cAAc,2CAA2C"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots, renderMenu_unstable } from '@fluentui/react-components';
3
+ import { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';
4
+ /**
5
+ * Render the final JSX of AttachmentOverflowMenu
6
+ */
7
+ export const renderAttachmentOverflowMenu_unstable = (state, contextValues) => {
8
+ const {
9
+ menuContextValues,
10
+ attachmentOverflowMenuContextValues
11
+ } = contextValues;
12
+ assertSlots(state);
13
+ return state.isOverflowing ? /*#__PURE__*/_jsx(AttachmentOverflowMenuProvider, {
14
+ value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
15
+ children: renderMenu_unstable(state, menuContextValues)
16
+ }) : null;
17
+ };
18
+ //# sourceMappingURL=renderAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["assertSlots","renderMenu_unstable","AttachmentOverflowMenuProvider","renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","isOverflowing","value","attachmentOverflowMenu"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,mBAAmB,QAAQ,6BAA6B;AAC9E,SAASC,8BAA8B,QAAQ,+CAA+C;AAQ9F;;CAEC,GACD,OAAO,MAAMC,wCAAwC,CACnDC,OACAC;IAKA,MAAM,EAAEC,iBAAiB,EAAEC,mCAAmC,EAAE,GAAGF;IACnEL,YAAyCI;IAEzC,OAAOA,MAAMI,aAAa,iBACxB,KAACN;QAA+BO,OAAOF,oCAAoCG,sBAAsB;kBAC9FT,oBAAoBG,OAAOE;SAE5B;AACN,EAAE"}
@@ -0,0 +1,24 @@
1
+ import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';
2
+ /**
3
+ * Create the state required to render AttachmentOverflowMenu.
4
+ *
5
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,
6
+ * before being passed to renderAttachmentOverflowMenu_unstable.
7
+ *
8
+ * @param props - props from this instance of AttachmentOverflowMenu
9
+ */
10
+ export const useAttachmentOverflowMenu_unstable = props => {
11
+ const menuState = useMenu_unstable(props);
12
+ const {
13
+ isOverflowing,
14
+ ref: overflowButtonRef,
15
+ overflowCount
16
+ } = useOverflowMenu();
17
+ return {
18
+ ...menuState,
19
+ isOverflowing,
20
+ overflowButtonRef,
21
+ overflowCount
22
+ };
23
+ };
24
+ //# sourceMappingURL=useAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["useMenu_unstable","useOverflowMenu","useAttachmentOverflowMenu_unstable","props","menuState","isOverflowing","ref","overflowButtonRef","overflowCount"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,6BAA6B;AAG/E;;;;;;;CAOC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjD,MAAMC,YAAYJ,iBAAiBG;IACnC,MAAM,EAAEE,aAAa,EAAEC,KAAKC,iBAAiB,EAAEC,aAAa,EAAE,GAAGP;IAEjE,OAAO;QACL,GAAGG,SAAS;QACZC;QACAE;QACAC;IACF;AACF,EAAE"}
@@ -0,0 +1,17 @@
1
+ export function useAttachmentOverflowMenuContextValues_unstable(state) {
2
+ const {
3
+ isOverflowing,
4
+ overflowButtonRef,
5
+ overflowCount
6
+ } = state;
7
+ // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
8
+ const attachmentOverflowMenu = {
9
+ isOverflowing,
10
+ overflowButtonRef,
11
+ overflowCount
12
+ };
13
+ return {
14
+ attachmentOverflowMenu
15
+ };
16
+ }
17
+ //# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"mappings":"AAEA,OAAO,SAASA,gDACdC,KAAkC;IAElC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAE,GAAGH;IAE5D,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAuB;AAClC"}
@@ -3,4 +3,5 @@ export * from './AttachmentTagList';
3
3
  export * from './AttachmentTagItem';
4
4
  export * from './Attachment';
5
5
  export * from './AttachmentList';
6
+ export * from './AttachmentOverflowMenu';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,mBAAmB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\nexport * from './AttachmentOverflowMenu';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,2BAA2B"}
@@ -0,0 +1,10 @@
1
+ import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ export const AttachmentOverflowMenuContext = createContext(undefined);
3
+ const overflowMenuContextDefaultValue = {
4
+ isOverflowing: false,
5
+ overflowButtonRef: undefined,
6
+ overflowCount: 0
7
+ };
8
+ export const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
9
+ export const useAttachmentOverflowMenuContext_unstable = selector => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));
10
+ //# sourceMappingURL=attachmentOverflowMenuContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentOverflowMenuContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","AttachmentOverflowMenuProvider","Provider","useAttachmentOverflowMenuContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,gCAA6EF,cAExFG,WAA0D;AAE5D,MAAMC,kCAAsE;IAC1EC,eAAe;IACfC,mBAAmBH;IACnBI,eAAe;AACjB;AASA,OAAO,MAAMC,iCAAiCN,8BAA8BO,QAAQ,CAAC;AAErF,OAAO,MAAMC,4CAA4C,CACvDC,WACGV,mBAAmBC,+BAA+B,CAACU,MAAMR,+BAA+B,GAAKO,SAASC,MAAM"}
package/lib/index.js CHANGED
@@ -4,4 +4,6 @@ export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem
4
4
  export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';
5
5
  export { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';
6
6
  export { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable } from './Attachment';
7
+ export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
8
+ export { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttachmentOverflowMenuContext_unstable } from './contexts/attachmentOverflowMenuContext';
7
9
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type { AttachmentListProps, AttachmentListSlots, AttachmentListState } from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type { AttachmentListProps, AttachmentListSlots, AttachmentListState } from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n\nexport type {\n AttachmentOverflowMenuProps,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuState,\n} from './AttachmentOverflowMenu';\nexport {\n AttachmentOverflowMenu,\n renderAttachmentOverflowMenu_unstable,\n useAttachmentOverflowMenu_unstable,\n} from './AttachmentOverflowMenu';\n\nexport type { AttachmentOverflowMenuContextValue } from './contexts/attachmentOverflowMenuContext';\nexport {\n AttachmentOverflowMenuContext,\n AttachmentOverflowMenuProvider,\n useAttachmentOverflowMenuContext_unstable,\n} from './contexts/attachmentOverflowMenuContext';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenu_unstable","AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAOtB,SACEC,sBAAsB,EACtBC,qCAAqC,EACrCC,kCAAkC,QAC7B,2BAA2B;AAGlC,SACEC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,yCAAyC,QACpC,2CAA2C"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/AttachmentOverflowMenu/index"), exports);
7
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.js"],"sourcesContent":["export * from './components/AttachmentOverflowMenu/index';\n//# sourceMappingURL=AttachmentOverflowMenu.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,kDAAkD"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AttachmentOverflowMenu", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AttachmentOverflowMenu;
9
+ }
10
+ });
11
+ const _useAttachmentOverflowMenu = require("./useAttachmentOverflowMenu");
12
+ const _renderAttachmentOverflowMenu = require("./renderAttachmentOverflowMenu");
13
+ const _useAttachmentOverflowMenuContextValues = require("./useAttachmentOverflowMenuContextValues");
14
+ const _reactcomponents = require("@fluentui/react-components");
15
+ const AttachmentOverflowMenu = (props)=>{
16
+ const state = (0, _useAttachmentOverflowMenu.useAttachmentOverflowMenu_unstable)(props);
17
+ const menuContextValues = (0, _reactcomponents.useMenuContextValues_unstable)(state);
18
+ const attachmentOverflowMenuContextValues = (0, _useAttachmentOverflowMenuContextValues.useAttachmentOverflowMenuContextValues_unstable)(state);
19
+ return (0, _renderAttachmentOverflowMenu.renderAttachmentOverflowMenu_unstable)(state, {
20
+ menuContextValues,
21
+ attachmentOverflowMenuContextValues
22
+ });
23
+ };
24
+ AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu'; //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.js"],"sourcesContent":["import { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nexport const AttachmentOverflowMenu = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n return renderAttachmentOverflowMenu_unstable(state, {\n menuContextValues,\n attachmentOverflowMenuContextValues\n });\n};\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n//# sourceMappingURL=AttachmentOverflowMenu.js.map"],"names":["AttachmentOverflowMenu","props","state","useAttachmentOverflowMenu_unstable","menuContextValues","useMenuContextValues_unstable","attachmentOverflowMenuContextValues","useAttachmentOverflowMenuContextValues_unstable","renderAttachmentOverflowMenu_unstable","displayName"],"mappings":";;;;+BAIaA;;;eAAAA;;;2CAJsC;8CACG;wDACU;iCAClB;AACvC,MAAMA,yBAAyBC,CAAAA;IACpC,MAAMC,QAAQC,IAAAA,6DAAkC,EAACF;IACjD,MAAMG,oBAAoBC,IAAAA,8CAA6B,EAACH;IACxD,MAAMI,sCAAsCC,IAAAA,uFAA+C,EAACL;IAC5F,OAAOM,IAAAA,mEAAqC,EAACN,OAAO;QAClDE;QACAE;IACF;AACF;AACAN,uBAAuBS,WAAW,GAAG,0BACrC,kDAAkD"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ //# sourceMappingURL=AttachmentOverflowMenu.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentOverflowMenu.types.js.map"],"names":[],"mappings":";;;;CACA,wDAAwD"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./AttachmentOverflowMenu"), exports);
7
+ _export_star._(require("./AttachmentOverflowMenu.types"), exports);
8
+ _export_star._(require("./renderAttachmentOverflowMenu"), exports);
9
+ _export_star._(require("./useAttachmentOverflowMenu"), exports);
10
+ _export_star._(require("./useAttachmentOverflowMenuContextValues"), exports);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenu.types';\nexport * from './renderAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenuContextValues';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderAttachmentOverflowMenu_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderAttachmentOverflowMenu_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const _attachmentOverflowMenuContext = require("../../contexts/attachmentOverflowMenuContext");
14
+ const renderAttachmentOverflowMenu_unstable = (state, contextValues)=>{
15
+ const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;
16
+ (0, _reactcomponents.assertSlots)(state);
17
+ return state.isOverflowing ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_attachmentOverflowMenuContext.AttachmentOverflowMenuProvider, {
18
+ value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
19
+ children: (0, _reactcomponents.renderMenu_unstable)(state, menuContextValues)
20
+ }) : null;
21
+ }; //# sourceMappingURL=renderAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAttachmentOverflowMenu.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (state, contextValues) => {\n const {\n menuContextValues,\n attachmentOverflowMenuContextValues\n } = contextValues;\n assertSlots(state);\n return state.isOverflowing ? /*#__PURE__*/_jsx(AttachmentOverflowMenuProvider, {\n value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,\n children: renderMenu_unstable(state, menuContextValues)\n }) : null;\n};\n//# sourceMappingURL=renderAttachmentOverflowMenu.js.map"],"names":["renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","_jsx","AttachmentOverflowMenuProvider","value","attachmentOverflowMenu","children","renderMenu_unstable"],"mappings":";;;;+BAMaA;;;eAAAA;;;4BANe;iCACqB;+CACF;AAIxC,MAAMA,wCAAwC,CAACC,OAAOC;IAC3D,MAAM,EACJC,iBAAiB,EACjBC,mCAAmC,EACpC,GAAGF;IACJG,IAAAA,4BAAW,EAACJ;IACZ,OAAOA,MAAMK,aAAa,GAAG,WAAW,GAAEC,IAAAA,eAAI,EAACC,6DAA8B,EAAE;QAC7EC,OAAOL,oCAAoCM,sBAAsB;QACjEC,UAAUC,IAAAA,oCAAmB,EAACX,OAAOE;IACvC,KAAK;AACP,GACA,wDAAwD"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useAttachmentOverflowMenu_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useAttachmentOverflowMenu_unstable;
9
+ }
10
+ });
11
+ const _reactcomponents = require("@fluentui/react-components");
12
+ const useAttachmentOverflowMenu_unstable = (props)=>{
13
+ const menuState = (0, _reactcomponents.useMenu_unstable)(props);
14
+ const { isOverflowing, ref: overflowButtonRef, overflowCount } = (0, _reactcomponents.useOverflowMenu)();
15
+ return {
16
+ ...menuState,
17
+ isOverflowing,
18
+ overflowButtonRef,
19
+ overflowCount
20
+ };
21
+ }; //# sourceMappingURL=useAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenu.js"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = props => {\n const menuState = useMenu_unstable(props);\n const {\n isOverflowing,\n ref: overflowButtonRef,\n overflowCount\n } = useOverflowMenu();\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount\n };\n};\n//# sourceMappingURL=useAttachmentOverflowMenu.js.map"],"names":["useAttachmentOverflowMenu_unstable","props","menuState","useMenu_unstable","isOverflowing","ref","overflowButtonRef","overflowCount","useOverflowMenu"],"mappings":";;;;+BASaA;;;eAAAA;;;iCATqC;AAS3C,MAAMA,qCAAqCC,CAAAA;IAChD,MAAMC,YAAYC,IAAAA,iCAAgB,EAACF;IACnC,MAAM,EACJG,aAAa,EACbC,KAAKC,iBAAiB,EACtBC,aAAa,EACd,GAAGC,IAAAA,gCAAe;IACnB,OAAO;QACL,GAAGN,SAAS;QACZE;QACAE;QACAC;IACF;AACF,GACA,qDAAqD"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useAttachmentOverflowMenuContextValues_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useAttachmentOverflowMenuContextValues_unstable;
9
+ }
10
+ });
11
+ function useAttachmentOverflowMenuContextValues_unstable(state) {
12
+ const { isOverflowing, overflowButtonRef, overflowCount } = state;
13
+ // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
14
+ const attachmentOverflowMenu = {
15
+ isOverflowing,
16
+ overflowButtonRef,
17
+ overflowCount
18
+ };
19
+ return {
20
+ attachmentOverflowMenu
21
+ };
22
+ } //# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuContextValues.js"],"sourcesContent":["export function useAttachmentOverflowMenuContextValues_unstable(state) {\n const {\n isOverflowing,\n overflowButtonRef,\n overflowCount\n } = state;\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount\n };\n return {\n attachmentOverflowMenu\n };\n}\n//# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,gDAAgDC,KAAK;IACnE,MAAM,EACJC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACd,GAAGH;IACJ,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IACA,OAAO;QACLC;IACF;AACF,EACA,kEAAkE"}
@@ -8,4 +8,5 @@ _export_star._(require("./AttachmentTagList"), exports);
8
8
  _export_star._(require("./AttachmentTagItem"), exports);
9
9
  _export_star._(require("./Attachment"), exports);
10
10
  _export_star._(require("./AttachmentList"), exports);
11
+ _export_star._(require("./AttachmentOverflowMenu"), exports);
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\nexport * from './AttachmentOverflowMenu';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ AttachmentOverflowMenuContext: function() {
13
+ return AttachmentOverflowMenuContext;
14
+ },
15
+ AttachmentOverflowMenuProvider: function() {
16
+ return AttachmentOverflowMenuProvider;
17
+ },
18
+ useAttachmentOverflowMenuContext_unstable: function() {
19
+ return useAttachmentOverflowMenuContext_unstable;
20
+ }
21
+ });
22
+ const _reactcontextselector = require("@fluentui/react-context-selector");
23
+ const AttachmentOverflowMenuContext = (0, _reactcontextselector.createContext)(undefined);
24
+ const overflowMenuContextDefaultValue = {
25
+ isOverflowing: false,
26
+ overflowButtonRef: undefined,
27
+ overflowCount: 0
28
+ };
29
+ const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
30
+ const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentOverflowMenuContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["attachmentOverflowMenuContext.js"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nexport const AttachmentOverflowMenuContext = createContext(undefined);\nconst overflowMenuContextDefaultValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0\n};\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\nexport const useAttachmentOverflowMenuContext_unstable = selector => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n//# sourceMappingURL=attachmentOverflowMenuContext.js.map"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"mappings":";;;;;;;;;;;IACaA,6BAA6B;eAA7BA;;IAMAC,8BAA8B;eAA9BA;;IACAC,yCAAyC;eAAzCA;;;sCARqC;AAC3C,MAAMF,gCAAgCG,IAAAA,mCAAa,EAACC;AAC3D,MAAMC,kCAAkC;IACtCC,eAAe;IACfC,mBAAmBH;IACnBI,eAAe;AACjB;AACO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAC7E,MAAMP,4CAA4CQ,CAAAA,WAAYC,IAAAA,wCAAkB,EAACX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE,OAC3K,yDAAyD"}
@@ -92,6 +92,24 @@ _export(exports, {
92
92
  },
93
93
  useAttachment_unstable: function() {
94
94
  return _Attachment.useAttachment_unstable;
95
+ },
96
+ AttachmentOverflowMenu: function() {
97
+ return _AttachmentOverflowMenu.AttachmentOverflowMenu;
98
+ },
99
+ renderAttachmentOverflowMenu_unstable: function() {
100
+ return _AttachmentOverflowMenu.renderAttachmentOverflowMenu_unstable;
101
+ },
102
+ useAttachmentOverflowMenu_unstable: function() {
103
+ return _AttachmentOverflowMenu.useAttachmentOverflowMenu_unstable;
104
+ },
105
+ AttachmentOverflowMenuContext: function() {
106
+ return _attachmentOverflowMenuContext.AttachmentOverflowMenuContext;
107
+ },
108
+ AttachmentOverflowMenuProvider: function() {
109
+ return _attachmentOverflowMenuContext.AttachmentOverflowMenuProvider;
110
+ },
111
+ useAttachmentOverflowMenuContext_unstable: function() {
112
+ return _attachmentOverflowMenuContext.useAttachmentOverflowMenuContext_unstable;
95
113
  }
96
114
  });
97
115
  const _AttachmentTag = require("./AttachmentTag");
@@ -100,4 +118,6 @@ const _AttachmentTagItem = require("./AttachmentTagItem");
100
118
  const _AttachmentList = require("./AttachmentList");
101
119
  const _attachmentListContext = require("./contexts/attachmentListContext");
102
120
  const _Attachment = require("./Attachment");
121
+ const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
122
+ const _attachmentOverflowMenuContext = require("./contexts/attachmentOverflowMenuContext");
103
123
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\nexport { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';\nexport { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';\nexport { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable } from './Attachment';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,cAAc;eAAdA,8BAAc;;IAAEC,wBAAwB;eAAxBA,wCAAwB;;IAAEC,6BAA6B;eAA7BA,6CAA6B;;IAAEC,gCAAgC;eAAhCA,gDAAgC;;IAAEC,0BAA0B;eAA1BA,0CAA0B;;IACrIC,qBAAqB;eAArBA,4CAAqB;;IAAEC,sBAAsB;eAAtBA,6CAAsB;;IAAEC,iCAAiC;eAAjCA,wDAAiC;;IAChFC,UAAU;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;;+BALuB;mCACoB;mCACA;gCACf;uCACrD;4BACiC;CAClI,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\nexport { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';\nexport { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';\nexport { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable } from './Attachment';\nexport { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';\nexport { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttachmentOverflowMenuContext_unstable } from './contexts/attachmentOverflowMenuContext';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenu_unstable","AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,cAAc;eAAdA,8BAAc;;IAAEC,wBAAwB;eAAxBA,wCAAwB;;IAAEC,6BAA6B;eAA7BA,6CAA6B;;IAAEC,gCAAgC;eAAhCA,gDAAgC;;IAAEC,0BAA0B;eAA1BA,0CAA0B;;IACrIC,qBAAqB;eAArBA,4CAAqB;;IAAEC,sBAAsB;eAAtBA,6CAAsB;;IAAEC,iCAAiC;eAAjCA,wDAAiC;;IAChFC,UAAU;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;IACjHC,sBAAsB;eAAtBA,8CAAsB;;IAAEC,qCAAqC;eAArCA,6DAAqC;;IAAEC,kCAAkC;eAAlCA,0DAAkC;;IACjGC,6BAA6B;eAA7BA,4DAA6B;;IAAEC,8BAA8B;eAA9BA,6DAA8B;;IAAEC,yCAAyC;eAAzCA,wEAAyC;;;+BAPgC;mCACoB;mCACA;gCACf;uCACrD;4BACiC;wCAChB;+CACO;CACzH,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-attachments",
3
- "version": "0.0.0-nightly-20240404-0406-2afa9891.1",
3
+ "version": "0.0.0-nightly-20240405-0406-15f86c74.1",
4
4
  "description": "A set of components related to attaching files in Copilot experiences.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/react-provider": "0.0.0-nightly-20240404-0406-2afa9891.1",
15
+ "@fluentui-copilot/react-provider": "0.0.0-nightly-20240405-0406-15f86c74.1",
16
16
  "@swc/helpers": "^0.5.1"
17
17
  },
18
18
  "peerDependencies": {