@fluentui-copilot/react-attachments 0.12.2 → 0.12.3-hotfix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +45 -1
- package/CHANGELOG.md +21 -2
- package/lib/AgentTag.js +0 -1
- package/lib/Attachment.js +0 -1
- package/lib/AttachmentList.js +0 -1
- package/lib/AttachmentOverflowMenu.js +0 -1
- package/lib/AttachmentOverflowMenuButton.js +0 -1
- package/lib/AttachmentOverflowMenuItem.js +0 -1
- package/lib/AttachmentTag.js +0 -1
- package/lib/AttachmentTagItem.js +0 -1
- package/lib/AttachmentTagList.js +0 -1
- package/lib/components/AgentTag/AgentTag.js +4 -5
- package/lib/components/AgentTag/AgentTag.types.js +1 -2
- package/lib/components/AgentTag/index.js +0 -1
- package/lib/components/AgentTag/renderAgentTag.js +3 -5
- package/lib/components/AgentTag/useAgentTag.js +7 -9
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/Attachment/Attachment.js +5 -6
- package/lib/components/Attachment/Attachment.types.js +1 -2
- package/lib/components/Attachment/index.js +0 -1
- package/lib/components/Attachment/renderAttachment.js +36 -31
- package/lib/components/Attachment/useAttachment.js +85 -95
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +293 -0
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.js +6 -7
- package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
- package/lib/components/AttachmentList/index.js +0 -1
- package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
- package/lib/components/AttachmentList/useAttachmentList.js +112 -119
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +9 -13
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
- package/lib/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +36 -45
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +94 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +5 -7
- package/lib/components/AttachmentTag/AttachmentTag.types.js +1 -2
- package/lib/components/AttachmentTag/index.js +0 -1
- package/lib/components/AttachmentTag/renderAttachmentTag.js +10 -8
- package/lib/components/AttachmentTag/useAttachmentTag.js +9 -11
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +98 -0
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -6
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -2
- package/lib/components/AttachmentTagItem/index.js +0 -1
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +10 -8
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +9 -11
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +34 -0
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagList/AttachmentTagList.js +6 -8
- package/lib/components/AttachmentTagList/AttachmentTagList.types.js +1 -2
- package/lib/components/AttachmentTagList/index.js +0 -1
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js +7 -9
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +21 -25
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +8 -11
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +21 -0
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib/components/index.js +0 -1
- package/lib/components/utils/useAttachmentTagSlots.js +45 -52
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
- package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib/contexts/attachmentListContext.js +3 -4
- package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
- package/lib/contexts/attachmentTagListContext.js +2 -3
- package/lib/index.js +0 -1
- package/lib-commonjs/AgentTag.js +0 -1
- package/lib-commonjs/Attachment.js +0 -1
- package/lib-commonjs/AttachmentList.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
- package/lib-commonjs/AttachmentTag.js +0 -1
- package/lib-commonjs/AttachmentTagItem.js +0 -1
- package/lib-commonjs/AttachmentTagList.js +0 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -1
- package/lib-commonjs/components/AgentTag/index.js +0 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.js +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
- package/lib-commonjs/components/Attachment/index.js +0 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +312 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
- package/lib-commonjs/components/AttachmentList/index.js +0 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +6 -2
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +110 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +0 -1
- package/lib-commonjs/components/AttachmentTag/index.js +0 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +118 -0
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js +0 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +0 -1
- package/lib-commonjs/components/AttachmentTagList/index.js +0 -1
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.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/AttachmentTagList/useAttachmentTagListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +37 -0
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/index.js +0 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/contexts/attachmentListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
- package/lib-commonjs/index.js +0 -1
- package/package.json +11 -15
|
@@ -2,4 +2,3 @@ export { AttachmentTagItem } from './AttachmentTagItem';
|
|
|
2
2
|
export { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
|
|
3
3
|
export { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
|
|
4
4
|
export { attachmentTagItemClassNames, useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of AttachmentTagItem
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
*/ export const renderAttachmentTagItem_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
|
8
|
+
children: [
|
|
9
|
+
state.media && /*#__PURE__*/ _jsx(state.media, {}),
|
|
10
|
+
/*#__PURE__*/ _jsx(state.content, {}),
|
|
11
|
+
/*#__PURE__*/ _jsx(state.icon, {})
|
|
12
|
+
]
|
|
13
|
+
});
|
|
11
14
|
};
|
|
12
|
-
//# sourceMappingURL=renderAttachmentTagItem.js.map
|
|
@@ -7,15 +7,13 @@ import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
|
|
|
7
7
|
*
|
|
8
8
|
* @param props - props from this instance of AttachmentTagItem
|
|
9
9
|
* @param ref - reference to root HTMLElement of AttachmentTagItem
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
});
|
|
10
|
+
*/ export const useAttachmentTagItem_unstable = (props, ref)=>{
|
|
11
|
+
return useAttachmentTagSlots(props, ref, {
|
|
12
|
+
elementType: {
|
|
13
|
+
root: 'div',
|
|
14
|
+
media: 'span',
|
|
15
|
+
content: 'span',
|
|
16
|
+
icon: 'span'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
20
19
|
};
|
|
21
|
-
//# sourceMappingURL=useAttachmentTagItem.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { makeResetStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
import { ATTACHMENTTAG_MAXWIDTH, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from '../AttachmentTag/useAttachmentTagStyles.styles';
|
|
4
|
+
export const attachmentTagItemClassNames = {
|
|
5
|
+
root: 'fai-AttachmentTagItem',
|
|
6
|
+
media: 'fai-AttachmentTagItem__media',
|
|
7
|
+
content: 'fai-AttachmentTagItem__content',
|
|
8
|
+
icon: 'fai-AttachmentTagItem__icon'
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Styles for the root slot
|
|
12
|
+
*/ const useRootBaseClassName = makeResetStyles({
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
flexWrap: 'nowrap',
|
|
15
|
+
columnGap: tokens.spacingHorizontalSNudge,
|
|
16
|
+
maxWidth: ATTACHMENTTAG_MAXWIDTH,
|
|
17
|
+
alignItems: 'center'
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Apply styling to the AttachmentTagItem slots based on the state
|
|
21
|
+
*/ export const useAttachmentTagItemStyles_unstable = (state)=>{
|
|
22
|
+
'use no memo';
|
|
23
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
24
|
+
const mediaBaseClassName = useMediaBaseClassName();
|
|
25
|
+
const contentBaseClassName = useContentBaseClassName();
|
|
26
|
+
const iconBaseClassName = useIconBaseClassName();
|
|
27
|
+
state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
|
|
28
|
+
if (state.media) {
|
|
29
|
+
state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
|
|
30
|
+
}
|
|
31
|
+
state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
|
|
32
|
+
state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItemStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles.styles';\nimport type { AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots> = {\n root: 'fai-AttachmentTagItem',\n media: 'fai-AttachmentTagItem__media',\n content: 'fai-AttachmentTagItem__content',\n icon: 'fai-AttachmentTagItem__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n columnGap: tokens.spacingHorizontalSNudge,\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n alignItems: 'center',\n});\n\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = (state: AttachmentTagItemState): AttachmentTagItemState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagItemClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","ATTACHMENTTAG_MAXWIDTH","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName","attachmentTagItemClassNames","root","media","content","icon","useRootBaseClassName","display","flexWrap","columnGap","spacingHorizontalSNudge","maxWidth","alignItems","useAttachmentTagItemStyles_unstable","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAC3E,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,oBAAoB,EACpBC,qBAAqB,QAChB,iDAAiD;AAIxD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAuBZ,gBAAgB;IAC3Ca,SAAS;IACTC,UAAU;IACVC,WAAWb,OAAOc,uBAAuB;IACzCC,UAAUd;IACVe,YAAY;AACd;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAMC,oBAAoBT;IAC1B,MAAMU,qBAAqBhB;IAC3B,MAAMiB,uBAAuBnB;IAC7B,MAAMoB,oBAAoBnB;IAE1Be,MAAMZ,IAAI,CAACiB,SAAS,GAAGxB,aAAaM,4BAA4BC,IAAI,EAAEa,mBAAmBD,MAAMZ,IAAI,CAACiB,SAAS;IAE7G,IAAIL,MAAMX,KAAK,EAAE;QACfW,MAAMX,KAAK,CAACgB,SAAS,GAAGxB,aAAaM,4BAA4BE,KAAK,EAAEa,oBAAoBF,MAAMX,KAAK,CAACgB,SAAS;IACnH;IAEAL,MAAMV,OAAO,CAACe,SAAS,GAAGxB,aACxBM,4BAA4BG,OAAO,EACnCa,sBACAH,MAAMV,OAAO,CAACe,SAAS;IAGzBL,MAAMT,IAAI,CAACc,SAAS,GAAGxB,aAAaM,4BAA4BI,IAAI,EAAEa,mBAAmBJ,MAAMT,IAAI,CAACc,SAAS;IAE7G,OAAOL;AACT,EAAE"}
|
|
@@ -7,13 +7,11 @@ import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated use new AttachmentList component exported from \@fluentui-copilot/react-attachments package instead.
|
|
9
9
|
* Deprecated on 4/9/2024.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return renderAttachmentTagList_unstable(state, contextValues);
|
|
10
|
+
*/ export const AttachmentTagList = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
11
|
+
const state = useAttachmentTagList_unstable(props, ref);
|
|
12
|
+
const contextValues = useAttachmentTagListContextValues_unstable(state);
|
|
13
|
+
useAttachmentTagListStyles_unstable(state);
|
|
14
|
+
useCustomStyleHook('useAttachmentTagListStyles')(state);
|
|
15
|
+
return renderAttachmentTagList_unstable(state, contextValues);
|
|
17
16
|
});
|
|
18
17
|
AttachmentTagList.displayName = 'AttachmentTagList';
|
|
19
|
-
//# sourceMappingURL=AttachmentTagList.js.map
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=AttachmentTagList.types.js.map
|
|
1
|
+
export { };
|
|
@@ -2,4 +2,3 @@ export { AttachmentTagList } from './AttachmentTagList';
|
|
|
2
2
|
export { renderAttachmentTagList_unstable } from './renderAttachmentTagList';
|
|
3
3
|
export { useAttachmentTagList_unstable } from './useAttachmentTagList';
|
|
4
4
|
export { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
import { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of AttachmentTagList
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
6
|
+
*/ export const renderAttachmentTagList_unstable = (state, contextValues)=>{
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/ _jsx(AttachmentTagListProvider, {
|
|
9
|
+
value: contextValues.tagList,
|
|
10
|
+
children: /*#__PURE__*/ _jsx(state.root, {})
|
|
11
|
+
});
|
|
13
12
|
};
|
|
14
|
-
//# sourceMappingURL=renderAttachmentTagList.js.map
|
|
@@ -7,29 +7,25 @@ import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluent
|
|
|
7
7
|
*
|
|
8
8
|
* @param props - props from this instance of AttachmentTagList
|
|
9
9
|
* @param ref - reference to root HTMLElement of AttachmentTagList
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
elementType: 'div'
|
|
32
|
-
})
|
|
33
|
-
};
|
|
10
|
+
*/ export const useAttachmentTagList_unstable = (props, ref)=>{
|
|
11
|
+
const { onAttachmentTagDismiss } = props;
|
|
12
|
+
const focusAttributes = useArrowNavigationGroup({
|
|
13
|
+
axis: 'both',
|
|
14
|
+
circular: true
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
onAttachmentTagDismiss,
|
|
18
|
+
components: {
|
|
19
|
+
root: 'div'
|
|
20
|
+
},
|
|
21
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
22
|
+
'aria-label': 'Attachments',
|
|
23
|
+
ref,
|
|
24
|
+
role: 'menu',
|
|
25
|
+
...focusAttributes,
|
|
26
|
+
...props
|
|
27
|
+
}), {
|
|
28
|
+
elementType: 'div'
|
|
29
|
+
})
|
|
30
|
+
};
|
|
34
31
|
};
|
|
35
|
-
//# sourceMappingURL=useAttachmentTagList.js.map
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export function useAttachmentTagListContextValues_unstable(state) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tagList
|
|
11
|
-
};
|
|
2
|
+
const { onAttachmentTagDismiss } = state;
|
|
3
|
+
// This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
|
|
4
|
+
const tagList = {
|
|
5
|
+
onAttachmentTagDismiss
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
tagList
|
|
9
|
+
};
|
|
12
10
|
}
|
|
13
|
-
//# sourceMappingURL=useAttachmentTagListContextValues.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { makeResetStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const attachmentTagListClassNames = {
|
|
4
|
+
root: 'fai-AttachmentTagList'
|
|
5
|
+
};
|
|
6
|
+
const useRootBaseClassName = makeResetStyles({
|
|
7
|
+
columnGap: tokens.spacingHorizontalSNudge,
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
flexShrink: 0,
|
|
11
|
+
flexWrap: 'wrap',
|
|
12
|
+
rowGap: tokens.spacingVerticalXS
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Apply styling to the AttachmentTagList slots based on the state
|
|
16
|
+
*/ export const useAttachmentTagListStyles_unstable = (state)=>{
|
|
17
|
+
'use no memo';
|
|
18
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
19
|
+
state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);
|
|
20
|
+
return state;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots> = {\n root: 'fai-AttachmentTagList',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\n/**\n * Apply styling to the AttachmentTagList slots based on the state\n */\nexport const useAttachmentTagListStyles_unstable = (state: AttachmentTagListState): AttachmentTagListState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","attachmentTagListClassNames","root","useRootBaseClassName","columnGap","spacingHorizontalSNudge","display","flexDirection","flexShrink","flexWrap","rowGap","spacingVerticalXS","useAttachmentTagListStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAC3E,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBL,gBAAgB;IAC3CM,WAAWJ,OAAOK,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQV,OAAOW,iBAAiB;AAClC;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAMC,oBAAoBX;IAC1BU,MAAMX,IAAI,CAACa,SAAS,GAAGhB,aAAaE,4BAA4BC,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACa,SAAS;IAE7G,OAAOF;AACT,EAAE"}
|
package/lib/components/index.js
CHANGED
|
@@ -6,4 +6,3 @@ export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable
|
|
|
6
6
|
export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
|
|
7
7
|
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
|
|
8
8
|
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -7,56 +7,49 @@ import { AttachmentTagListContext } from '../../contexts/attachmentTagListContex
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
* Create the slots required to render AttachmentTag or AttachmentTagItem.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
content
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
root,
|
|
57
|
-
media,
|
|
58
|
-
content,
|
|
59
|
-
icon
|
|
60
|
-
};
|
|
10
|
+
*/ export function useAttachmentTagSlots(props, ref, options) {
|
|
11
|
+
const onAttachmentTagDismiss = useAttachmentTagListContext_unstable((context)=>context.onAttachmentTagDismiss);
|
|
12
|
+
const { children, role } = props;
|
|
13
|
+
const { elementType } = options;
|
|
14
|
+
const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
|
|
15
|
+
const hasParentContext = useHasParentContext(AttachmentTagListContext);
|
|
16
|
+
const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
|
|
17
|
+
const root = slot.always(getIntrinsicElementProps(elementType.root, {
|
|
18
|
+
ref,
|
|
19
|
+
...props,
|
|
20
|
+
role: rootRole
|
|
21
|
+
}), {
|
|
22
|
+
elementType: elementType.root
|
|
23
|
+
});
|
|
24
|
+
root.onClick = mergeCallbacks(root.onClick, (ev)=>onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
|
|
25
|
+
content: children,
|
|
26
|
+
media
|
|
27
|
+
}));
|
|
28
|
+
const media = slot.optional(props.media, {
|
|
29
|
+
elementType: elementType.media
|
|
30
|
+
});
|
|
31
|
+
const content = slot.always(props.content, {
|
|
32
|
+
defaultProps: {
|
|
33
|
+
children
|
|
34
|
+
},
|
|
35
|
+
elementType: elementType.content
|
|
36
|
+
});
|
|
37
|
+
const icon = slot.always(props.icon, {
|
|
38
|
+
defaultProps: {
|
|
39
|
+
children: /*#__PURE__*/ React.createElement(DismissIcon, null)
|
|
40
|
+
},
|
|
41
|
+
elementType: elementType.icon
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
components: {
|
|
45
|
+
root: elementType.root,
|
|
46
|
+
media: elementType.media,
|
|
47
|
+
content: elementType.content,
|
|
48
|
+
icon: elementType.icon
|
|
49
|
+
},
|
|
50
|
+
root,
|
|
51
|
+
media,
|
|
52
|
+
content,
|
|
53
|
+
icon
|
|
54
|
+
};
|
|
61
55
|
}
|
|
62
|
-
//# sourceMappingURL=useAttachmentTagSlots.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { makeStyles } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
const indeterminateProgressBarReducedMotion = {
|
|
4
|
+
'0%': {
|
|
5
|
+
opacity: '.2'
|
|
6
|
+
},
|
|
7
|
+
'50%': {
|
|
8
|
+
opacity: '1'
|
|
9
|
+
},
|
|
10
|
+
'100%': {
|
|
11
|
+
opacity: '.2'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/ export const useProgressBarStyles = makeStyles({
|
|
17
|
+
progress: {
|
|
18
|
+
width: '100%',
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
bottom: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
right: 0,
|
|
23
|
+
height: '4px',
|
|
24
|
+
borderBottomLeftRadius: tokens.borderRadiusMedium,
|
|
25
|
+
borderBottomRightRadius: tokens.borderRadiusMedium
|
|
26
|
+
},
|
|
27
|
+
regularProgressBar: {
|
|
28
|
+
height: '100%',
|
|
29
|
+
backgroundImage: `linear-gradient(90deg, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%)`
|
|
30
|
+
},
|
|
31
|
+
indeterminateProgressBar: {
|
|
32
|
+
height: '100%',
|
|
33
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
34
|
+
backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0) 0%, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%, rgba(0,0,0,0))`,
|
|
35
|
+
'@media screen and (prefers-reduced-motion: reduce)': {
|
|
36
|
+
maxWidth: '100%',
|
|
37
|
+
animationIterationCount: 'infinite',
|
|
38
|
+
animationDuration: '3s',
|
|
39
|
+
animationName: indeterminateProgressBarReducedMotion
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useProgressBarStyles.styles.ts"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nconst indeterminateProgressBarReducedMotion = {\n '0%': {\n opacity: '.2', // matches indeterminate bar width\n },\n '50%': {\n opacity: '1',\n },\n '100%': {\n opacity: '.2',\n },\n};\n\n/**\n * @internal\n */\nexport const useProgressBarStyles = makeStyles({\n progress: {\n width: '100%',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '4px',\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n regularProgressBar: {\n height: '100%',\n backgroundImage: `linear-gradient(90deg, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%)`,\n },\n indeterminateProgressBar: {\n height: '100%',\n backgroundColor: tokens.colorTransparentBackground,\n backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0) 0%, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%, rgba(0,0,0,0))`,\n '@media screen and (prefers-reduced-motion: reduce)': {\n maxWidth: '100%',\n animationIterationCount: 'infinite',\n animationDuration: '3s',\n animationName: indeterminateProgressBarReducedMotion,\n },\n },\n});\n"],"names":["makeStyles","tokens","indeterminateProgressBarReducedMotion","opacity","useProgressBarStyles","progress","width","position","bottom","left","right","height","borderBottomLeftRadius","borderRadiusMedium","borderBottomRightRadius","regularProgressBar","backgroundImage","colorBrandFlair1","colorBrandFlair2","colorBrandFlair3","indeterminateProgressBar","backgroundColor","colorTransparentBackground","maxWidth","animationIterationCount","animationDuration","animationName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,QAAQ,6BAA6B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,wCAAwC;IAC5C,MAAM;QACJC,SAAS;IACX;IACA,OAAO;QACLA,SAAS;IACX;IACA,QAAQ;QACNA,SAAS;IACX;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,uBAAuBJ,WAAW;IAC7CK,UAAU;QACRC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,MAAM;QACNC,OAAO;QACPC,QAAQ;QACRC,wBAAwBX,OAAOY,kBAAkB;QACjDC,yBAAyBb,OAAOY,kBAAkB;IACpD;IACAE,oBAAoB;QAClBJ,QAAQ;QACRK,iBAAiB,CAAC,uBAAuB,EAAEf,OAAOgB,gBAAgB,CAAC,MAAM,EAAEhB,OAAOiB,gBAAgB,CAAC,MAAM,EAAEjB,OAAOkB,gBAAgB,CAAC,KAAK,CAAC;IAC3I;IACAC,0BAA0B;QACxBT,QAAQ;QACRU,iBAAiBpB,OAAOqB,0BAA0B;QAClDN,iBAAiB,CAAC,yCAAyC,EAAEf,OAAOgB,gBAAgB,CAAC,MAAM,EAAEhB,OAAOiB,gBAAgB,CAAC,MAAM,EAAEjB,OAAOkB,gBAAgB,CAAC,qBAAqB,CAAC;QAC3K,sDAAsD;YACpDI,UAAU;YACVC,yBAAyB;YACzBC,mBAAmB;YACnBC,eAAexB;QACjB;IACF;AACF,GAAG"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
2
|
export const AttachmentListContext = createContext(undefined);
|
|
3
3
|
const attachmentListContextDefaultValue = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
onAttachmentDismiss: ()=>null,
|
|
5
|
+
shouldUseOverflow: false
|
|
6
6
|
};
|
|
7
7
|
export const AttachmentListProvider = AttachmentListContext.Provider;
|
|
8
|
-
export const useAttachmentListContext_unstable = selector
|
|
9
|
-
//# sourceMappingURL=attachmentListContext.js.map
|
|
8
|
+
export const useAttachmentListContext_unstable = (selector)=>useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
2
|
export const AttachmentOverflowMenuContext = createContext(undefined);
|
|
3
3
|
const overflowMenuContextDefaultValue = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
isOverflowing: false,
|
|
5
|
+
overflowButtonRef: undefined,
|
|
6
|
+
overflowCount: 0
|
|
7
7
|
};
|
|
8
8
|
export const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
|
|
9
|
-
export const useAttachmentOverflowMenuContext_unstable = selector
|
|
10
|
-
//# sourceMappingURL=attachmentOverflowMenuContext.js.map
|
|
9
|
+
export const useAttachmentOverflowMenuContext_unstable = (selector)=>useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
2
|
export const AttachmentTagListContext = createContext(undefined);
|
|
3
3
|
const tagListContextDefaultValue = {
|
|
4
|
-
|
|
4
|
+
onAttachmentTagDismiss: ()=>null
|
|
5
5
|
};
|
|
6
6
|
export const AttachmentTagListProvider = AttachmentTagListContext.Provider;
|
|
7
|
-
export const useAttachmentTagListContext_unstable = selector
|
|
8
|
-
//# sourceMappingURL=attachmentTagListContext.js.map
|
|
7
|
+
export const useAttachmentTagListContext_unstable = (selector)=>useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue)=>selector(ctx));
|
package/lib/index.js
CHANGED
|
@@ -9,4 +9,3 @@ export { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttac
|
|
|
9
9
|
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
|
|
10
10
|
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
|
|
11
11
|
export { AgentTag, renderAgentTag_unstable, useAgentTag_unstable, agentTagClassNames, useAgentTagStyles_unstable } from './AgentTag';
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/lib-commonjs/AgentTag.js
CHANGED
|
@@ -18,4 +18,4 @@ const AgentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
18
18
|
(0, _useAgentTagStylesstyles.useAgentTagStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAgentTag.renderAgentTag_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
AgentTag.displayName = 'AgentTag';
|
|
21
|
+
AgentTag.displayName = 'AgentTag';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AgentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAgentTag_unstable } from './useAgentTag';\nimport { renderAgentTag_unstable } from './renderAgentTag';\nimport { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\nimport type { AgentTagProps } from './AgentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AgentTag component - TODO: add more docs\nexport const AgentTag: ForwardRefComponent<AgentTagProps> = React.forwardRef((props, ref) => {\n const state = useAgentTag_unstable(props, ref);\n\n useAgentTagStyles_unstable(state);\n return renderAgentTag_unstable(state);\n});\n\nAgentTag.displayName = 'AgentTag';\n"],"names":["AgentTag","React","forwardRef","props","state","useAgentTag_unstable","useAgentTagStyles_unstable","renderAgentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;6BACc;gCACG;yCACG;AAKpC,MAAMA,WAAAA,WAAAA,
|
|
1
|
+
{"version":3,"sources":["AgentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAgentTag_unstable } from './useAgentTag';\nimport { renderAgentTag_unstable } from './renderAgentTag';\nimport { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\nimport type { AgentTagProps } from './AgentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AgentTag component - TODO: add more docs\nexport const AgentTag: ForwardRefComponent<AgentTagProps> = React.forwardRef((props, ref) => {\n const state = useAgentTag_unstable(props, ref);\n\n useAgentTagStyles_unstable(state);\n return renderAgentTag_unstable(state);\n});\n\nAgentTag.displayName = 'AgentTag';\n"],"names":["AgentTag","React","forwardRef","props","ref","state","useAgentTag_unstable","useAgentTagStyles_unstable","renderAgentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;6BACc;gCACG;yCACG;AAKpC,MAAMA,WAAAA,WAAAA,GAA+CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQC,IAAAA,iCAAAA,EAAqBH,OAAOC;IAE1CG,IAAAA,mDAAAA,EAA2BF;IAC3B,OAAOG,IAAAA,uCAAAA,EAAwBH;AACjC;AAEAL,SAASS,WAAW,GAAG"}
|
|
@@ -11,4 +11,4 @@ Object.defineProperty(exports, "renderAgentTag_unstable", {
|
|
|
11
11
|
const _Attachment = require("../Attachment");
|
|
12
12
|
const renderAgentTag_unstable = (state)=>{
|
|
13
13
|
return (0, _Attachment.renderAttachment_unstable)(state);
|
|
14
|
-
};
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAgentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { renderAttachment_unstable } from '../Attachment';\nimport type { AgentTagState } from './AgentTag.types';\n\n/**\n * Render the final JSX of AgentTag\n */\nexport const renderAgentTag_unstable = (state: AgentTagState) => {\n return renderAttachment_unstable(state);\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAgentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { renderAttachment_unstable } from '../Attachment';\nimport type { AgentTagState } from './AgentTag.types';\n\n/**\n * Render the final JSX of AgentTag\n */\nexport const renderAgentTag_unstable = (state: AgentTagState) => {\n return renderAttachment_unstable(state);\n};\n"],"names":["renderAgentTag_unstable","state","renderAttachment_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;AAQO,MAAMA,0BAA0B,CAACC;IACtC,OAAOC,IAAAA,qCAAAA,EAA0BD;AACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAgentTag.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AgentTagProps, AgentTagState } from './AgentTag.types';\nimport { useAttachment_unstable } from '..';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AgentTag.\n *\n * The returned state can be modified with hooks such as useAgentTagStyles_unstable,\n * before being passed to renderAgentTag_unstable.\n *\n * @param props - props from this instance of AgentTag\n * @param ref - reference to root HTMLElement of AgentTag\n */\nexport const useAgentTag_unstable = (props: AgentTagProps, ref: React.Ref<HTMLDivElement>): AgentTagState => {\n const state = useAttachment_unstable({ ...props, dismissOnly: true, designVersion: 'next' }, ref);\n\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAgentTag.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AgentTagProps, AgentTagState } from './AgentTag.types';\nimport { useAttachment_unstable } from '..';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AgentTag.\n *\n * The returned state can be modified with hooks such as useAgentTagStyles_unstable,\n * before being passed to renderAgentTag_unstable.\n *\n * @param props - props from this instance of AgentTag\n * @param ref - reference to root HTMLElement of AgentTag\n */\nexport const useAgentTag_unstable = (props: AgentTagProps, ref: React.Ref<HTMLDivElement>): AgentTagState => {\n const state = useAttachment_unstable({ ...props, dismissOnly: true, designVersion: 'next' }, ref);\n\n return state;\n};\n"],"names":["useAgentTag_unstable","props","ref","state","useAttachment_unstable","dismissOnly","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;kBAb0B;AAahC,MAAMA,uBAAuB,CAACC,OAAsBC;IACzD,MAAMC,QAAQC,IAAAA,wBAAAA,EAAuB;QAAE,GAAGH,KAAK;QAAEI,aAAa;QAAMC,eAAe;IAAO,GAAGJ;IAE7F,OAAOC;AACT"}
|