@fluentui-copilot/react-attachments 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/index.d.ts +43 -1
  4. package/lib/AgentTag.js +2 -0
  5. package/lib/AgentTag.js.map +1 -0
  6. package/lib/components/AgentTag/AgentTag.js +12 -0
  7. package/lib/components/AgentTag/AgentTag.js.map +1 -0
  8. package/lib/components/AgentTag/AgentTag.types.js +4 -0
  9. package/lib/components/AgentTag/AgentTag.types.js.map +1 -0
  10. package/lib/components/AgentTag/index.js +5 -0
  11. package/lib/components/AgentTag/index.js.map +1 -0
  12. package/lib/components/AgentTag/renderAgentTag.js +8 -0
  13. package/lib/components/AgentTag/renderAgentTag.js.map +1 -0
  14. package/lib/components/AgentTag/useAgentTag.js +20 -0
  15. package/lib/components/AgentTag/useAgentTag.js.map +1 -0
  16. package/lib/components/AgentTag/useAgentTagStyles.styles.js +95 -0
  17. package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  18. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  19. package/lib/components/Attachment/renderAttachment.js +20 -7
  20. package/lib/components/Attachment/renderAttachment.js.map +1 -1
  21. package/lib/components/Attachment/useAttachment.js +7 -2
  22. package/lib/components/Attachment/useAttachment.js.map +1 -1
  23. package/lib/components/Attachment/useAttachmentStyles.styles.js +15 -3
  24. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  25. package/lib/index.js +1 -0
  26. package/lib/index.js.map +1 -1
  27. package/lib-commonjs/AgentTag.js +29 -0
  28. package/lib-commonjs/AgentTag.js.map +1 -0
  29. package/lib-commonjs/components/AgentTag/AgentTag.js +21 -0
  30. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -0
  31. package/lib-commonjs/components/AgentTag/AgentTag.types.js +7 -0
  32. package/lib-commonjs/components/AgentTag/AgentTag.types.js.map +1 -0
  33. package/lib-commonjs/components/AgentTag/index.js +32 -0
  34. package/lib-commonjs/components/AgentTag/index.js.map +1 -0
  35. package/lib-commonjs/components/AgentTag/renderAgentTag.js +14 -0
  36. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -0
  37. package/lib-commonjs/components/AgentTag/useAgentTag.js +19 -0
  38. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -0
  39. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +145 -0
  40. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  41. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
  42. package/lib-commonjs/components/Attachment/renderAttachment.js +22 -6
  43. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  44. package/lib-commonjs/components/Attachment/useAttachment.js +6 -2
  45. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  46. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +24 -3
  47. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  48. package/lib-commonjs/index.js +16 -0
  49. package/lib-commonjs/index.js.map +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentStyles.styles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n slot,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n progress: 'fai-Attachment__progress',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst SMALL_ATTACHMENT_SIZE = '16px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n alignSelf: 'end',\n position: 'relative',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorSubtleBackground,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = 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: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\nconst useImageOnlyStyles = makeStyles({\n primaryAction: {\n padding: 0,\n },\n content: {\n lineHeight: 0,\n },\n});\n\nexport const useOverflowStyles = makeStyles({\n overflow: {\n maxWidth: '100%',\n width: '100%',\n },\n});\n\nconst useSmallStyles = makeStyles({\n primaryAction: {\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge} ${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge}`,\n },\n media: {\n fontSize: SMALL_ATTACHMENT_SIZE,\n height: SMALL_ATTACHMENT_SIZE,\n lineHeight: SMALL_ATTACHMENT_SIZE,\n width: SMALL_ATTACHMENT_SIZE,\n },\n content: {\n ...typographyStyles.caption1,\n },\n dismissButton: {\n padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalXXS}`,\n maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n },\n dismissIcon: {\n fontSize: SMALL_ATTACHMENT_SIZE,\n height: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n },\n});\n\nconst usePrimaryActionNextStyles = makeStyles({\n root: {\n borderTopLeftRadius: tokens.borderRadiusXLarge,\n borderBottomLeftRadius: tokens.borderRadiusXLarge,\n },\n canvas: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '40px',\n },\n\n sidecar: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '32px',\n },\n});\n\nconst useDismissButtonNextStyles = makeStyles({\n root: {\n borderTopRightRadius: tokens.borderRadiusXLarge,\n borderBottomRightRadius: tokens.borderRadiusXLarge,\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2,\n },\n },\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n borderLeftColor: tokens.colorNeutralStroke1,\n borderLeftWidth: tokens.strokeWidthThin,\n borderLeftStyle: 'solid',\n },\n canvas: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '40px',\n width: '40px',\n },\n sidecar: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalMNudge}`,\n minHeight: '32px',\n width: '32px',\n },\n});\n\nconst usePrimaryDismissNextStyles = makeStyles({\n sharedStyles: {\n border: 'none',\n backgroundColor: tokens.colorNeutralBackground3,\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground3Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n },\n ':focus-visible': {\n borderRadius: tokens.borderRadiusLarge,\n },\n },\n});\n\nconst useRootNextStyles = makeStyles({\n root: {\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n const primaryActionStyles = usePrimaryActionStyles();\n const imageOnlyStyles = useImageOnlyStyles();\n const smallStyles = useSmallStyles();\n const primaryActionNextStyles = usePrimaryActionNextStyles();\n const dismissButtonNextStyles = useDismissButtonNextStyles();\n const primaryDismissNextStyles = usePrimaryDismissNextStyles();\n const rootNextStyles = useRootNextStyles();\n const { imageOnly, primaryAction, size, mode, designVersion } = state;\n\n state.root.className = mergeClasses(\n attachmentClassNames.root,\n rootBaseClassName,\n designVersion === 'next' && rootNextStyles.root,\n state.root.className,\n );\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n size === 'small' && smallStyles.primaryAction,\n primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button,\n imageOnly && imageOnlyStyles.primaryAction,\n designVersion === 'next' && primaryDismissNextStyles.sharedStyles,\n designVersion === 'next' && primaryActionNextStyles.root,\n designVersion === 'next' && primaryActionNextStyles[mode],\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n size === 'small' && smallStyles.dismissButton,\n designVersion === 'next' && primaryDismissNextStyles.sharedStyles,\n designVersion === 'next' && dismissButtonNextStyles.root,\n designVersion === 'next' && dismissButtonNextStyles[mode],\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(\n attachmentClassNames.media,\n mediaBaseClassName,\n size === 'small' && smallStyles.media,\n state.media.className,\n );\n }\n state.content.className = mergeClasses(\n attachmentClassNames.content,\n contentBaseClassName,\n size === 'small' && smallStyles.content,\n imageOnly && imageOnlyStyles.content,\n state.content.className,\n );\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n size === 'small' && smallStyles.dismissIcon,\n state.dismissIcon.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","slot","typographyStyles","tokens","useProgressBarStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","progress","ATTACHMENT_MAXWIDTH","SMALL_ATTACHMENT_SIZE","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","alignSelf","position","buttonBaseStyles","alignItems","backgroundColor","colorSubtleBackground","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorSubtleBackgroundHover","colorNeutralForeground2Hover","colorSubtleBackgroundPressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useImageOnlyStyles","useOverflowStyles","overflow","useSmallStyles","caption1","usePrimaryActionNextStyles","borderRadiusXLarge","canvas","spacingVerticalNone","minHeight","sidecar","useDismissButtonNextStyles","colorNeutralForeground2","borderLeftWidth","borderLeftStyle","spacingHorizontalMNudge","usePrimaryDismissNextStyles","sharedStyles","colorNeutralBackground3","colorNeutralBackground3Hover","colorNeutralBackground3Pressed","borderRadiusLarge","useRootNextStyles","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","progressBarStyles","primaryActionStyles","imageOnlyStyles","smallStyles","primaryActionNextStyles","dismissButtonNextStyles","primaryDismissNextStyles","rootNextStyles","imageOnly","size","mode","designVersion","className","as","isLoading","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAQ,CAACmH,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOtB;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentStyles.styles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n slot,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n progress: 'fai-Attachment__progress',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst SMALL_ATTACHMENT_SIZE = '16px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n alignSelf: 'end',\n position: 'relative',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorSubtleBackground,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = 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: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\nconst useImageOnlyStyles = makeStyles({\n primaryAction: {\n padding: 0,\n },\n content: {\n lineHeight: 0,\n },\n});\n\nexport const useOverflowStyles = makeStyles({\n overflow: {\n maxWidth: '100%',\n width: '100%',\n },\n});\n\nconst useSmallStyles = makeStyles({\n primaryAction: {\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge} ${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge}`,\n },\n media: {\n fontSize: SMALL_ATTACHMENT_SIZE,\n height: SMALL_ATTACHMENT_SIZE,\n lineHeight: SMALL_ATTACHMENT_SIZE,\n width: SMALL_ATTACHMENT_SIZE,\n },\n content: {\n ...typographyStyles.caption1,\n },\n dismissButton: {\n padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalXXS}`,\n maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n },\n dismissIcon: {\n fontSize: SMALL_ATTACHMENT_SIZE,\n height: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n },\n});\n\nconst usePrimaryActionNextStyles = makeStyles({\n root: {\n borderTopLeftRadius: tokens.borderRadiusXLarge,\n borderBottomLeftRadius: tokens.borderRadiusXLarge,\n },\n canvas: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '40px',\n },\n\n sidecar: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '32px',\n },\n});\n\nconst useDismissButtonNextStyles = makeStyles({\n root: {\n borderTopRightRadius: tokens.borderRadiusXLarge,\n borderBottomRightRadius: tokens.borderRadiusXLarge,\n ':hover': {\n color: tokens.colorNeutralForeground2,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2,\n },\n },\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n borderLeftColor: tokens.colorNeutralStroke1,\n borderLeftWidth: tokens.strokeWidthThin,\n borderLeftStyle: 'solid',\n },\n canvas: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n minHeight: '40px',\n width: '40px',\n },\n sidecar: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalMNudge}`,\n minHeight: '32px',\n width: '32px',\n },\n dismissOnly: {\n borderRadius: tokens.borderRadiusXLarge,\n width: 'unset',\n borderLeftColor: tokens.colorTransparentStroke,\n },\n});\n\nconst usePrimaryDismissNextStyles = makeStyles({\n sharedStyles: {\n border: 'none',\n backgroundColor: tokens.colorNeutralBackground3,\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground3Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n },\n ':focus-visible': {\n borderRadius: tokens.borderRadiusLarge,\n },\n },\n});\n\nconst useRootNextStyles = makeStyles({\n root: {\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n const primaryActionStyles = usePrimaryActionStyles();\n const imageOnlyStyles = useImageOnlyStyles();\n const smallStyles = useSmallStyles();\n const primaryActionNextStyles = usePrimaryActionNextStyles();\n const dismissButtonNextStyles = useDismissButtonNextStyles();\n const primaryDismissNextStyles = usePrimaryDismissNextStyles();\n const rootNextStyles = useRootNextStyles();\n const { imageOnly, primaryAction, size, mode, designVersion, dismissOnly } = state;\n\n state.root.className = mergeClasses(\n attachmentClassNames.root,\n rootBaseClassName,\n designVersion === 'next' && rootNextStyles.root,\n state.root.className,\n );\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n size === 'small' && smallStyles.primaryAction,\n primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button,\n imageOnly && imageOnlyStyles.primaryAction,\n designVersion === 'next' && primaryDismissNextStyles.sharedStyles,\n designVersion === 'next' && primaryActionNextStyles.root,\n designVersion === 'next' && primaryActionNextStyles[mode],\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n size === 'small' && smallStyles.dismissButton,\n designVersion === 'next' && primaryDismissNextStyles.sharedStyles,\n designVersion === 'next' && dismissButtonNextStyles.root,\n designVersion === 'next' && dismissButtonNextStyles[mode],\n designVersion === 'next' && dismissOnly && dismissButtonNextStyles.dismissOnly,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(\n attachmentClassNames.media,\n mediaBaseClassName,\n size === 'small' && smallStyles.media,\n state.media.className,\n );\n }\n state.content.className = mergeClasses(\n attachmentClassNames.content,\n contentBaseClassName,\n size === 'small' && smallStyles.content,\n imageOnly && imageOnlyStyles.content,\n state.content.className,\n );\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n size === 'small' && smallStyles.dismissIcon,\n state.dismissIcon.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","slot","typographyStyles","tokens","useProgressBarStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","progress","ATTACHMENT_MAXWIDTH","SMALL_ATTACHMENT_SIZE","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","alignSelf","position","buttonBaseStyles","alignItems","backgroundColor","colorSubtleBackground","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorSubtleBackgroundHover","colorNeutralForeground2Hover","colorSubtleBackgroundPressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useImageOnlyStyles","useOverflowStyles","overflow","useSmallStyles","caption1","usePrimaryActionNextStyles","borderRadiusXLarge","canvas","spacingVerticalNone","minHeight","sidecar","useDismissButtonNextStyles","colorNeutralForeground2","borderLeftWidth","borderLeftStyle","spacingHorizontalMNudge","dismissOnly","usePrimaryDismissNextStyles","sharedStyles","colorNeutralBackground3","colorNeutralBackground3Hover","colorNeutralBackground3Pressed","borderRadiusLarge","useRootNextStyles","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","progressBarStyles","primaryActionStyles","imageOnlyStyles","smallStyles","primaryActionNextStyles","dismissButtonNextStyles","primaryDismissNextStyles","rootNextStyles","imageOnly","size","mode","designVersion","className","as","isLoading","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,gBAAgB,QACX,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,oBAAoB,QAAQ,uCAAuC;AAI5E,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;AACZ,EAAE;AAEF,MAAMC,sBAAsB;AAC5B,MAAMC,wBAAwB;AAC9B,MAAMC,kBAAkB;AAExB,MAAMC,uBA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H,aACxBK,qBAAqBK,OAAO,EAC5BqG,sBACAW,SAAS,WAAWN,YAAY1G,OAAO,EACvC+G,aAAaN,gBAAgBzG,OAAO,EACpCgG,MAAMhG,OAAO,CAACmH,SAAS;IAEzBnB,MAAM/F,WAAW,CAACkH,SAAS,GAAG7H,aAC5BK,qBAAqBM,WAAW,EAChCqG,0BACAU,SAAS,WAAWN,YAAYzG,WAAW,EAC3C+F,MAAM/F,WAAW,CAACkH,SAAS;IAG7B,IAAInB,MAAM9F,QAAQ,EAAE;QAClB8F,MAAM9F,QAAQ,CAACiH,SAAS,GAAG7H,aACzBK,qBAAqBO,QAAQ,EAC7BqG,kBAAkBrG,QAAQ,EAC1B8F,MAAM9F,QAAQ,CAACiH,SAAS;QAG1B,MAAMG,MAAM/H,KAAKgI,QAAQ,CAACvB,MAAM9F,QAAQ,CAACoH,GAAG,EAAE;YAAEE,aAAa;YAAOC,iBAAiB;QAAK;QAC1F,IAAIH,KAAK;YACP,IAAItB,MAAM9F,QAAQ,CAACwH,KAAK,KAAKC,WAAW;gBACtCL,IAAIH,SAAS,GAAG7H,aAAaiH,kBAAkBqB,wBAAwB,EAAEN,IAAIH,SAAS;YACxF,OAAO;gBACLG,IAAIH,SAAS,GAAG7H,aAAaiH,kBAAkBsB,kBAAkB,EAAEP,IAAIH,SAAS;YAClF;YACAnB,MAAM9F,QAAQ,CAACoH,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOtB;AACT,EAAE"}
package/lib/index.js CHANGED
@@ -8,4 +8,5 @@ export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttac
8
8
  export { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttachmentOverflowMenuContext_unstable } from './contexts/attachmentOverflowMenuContext';
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
+ export { AgentTag, renderAgentTag_unstable, useAgentTag_unstable, agentTagClassNames, useAgentTagStyles_unstable } from './AgentTag';
11
12
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type {\n AttachmentListProps,\n AttachmentListSlots,\n AttachmentListState,\n AttachmentDismissedData,\n} from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n\nexport type {\n AttachmentOverflowMenuProps,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuState,\n} from './AttachmentOverflowMenu';\nexport {\n AttachmentOverflowMenu,\n renderAttachmentOverflowMenu_unstable,\n useAttachmentOverflowMenu_unstable,\n} from './AttachmentOverflowMenu';\n\nexport type { AttachmentOverflowMenuContextValue } from './contexts/attachmentOverflowMenuContext';\nexport {\n AttachmentOverflowMenuContext,\n AttachmentOverflowMenuProvider,\n useAttachmentOverflowMenuContext_unstable,\n} from './contexts/attachmentOverflowMenuContext';\n\nexport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton';\nexport {\n AttachmentOverflowMenuButton,\n attachmentOverflowMenuButtonClassNames,\n renderAttachmentOverflowMenuButton_unstable,\n useAttachmentOverflowMenuButtonStyles_unstable,\n useAttachmentOverflowMenuButton_unstable,\n} from './AttachmentOverflowMenuButton';\n\nexport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem';\nexport {\n AttachmentOverflowMenuItem,\n attachmentOverflowMenuItemClassNames,\n renderAttachmentOverflowMenuItem_unstable,\n useAttachmentOverflowMenuItemStyles_unstable,\n useAttachmentOverflowMenuItem_unstable,\n} from './AttachmentOverflowMenuItem';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenu_unstable","AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","AttachmentOverflowMenuButton","attachmentOverflowMenuButtonClassNames","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useAttachmentOverflowMenuButton_unstable","AttachmentOverflowMenuItem","attachmentOverflowMenuItemClassNames","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","useAttachmentOverflowMenuItem_unstable"],"rangeMappings":";;;;;;;;;","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAQ7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAOtB,SACEC,sBAAsB,EACtBC,qCAAqC,EACrCC,kCAAkC,QAC7B,2BAA2B;AAGlC,SACEC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,yCAAyC,QACpC,2CAA2C;AAOlD,SACEC,4BAA4B,EAC5BC,sCAAsC,EACtCC,2CAA2C,EAC3CC,8CAA8C,EAC9CC,wCAAwC,QACnC,iCAAiC;AAOxC,SACEC,0BAA0B,EAC1BC,oCAAoC,EACpCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,sCAAsC,QACjC,+BAA+B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type {\n AttachmentListProps,\n AttachmentListSlots,\n AttachmentListState,\n AttachmentDismissedData,\n} from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n\nexport type {\n AttachmentOverflowMenuProps,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuState,\n} from './AttachmentOverflowMenu';\nexport {\n AttachmentOverflowMenu,\n renderAttachmentOverflowMenu_unstable,\n useAttachmentOverflowMenu_unstable,\n} from './AttachmentOverflowMenu';\n\nexport type { AttachmentOverflowMenuContextValue } from './contexts/attachmentOverflowMenuContext';\nexport {\n AttachmentOverflowMenuContext,\n AttachmentOverflowMenuProvider,\n useAttachmentOverflowMenuContext_unstable,\n} from './contexts/attachmentOverflowMenuContext';\n\nexport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton';\nexport {\n AttachmentOverflowMenuButton,\n attachmentOverflowMenuButtonClassNames,\n renderAttachmentOverflowMenuButton_unstable,\n useAttachmentOverflowMenuButtonStyles_unstable,\n useAttachmentOverflowMenuButton_unstable,\n} from './AttachmentOverflowMenuButton';\n\nexport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem';\nexport {\n AttachmentOverflowMenuItem,\n attachmentOverflowMenuItemClassNames,\n renderAttachmentOverflowMenuItem_unstable,\n useAttachmentOverflowMenuItemStyles_unstable,\n useAttachmentOverflowMenuItem_unstable,\n} from './AttachmentOverflowMenuItem';\n\nexport {\n AgentTag,\n renderAgentTag_unstable,\n useAgentTag_unstable,\n agentTagClassNames,\n useAgentTagStyles_unstable,\n} from './AgentTag';\nexport type { AgentTagProps, AgentTagSlots, AgentTagState } from './AgentTag';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenu_unstable","AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","AttachmentOverflowMenuButton","attachmentOverflowMenuButtonClassNames","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useAttachmentOverflowMenuButton_unstable","AttachmentOverflowMenuItem","attachmentOverflowMenuItemClassNames","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","useAttachmentOverflowMenuItem_unstable","AgentTag","renderAgentTag_unstable","useAgentTag_unstable","agentTagClassNames","useAgentTagStyles_unstable"],"rangeMappings":";;;;;;;;;;","mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAQ7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAOtB,SACEC,sBAAsB,EACtBC,qCAAqC,EACrCC,kCAAkC,QAC7B,2BAA2B;AAGlC,SACEC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,yCAAyC,QACpC,2CAA2C;AAOlD,SACEC,4BAA4B,EAC5BC,sCAAsC,EACtCC,2CAA2C,EAC3CC,8CAA8C,EAC9CC,wCAAwC,QACnC,iCAAiC;AAOxC,SACEC,0BAA0B,EAC1BC,oCAAoC,EACpCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,sCAAsC,QACjC,+BAA+B;AAEtC,SACEC,QAAQ,EACRC,uBAAuB,EACvBC,oBAAoB,EACpBC,kBAAkB,EAClBC,0BAA0B,QACrB,aAAa"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ AgentTag: function() {
13
+ return _index.AgentTag;
14
+ },
15
+ agentTagClassNames: function() {
16
+ return _index.agentTagClassNames;
17
+ },
18
+ renderAgentTag_unstable: function() {
19
+ return _index.renderAgentTag_unstable;
20
+ },
21
+ useAgentTagStyles_unstable: function() {
22
+ return _index.useAgentTagStyles_unstable;
23
+ },
24
+ useAgentTag_unstable: function() {
25
+ return _index.useAgentTag_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/AgentTag/index");
29
+ //# sourceMappingURL=AgentTag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AgentTag.ts"],"sourcesContent":["export {\n AgentTag,\n renderAgentTag_unstable,\n useAgentTag_unstable,\n agentTagClassNames,\n useAgentTagStyles_unstable,\n} from './components/AgentTag/index';\nexport type { AgentTagProps, AgentTagSlots, AgentTagState } from './components/AgentTag/index';\n"],"names":["AgentTag","agentTagClassNames","renderAgentTag_unstable","useAgentTagStyles_unstable","useAgentTag_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,QAAQ;eAARA,eAAQ;;IAGRC,kBAAkB;eAAlBA,yBAAkB;;IAFlBC,uBAAuB;eAAvBA,8BAAuB;;IAGvBC,0BAA0B;eAA1BA,iCAA0B;;IAF1BC,oBAAoB;eAApBA,2BAAoB;;;uBAGf"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AgentTag", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AgentTag;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useAgentTag = require("./useAgentTag");
14
+ const _renderAgentTag = require("./renderAgentTag");
15
+ const _useAgentTagStylesstyles = require("./useAgentTagStyles.styles");
16
+ const AgentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useAgentTag.useAgentTag_unstable)(props, ref);
18
+ (0, _useAgentTagStylesstyles.useAgentTagStyles_unstable)(state);
19
+ return (0, _renderAgentTag.renderAgentTag_unstable)(state);
20
+ });
21
+ AgentTag.displayName = 'AgentTag'; //# sourceMappingURL=AgentTag.js.map
@@ -0,0 +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,GAAAA,OAA+CC,UAAMC,CAAU,CAACC,OAACA;UAC5EC,QAAMA,IAAAA,iCAAQC,EAAAA,OAAqBF;2DAEnCG,EAAAA;WACAC,IAAAA,uCAAOA,EAAAA;AACT;AAEAP,SAASQ,WAAW,GAAG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * State used in rendering AgentTag
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ //# sourceMappingURL=AgentTag.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AgentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentProps, AttachmentState } from '../Attachment';\n\nexport type AgentTagSlots = AttachmentSlots;\n\n/**\n * AgentTag Props\n */\nexport type AgentTagProps = ComponentProps<Partial<Omit<AgentTagSlots, 'primaryAction' | 'progress'>>> &\n Omit<AttachmentProps, keyof AttachmentSlots | 'dismissOnly'>;\n\n/**\n * State used in rendering AgentTag\n */\nexport type AgentTagState = ComponentState<AgentTagSlots> & Omit<AttachmentState, keyof AttachmentSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ AgentTag: function() {
13
+ return _AgentTag.AgentTag;
14
+ },
15
+ agentTagClassNames: function() {
16
+ return _useAgentTagStylesstyles.agentTagClassNames;
17
+ },
18
+ renderAgentTag_unstable: function() {
19
+ return _renderAgentTag.renderAgentTag_unstable;
20
+ },
21
+ useAgentTagStyles_unstable: function() {
22
+ return _useAgentTagStylesstyles.useAgentTagStyles_unstable;
23
+ },
24
+ useAgentTag_unstable: function() {
25
+ return _useAgentTag.useAgentTag_unstable;
26
+ }
27
+ });
28
+ const _AgentTag = require("./AgentTag");
29
+ const _renderAgentTag = require("./renderAgentTag");
30
+ const _useAgentTag = require("./useAgentTag");
31
+ const _useAgentTagStylesstyles = require("./useAgentTagStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { AgentTag } from './AgentTag';\nexport type { AgentTagProps, AgentTagSlots, AgentTagState } from './AgentTag.types';\nexport { renderAgentTag_unstable } from './renderAgentTag';\nexport { useAgentTag_unstable } from './useAgentTag';\nexport { agentTagClassNames, useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\n"],"names":["AgentTag","agentTagClassNames","renderAgentTag_unstable","useAgentTagStyles_unstable","useAgentTag_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAIRC,kBAAkB;eAAlBA,2CAAkB;;IAFlBC,uBAAuB;eAAvBA,uCAAuB;;IAEHC,0BAA0B;eAA1BA,mDAA0B;;IAD9CC,oBAAoB;eAApBA,iCAAoB;;;0BAHJ;gCAEe;6BACH;yCAC0B"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderAgentTag_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderAgentTag_unstable;
9
+ }
10
+ });
11
+ const _Attachment = require("../Attachment");
12
+ const renderAgentTag_unstable = (state)=>{
13
+ return (0, _Attachment.renderAttachment_unstable)(state);
14
+ }; //# sourceMappingURL=renderAgentTag.js.map
@@ -0,0 +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":["renderAttachment_unstable","state"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;;+BAUSA;;;eAAAA;;;4BATT;AASE,MAAOA,0BAA0BC,CAAAA;IACjC,OAAAD,IAAAA,qCAAA,EAAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useAgentTag_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useAgentTag_unstable;
9
+ }
10
+ });
11
+ const _ = require("..");
12
+ const useAgentTag_unstable = (props, ref)=>{
13
+ const state = (0, _.useAttachment_unstable)({
14
+ ...props,
15
+ dismissOnly: true,
16
+ designVersion: 'next'
17
+ }, ref);
18
+ return state;
19
+ }; //# sourceMappingURL=useAgentTag.js.map
@@ -0,0 +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":["state","useAttachment_unstable","ref","dismissOnly","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBQA;;;eAAAA;;;kBAd+B;AAcrC,MAAMA,uBAAQC,CAAAA,OAAuBC;UAAEF,QAAQC,IAAAA,wBAAA,EAAA;gBAAEE;qBAAmBC;QAAsBA,eAAGF;OAE7FA;IACA,OAAAF"}
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ agentTagClassNames: function() {
13
+ return agentTagClassNames;
14
+ },
15
+ useAgentTagStyles_unstable: function() {
16
+ return useAgentTagStyles_unstable;
17
+ }
18
+ });
19
+ const _reactcomponents = require("@fluentui/react-components");
20
+ const _ = require("..");
21
+ const agentTagClassNames = {
22
+ root: 'fai-AgentTag',
23
+ primaryAction: 'fai-AgentTag__primaryAction',
24
+ dismissIcon: 'fai-AgentTag__dismissIcon',
25
+ dismissButton: 'fai-AgentTag__dismissButton',
26
+ media: 'fai-AgentTag__media',
27
+ content: 'fai-AgentTag__content',
28
+ progress: 'fai-AgentTag__progress'
29
+ };
30
+ const useMediaStyles = (0, _reactcomponents.__styles)({
31
+ canvas: {
32
+ a9b677: "fq4mcun",
33
+ Bqenvij: "frvgh55"
34
+ },
35
+ sidecar: {
36
+ a9b677: "f64fuq3",
37
+ Bqenvij: "fjamq6b"
38
+ }
39
+ }, {
40
+ d: [
41
+ ".fq4mcun{width:24px;}",
42
+ ".frvgh55{height:24px;}",
43
+ ".f64fuq3{width:20px;}",
44
+ ".fjamq6b{height:20px;}"
45
+ ]
46
+ });
47
+ const useContentStyles = (0, _reactcomponents.__styles)({
48
+ canvas: {
49
+ Bahqtrf: "fk6fouc",
50
+ Be2twd7: "fod5ikn",
51
+ Bhrd7zp: "fl43uef",
52
+ Bg96gwp: "faaz57k",
53
+ sj55zd: "fkfq4zb"
54
+ },
55
+ sidecar: {
56
+ Bahqtrf: "fk6fouc",
57
+ Be2twd7: "fkhj508",
58
+ Bhrd7zp: "fl43uef",
59
+ Bg96gwp: "f1i3iumi",
60
+ sj55zd: "fkfq4zb"
61
+ }
62
+ }, {
63
+ d: [
64
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
65
+ ".fod5ikn{font-size:var(--fontSizeBase400);}",
66
+ ".fl43uef{font-weight:var(--fontWeightSemibold);}",
67
+ ".faaz57k{line-height:var(--lineHeightBase400);}",
68
+ ".fkfq4zb{color:var(--colorNeutralForeground2);}",
69
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
70
+ ".f1i3iumi{line-height:var(--lineHeightBase300);}"
71
+ ]
72
+ });
73
+ const useDismissButtonStyles = (0, _reactcomponents.__styles)({
74
+ canvas: {
75
+ Beyfa6y: 0,
76
+ Bbmb7ep: 0,
77
+ Btl43ni: 0,
78
+ B7oj6ja: 0,
79
+ Dimara: "f1jxijnj",
80
+ uwmqm3: [
81
+ "fhx4nu",
82
+ "fjodcmx"
83
+ ],
84
+ z189sj: [
85
+ "fw5db7e",
86
+ "f1uw59to"
87
+ ]
88
+ },
89
+ sidecar: {
90
+ uwmqm3: [
91
+ "f1uw59to",
92
+ "fw5db7e"
93
+ ],
94
+ z189sj: [
95
+ "f1vdfbxk",
96
+ "f1f5gg8d"
97
+ ],
98
+ Beyfa6y: 0,
99
+ Bbmb7ep: 0,
100
+ Btl43ni: 0,
101
+ B7oj6ja: 0,
102
+ Dimara: "f1kijzfu"
103
+ }
104
+ }, {
105
+ d: [
106
+ [
107
+ ".f1jxijnj{border-radius:var(--borderRadius2XL);}",
108
+ {
109
+ p: -1
110
+ }
111
+ ],
112
+ ".fhx4nu{padding-left:var(--spacingHorizontalL);}",
113
+ ".fjodcmx{padding-right:var(--spacingHorizontalL);}",
114
+ ".fw5db7e{padding-right:var(--spacingHorizontalM);}",
115
+ ".f1uw59to{padding-left:var(--spacingHorizontalM);}",
116
+ ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
117
+ ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
118
+ [
119
+ ".f1kijzfu{border-radius:var(--borderRadiusXLarge);}",
120
+ {
121
+ p: -1
122
+ }
123
+ ]
124
+ ]
125
+ });
126
+ const useAgentTagStyles_unstable = (state)=>{
127
+ 'use no memo';
128
+ const { mode } = state;
129
+ const contentStyles = useContentStyles();
130
+ const dismissButtonStyles = useDismissButtonStyles();
131
+ const mediaStyles = useMediaStyles();
132
+ state.root.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.root, state.root.className);
133
+ state.primaryAction.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.primaryAction, state.primaryAction.className);
134
+ state.dismissIcon.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.dismissIcon, state.dismissIcon.className);
135
+ state.dismissButton.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.dismissButton, dismissButtonStyles[mode], state.dismissButton.className);
136
+ if (state.media) {
137
+ state.media.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.media, mediaStyles[mode], state.media.className);
138
+ }
139
+ state.content.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.content, contentStyles[mode], state.content.className);
140
+ if (state.progress) {
141
+ state.progress.className = (0, _reactcomponents.mergeClasses)(agentTagClassNames.progress, state.progress.className);
142
+ }
143
+ (0, _.useAttachmentStyles_unstable)(state);
144
+ return state;
145
+ }; //# sourceMappingURL=useAgentTagStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAgentTagStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport type { AgentTagSlots, AgentTagState } from './AgentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { useAttachmentStyles_unstable } from '..';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const agentTagClassNames: SlotClassNames<AgentTagSlots> = {\n root: 'fai-AgentTag',\n primaryAction: 'fai-AgentTag__primaryAction',\n dismissIcon: 'fai-AgentTag__dismissIcon',\n dismissButton: 'fai-AgentTag__dismissButton',\n media: 'fai-AgentTag__media',\n content: 'fai-AgentTag__content',\n progress: 'fai-AgentTag__progress',\n};\n\nconst useMediaStyles = makeStyles({\n canvas: {\n width: '24px',\n height: '24px',\n },\n sidecar: { width: '20px', height: '20px' },\n});\n\nconst useContentStyles = makeStyles({\n canvas: {\n ...typographyStyles.subtitle2,\n color: tokens.colorNeutralForeground2,\n },\n sidecar: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground2,\n },\n});\n\nconst useDismissButtonStyles = makeStyles({\n canvas: {\n borderRadius: tokens.borderRadius2XL,\n paddingLeft: tokens.spacingHorizontalL,\n paddingRight: tokens.spacingHorizontalM,\n },\n sidecar: {\n paddingLeft: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalS,\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the AgentTag slots based on the state\n */\nexport const useAgentTagStyles_unstable = (state: AgentTagState): AgentTagState => {\n 'use no memo';\n\n const { mode } = state;\n\n const contentStyles = useContentStyles();\n const dismissButtonStyles = useDismissButtonStyles();\n const mediaStyles = useMediaStyles();\n\n state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);\n\n state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);\n\n state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);\n\n state.dismissButton.className = mergeClasses(\n agentTagClassNames.dismissButton,\n dismissButtonStyles[mode],\n state.dismissButton.className,\n );\n\n if (state.media) {\n state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);\n }\n\n state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);\n\n if (state.progress) {\n state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);\n }\n\n useAttachmentStyles_unstable(state);\n\n return state;\n};\n"],"names":["agentTagClassNames","root","primaryAction","dismissIcon","dismissButton","media","content","progress","useMediaStyles","makeStyles","canvas","width","height","sidecar","d","useContentStyles","typographyStyles","subtitle2","color","Bahqtrf","sj55zd","useDismissButtonStyles","borderRadius","paddingLeft","paddingRight","__styles","Beyfa6y","Btl43ni","B7oj6ja","Dimara","mode","uwmqm3","contentStyles","z189sj","dismissButtonStyles","state","className","mergeClasses","Bbmb7ep","useAttachmentStyles_unstable","p"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,kBAAAA;eAAAA;;;;;;iCANsC;kBAGN;AAGtC,MAAMA,qBAAoD;UAC/DC;mBACAC;iBACAC;mBACAC;WACAC;aACAC;cACAC;AACF;AAEA,MAAMC,iBAAiBC,IAAAA,yBAAAA,EAAAA;YACrBC;gBACEC;iBACAC;;aAEFC;gBAAWF;iBAAeC;;AAC5B,GAAA;IAEAE,GAAA;QAAMC;QAAmBN;QAAW;QAAA;KAAA;;yBAE7BO,IAAAA,yBAAiBC,EAAAA;YACpBC;QACFC,SAAA;QACAN,SAAS;iBACJG;iBACHE;QACFE,QAAA;IACF;IAEAP,SAAMQ;QACJX,SAAQ;iBACNY;iBACAC;iBACAC;QACFJ,QAAA;;;;;QAGyC;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;;MAEzCC,yBAAAI,IAAAA,yBAAA,EAAA;IACFf,QAAA;QAEAgB,SAAA;;QAGAC,SAAO;QACLC,SAAA;QAEAC,QAAQC;QAERC,QAAMC;YAAAA;YAAAA;SAAgBjB;QACtBkB,QAAMC;YAAAA;YAAAA;SAAsBb;;aAGtBpB;QAENkC,QAAMjC;YAAAA;YAAckC;SAAS;QAE7BD,QAAMhC;YAAAA;YAAYiC;SAAYC;QAE9BF,SAAM/B;QAMNkC,SAAIH;iBACFA;QACFP,SAAA;QAEAO,QAAM7B;;;OAIN;QAAA;YAAA;YAAA;gBAEAiC,GAAAA,CAAAA;;SAEA;QAAA;QAAOJ;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;YAAAA;YAAAA;gBACPK,GAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &\n CopilotMode &\n DesignVersion & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n };\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA0DA;;CAEC"}
1
+ {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &\n CopilotMode &\n DesignVersion & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n /**\n * Use this prop if the attachment has no primary action\n * and should be rendered as a single button\n */\n dismissOnly?: boolean;\n };\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode' | 'dismissOnly'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA+DA;;CAEC"}
@@ -11,9 +11,16 @@ Object.defineProperty(exports, "renderAttachment_unstable", {
11
11
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactcomponents = require("@fluentui/react-components");
13
13
  const renderAttachment_unstable = (state)=>{
14
+ const { id, shouldUseOverflow, designVersion, dismissOnly } = state;
15
+ const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);
16
+ return shouldUseOverflow ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.OverflowItem, {
17
+ id: id,
18
+ children: attachment
19
+ }, id) : attachment;
20
+ };
21
+ const renderAttachment = (state)=>{
14
22
  (0, _reactcomponents.assertSlots)(state);
15
- const { id, shouldUseOverflow } = state;
16
- const attachment = /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
23
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
17
24
  children: [
18
25
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
19
26
  children: [
@@ -27,8 +34,17 @@ const renderAttachment_unstable = (state)=>{
27
34
  })
28
35
  ]
29
36
  });
30
- return shouldUseOverflow ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.OverflowItem, {
31
- id: id,
32
- children: attachment
33
- }, id) : attachment;
37
+ };
38
+ const renderDismissOnly = (state)=>{
39
+ (0, _reactcomponents.assertSlots)(state);
40
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
41
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.dismissButton, {
42
+ children: [
43
+ state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
44
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
45
+ state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {}),
46
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissIcon, {})
47
+ ]
48
+ })
49
+ });
34
50
  }; //# sourceMappingURL=renderAttachment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n const { id, shouldUseOverflow } = state;\n\n const attachment = (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n"],"names":["assertSlots","state","id","_jsxs","imageOnly","progress","media","_jsx","content","shouldUseOverflow","attachment"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE0C;AAOxCA,MAAAA,4BAA6BC,CAAAA;oCACrBC,EAAED;UAEV;uBAGOA,WAAW,GAAAE,IAAAA,gBAAKF,EAAAA,MAAMG,IAAAA,EAAS;;gDAChCH,MAACA,aAAa,EAAA;;0BACbA,KAAMI,IAAAA,CAAAA,MAAQD,SAAA,IAAI,WAAOC,GAAAA,IAAAA,eAAAA,EAAAA,MAAQC,KAAA,EAAA,CAAA;oBAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAN,MAAAO,OAAA,EAAA,CAAA;oBAAAP,MAAAI,QAAA,IAAA,WAAA,GAAAE,IAAAA,eAAA,EAAAN,MAAAI,QAAA,EAAA,CAAA;iBAAA;;;;;;;;;;OAOxCH,MAAOO;+CAEFC"}
1
+ {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n const { id, shouldUseOverflow, designVersion, dismissOnly } = state;\n\n const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);\n\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n\nconst renderAttachment = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n\nconst renderDismissOnly = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.dismissButton>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["id","designVersion","attachment","state","renderAttachment","assertSlots","progress","root","dismissButton","_jsx","dismissIcon","renderDismissOnly","children","_jsxs","media","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUUA;;;eAAAA;;;4BATV;iCAE0C;AAOxC,MAAQA,4BAAuBC,CAAAA;UAE/B,EAEAD,EAAA,mBACoBA,4BAIlBE,EAEF,GAAAC;IAEF,MAAMC,aAAAA,kBAAoBD,UAAAA,cAAAA,kBAAAA,SAAAA,iBAAAA;WACxBE,oBAA6BF,WAAAA,GAAAA,IAAAA,eAAAA,EAAAA,6BAAAA,EAAAA;QAE7BH,IAAAA;;;;yBAGOG,CAAAA;;sBAEAA,GAAAA,IAAAA,gBAAMG,EAAAA,MAAQC,IAAA,EAAA;;;;;;;;;+CAEjBJ,MAACA,aAAMK,EAAAA;qCACL,GAAAC,IAAAA,eAAA,EAAAN,MAAAO,WAAOA,EAAAA,CAAAA;;;;;AAIf,MAAAC,oBAAAR,CAAAA;IAEAE,IAAAA,4BAAMM,EAAAA;WACJN,WAA6BF,GAAAA,IAAAA,eAAAA,EAAAA,MAAAA,IAAAA,EAAAA;QAE7BS,UAAA,WACE,GAAAC,IAAAA,gBAACV,EAAAA,MAAMI,aAAI,EAAA;;sBACTO,KAAA,IAAA,CAAAX,MAACA,SAAMK,IAAAA,WAAa,GAAAC,IAAAA,eAAA,EAAAN,MAAAW,KAAA,EAAA,CAAA;gBAAA,WAAA,GAAAL,IAAAA,eAAA,EAAAN,MAAAY,OAAA,EAAA,CAAA;gBAAAZ,MAAAG,QAAA,IAAA,WAAA,GAAAG,IAAAA,eAAA,EAAAN,MAAAG,QAAA,EAAA,CAAA;gBAAA,WAAA,GAAAG,IAAAA,eAAA,EAAAN,MAAAO,WAAA,EAAA,CAAA;aAAA;;;+CAGH"}
@@ -15,7 +15,7 @@ const _reacticons = require("@fluentui/react-icons");
15
15
  const _attachmentListContext = require("../../contexts/attachmentListContext");
16
16
  const _reactprovider = require("@fluentui-copilot/react-provider");
17
17
  const useAttachment_unstable = (props, ref)=>{
18
- const { children, imageOnly, size = 'medium' } = props;
18
+ const { children, imageOnly, size = 'medium', dismissOnly = false } = props;
19
19
  const { onAttachmentDismiss, shouldUseOverflow } = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context);
20
20
  const attachmentId = (0, _reactcomponents.useId)('attachment-', props.id);
21
21
  const isLoading = !!props.progress;
@@ -29,6 +29,9 @@ const useAttachment_unstable = (props, ref)=>{
29
29
  elementType: 'div'
30
30
  });
31
31
  const primaryAction = _reactcomponents.slot.always(props.primaryAction, {
32
+ defaultProps: {
33
+ as: dismissOnly ? 'span' : undefined
34
+ },
32
35
  elementType: 'button'
33
36
  });
34
37
  const dismissButton = _reactcomponents.slot.always(props.dismissButton, {
@@ -90,7 +93,8 @@ const useAttachment_unstable = (props, ref)=>{
90
93
  isLoading,
91
94
  shouldUseOverflow,
92
95
  mode,
93
- designVersion
96
+ designVersion,
97
+ dismissOnly
94
98
  };
95
99
  if (state.primaryAction.as === 'span') {
96
100
  state.components.primaryAction = 'span';