@fluentui-copilot/react-attachments 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +63 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +220 -5
- package/lib/AttachmentList.js +2 -0
- package/lib/AttachmentList.js.map +1 -0
- package/lib/AttachmentOverflowMenu.js +2 -0
- package/lib/AttachmentOverflowMenu.js.map +1 -0
- package/lib/AttachmentOverflowMenuButton.js +2 -0
- package/lib/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/AttachmentOverflowMenuItem.js +2 -0
- package/lib/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +6 -8
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.js +2 -2
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.js +13 -0
- package/lib/components/AttachmentList/AttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.types.js +2 -0
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -0
- package/lib/components/AttachmentList/index.js +6 -0
- package/lib/components/AttachmentList/index.js.map +1 -0
- package/lib/components/AttachmentList/renderAttachmentList.js +14 -0
- package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentList.js +74 -0
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +13 -0
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.js +14 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/index.js +6 -0
- package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +14 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
- package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
- package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/utils/useAttachmentTagSlots.js +2 -2
- package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib/contexts/attachmentListContext.js +8 -0
- package/lib/contexts/attachmentListContext.js.map +1 -0
- package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
- package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/AttachmentList.js +7 -0
- package/lib-commonjs/AttachmentList.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/Attachment/useAttachment.js +5 -7
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +4 -4
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +23 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +5 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/index.js +11 -0
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +20 -0
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +68 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +20 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js +30 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +39 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +28 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/index.js +5 -0
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js +28 -0
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib-commonjs/index.js +78 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -2,6 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
import { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
|
|
3
3
|
import { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
|
|
4
4
|
import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use new AttachmentOverflowMenuItem component exported from @fluentui-copilot/react-attachments package instead.
|
|
7
|
+
* Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
|
|
8
|
+
*/
|
|
5
9
|
export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
6
10
|
const state = useAttachmentTagItem_unstable(props, ref);
|
|
7
11
|
useAttachmentTagItemStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from @fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF;;;CAGC,GACD,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTagItem_unstable","props","ref","elementType","root","media","content","icon"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAOC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC3E;AACF,EAAE"}
|
|
@@ -4,7 +4,10 @@ import { useAttachmentTagList_unstable } from './useAttachmentTagList';
|
|
|
4
4
|
import { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';
|
|
5
5
|
import { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';
|
|
6
6
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use new AttachmentList component exported from @fluentui-copilot/react-attachments package instead.
|
|
9
|
+
* Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
|
|
10
|
+
*/
|
|
8
11
|
export const AttachmentTagList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
12
|
const state = useAttachmentTagList_unstable(props, ref);
|
|
10
13
|
const contextValues = useAttachmentTagListContextValues_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from @fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["React","renderAttachmentTagList_unstable","useAttachmentTagList_unstable","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","useCustomStyleHook","AttachmentTagList","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0CAA0C,QAAQ,sCAAsC;AACjG,SAASC,mCAAmC,QAAQ,+BAA+B;AAGnF,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;CAGC,GACD,OAAO,MAAMC,kCAAiEN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IACnD,MAAME,gBAAgBR,2CAA2CO;IAEjEN,oCAAoCM;IACpCL,mBAAmB,8BAA8BK;IAEjD,OAAOT,iCAAiCS,OAAOC;AACjD,GAAG;AAEHL,kBAAkBM,WAAW,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
|
|
2
2
|
/**
|
|
3
3
|
* Create the state required to render AttachmentTagList.
|
|
4
4
|
*
|
|
@@ -21,7 +21,7 @@ export const useAttachmentTagList_unstable = (props, ref) => {
|
|
|
21
21
|
components: {
|
|
22
22
|
root: 'div'
|
|
23
23
|
},
|
|
24
|
-
root: slot.always(
|
|
24
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
25
25
|
'aria-label': 'Attachments',
|
|
26
26
|
ref,
|
|
27
27
|
role: 'menu',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useArrowNavigationGroup","useAttachmentTagList_unstable","props","ref","onAttachmentTagDismiss","focusAttributes","axis","circular","components","root","always","role","elementType"],"mappings":"AAEA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,uBAAuB,QAAQ,6BAA6B;AAGrG;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,sBAAsB,EAAE,GAAGF;IAEnC,MAAMG,kBAAkBL,wBAAwB;QAC9CM,MAAM;QACNC,UAAU;IACZ;IAEA,OAAO;QACLH;QAEAI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMV,KAAKW,MAAM,CACfZ,yBAAyB,OAAO;YAC9B,cAAc;YACdK;YACAQ,MAAM;YACN,GAAGN,eAAe;YAClB,GAAGH,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
package/lib/components/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export * from './AttachmentTag';
|
|
2
2
|
export * from './AttachmentTagList';
|
|
3
3
|
export * from './AttachmentTagItem';
|
|
4
|
+
export * from './Attachment';
|
|
5
|
+
export * from './AttachmentList';
|
|
6
|
+
export * from './AttachmentOverflowMenu';
|
|
7
|
+
export * from './AttachmentOverflowMenuButton';
|
|
8
|
+
export * from './AttachmentOverflowMenuItem';
|
|
4
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB"}
|
|
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';\nexport * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuItem';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,2BAA2B;AACzC,cAAc,iCAAiC;AAC/C,cAAc,+BAA+B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
|
|
3
3
|
import { useHasParentContext } from '@fluentui/react-context-selector';
|
|
4
4
|
import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
|
|
5
5
|
import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';
|
|
@@ -20,7 +20,7 @@ export function useAttachmentTagSlots(props, ref, options) {
|
|
|
20
20
|
const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
|
|
21
21
|
const hasParentContext = useHasParentContext(AttachmentTagListContext);
|
|
22
22
|
const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
|
|
23
|
-
const root = slot.always(
|
|
23
|
+
const root = slot.always(getIntrinsicElementProps(elementType.root, {
|
|
24
24
|
ref,
|
|
25
25
|
...props,
|
|
26
26
|
role: rootRole
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\n\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\n\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps, AttachmentTagState } from './../AttachmentTag/AttachmentTag.types';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './../AttachmentTagItem/AttachmentTagItem.types';\n\n/**\n * @internal\n * Create the slots required to render AttachmentTag or AttachmentTagItem.\n */\nexport function useAttachmentTagSlots<TAttachmentTagState extends AttachmentTagState | AttachmentTagItemState>(\n props: AttachmentTagProps | AttachmentTagItemProps,\n ref: React.Ref<HTMLButtonElement | HTMLDivElement>,\n options: {\n elementType: TAttachmentTagState['components'];\n },\n): TAttachmentTagState {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const { children, role } = props;\n const { elementType } = options;\n\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role ?? (hasParentContext ? 'menuitem' : undefined);\n\n const root: TAttachmentTagState['root'] = slot.always(\n getIntrinsicElementProps(elementType.root as 'button' | 'div', {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: elementType.root as 'button' | 'div' },\n );\n root.onClick = mergeCallbacks(\n root.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onAttachmentTagDismiss?.(ev, { content: children, media }),\n );\n\n const media: TAttachmentTagState['media'] = slot.optional(props.media, { elementType: elementType.media });\n\n const content: TAttachmentTagState['content'] = slot.always(props.content, {\n defaultProps: {\n children,\n },\n elementType: elementType.content,\n });\n\n const icon: TAttachmentTagState['icon'] = slot.always(props.icon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: elementType.icon,\n });\n\n return {\n components: {\n root: elementType.root,\n media: elementType.media,\n content: elementType.content,\n icon: elementType.icon,\n },\n root,\n media,\n content,\n icon,\n } as TAttachmentTagState;\n}\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useHasParentContext","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentTagListContext_unstable","AttachmentTagListContext","useAttachmentTagSlots","props","ref","options","onAttachmentTagDismiss","context","children","role","elementType","DismissIcon","hasParentContext","rootRole","undefined","root","always","onClick","ev","content","media","optional","defaultProps","icon","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AAEtF,SAASC,oCAAoC,QAAQ,0CAA0C;AAE/F,SAASC,wBAAwB,QAAQ,0CAA0C;AAInF;;;CAGC,GACD,OAAO,SAASC,sBACdC,KAAkD,EAClDC,GAAkD,EAClDC,OAEC;IAED,MAAMC,yBAAyBN,qCAAqCO,CAAAA,UAAWA,QAAQD,sBAAsB;IAC7G,MAAM,EAAEE,QAAQ,EAAEC,IAAI,EAAE,GAAGN;IAC3B,MAAM,EAAEO,WAAW,EAAE,GAAGL;IAExB,MAAMM,cAAcZ,WAAWD,iBAAiBD;IAEhD,MAAMe,mBAAmBhB,oBAAoBK;IAC7C,MAAMY,WAAWJ,iBAAAA,kBAAAA,OAASG,mBAAmB,aAAaE;IAE1D,MAAMC,OAAoCpB,KAAKqB,MAAM,CACnDvB,yBAAyBiB,YAAYK,IAAI,EAAsB;QAC7DX;QACA,GAAGD,KAAK;QACRM,MAAMI;IACR,IACA;QAAEH,aAAaA,YAAYK,IAAI;IAAqB;IAEtDA,KAAKE,OAAO,GAAGvB,eACbqB,KAAKE,OAAO,EACZ,CAACC,KACCZ,mCAAAA,6CAAAA,uBAAyBY,IAAI;YAAEC,SAASX;YAAUY;QAAM;IAG5D,MAAMA,QAAsCzB,KAAK0B,QAAQ,CAAClB,MAAMiB,KAAK,EAAE;QAAEV,aAAaA,YAAYU,KAAK;IAAC;IAExG,MAAMD,UAA0CxB,KAAKqB,MAAM,CAACb,MAAMgB,OAAO,EAAE;QACzEG,cAAc;YACZd;QACF;QACAE,aAAaA,YAAYS,OAAO;IAClC;IAEA,MAAMI,OAAoC5B,KAAKqB,MAAM,CAACb,MAAMoB,IAAI,EAAE;QAChED,cAAc;YACZd,wBAAU,oBAACG;QACb;QACAD,aAAaA,YAAYa,IAAI;IAC/B;IAEA,OAAO;QACLC,YAAY;YACVT,MAAML,YAAYK,IAAI;YACtBK,OAAOV,YAAYU,KAAK;YACxBD,SAAST,YAAYS,OAAO;YAC5BI,MAAMb,YAAYa,IAAI;QACxB;QACAR;QACAK;QACAD;QACAI;IACF;AACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
|
+
export const AttachmentListContext = createContext(undefined);
|
|
3
|
+
const attachmentListContextDefaultValue = {
|
|
4
|
+
onAttachmentDismiss: () => null
|
|
5
|
+
};
|
|
6
|
+
export const AttachmentListProvider = AttachmentListContext.Provider;
|
|
7
|
+
export const useAttachmentListContext_unstable = selector => useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));
|
|
8
|
+
//# sourceMappingURL=attachmentListContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListProps } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentListContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","AttachmentListProvider","Provider","useAttachmentListContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,wBAA6DF,cAExEG,WAAkD;AAEpD,MAAMC,oCAAgE;IACpEC,qBAAqB,IAAM;AAC7B;AAOA,OAAO,MAAMC,yBAAyBJ,sBAAsBK,QAAQ,CAAC;AAErE,OAAO,MAAMC,oCAAoC,CAAIC,WACnDR,mBAAmBC,uBAAuB,CAACQ,MAAMN,iCAAiC,GAAKK,SAASC,MAAM"}
|
|
@@ -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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';
|
|
2
2
|
export { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';
|
|
3
3
|
export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';
|
|
4
|
+
export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';
|
|
5
|
+
export { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';
|
|
4
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';
|
|
9
|
+
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
|
|
10
|
+
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
|
|
5
11
|
//# 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 { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport { Attachment
|
|
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\nexport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton';\nexport {\n AttachmentOverflowMenuButton,\n attachmentOverflowMenuButtonClassNames,\n renderAttachmentOverflowMenuButton_unstable,\n useAttachmentOverflowMenuButtonStyles_unstable,\n useAttachmentOverflowMenuButton_unstable,\n} from './AttachmentOverflowMenuButton';\n\nexport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem';\nexport {\n AttachmentOverflowMenuItem,\n attachmentOverflowMenuItemClassNames,\n renderAttachmentOverflowMenuItem_unstable,\n useAttachmentOverflowMenuItemStyles_unstable,\n useAttachmentOverflowMenuItem_unstable,\n} from './AttachmentOverflowMenuItem';\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","AttachmentOverflowMenuButton","attachmentOverflowMenuButtonClassNames","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useAttachmentOverflowMenuButton_unstable","AttachmentOverflowMenuItem","attachmentOverflowMenuItemClassNames","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","useAttachmentOverflowMenuItem_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;AAOlD,SACEC,4BAA4B,EAC5BC,sCAAsC,EACtCC,2CAA2C,EAC3CC,8CAA8C,EAC9CC,wCAAwC,QACnC,iCAAiC;AAOxC,SACEC,0BAA0B,EAC1BC,oCAAoC,EACpCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,sCAAsC,QACjC,+BAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentList.js"],"sourcesContent":["export * from './components/AttachmentList/index';\n//# sourceMappingURL=AttachmentList.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,0CAA0C"}
|
|
@@ -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,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/AttachmentOverflowMenuButton/index"), exports);
|
|
7
|
+
//# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.js"],"sourcesContent":["export * from './components/AttachmentOverflowMenuButton/index';\n//# sourceMappingURL=AttachmentOverflowMenuButton.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,wDAAwD"}
|
|
@@ -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/AttachmentOverflowMenuItem/index"), exports);
|
|
7
|
+
//# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.js"],"sourcesContent":["export * from './components/AttachmentOverflowMenuItem/index';\n//# sourceMappingURL=AttachmentOverflowMenuItem.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,sDAAsD"}
|
|
@@ -12,12 +12,11 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _reactcomponents = require("@fluentui/react-components");
|
|
14
14
|
const _reacticons = require("@fluentui/react-icons");
|
|
15
|
-
const
|
|
15
|
+
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
16
16
|
const useAttachment_unstable = (props, ref)=>{
|
|
17
17
|
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const root = _reactcomponents.slot.always((0, _reactcomponents.getNativeElementProps)('div', {
|
|
18
|
+
const onAttachmentDismiss = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context.onAttachmentDismiss);
|
|
19
|
+
const root = _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
21
20
|
ref,
|
|
22
21
|
...props
|
|
23
22
|
}), {
|
|
@@ -32,9 +31,8 @@ const useAttachment_unstable = (props, ref)=>{
|
|
|
32
31
|
},
|
|
33
32
|
elementType: 'button'
|
|
34
33
|
});
|
|
35
|
-
dismissButton.onClick = (0, _reactcomponents.mergeCallbacks)(dismissButton.onClick, (ev)=>
|
|
36
|
-
|
|
37
|
-
media: props.media
|
|
34
|
+
dismissButton.onClick = (0, _reactcomponents.mergeCallbacks)(dismissButton.onClick, (ev)=>onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
|
|
35
|
+
id: props.id
|
|
38
36
|
}));
|
|
39
37
|
const media = _reactcomponents.slot.optional(props.media, {
|
|
40
38
|
elementType: 'span'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachment.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachment.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props, ref) => {\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n const root = slot.always(getIntrinsicElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n });\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button'\n });\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: {\n 'aria-label': 'Dismiss'\n },\n elementType: 'button'\n });\n dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {\n id: props.id\n }));\n const media = slot.optional(props.media, {\n elementType: 'span'\n });\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children\n },\n elementType: 'span'\n });\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DismissIcon, null)\n },\n elementType: 'span'\n });\n const state = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span'\n },\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon\n };\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n return state;\n};\n//# sourceMappingURL=useAttachment.js.map"],"names":["useAttachment_unstable","props","ref","DismissIcon","bundleIcon","Dismiss20Filled","Dismiss20Regular","onAttachmentDismiss","useAttachmentListContext_unstable","context","root","slot","always","getIntrinsicElementProps","elementType","primaryAction","dismissButton","defaultProps","onClick","mergeCallbacks","ev","id","media","optional","content","children","dismissIcon","React","createElement","state","components","as"],"mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;iCACwC;4BACD;uCACZ;AAU3C,MAAMA,yBAAyB,CAACC,OAAOC;IAC5C,MAAMC,cAAcC,IAAAA,sBAAU,EAACC,2BAAe,EAAEC,4BAAgB;IAChE,MAAMC,sBAAsBC,IAAAA,wDAAiC,EAACC,CAAAA,UAAWA,QAAQF,mBAAmB;IACpG,MAAMG,OAAOC,qBAAI,CAACC,MAAM,CAACC,IAAAA,yCAAwB,EAAC,OAAO;QACvDX;QACA,GAAGD,KAAK;IACV,IAAI;QACFa,aAAa;IACf;IACA,MAAMC,gBAAgBJ,qBAAI,CAACC,MAAM,CAACX,MAAMc,aAAa,EAAE;QACrDD,aAAa;IACf;IACA,MAAME,gBAAgBL,qBAAI,CAACC,MAAM,CAACX,MAAMe,aAAa,EAAE;QACrDC,cAAc;YACZ,cAAc;QAChB;QACAH,aAAa;IACf;IACAE,cAAcE,OAAO,GAAGC,IAAAA,+BAAc,EAACH,cAAcE,OAAO,EAAEE,CAAAA,KAAMb,wBAAwB,QAAQA,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBa,IAAI;YACpKC,IAAIpB,MAAMoB,EAAE;QACd;IACA,MAAMC,QAAQX,qBAAI,CAACY,QAAQ,CAACtB,MAAMqB,KAAK,EAAE;QACvCR,aAAa;IACf;IACA,MAAMU,UAAUb,qBAAI,CAACC,MAAM,CAACX,MAAMuB,OAAO,EAAE;QACzCP,cAAc;YACZQ,UAAUxB,MAAMwB,QAAQ;QAC1B;QACAX,aAAa;IACf;IACA,MAAMY,cAAcf,qBAAI,CAACC,MAAM,CAACX,MAAMyB,WAAW,EAAE;QACjDT,cAAc;YACZQ,UAAU,WAAW,GAAEE,OAAMC,aAAa,CAACzB,aAAa;QAC1D;QACAW,aAAa;IACf;IACA,MAAMe,QAAQ;QACZC,YAAY;YACVpB,MAAM;YACNK,eAAe;YACfC,eAAe;YACfM,OAAO;YACPE,SAAS;YACTE,aAAa;QACf;QACAhB;QACAK;QACAC;QACAM;QACAE;QACAE;IACF;IACA,IAAIG,MAAMd,aAAa,CAACgB,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACf,aAAa,GAAG;IACnC;IACA,OAAOc;AACT,GACA,yCAAyC"}
|
|
@@ -27,8 +27,8 @@ const attachmentClassNames = {
|
|
|
27
27
|
};
|
|
28
28
|
const ATTACHMENT_MAXWIDTH = '180px';
|
|
29
29
|
const ATTACHMENT_SIZE = '20px';
|
|
30
|
-
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("
|
|
31
|
-
".
|
|
30
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("rj3sqpg", null, [
|
|
31
|
+
".rj3sqpg{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;}"
|
|
32
32
|
]);
|
|
33
33
|
const buttonBaseStyles = {
|
|
34
34
|
alignItems: 'center',
|
|
@@ -109,8 +109,8 @@ const useDismissButtonBaseClassName = (0, _reactcomponents.__resetStyles)("r1cf2
|
|
|
109
109
|
"@media (forced-colors: active){.rhq1520:hover{background-color:HighlightText;}.rhq1520:active{background-color:HighlightText;}}"
|
|
110
110
|
]
|
|
111
111
|
});
|
|
112
|
-
const useMediaBaseClassName = (0, _reactcomponents.__resetStyles)("
|
|
113
|
-
".
|
|
112
|
+
const useMediaBaseClassName = (0, _reactcomponents.__resetStyles)("rz1lum2", null, [
|
|
113
|
+
".rz1lum2{display:inline-flex;font-size:20px;height:20px;line-height:20px;width:20px;}"
|
|
114
114
|
]);
|
|
115
115
|
const useContentBaseClassName = (0, _reactcomponents.__resetStyles)("rmt99gk", null, [
|
|
116
116
|
".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentStyles.js"],"sourcesContent":["import { createCustomFocusIndicatorStyle, __resetStyles, __styles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nexport const attachmentClassNames = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon'\n};\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\nconst useRootBaseClassName = __resetStyles(\"r1u26nio\", null, [\".r1u26nio{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;max-width:180px;}\"]);\nconst buttonBaseStyles = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1\n }),\n verticalAlign: 'middle'\n};\nconst usePrimaryActionBaseClassName = __resetStyles(\"rftb5h9\", \"rofiitm\", [\".rftb5h9{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-right-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}\", \".rftb5h9[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".rofiitm{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-left-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}\", \".rofiitm[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\"]);\nconst usePrimaryActionStyles = __styles({\n button: {\n eoavqd: \"f8491dx\",\n Jwef8y: \"f1h648pw\",\n Bi91k9c: \"fnwyq0v\",\n ecr2s2: \"fwdzr64\",\n lj723h: \"flvvhsy\",\n Bqrx1nm: \"fq7113v\",\n kx9iu6: \"fp3oj7s\"\n }\n}, {\n h: [\".f8491dx:hover{cursor:pointer;}\", \".f1h648pw:hover{background-color:var(--colorNeutralBackground3Hover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\"],\n a: [\".fwdzr64:active{background-color:var(--colorNeutralBackground3Pressed);}\", \".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}\"],\n m: [[\"@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fp3oj7s:active{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useDismissButtonBaseClassName = __resetStyles(\"r1cf2ehf\", \"rhq1520\", {\n r: [\".r1cf2ehf{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-left-color:var(--colorNeutralStroke1);border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-top-right-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);}\", \".r1cf2ehf[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".r1cf2ehf:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}\", \".r1cf2ehf:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}\", \".r1cf2ehf:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}\", \".r1cf2ehf:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}\", \".rhq1520{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-right-color:var(--colorNeutralStroke1);border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-top-left-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);}\", \".rhq1520[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".rhq1520:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}\", \".rhq1520:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}\", \".rhq1520:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}\", \".rhq1520:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}\"],\n s: [\"@media (forced-colors: active){.r1cf2ehf:hover{background-color:HighlightText;}.r1cf2ehf:active{background-color:HighlightText;}}\", \"@media (forced-colors: active){.rhq1520:hover{background-color:HighlightText;}.rhq1520:active{background-color:HighlightText;}}\"]\n});\nconst useMediaBaseClassName = __resetStyles(\"r19jnv3a\", null, [\".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}\"]);\nconst useContentBaseClassName = __resetStyles(\"rmt99gk\", null, [\".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\nconst useDismissIconBaseClassName = __resetStyles(\"r176grtk\", null, [\".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}\"]);\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const {\n primaryAction\n } = state;\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, primaryAction.as !== 'span' && primaryActionStyles.button, state.primaryAction.className);\n state.dismissButton.className = mergeClasses(attachmentClassNames.dismissButton, dismissButtonBaseClassName, state.dismissButton.className);\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);\n state.dismissIcon.className = mergeClasses(attachmentClassNames.dismissIcon, dismissIconBaseClassName, state.dismissIcon.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentStyles.js.map"],"names":["attachmentClassNames","useAttachmentStyles_unstable","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","__resetStyles","buttonBaseStyles","alignItems","backgroundColor","tokens","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","display","flexWrap","justifyContent","createCustomFocusIndicatorStyle","shorthands","outline","strokeWidthThick","colorStrokeFocus2","zIndex","verticalAlign","usePrimaryActionBaseClassName","usePrimaryActionStyles","__styles","button","eoavqd","Jwef8y","Bi91k9c","ecr2s2","lj723h","Bqrx1nm","kx9iu6","h","a","m","useDismissButtonBaseClassName","r","s","useMediaBaseClassName","useContentBaseClassName","useDismissIconBaseClassName","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","className","mergeClasses","as"],"mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["useAttachmentStyles.js"],"sourcesContent":["import { createCustomFocusIndicatorStyle, __resetStyles, __styles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nexport const attachmentClassNames = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon'\n};\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\nconst useRootBaseClassName = __resetStyles(\"rj3sqpg\", null, [\".rj3sqpg{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;}\"]);\nconst buttonBaseStyles = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1\n }),\n verticalAlign: 'middle'\n};\nconst usePrimaryActionBaseClassName = __resetStyles(\"rftb5h9\", \"rofiitm\", [\".rftb5h9{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-right-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}\", \".rftb5h9[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".rofiitm{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-left-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}\", \".rofiitm[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\"]);\nconst usePrimaryActionStyles = __styles({\n button: {\n eoavqd: \"f8491dx\",\n Jwef8y: \"f1h648pw\",\n Bi91k9c: \"fnwyq0v\",\n ecr2s2: \"fwdzr64\",\n lj723h: \"flvvhsy\",\n Bqrx1nm: \"fq7113v\",\n kx9iu6: \"fp3oj7s\"\n }\n}, {\n h: [\".f8491dx:hover{cursor:pointer;}\", \".f1h648pw:hover{background-color:var(--colorNeutralBackground3Hover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\"],\n a: [\".fwdzr64:active{background-color:var(--colorNeutralBackground3Pressed);}\", \".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}\"],\n m: [[\"@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fp3oj7s:active{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nconst useDismissButtonBaseClassName = __resetStyles(\"r1cf2ehf\", \"rhq1520\", {\n r: [\".r1cf2ehf{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-left-color:var(--colorNeutralStroke1);border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-top-right-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);}\", \".r1cf2ehf[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".r1cf2ehf:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}\", \".r1cf2ehf:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}\", \".r1cf2ehf:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}\", \".r1cf2ehf:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}\", \".rhq1520{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-right-color:var(--colorNeutralStroke1);border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-top-left-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);}\", \".rhq1520[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}\", \".rhq1520:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}\", \".rhq1520:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}\", \".rhq1520:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}\", \".rhq1520:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}\"],\n s: [\"@media (forced-colors: active){.r1cf2ehf:hover{background-color:HighlightText;}.r1cf2ehf:active{background-color:HighlightText;}}\", \"@media (forced-colors: active){.rhq1520:hover{background-color:HighlightText;}.rhq1520:active{background-color:HighlightText;}}\"]\n});\nconst useMediaBaseClassName = __resetStyles(\"rz1lum2\", null, [\".rz1lum2{display:inline-flex;font-size:20px;height:20px;line-height:20px;width:20px;}\"]);\nconst useContentBaseClassName = __resetStyles(\"rmt99gk\", null, [\".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\nconst useDismissIconBaseClassName = __resetStyles(\"r176grtk\", null, [\".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}\"]);\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const {\n primaryAction\n } = state;\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, primaryAction.as !== 'span' && primaryActionStyles.button, state.primaryAction.className);\n state.dismissButton.className = mergeClasses(attachmentClassNames.dismissButton, dismissButtonBaseClassName, state.dismissButton.className);\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);\n state.dismissIcon.className = mergeClasses(attachmentClassNames.dismissIcon, dismissIconBaseClassName, state.dismissIcon.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentStyles.js.map"],"names":["attachmentClassNames","useAttachmentStyles_unstable","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","__resetStyles","buttonBaseStyles","alignItems","backgroundColor","tokens","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","display","flexWrap","justifyContent","createCustomFocusIndicatorStyle","shorthands","outline","strokeWidthThick","colorStrokeFocus2","zIndex","verticalAlign","usePrimaryActionBaseClassName","usePrimaryActionStyles","__styles","button","eoavqd","Jwef8y","Bi91k9c","ecr2s2","lj723h","Bqrx1nm","kx9iu6","h","a","m","useDismissButtonBaseClassName","r","s","useMediaBaseClassName","useContentBaseClassName","useDismissIconBaseClassName","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","className","mergeClasses","as"],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AttachmentList", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AttachmentList;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useAttachmentList = require("./useAttachmentList");
|
|
14
|
+
const _renderAttachmentList = require("./renderAttachmentList");
|
|
15
|
+
const _useAttachmentListStyles = require("./useAttachmentListStyles");
|
|
16
|
+
const _useAttachmentListContextValues = require("./useAttachmentListContextValues");
|
|
17
|
+
const AttachmentList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
|
+
const state = (0, _useAttachmentList.useAttachmentList_unstable)(props, ref);
|
|
19
|
+
const contextValues = (0, _useAttachmentListContextValues.useAttachmentListContextValues_unstable)(state);
|
|
20
|
+
(0, _useAttachmentListStyles.useAttachmentListStyles_unstable)(state);
|
|
21
|
+
return (0, _renderAttachmentList.renderAttachmentList_unstable)(state, contextValues);
|
|
22
|
+
});
|
|
23
|
+
AttachmentList.displayName = 'AttachmentList'; //# sourceMappingURL=AttachmentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentList.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentList_unstable } from './useAttachmentList';\nimport { renderAttachmentList_unstable } from './renderAttachmentList';\nimport { useAttachmentListStyles_unstable } from './useAttachmentListStyles';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nexport const AttachmentList = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentList_unstable(props, ref);\n const contextValues = useAttachmentListContextValues_unstable(state);\n useAttachmentListStyles_unstable(state);\n return renderAttachmentList_unstable(state, contextValues);\n});\nAttachmentList.displayName = 'AttachmentList';\n//# sourceMappingURL=AttachmentList.js.map"],"names":["AttachmentList","React","forwardRef","props","ref","state","useAttachmentList_unstable","contextValues","useAttachmentListContextValues_unstable","useAttachmentListStyles_unstable","renderAttachmentList_unstable","displayName"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;mCACoB;sCACG;yCACG;gDACO;AACjD,MAAMA,iBAAiB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAClE,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChD,MAAMG,gBAAgBC,IAAAA,uEAAuC,EAACH;IAC9DI,IAAAA,yDAAgC,EAACJ;IACjC,OAAOK,IAAAA,mDAA6B,EAACL,OAAOE;AAC9C;AACAP,eAAeW,WAAW,GAAG,kBAC7B,0CAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentList.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentList.types.js.map"],"names":[],"mappings":";;;;CACA,gDAAgD"}
|
|
@@ -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("./AttachmentList"), exports);
|
|
7
|
+
_export_star._(require("./AttachmentList.types"), exports);
|
|
8
|
+
_export_star._(require("./renderAttachmentList"), exports);
|
|
9
|
+
_export_star._(require("./useAttachmentList"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentListStyles"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderAttachmentList_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderAttachmentList_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
14
|
+
const renderAttachmentList_unstable = (state, contextValues)=>{
|
|
15
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_attachmentListContext.AttachmentListProvider, {
|
|
17
|
+
value: contextValues.attachmentList,
|
|
18
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
19
|
+
});
|
|
20
|
+
}; //# sourceMappingURL=renderAttachmentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderAttachmentList.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\n/**\n * Render the final JSX of AttachmentList\n */\nexport const renderAttachmentList_unstable = (state, contextValues) => {\n assertSlots(state);\n return /*#__PURE__*/_jsx(AttachmentListProvider, {\n value: contextValues.attachmentList,\n children: /*#__PURE__*/_jsx(state.root, {})\n });\n};\n//# sourceMappingURL=renderAttachmentList.js.map"],"names":["renderAttachmentList_unstable","state","contextValues","assertSlots","_jsx","AttachmentListProvider","value","attachmentList","children","root"],"mappings":";;;;+BAMaA;;;eAAAA;;;4BANe;iCACA;uCACW;AAIhC,MAAMA,gCAAgC,CAACC,OAAOC;IACnDC,IAAAA,4BAAW,EAACF;IACZ,OAAO,WAAW,GAAEG,IAAAA,eAAI,EAACC,6CAAsB,EAAE;QAC/CC,OAAOJ,cAAcK,cAAc;QACnCC,UAAU,WAAW,GAAEJ,IAAAA,eAAI,EAACH,MAAMQ,IAAI,EAAE,CAAC;IAC3C;AACF,GACA,gDAAgD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentList_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentList_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
15
|
+
const _reactoverflow = require("@fluentui/react-overflow");
|
|
16
|
+
const useAttachmentList_unstable = (props, ref)=>{
|
|
17
|
+
const { onAttachmentDismiss } = props;
|
|
18
|
+
const attachmentsVisibilityStatus = (0, _reactoverflow.useOverflowContext)((context)=>context.itemVisibility);
|
|
19
|
+
const innerRef = _react.useRef(null);
|
|
20
|
+
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
21
|
+
const { findNextFocusable, findPrevFocusable } = (0, _reactcomponents.useFocusFinders)();
|
|
22
|
+
const handleAttachmentDismiss = (0, _reactcomponents.useEventCallback)((e, data)=>{
|
|
23
|
+
var _innerRef_current;
|
|
24
|
+
if (!onAttachmentDismiss) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
onAttachmentDismiss(e, data);
|
|
28
|
+
// Remove attachment from overflow context
|
|
29
|
+
attachmentsVisibilityStatus === null || attachmentsVisibilityStatus === void 0 ? true : delete attachmentsVisibilityStatus[data.id];
|
|
30
|
+
// set focus after attachment dismiss
|
|
31
|
+
const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
|
32
|
+
if ((_innerRef_current = innerRef.current) === null || _innerRef_current === void 0 ? void 0 : _innerRef_current.contains(activeElement)) {
|
|
33
|
+
// focus on next attachment only if the active element is within the current attachment list
|
|
34
|
+
const next = findNextFocusable(activeElement, {
|
|
35
|
+
container: innerRef.current
|
|
36
|
+
});
|
|
37
|
+
if (next) {
|
|
38
|
+
next.focus();
|
|
39
|
+
return;
|
|
40
|
+
} else {
|
|
41
|
+
const prev = findPrevFocusable(activeElement === null || activeElement === void 0 ? void 0 : activeElement.parentElement, {
|
|
42
|
+
container: innerRef.current
|
|
43
|
+
});
|
|
44
|
+
prev === null || prev === void 0 ? void 0 : prev.focus();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const arrowNavigationProps = (0, _reactcomponents.useArrowNavigationGroup)({
|
|
49
|
+
circular: true,
|
|
50
|
+
axis: 'both',
|
|
51
|
+
memorizeCurrent: true
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
onAttachmentDismiss: handleAttachmentDismiss,
|
|
55
|
+
components: {
|
|
56
|
+
root: 'div'
|
|
57
|
+
},
|
|
58
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
59
|
+
'aria-label': 'Attachments',
|
|
60
|
+
ref: (0, _reactcomponents.useMergedRefs)(ref, innerRef),
|
|
61
|
+
role: 'toolbar',
|
|
62
|
+
...arrowNavigationProps,
|
|
63
|
+
...props
|
|
64
|
+
}), {
|
|
65
|
+
elementType: 'div'
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
}; //# sourceMappingURL=useAttachmentList.js.map
|