@fluentui-copilot/react-attachments 0.12.4 → 0.12.5-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 +46 -1
- package/CHANGELOG.md +20 -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.js +34 -12
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +317 -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 +113 -124
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +10 -15
- 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 +51 -59
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -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 +4 -5
- 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.js +52 -26
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +336 -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 +1 -1
- 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 +118 -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 +5 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots> = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon',\n};\n\n/**\n * @internal\n */\nexport const ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\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 cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n\n ':hover': {\n borderColor: tokens.colorNeutralStroke1Hover,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n\n ':hover:active': {\n borderColor: tokens.colorNeutralStroke1Pressed,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n ':focus': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':focus:active': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\n/**\n * @internal\n */\nexport const useMediaBaseClassName = makeResetStyles({\n fontSize: ATTACHMENTTAG_SIZE,\n height: ATTACHMENTTAG_SIZE,\n lineHeight: ATTACHMENTTAG_SIZE,\n width: ATTACHMENTTAG_SIZE,\n});\n\n/**\n * @internal\n */\nexport const useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\n/**\n * @internal\n */\nexport const useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENTTAG_SIZE,\n height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = (state: AttachmentTagState): AttachmentTagState => {\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(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","typographyStyles","tokens","attachmentTagClassNames","root","media","content","icon","ATTACHMENTTAG_MAXWIDTH","ATTACHMENTTAG_SIZE","useRootBaseClassName","color","colorNeutralForeground1","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","justifyContent","maxWidth","padding","spacingVerticalXS","spacingHorizontalXS","spacingHorizontalS","verticalAlign","borderColor","colorNeutralStroke1Hover","colorBrandForegroundLinkHover","colorNeutralStroke1Pressed","colorNeutralForeground2BrandPressed","colorNeutralForeground2BrandHover","useMediaBaseClassName","fontSize","height","lineHeight","width","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","spacingHorizontalXXS","minWidth","useAttachmentTagStyles_unstable","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
|
@@ -5,11 +5,9 @@ import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyle
|
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated use new AttachmentOverflowMenuItem component exported from \@fluentui-copilot/react-attachments package instead.
|
|
7
7
|
* Deprecated on 4/9/2024.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return renderAttachmentTagItem_unstable(state);
|
|
8
|
+
*/ export const AttachmentTagItem = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
|
+
const state = useAttachmentTagItem_unstable(props, ref);
|
|
10
|
+
useAttachmentTagItemStyles_unstable(state);
|
|
11
|
+
return renderAttachmentTagItem_unstable(state);
|
|
13
12
|
});
|
|
14
13
|
AttachmentTagItem.displayName = 'AttachmentTagItem';
|
|
15
|
-
//# sourceMappingURL=AttachmentTagItem.js.map
|
|
@@ -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,10 +1,9 @@
|
|
|
1
1
|
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
2
|
export const AttachmentListContext = createContext(undefined);
|
|
3
3
|
const attachmentListContextDefaultValue = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
onAttachmentDismiss: ()=>null,
|
|
5
|
+
shouldUseOverflow: false,
|
|
6
|
+
numberOfAttachments: 0
|
|
7
7
|
};
|
|
8
8
|
export const AttachmentListProvider = AttachmentListContext.Provider;
|
|
9
|
-
export const useAttachmentListContext_unstable = selector
|
|
10
|
-
//# sourceMappingURL=attachmentListContext.js.map
|
|
9
|
+
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
|
+
};
|