@fluentui-copilot/react-attachments 0.8.3 → 0.9.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 +71 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +154 -5
- package/lib/Attachment.js.map +1 -1
- package/lib/AttachmentList.js.map +1 -1
- package/lib/AttachmentOverflowMenu.js +2 -0
- package/lib/AttachmentOverflowMenu.js.map +1 -0
- package/lib/AttachmentOverflowMenuButton.js +2 -0
- package/lib/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/AttachmentOverflowMenuItem.js +2 -0
- package/lib/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/AttachmentTag.js.map +1 -1
- package/lib/AttachmentTagItem.js.map +1 -1
- package/lib/AttachmentTagList.js.map +1 -1
- package/lib/components/Attachment/Attachment.js.map +1 -1
- package/lib/components/Attachment/Attachment.types.js +3 -1
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/index.js.map +1 -1
- package/lib/components/Attachment/renderAttachment.js +1 -1
- package/lib/components/Attachment/renderAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +5 -1
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.js +18 -3
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib/components/AttachmentList/index.js.map +1 -1
- package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/index.js +6 -0
- package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +4 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +4 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +43 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +25 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
- package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/AttachmentTag.types.js +3 -1
- package/lib/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
- package/lib/components/AttachmentTag/index.js.map +1 -1
- package/lib/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
- package/lib/components/AttachmentTagItem/index.js.map +1 -1
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
- package/lib/components/AttachmentTagList/index.js.map +1 -1
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
- package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
- package/lib/components/index.js +3 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/utils/useAttachmentTagSlots.js +2 -2
- package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib/contexts/attachmentListContext.js.map +1 -1
- package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
- package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib/contexts/attachmentTagListContext.js.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Attachment.js.map +1 -1
- package/lib-commonjs/AttachmentList.js.map +1 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/AttachmentTag.js.map +1 -1
- package/lib-commonjs/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +3 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
- package/lib-commonjs/components/Attachment/index.js.map +1 -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 +3 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +31 -5
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +7 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +7 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +40 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +39 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +3 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +7 -7
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/index.js.map +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.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
- package/lib-commonjs/components/index.js +3 -0
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
- package/lib-commonjs/index.js +95 -43
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\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 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","tokens","typographyStyles","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"],"mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\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 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","tokens","typographyStyles","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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"}
|
|
@@ -2,6 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
import { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
|
|
3
3
|
import { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
|
|
4
4
|
import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use new AttachmentOverflowMenuItem component exported from \@fluentui-copilot/react-attachments package instead.
|
|
7
|
+
* Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
|
|
8
|
+
*/
|
|
5
9
|
export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
6
10
|
const state = useAttachmentTagItem_unstable(props, ref);
|
|
7
11
|
useAttachmentTagItemStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF;;;CAGC,GACD,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagItemSlots = {\n root: NonNullable<Slot<'div'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTagItem Props\n */\nexport type AttachmentTagItemProps = ComponentProps<Partial<AttachmentTagItemSlots>>;\n\n/**\n * State used in rendering AttachmentTagItem\n */\nexport type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagItemSlots = {\n root: NonNullable<Slot<'div'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTagItem Props\n */\nexport type AttachmentTagItemProps = ComponentProps<Partial<AttachmentTagItemSlots>>;\n\n/**\n * State used in rendering AttachmentTagItem\n */\nexport type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAcA;;CAEC,GACD,WAA4E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagItem';\nexport * from './AttachmentTagItem.types';\nexport * from './renderAttachmentTagItem';\nexport * from './useAttachmentTagItem';\nexport * from './useAttachmentTagItemStyles';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,+BAA+B"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagItem';\nexport * from './AttachmentTagItem.types';\nexport * from './renderAttachmentTagItem';\nexport * from './useAttachmentTagItem';\nexport * from './useAttachmentTagItemStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachmentTagItem_unstable","state","root","media","content","icon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IAEpC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachmentTagItem_unstable","state","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IAEpC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTagItem_unstable","props","ref","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAOC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC3E;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItemStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles';\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 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"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AACnF,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,oBAAoB,EACpBC,qBAAqB,QAChB,0CAA0C;AAIjD,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,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"}
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItemStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles';\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 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,EAAEC,MAAM,QAAQ,6BAA6B;AACnF,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,oBAAoB,EACpBC,qBAAqB,QAChB,0CAA0C;AAIjD,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,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"}
|
|
@@ -4,7 +4,10 @@ import { useAttachmentTagList_unstable } from './useAttachmentTagList';
|
|
|
4
4
|
import { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';
|
|
5
5
|
import { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';
|
|
6
6
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use new AttachmentList component exported from \@fluentui-copilot/react-attachments package instead.
|
|
9
|
+
* Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
|
|
10
|
+
*/
|
|
8
11
|
export const AttachmentTagList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
9
12
|
const state = useAttachmentTagList_unstable(props, ref);
|
|
10
13
|
const contextValues = useAttachmentTagListContextValues_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["React","renderAttachmentTagList_unstable","useAttachmentTagList_unstable","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","useCustomStyleHook","AttachmentTagList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0CAA0C,QAAQ,sCAAsC;AACjG,SAASC,mCAAmC,QAAQ,+BAA+B;AAGnF,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;CAGC,GACD,OAAO,MAAMC,kCAAiEN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IACnD,MAAME,gBAAgBR,2CAA2CO;IAEjEN,oCAAoCM;IACpCL,mBAAmB,8BAA8BK;IAEjD,OAAOT,iCAAiCS,OAAOC;AACjD,GAAG;AAEHL,kBAAkBM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentTagListContextValue } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps } from '../AttachmentTag/AttachmentTag.types';\n\nexport type AttachmentTagListSlots = {\n root: Slot<'div'>;\n};\n\nexport type AttachmentTagDismissedData = {\n content?: AttachmentTagProps['children'];\n media?: AttachmentTagProps['media'];\n};\n\n/**\n * AttachmentTagList Props\n */\nexport type AttachmentTagListProps = ComponentProps<AttachmentTagListSlots> & {\n onAttachmentTagDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n data: AttachmentTagDismissedData,\n ) => void;\n};\n\n/**\n * State used in rendering AttachmentTagList\n */\nexport type AttachmentTagListState = ComponentState<AttachmentTagListSlots> &\n Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport type AttachmentTagListContextValues = {\n tagList: AttachmentTagListContextValue;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentTagListContextValue } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps } from '../AttachmentTag/AttachmentTag.types';\n\nexport type AttachmentTagListSlots = {\n root: Slot<'div'>;\n};\n\nexport type AttachmentTagDismissedData = {\n content?: AttachmentTagProps['children'];\n media?: AttachmentTagProps['media'];\n};\n\n/**\n * AttachmentTagList Props\n */\nexport type AttachmentTagListProps = ComponentProps<AttachmentTagListSlots> & {\n onAttachmentTagDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n data: AttachmentTagDismissedData,\n ) => void;\n};\n\n/**\n * State used in rendering AttachmentTagList\n */\nexport type AttachmentTagListState = ComponentState<AttachmentTagListSlots> &\n Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport type AttachmentTagListContextValues = {\n tagList: AttachmentTagListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA6BA,WAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagList';\nexport * from './AttachmentTagList.types';\nexport * from './renderAttachmentTagList';\nexport * from './useAttachmentTagList';\nexport * from './useAttachmentTagListStyles';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,+BAA+B"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagList';\nexport * from './AttachmentTagList.types';\nexport * from './renderAttachmentTagList';\nexport * from './useAttachmentTagList';\nexport * from './useAttachmentTagListStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["assertSlots","AttachmentTagListProvider","renderAttachmentTagList_unstable","state","contextValues","value","tagList","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAEzD,SAASC,yBAAyB,QAAQ,0CAA0C;AAOpF;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;IAEAJ,YAAoCG;IAEpC,qBACE,KAACF;QAA0BI,OAAOD,cAAcE,OAAO;kBACrD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["assertSlots","AttachmentTagListProvider","renderAttachmentTagList_unstable","state","contextValues","value","tagList","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAEzD,SAASC,yBAAyB,QAAQ,0CAA0C;AAOpF;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;IAEAJ,YAAoCG;IAEpC,qBACE,KAACF;QAA0BI,OAAOD,cAAcE,OAAO;kBACrD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
|
|
2
2
|
/**
|
|
3
3
|
* Create the state required to render AttachmentTagList.
|
|
4
4
|
*
|
|
@@ -21,7 +21,7 @@ export const useAttachmentTagList_unstable = (props, ref) => {
|
|
|
21
21
|
components: {
|
|
22
22
|
root: 'div'
|
|
23
23
|
},
|
|
24
|
-
root: slot.always(
|
|
24
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
25
25
|
'aria-label': 'Attachments',
|
|
26
26
|
ref,
|
|
27
27
|
role: 'menu',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useArrowNavigationGroup","useAttachmentTagList_unstable","props","ref","onAttachmentTagDismiss","focusAttributes","axis","circular","components","root","always","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,uBAAuB,QAAQ,6BAA6B;AAGrG;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,sBAAsB,EAAE,GAAGF;IAEnC,MAAMG,kBAAkBL,wBAAwB;QAC9CM,MAAM;QACNC,UAAU;IACZ;IAEA,OAAO;QACLH;QAEAI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMV,KAAKW,MAAM,CACfZ,yBAAyB,OAAO;YAC9B,cAAc;YACdK;YACAQ,MAAM;YACN,GAAGN,eAAe;YAClB,GAAGH,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"mappings":"AAEA,OAAO,SAASA,2CACdC,KAA6B;IAE7B,MAAM,EAAEC,sBAAsB,EAAE,GAAGD;IAEnC,mGAAmG;IACnG,MAAME,UAAU;QACdD;IACF;IAEA,OAAO;QAAEC;IAAQ;AACnB"}
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"rangeMappings":";;;;;;;;;","mappings":"AAEA,OAAO,SAASA,2CACdC,KAA6B;IAE7B,MAAM,EAAEC,sBAAsB,EAAE,GAAGD;IAEnC,mGAAmG;IACnG,MAAME,UAAU;QACdD;IACF;IAEA,OAAO;QAAEC;IAAQ;AACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagListStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\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 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"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAInF,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,MAAMC,oBAAoBX;IAC1BU,MAAMX,IAAI,CAACa,SAAS,GAAGhB,aAAaE,4BAA4BC,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACa,SAAS;IAE7G,OAAOF;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\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 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,EAAEC,MAAM,QAAQ,6BAA6B;AAInF,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,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
|
@@ -3,4 +3,7 @@ export * from './AttachmentTagList';
|
|
|
3
3
|
export * from './AttachmentTagItem';
|
|
4
4
|
export * from './Attachment';
|
|
5
5
|
export * from './AttachmentList';
|
|
6
|
+
export * from './AttachmentOverflowMenu';
|
|
7
|
+
export * from './AttachmentOverflowMenuButton';
|
|
8
|
+
export * from './AttachmentOverflowMenuItem';
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,mBAAmB"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\nexport * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuItem';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,2BAA2B;AACzC,cAAc,iCAAiC;AAC/C,cAAc,+BAA+B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
|
|
3
3
|
import { useHasParentContext } from '@fluentui/react-context-selector';
|
|
4
4
|
import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
|
|
5
5
|
import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';
|
|
@@ -20,7 +20,7 @@ export function useAttachmentTagSlots(props, ref, options) {
|
|
|
20
20
|
const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
|
|
21
21
|
const hasParentContext = useHasParentContext(AttachmentTagListContext);
|
|
22
22
|
const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
|
|
23
|
-
const root = slot.always(
|
|
23
|
+
const root = slot.always(getIntrinsicElementProps(elementType.root, {
|
|
24
24
|
ref,
|
|
25
25
|
...props,
|
|
26
26
|
role: rootRole
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\n\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\n\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps, AttachmentTagState } from './../AttachmentTag/AttachmentTag.types';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './../AttachmentTagItem/AttachmentTagItem.types';\n\n/**\n * @internal\n * Create the slots required to render AttachmentTag or AttachmentTagItem.\n */\nexport function useAttachmentTagSlots<TAttachmentTagState extends AttachmentTagState | AttachmentTagItemState>(\n props: AttachmentTagProps | AttachmentTagItemProps,\n ref: React.Ref<HTMLButtonElement | HTMLDivElement>,\n options: {\n elementType: TAttachmentTagState['components'];\n },\n): TAttachmentTagState {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const { children, role } = props;\n const { elementType } = options;\n\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role ?? (hasParentContext ? 'menuitem' : undefined);\n\n const root: TAttachmentTagState['root'] = slot.always(\n getIntrinsicElementProps(elementType.root as 'button' | 'div', {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: elementType.root as 'button' | 'div' },\n );\n root.onClick = mergeCallbacks(\n root.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onAttachmentTagDismiss?.(ev, { content: children, media }),\n );\n\n const media: TAttachmentTagState['media'] = slot.optional(props.media, { elementType: elementType.media });\n\n const content: TAttachmentTagState['content'] = slot.always(props.content, {\n defaultProps: {\n children,\n },\n elementType: elementType.content,\n });\n\n const icon: TAttachmentTagState['icon'] = slot.always(props.icon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: elementType.icon,\n });\n\n return {\n components: {\n root: elementType.root,\n media: elementType.media,\n content: elementType.content,\n icon: elementType.icon,\n },\n root,\n media,\n content,\n icon,\n } as TAttachmentTagState;\n}\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useHasParentContext","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentTagListContext_unstable","AttachmentTagListContext","useAttachmentTagSlots","props","ref","options","onAttachmentTagDismiss","context","children","role","elementType","DismissIcon","hasParentContext","rootRole","undefined","root","always","onClick","ev","content","media","optional","defaultProps","icon","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AAEtF,SAASC,oCAAoC,QAAQ,0CAA0C;AAE/F,SAASC,wBAAwB,QAAQ,0CAA0C;AAInF;;;CAGC,GACD,OAAO,SAASC,sBACdC,KAAkD,EAClDC,GAAkD,EAClDC,OAEC;IAED,MAAMC,yBAAyBN,qCAAqCO,CAAAA,UAAWA,QAAQD,sBAAsB;IAC7G,MAAM,EAAEE,QAAQ,EAAEC,IAAI,EAAE,GAAGN;IAC3B,MAAM,EAAEO,WAAW,EAAE,GAAGL;IAExB,MAAMM,cAAcZ,WAAWD,iBAAiBD;IAEhD,MAAMe,mBAAmBhB,oBAAoBK;IAC7C,MAAMY,WAAWJ,iBAAAA,kBAAAA,OAASG,mBAAmB,aAAaE;IAE1D,MAAMC,OAAoCpB,KAAKqB,MAAM,CACnDvB,yBAAyBiB,YAAYK,IAAI,EAAsB;QAC7DX;QACA,GAAGD,KAAK;QACRM,MAAMI;IACR,IACA;QAAEH,aAAaA,YAAYK,IAAI;IAAqB;IAEtDA,KAAKE,OAAO,GAAGvB,eACbqB,KAAKE,OAAO,EACZ,CAACC,KACCZ,mCAAAA,6CAAAA,uBAAyBY,IAAI;YAAEC,SAASX;YAAUY;QAAM;IAG5D,MAAMA,QAAsCzB,KAAK0B,QAAQ,CAAClB,MAAMiB,KAAK,EAAE;QAAEV,aAAaA,YAAYU,KAAK;IAAC;IAExG,MAAMD,UAA0CxB,KAAKqB,MAAM,CAACb,MAAMgB,OAAO,EAAE;QACzEG,cAAc;YACZd;QACF;QACAE,aAAaA,YAAYS,OAAO;IAClC;IAEA,MAAMI,OAAoC5B,KAAKqB,MAAM,CAACb,MAAMoB,IAAI,EAAE;QAChED,cAAc;YACZd,wBAAU,oBAACG;QACb;QACAD,aAAaA,YAAYa,IAAI;IAC/B;IAEA,OAAO;QACLC,YAAY;YACVT,MAAML,YAAYK,IAAI;YACtBK,OAAOV,YAAYU,KAAK;YACxBD,SAAST,YAAYS,OAAO;YAC5BI,MAAMb,YAAYa,IAAI;QACxB;QACAR;QACAK;QACAD;QACAI;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListProps } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentListContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","AttachmentListProvider","Provider","useAttachmentListContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,wBAA6DF,cAExEG,WAAkD;AAEpD,MAAMC,oCAAgE;IACpEC,qBAAqB,IAAM;AAC7B;AAOA,OAAO,MAAMC,yBAAyBJ,sBAAsBK,QAAQ,CAAC;AAErE,OAAO,MAAMC,oCAAoC,CAAIC,WACnDR,mBAAmBC,uBAAuB,CAACQ,MAAMN,iCAAiC,GAAKK,SAASC,MAAM"}
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListProps } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentListContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","AttachmentListProvider","Provider","useAttachmentListContext_unstable","selector","ctx"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,wBAA6DF,cAExEG,WAAkD;AAEpD,MAAMC,oCAAgE;IACpEC,qBAAqB,IAAM;AAC7B;AAOA,OAAO,MAAMC,yBAAyBJ,sBAAsBK,QAAQ,CAAC;AAErE,OAAO,MAAMC,oCAAoC,CAAIC,WACnDR,mBAAmBC,uBAAuB,CAACQ,MAAMN,iCAAiC,GAAKK,SAASC,MAAM"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContextSelector } from '@fluentui/react-context-selector';
|
|
2
|
+
export const AttachmentOverflowMenuContext = createContext(undefined);
|
|
3
|
+
const overflowMenuContextDefaultValue = {
|
|
4
|
+
isOverflowing: false,
|
|
5
|
+
overflowButtonRef: undefined,
|
|
6
|
+
overflowCount: 0
|
|
7
|
+
};
|
|
8
|
+
export const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
|
|
9
|
+
export const useAttachmentOverflowMenuContext_unstable = selector => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));
|
|
10
|
+
//# sourceMappingURL=attachmentOverflowMenuContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentOverflowMenuContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","AttachmentOverflowMenuProvider","Provider","useAttachmentOverflowMenuContext_unstable","selector","ctx"],"rangeMappings":";;;;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,gCAA6EF,cAExFG,WAA0D;AAE5D,MAAMC,kCAAsE;IAC1EC,eAAe;IACfC,mBAAmBH;IACnBI,eAAe;AACjB;AASA,OAAO,MAAMC,iCAAiCN,8BAA8BO,QAAQ,CAAC;AAErF,OAAO,MAAMC,4CAA4C,CACvDC,WACGV,mBAAmBC,+BAA+B,CAACU,MAAMR,+BAA+B,GAAKO,SAASC,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentTagListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentTagListProps } from '../components/index';\n\nexport const AttachmentTagListContext: Context<AttachmentTagListContextValue> = createContext<\n AttachmentTagListContextValue | undefined\n>(undefined) as Context<AttachmentTagListContextValue>;\n\nconst tagListContextDefaultValue: AttachmentTagListContextValue = {\n onAttachmentTagDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentTagList and its children components\n */\nexport type AttachmentTagListContextValue = Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport const AttachmentTagListProvider = AttachmentTagListContext.Provider;\n\nexport const useAttachmentTagListContext_unstable = <T>(selector: ContextSelector<AttachmentTagListContextValue, T>) =>\n useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentTagListContext","undefined","tagListContextDefaultValue","onAttachmentTagDismiss","AttachmentTagListProvider","Provider","useAttachmentTagListContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAAmEF,cAE9EG,WAAqD;AAEvD,MAAMC,6BAA4D;IAChEC,wBAAwB,IAAM;AAChC;AAOA,OAAO,MAAMC,4BAA4BJ,yBAAyBK,QAAQ,CAAC;AAE3E,OAAO,MAAMC,uCAAuC,CAAIC,WACtDR,mBAAmBC,0BAA0B,CAACQ,MAAMN,0BAA0B,GAAKK,SAASC,MAAM"}
|
|
1
|
+
{"version":3,"sources":["attachmentTagListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentTagListProps } from '../components/index';\n\nexport const AttachmentTagListContext: Context<AttachmentTagListContextValue> = createContext<\n AttachmentTagListContextValue | undefined\n>(undefined) as Context<AttachmentTagListContextValue>;\n\nconst tagListContextDefaultValue: AttachmentTagListContextValue = {\n onAttachmentTagDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentTagList and its children components\n */\nexport type AttachmentTagListContextValue = Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport const AttachmentTagListProvider = AttachmentTagListContext.Provider;\n\nexport const useAttachmentTagListContext_unstable = <T>(selector: ContextSelector<AttachmentTagListContextValue, T>) =>\n useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentTagListContext","undefined","tagListContextDefaultValue","onAttachmentTagDismiss","AttachmentTagListProvider","Provider","useAttachmentTagListContext_unstable","selector","ctx"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAAmEF,cAE9EG,WAAqD;AAEvD,MAAMC,6BAA4D;IAChEC,wBAAwB,IAAM;AAChC;AAOA,OAAO,MAAMC,4BAA4BJ,yBAAyBK,QAAQ,CAAC;AAE3E,OAAO,MAAMC,uCAAuC,CAAIC,WACtDR,mBAAmBC,0BAA0B,CAACQ,MAAMN,0BAA0B,GAAKK,SAASC,MAAM"}
|
package/lib/index.js
CHANGED
|
@@ -4,4 +4,8 @@ export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem
|
|
|
4
4
|
export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';
|
|
5
5
|
export { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';
|
|
6
6
|
export { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable } from './Attachment';
|
|
7
|
+
export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
|
|
8
|
+
export { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttachmentOverflowMenuContext_unstable } from './contexts/attachmentOverflowMenuContext';
|
|
9
|
+
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
|
|
10
|
+
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
|
|
7
11
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type { AttachmentListProps, AttachmentListSlots, AttachmentListState } from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport {\n AttachmentTagItem,\n attachmentTagItemClassNames,\n renderAttachmentTagItem_unstable,\n useAttachmentTagItemStyles_unstable,\n useAttachmentTagItem_unstable,\n} from './AttachmentTagItem';\n\nexport type { AttachmentListProps, AttachmentListSlots, AttachmentListState } from './AttachmentList';\nexport {\n AttachmentList,\n attachmentListClassNames,\n renderAttachmentList_unstable,\n useAttachmentListStyles_unstable,\n useAttachmentList_unstable,\n} from './AttachmentList';\nexport type { AttachmentListContextValue } from './contexts/attachmentListContext';\nexport {\n AttachmentListContext,\n AttachmentListProvider,\n useAttachmentListContext_unstable,\n} from './contexts/attachmentListContext';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport {\n Attachment,\n attachmentClassNames,\n renderAttachment_unstable,\n useAttachmentStyles_unstable,\n useAttachment_unstable,\n} from './Attachment';\n\nexport type {\n AttachmentOverflowMenuProps,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuState,\n} from './AttachmentOverflowMenu';\nexport {\n AttachmentOverflowMenu,\n renderAttachmentOverflowMenu_unstable,\n useAttachmentOverflowMenu_unstable,\n} from './AttachmentOverflowMenu';\n\nexport type { AttachmentOverflowMenuContextValue } from './contexts/attachmentOverflowMenuContext';\nexport {\n AttachmentOverflowMenuContext,\n AttachmentOverflowMenuProvider,\n useAttachmentOverflowMenuContext_unstable,\n} from './contexts/attachmentOverflowMenuContext';\n\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;AAG7B,SACEC,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,iCAAiC,QAC5B,mCAAmC;AAE1C,SACEC,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAOtB,SACEC,sBAAsB,EACtBC,qCAAqC,EACrCC,kCAAkC,QAC7B,2BAA2B;AAGlC,SACEC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,yCAAyC,QACpC,2CAA2C;AAOlD,SACEC,4BAA4B,EAC5BC,sCAAsC,EACtCC,2CAA2C,EAC3CC,8CAA8C,EAC9CC,wCAAwC,QACnC,iCAAiC;AAOxC,SACEC,0BAA0B,EAC1BC,oCAAoC,EACpCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,sCAAsC,QACjC,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Attachment.
|
|
1
|
+
{"version":3,"sources":["Attachment.ts"],"sourcesContent":["export * from './components/Attachment/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentList.
|
|
1
|
+
{"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export * from './components/AttachmentList/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./components/AttachmentOverflowMenu/index"), exports);
|
|
7
|
+
//# sourceMappingURL=AttachmentOverflowMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenu/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./components/AttachmentOverflowMenuButton/index"), exports);
|
|
7
|
+
//# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuButton/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./components/AttachmentOverflowMenuItem/index"), exports);
|
|
7
|
+
//# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuItem/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export * from './components/AttachmentTag/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export * from './components/AttachmentTagItem/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export * from './components/AttachmentTagList/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Attachment.
|
|
1
|
+
{"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["Attachment","React","forwardRef","props","state","useAttachment_unstable","useAttachmentStyles_unstable","renderAttachment_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;+BACgB;kCACG;qCACG;AAKtC,MAAMA,aAAAA,WAAAA,GAAAA,OAAmDC,UAAMC,CAAU,CAACC,OAACA;UAChFC,QAAMA,IAAAA,qCAAQC,EAAAA,OAAuBF;yDAErCG,EAAAA;WACAC,IAAAA,2CAAOA,EAAAA;AACT;AAEAP,WAAWQ,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Attachment.types.
|
|
1
|
+
{"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n id: string;\n imageOnly?: boolean;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> & Pick<AttachmentProps, 'imageOnly'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -16,7 +16,7 @@ const renderAttachment_unstable = (state)=>{
|
|
|
16
16
|
children: [
|
|
17
17
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
|
|
18
18
|
children: [
|
|
19
|
-
state.media && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
|
|
19
|
+
state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
|
|
20
20
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {})
|
|
21
21
|
]
|
|
22
22
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachment.
|
|
1
|
+
{"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { 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\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["assertSlots","state","_jsxs","primaryAction","media","dismissButton","imageOnly","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,4BAA6BC,CAAAA;oCAE7B,EAAAA;;;uBAEI,GAAAC,IAAAA,gBAACD,EAAAA,MAAME,aAAa,EAAA;;;;;;0BACjBF,IAAAA,eAAAA,EAAMG,MAAKC,aAAWC,EAAAA;6DACvBL,MAACA,WAAMM,EAAO,CAAA;;;;+CAGd"}
|
|
@@ -14,6 +14,7 @@ const _reactcomponents = require("@fluentui/react-components");
|
|
|
14
14
|
const _reacticons = require("@fluentui/react-icons");
|
|
15
15
|
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
16
16
|
const useAttachment_unstable = (props, ref)=>{
|
|
17
|
+
const { imageOnly } = props;
|
|
17
18
|
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
|
|
18
19
|
const onAttachmentDismiss = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context.onAttachmentDismiss);
|
|
19
20
|
const root = _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
@@ -63,7 +64,8 @@ const useAttachment_unstable = (props, ref)=>{
|
|
|
63
64
|
dismissButton,
|
|
64
65
|
media,
|
|
65
66
|
content,
|
|
66
|
-
dismissIcon
|
|
67
|
+
dismissIcon,
|
|
68
|
+
imageOnly
|
|
67
69
|
};
|
|
68
70
|
if (state.primaryAction.as === 'span') {
|
|
69
71
|
state.components.primaryAction = 'span';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachment.
|
|
1
|
+
{"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const { imageOnly } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => onAttachmentDismiss?.(ev, { id: props.id }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const state: AttachmentState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n imageOnly,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["imageOnly","props","onAttachmentDismiss","ref","useAttachmentListContext_unstable","context","root","slot","always","getIntrinsicElementProps","elementType","primaryAction","dismissButton","defaultProps","media","optional","onClick","ev","content","children","dismissIcon","React","createElement","DismissIcon","components","state"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBUA;;;eAAAA;;;;iEAhBa;iCACwC;4BACD;uCACZ;AAahD,MAAQA,yBAAcC,CAAAA,OAAAA;UACtB,EAEAD,SAAME,KAEND;UAEIE,cAAAA,IAAAA,sBAAAA,EAAAA,2BAAAA,EAAAA,4BAAAA;UACAD,sBAAQE,IAAAA,wDAAA,EAAAC,CAAAA,UAAAA,QAAAH,mBAAA;UAEVI,OAAAC,qBAAA,CAAAC,MAAA,CAAAC,IAAAA,yCAAA,EAAA,OAAA;;QAAqB,GAAAR,KAAA;QAGvB;qBACES;;UAGFC,gBAAMC,qBAAgBL,CAAAA,MAAKC,CAAAA,MAAOP,aAAMW,EAAa;qBACnDC;;UAAwCD,gBAAAL,qBAAA,CAAAC,MAAA,CAAAP,MAAAW,aAAA,EAAA;sBACxCF;YACF,cAAA;QAEAE;qBAEmGX;;kBAG7Fa,OAAaC,GAAAA,IAAAA,+BAAeD,EAAAA,cAAOE,OAAA,EAAAC,CAAAA,KAAAf,wBAAA,QAAAA,wBAAA,KAAA,IAAA,KAAA,IAAAA,oBAAAe,IAAA;gBAAEP,MAAAA,EAAAA;;UAE3CI,QAAMI,qBAAUX,CAAAA,QAAKC,CAAAA,MAAOP,KAAMiB,EAAAA;qBAChCL;;UAEAK,UAAAX,qBAAA,CAAAC,MAAA,CAAAP,MAAAiB,OAAA,EAAA;sBACAR;YACFS,UAAAlB,MAAAkB,QAAA;QAEA;qBACEN;;UAEAO,cAAAb,qBAAA,CAAAC,MAAA,CAAAP,MAAAmB,WAAA,EAAA;sBACAV;YACFS,UAAA,WAAA,GAAAE,OAAAC,aAAA,CAAAC,aAAA;QAEA;qBACEC;;kBAEEb;oBACAC;kBACAE;2BACS;2BACTM;mBACF;qBAEAd;yBACAK;;;;;;QAMFO;QAEAE;;;QAIAK,MAAOA,aAAAA,CAAAA,EAAAA,KAAAA,QAAAA;QACPA,MAAAD,UAAA,CAAAb,aAAA,GAAA"}
|