@fluentui-copilot/react-attachments 0.10.2 → 0.10.4
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 +31 -1
- package/CHANGELOG.md +20 -2
- package/dist/index.d.ts +7 -1
- package/lib/Attachment.js +1 -1
- package/lib/Attachment.js.map +1 -1
- package/lib/AttachmentList.js +1 -1
- package/lib/AttachmentList.js.map +1 -1
- package/lib/AttachmentOverflowMenu.js +1 -1
- package/lib/AttachmentOverflowMenu.js.map +1 -1
- package/lib/AttachmentOverflowMenuButton.js +1 -1
- package/lib/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib/AttachmentOverflowMenuItem.js +1 -1
- package/lib/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib/AttachmentTag.js +1 -1
- package/lib/AttachmentTag.js.map +1 -1
- package/lib/AttachmentTagItem.js +1 -1
- package/lib/AttachmentTagItem.js.map +1 -1
- package/lib/AttachmentTagList.js +1 -1
- package/lib/AttachmentTagList.js.map +1 -1
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/index.js +4 -5
- package/lib/components/Attachment/index.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +5 -3
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.styles.js +52 -6
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib/components/AttachmentList/index.js +4 -5
- package/lib/components/AttachmentList/index.js.map +1 -1
- package/lib/components/AttachmentOverflowMenu/index.js +4 -5
- package/lib/components/AttachmentOverflowMenu/index.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/index.js +4 -5
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/index.js +4 -5
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -1
- package/lib/components/AttachmentTag/index.js +4 -5
- package/lib/components/AttachmentTag/index.js.map +1 -1
- package/lib/components/AttachmentTagItem/index.js +4 -5
- package/lib/components/AttachmentTagItem/index.js.map +1 -1
- package/lib/components/AttachmentTagList/index.js +4 -5
- package/lib/components/AttachmentTagList/index.js.map +1 -1
- package/lib/components/index.js +8 -8
- package/lib/components/index.js.map +1 -1
- package/lib-commonjs/Attachment.js +27 -2
- package/lib-commonjs/Attachment.js.map +1 -1
- package/lib-commonjs/AttachmentList.js +24 -2
- package/lib-commonjs/AttachmentList.js.map +1 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +21 -2
- package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +24 -2
- package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +24 -2
- package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/AttachmentTag.js +36 -2
- package/lib-commonjs/AttachmentTag.js.map +1 -1
- package/lib-commonjs/AttachmentTagItem.js +24 -2
- package/lib-commonjs/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/AttachmentTagList.js +24 -2
- package/lib-commonjs/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
- package/lib-commonjs/components/Attachment/index.js +30 -6
- package/lib-commonjs/components/Attachment/index.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +3 -2
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +74 -6
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/index.js +27 -6
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +24 -6
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +27 -6
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +27 -6
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/index.js +39 -6
- package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js +27 -6
- package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/index.js +27 -6
- package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
- package/lib-commonjs/components/index.js +148 -9
- package/lib-commonjs/components/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useAttachmentTagListStyles.styles';
|
|
1
|
+
export { AttachmentTagList } from './AttachmentTagList';
|
|
2
|
+
export { renderAttachmentTagList_unstable } from './renderAttachmentTagList';
|
|
3
|
+
export { useAttachmentTagList_unstable } from './useAttachmentTagList';
|
|
4
|
+
export { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { AttachmentTagList } from './AttachmentTagList';\nexport type { AttachmentTagDismissedData, AttachmentTagListContextValues, AttachmentTagListProps, AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nexport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nexport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nexport { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';\n"],"names":["AttachmentTagList","renderAttachmentTagList_unstable","useAttachmentTagList_unstable","attachmentTagListClassNames","useAttachmentTagListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,iBAAiB,QAAQ,sBAAsB;AAExD,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,2BAA2B,EAAEC,mCAAmC,QAAQ,sCAAsC"}
|
package/lib/components/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
1
|
+
export { ATTACHMENTTAG_MAXWIDTH, AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './AttachmentTag';
|
|
2
|
+
export { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';
|
|
3
|
+
export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';
|
|
4
|
+
export { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable, useOverflowStyles } from './Attachment';
|
|
5
|
+
export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';
|
|
6
|
+
export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
|
|
7
|
+
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
|
|
8
|
+
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport { ATTACHMENTTAG_MAXWIDTH, AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './AttachmentTag';\nexport type { AttachmentTagDismissedData, AttachmentTagListContextValues, AttachmentTagListProps, AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment';\nexport { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable, useOverflowStyles } from './Attachment';\nexport type { AttachmentDismissedData, AttachmentListContextValues, AttachmentListProps, AttachmentListSlots, AttachmentListState } from './AttachmentList';\nexport { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';\nexport type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuProps, AttachmentOverflowMenuSlots, AttachmentOverflowMenuState } from './AttachmentOverflowMenu';\nexport { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';\nexport type { AttachmentOverflowMenuButtonProps, AttachmentOverflowMenuButtonSlots, AttachmentOverflowMenuButtonState } from './AttachmentOverflowMenuButton';\nexport { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';\nexport type { AttachmentOverflowMenuItemProps, AttachmentOverflowMenuItemSlots, AttachmentOverflowMenuItemState } from './AttachmentOverflowMenuItem';\nexport { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';\n"],"names":["ATTACHMENTTAG_MAXWIDTH","AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","useOverflowStyles","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenuContextValues_unstable","useAttachmentOverflowMenu_unstable","AttachmentOverflowMenuButton","attachmentOverflowMenuButtonClassNames","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useAttachmentOverflowMenuButton_unstable","AttachmentOverflowMenuItem","attachmentOverflowMenuItemClassNames","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","useAttachmentOverflowMenuItem_unstable"],"rangeMappings":";;;;;;;","mappings":"AACA,SAASA,sBAAsB,EAAEC,aAAa,EAAEC,uBAAuB,EAAEC,4BAA4B,EAAEC,+BAA+B,EAAEC,yBAAyB,EAAEC,uBAAuB,EAAEC,oBAAoB,EAAEC,qBAAqB,QAAQ,kBAAkB;AAEjQ,SAASC,iBAAiB,EAAEC,2BAA2B,EAAEC,gCAAgC,EAAEC,mCAAmC,EAAEC,6BAA6B,QAAQ,sBAAsB;AAE3L,SAASC,iBAAiB,EAAEC,2BAA2B,EAAEC,gCAAgC,EAAEC,mCAAmC,EAAEC,6BAA6B,QAAQ,sBAAsB;AAE3L,SAASC,UAAU,EAAEC,oBAAoB,EAAEC,yBAAyB,EAAEC,4BAA4B,EAAEC,sBAAsB,EAAEC,iBAAiB,QAAQ,eAAe;AAEpK,SAASC,cAAc,EAAEC,wBAAwB,EAAEC,6BAA6B,EAAEC,gCAAgC,EAAEC,0BAA0B,QAAQ,mBAAmB;AAEzK,SAASC,sBAAsB,EAAEC,qCAAqC,EAAEC,+CAA+C,EAAEC,kCAAkC,QAAQ,2BAA2B;AAE9L,SAASC,4BAA4B,EAAEC,sCAAsC,EAAEC,2CAA2C,EAAEC,8CAA8C,EAAEC,wCAAwC,QAAQ,iCAAiC;AAE7P,SAASC,0BAA0B,EAAEC,oCAAoC,EAAEC,yCAAyC,EAAEC,4CAA4C,EAAEC,sCAAsC,QAAQ,+BAA+B"}
|
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Attachment: function() {
|
|
13
|
+
return _index.Attachment;
|
|
14
|
+
},
|
|
15
|
+
attachmentClassNames: function() {
|
|
16
|
+
return _index.attachmentClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachment_unstable: function() {
|
|
19
|
+
return _index.renderAttachment_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachment_unstable: function() {
|
|
25
|
+
return _index.useAttachment_unstable;
|
|
26
|
+
},
|
|
27
|
+
useOverflowStyles: function() {
|
|
28
|
+
return _index.useOverflowStyles;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const _index = require("./components/Attachment/index");
|
|
7
32
|
//# sourceMappingURL=Attachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Attachment.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["Attachment.ts"],"sourcesContent":["export type { AttachmentProps, AttachmentSlots, AttachmentState } from './components/Attachment/index';\nexport { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable, useOverflowStyles } from './components/Attachment/index';\n"],"names":["Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","useOverflowStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,UAAU;eAAVA,iBAAU;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,yBAAyB;eAAzBA,gCAAyB;;IAAEC,4BAA4B;eAA5BA,mCAA4B;;IAAEC,sBAAsB;eAAtBA,6BAAsB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;;uBAAQ"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentList: function() {
|
|
13
|
+
return _index.AttachmentList;
|
|
14
|
+
},
|
|
15
|
+
attachmentListClassNames: function() {
|
|
16
|
+
return _index.attachmentListClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachmentList_unstable: function() {
|
|
19
|
+
return _index.renderAttachmentList_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentListStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentListStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentList_unstable: function() {
|
|
25
|
+
return _index.useAttachmentList_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/AttachmentList/index");
|
|
7
29
|
//# sourceMappingURL=AttachmentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export type { AttachmentDismissedData, AttachmentListContextValues, AttachmentListProps, AttachmentListSlots, AttachmentListState } from './components/AttachmentList/index';\nexport { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './components/AttachmentList/index';\n"],"names":["AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,cAAc;eAAdA,qBAAc;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;;uBAAQ"}
|
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentOverflowMenu: function() {
|
|
13
|
+
return _index.AttachmentOverflowMenu;
|
|
14
|
+
},
|
|
15
|
+
renderAttachmentOverflowMenu_unstable: function() {
|
|
16
|
+
return _index.renderAttachmentOverflowMenu_unstable;
|
|
17
|
+
},
|
|
18
|
+
useAttachmentOverflowMenuContextValues_unstable: function() {
|
|
19
|
+
return _index.useAttachmentOverflowMenuContextValues_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentOverflowMenu_unstable: function() {
|
|
22
|
+
return _index.useAttachmentOverflowMenu_unstable;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const _index = require("./components/AttachmentOverflowMenu/index");
|
|
7
26
|
//# sourceMappingURL=AttachmentOverflowMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuProps, AttachmentOverflowMenuSlots, AttachmentOverflowMenuState } from './components/AttachmentOverflowMenu/index';\nexport { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './components/AttachmentOverflowMenu/index';\n"],"names":["AttachmentOverflowMenu","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenuContextValues_unstable","useAttachmentOverflowMenu_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,sBAAsB;eAAtBA,6BAAsB;;IAAEC,qCAAqC;eAArCA,4CAAqC;;IAAEC,+CAA+C;eAA/CA,sDAA+C;;IAAEC,kCAAkC;eAAlCA,yCAAkC;;;uBAAQ"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentOverflowMenuButton: function() {
|
|
13
|
+
return _index.AttachmentOverflowMenuButton;
|
|
14
|
+
},
|
|
15
|
+
attachmentOverflowMenuButtonClassNames: function() {
|
|
16
|
+
return _index.attachmentOverflowMenuButtonClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachmentOverflowMenuButton_unstable: function() {
|
|
19
|
+
return _index.renderAttachmentOverflowMenuButton_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentOverflowMenuButtonStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentOverflowMenuButtonStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentOverflowMenuButton_unstable: function() {
|
|
25
|
+
return _index.useAttachmentOverflowMenuButton_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/AttachmentOverflowMenuButton/index");
|
|
7
29
|
//# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuButton.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.ts"],"sourcesContent":["export type { AttachmentOverflowMenuButtonProps, AttachmentOverflowMenuButtonSlots, AttachmentOverflowMenuButtonState } from './components/AttachmentOverflowMenuButton/index';\nexport { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './components/AttachmentOverflowMenuButton/index';\n"],"names":["AttachmentOverflowMenuButton","attachmentOverflowMenuButtonClassNames","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useAttachmentOverflowMenuButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,4BAA4B;eAA5BA,mCAA4B;;IAAEC,sCAAsC;eAAtCA,6CAAsC;;IAAEC,2CAA2C;eAA3CA,kDAA2C;;IAAEC,8CAA8C;eAA9CA,qDAA8C;;IAAEC,wCAAwC;eAAxCA,+CAAwC;;;uBAAQ"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentOverflowMenuItem: function() {
|
|
13
|
+
return _index.AttachmentOverflowMenuItem;
|
|
14
|
+
},
|
|
15
|
+
attachmentOverflowMenuItemClassNames: function() {
|
|
16
|
+
return _index.attachmentOverflowMenuItemClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachmentOverflowMenuItem_unstable: function() {
|
|
19
|
+
return _index.renderAttachmentOverflowMenuItem_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentOverflowMenuItemStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentOverflowMenuItemStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentOverflowMenuItem_unstable: function() {
|
|
25
|
+
return _index.useAttachmentOverflowMenuItem_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/AttachmentOverflowMenuItem/index");
|
|
7
29
|
//# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuItem.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.ts"],"sourcesContent":["export type { AttachmentOverflowMenuItemProps, AttachmentOverflowMenuItemSlots, AttachmentOverflowMenuItemState } from './components/AttachmentOverflowMenuItem/index';\nexport { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './components/AttachmentOverflowMenuItem/index';\n"],"names":["AttachmentOverflowMenuItem","attachmentOverflowMenuItemClassNames","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","useAttachmentOverflowMenuItem_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,0BAA0B;eAA1BA,iCAA0B;;IAAEC,oCAAoC;eAApCA,2CAAoC;;IAAEC,yCAAyC;eAAzCA,gDAAyC;;IAAEC,4CAA4C;eAA5CA,mDAA4C;;IAAEC,sCAAsC;eAAtCA,6CAAsC;;;uBAAQ"}
|
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ATTACHMENTTAG_MAXWIDTH: function() {
|
|
13
|
+
return _index.ATTACHMENTTAG_MAXWIDTH;
|
|
14
|
+
},
|
|
15
|
+
AttachmentTag: function() {
|
|
16
|
+
return _index.AttachmentTag;
|
|
17
|
+
},
|
|
18
|
+
attachmentTagClassNames: function() {
|
|
19
|
+
return _index.attachmentTagClassNames;
|
|
20
|
+
},
|
|
21
|
+
renderAttachmentTag_unstable: function() {
|
|
22
|
+
return _index.renderAttachmentTag_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentTagStyles_unstable: function() {
|
|
25
|
+
return _index.useAttachmentTagStyles_unstable;
|
|
26
|
+
},
|
|
27
|
+
useAttachmentTag_unstable: function() {
|
|
28
|
+
return _index.useAttachmentTag_unstable;
|
|
29
|
+
},
|
|
30
|
+
useContentBaseClassName: function() {
|
|
31
|
+
return _index.useContentBaseClassName;
|
|
32
|
+
},
|
|
33
|
+
useIconBaseClassName: function() {
|
|
34
|
+
return _index.useIconBaseClassName;
|
|
35
|
+
},
|
|
36
|
+
useMediaBaseClassName: function() {
|
|
37
|
+
return _index.useMediaBaseClassName;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const _index = require("./components/AttachmentTag/index");
|
|
7
41
|
//# sourceMappingURL=AttachmentTag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './components/AttachmentTag/index';\nexport { ATTACHMENTTAG_MAXWIDTH, AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './components/AttachmentTag/index';\n"],"names":["ATTACHMENTTAG_MAXWIDTH","AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,sBAAsB;eAAtBA,6BAAsB;;IAAEC,aAAa;eAAbA,oBAAa;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,4BAA4B;eAA5BA,mCAA4B;;IAAEC,+BAA+B;eAA/BA,sCAA+B;;IAAEC,yBAAyB;eAAzBA,gCAAyB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,qBAAqB;eAArBA,4BAAqB;;;uBAAQ"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentTagItem: function() {
|
|
13
|
+
return _index.AttachmentTagItem;
|
|
14
|
+
},
|
|
15
|
+
attachmentTagItemClassNames: function() {
|
|
16
|
+
return _index.attachmentTagItemClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachmentTagItem_unstable: function() {
|
|
19
|
+
return _index.renderAttachmentTagItem_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentTagItemStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentTagItemStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentTagItem_unstable: function() {
|
|
25
|
+
return _index.useAttachmentTagItem_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/AttachmentTagItem/index");
|
|
7
29
|
//# sourceMappingURL=AttachmentTagItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './components/AttachmentTagItem/index';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './components/AttachmentTagItem/index';\n"],"names":["AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,iBAAiB;eAAjBA,wBAAiB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,mCAAmC;eAAnCA,0CAAmC;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;;uBAAQ"}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
AttachmentTagList: function() {
|
|
13
|
+
return _index.AttachmentTagList;
|
|
14
|
+
},
|
|
15
|
+
attachmentTagListClassNames: function() {
|
|
16
|
+
return _index.attachmentTagListClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachmentTagList_unstable: function() {
|
|
19
|
+
return _index.renderAttachmentTagList_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentTagListStyles_unstable: function() {
|
|
22
|
+
return _index.useAttachmentTagListStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachmentTagList_unstable: function() {
|
|
25
|
+
return _index.useAttachmentTagList_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/AttachmentTagList/index");
|
|
7
29
|
//# sourceMappingURL=AttachmentTagList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export type { AttachmentTagDismissedData, AttachmentTagListContextValues, AttachmentTagListProps, AttachmentTagListSlots, AttachmentTagListState } from './components/AttachmentTagList/index';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './components/AttachmentTagList/index';\n"],"names":["AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,iBAAiB;eAAjBA,wBAAiB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,mCAAmC;eAAnCA,0CAAmC;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;;uBAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ProgressBar, 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 progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n imageOnly?: boolean;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"
|
|
1
|
+
{"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ProgressBar, 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 progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA0BA;;CAEC"}
|
|
@@ -2,10 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Attachment: function() {
|
|
13
|
+
return _Attachment.Attachment;
|
|
14
|
+
},
|
|
15
|
+
attachmentClassNames: function() {
|
|
16
|
+
return _useAttachmentStylesstyles.attachmentClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderAttachment_unstable: function() {
|
|
19
|
+
return _renderAttachment.renderAttachment_unstable;
|
|
20
|
+
},
|
|
21
|
+
useAttachmentStyles_unstable: function() {
|
|
22
|
+
return _useAttachmentStylesstyles.useAttachmentStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useAttachment_unstable: function() {
|
|
25
|
+
return _useAttachment.useAttachment_unstable;
|
|
26
|
+
},
|
|
27
|
+
useOverflowStyles: function() {
|
|
28
|
+
return _useAttachmentStylesstyles.useOverflowStyles;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const _Attachment = require("./Attachment");
|
|
32
|
+
const _renderAttachment = require("./renderAttachment");
|
|
33
|
+
const _useAttachment = require("./useAttachment");
|
|
34
|
+
const _useAttachmentStylesstyles = require("./useAttachmentStyles.styles");
|
|
11
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Attachment } from './Attachment';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment.types';\nexport { renderAttachment_unstable } from './renderAttachment';\nexport { useAttachment_unstable } from './useAttachment';\nexport { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';\n"],"names":["Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","useOverflowStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAIVC,oBAAoB;eAApBA,+CAAoB;;IAFpBC,yBAAyB;eAAzBA,2CAAyB;;IAEHC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;IAC8BC,iBAAiB;eAAjBA,4CAAiB;;;4BAJnD;kCAEe;+BACH;2CAC+C"}
|
|
@@ -14,7 +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 { children, imageOnly } = props;
|
|
17
|
+
const { children, imageOnly, size = 'medium' } = props;
|
|
18
18
|
const { onAttachmentDismiss, shouldUseOverflow } = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context);
|
|
19
19
|
const attachmentId = (0, _reactcomponents.useId)('attachment-', props.id);
|
|
20
20
|
const isLoading = !!props.progress;
|
|
@@ -52,7 +52,7 @@ const useAttachment_unstable = (props, ref)=>{
|
|
|
52
52
|
});
|
|
53
53
|
const dismissIcon = _reactcomponents.slot.always(props.dismissIcon, {
|
|
54
54
|
defaultProps: {
|
|
55
|
-
children: /*#__PURE__*/ _react.createElement(_reacticons.Dismiss20Regular, null)
|
|
55
|
+
children: size === 'small' ? /*#__PURE__*/ _react.createElement(_reacticons.Dismiss12Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.Dismiss20Regular, null)
|
|
56
56
|
},
|
|
57
57
|
elementType: 'span'
|
|
58
58
|
});
|
|
@@ -66,6 +66,7 @@ const useAttachment_unstable = (props, ref)=>{
|
|
|
66
66
|
});
|
|
67
67
|
const state = {
|
|
68
68
|
id: attachmentId,
|
|
69
|
+
size,
|
|
69
70
|
components: {
|
|
70
71
|
root: 'div',
|
|
71
72
|
primaryAction: 'button',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';\nimport { Dismiss20Regular } 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 { children, imageOnly } = props;\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n const attachmentId = useId('attachment-', props.id);\n const isLoading = !!props.progress;\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n id: attachmentId,\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>) => {\n onAttachmentDismiss?.(ev, { content: children, media, id: attachmentId });\n },\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: <Dismiss20Regular />,\n },\n elementType: 'span',\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n const state: AttachmentState = {\n id: attachmentId,\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n progress: ProgressBar,\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n progress,\n imageOnly,\n isLoading,\n shouldUseOverflow,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["children","
|
|
1
|
+
{"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';\nimport { Dismiss12Regular, Dismiss20Regular } 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 { children, imageOnly, size = 'medium' } = props;\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n const attachmentId = useId('attachment-', props.id);\n const isLoading = !!props.progress;\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n id: attachmentId,\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>) => {\n onAttachmentDismiss?.(ev, { content: children, media, id: attachmentId });\n },\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: size === 'small' ? <Dismiss12Regular /> : <Dismiss20Regular />,\n },\n elementType: 'span',\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n const state: AttachmentState = {\n id: attachmentId,\n size,\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n progress: ProgressBar,\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n progress,\n imageOnly,\n isLoading,\n shouldUseOverflow,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["children","size","ref","attachmentId","imageOnly","isLoading","root","slot","shouldUseOverflow","context","useId","props","id","primaryAction","always","elementType","getIntrinsicElementProps","dismissButton","defaultProps","media","mergeCallbacks","onClick","ev","onAttachmentDismiss","content","optional","dismissIcon","progress","thickness","React","createElement","Dismiss12Regular","Dismiss20Regular","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBUA;;;eAAAA;;;;iEAhBa;iCAC4D;4BAChC;uCACD;AAahD,MAAQA,yBAAqBC,CAAAA,OAAOC;UACpC,EACAF,QAAMG,EACNC,SAAMC,EAENJ,OAAMK,QAAOC;UAGT,qBACIJ,EACNK,iBACA,iEAAe,EAAAC,CAAAA,UAAAA;UAAMN,eAAAO,IAAAA,sBAAA,EAAA,eAAAC,MAAAC,EAAA;UAGvBP,YAAMQ,CAAAA,CAAAA,MAAgBN,QAAKO;UACzBC,OAAAA,qBAAAA,CAAAA,MAAa,CAAAC,IAAAA,yCAAA,EAAA,OAAA;QACfd;QAEA,GAAAS,KAAMM;YACJC;;qBAAwC;;UAE1CL,gBAAAN,qBAAA,CAAAO,MAAA,CAAAH,MAAAE,aAAA,EAAA;QAEAI,aAAAA;;0BAGyCjB,qBAAAA,CAAAA,MAAAA,CAAAA,MAAAA,aAAAA,EAAAA;sBAAUmB;0BAAWhB;;QAC5DY,aAAA;;kBAGyCA,OAAa,GAAAK,IAAAA,+BAAA,EAAAH,cAAAI,OAAA,EAAAC,CAAAA;QAAOC,wBAAA,QAAAA,wBAAA,KAAA,IAAA,KAAA,IAAAA,oBAAAD,IAAA;YAE/DE,SAAMA;;;;;UAKNL,QAAAZ,qBAAA,CAAAkB,QAAA,CAAAd,MAAAQ,KAAA,EAAA;QAEAJ,aAAMW;;oBAEF1B,qBAAUC,CAAAA,MAAAA,CAAAA,MAASuB,OAAA,EAAA;sBACrB;sBACAT,MAAaf,QAAA;QACf;QAEAe,aAAMY;;wBAEKpB,qBAAA,CAAAO,MAAA,CAAAH,MAAAe,WAAA,EAAA;sBACPE;sBACA3B,SAAA,UAAmBU,WAAQ,GAAAkB,OAAAC,aAAA,CAAAC,4BAAA,EAAA,QAAA,WAAA,GAAAF,OAAAC,aAAA,CAAAE,4BAAA,EAAA;;qBAE7BjB;;UAGFY,WAA+BpB,qBAAA,CAAAkB,QAAA,CAAAd,MAAAgB,QAAA,EAAA;sBACzBxB;mBACJF;uBACAgC;+BACQtB,MAAAC,EAAA;;qBAENK,4BAAe;;kBAEfO;;;oBAGF;kBAEAlB;2BACAO;2BACAI;mBACAE;qBACAK;yBACAE;sBACAC,4BAAAA;;;;QAIFV;QAEAE;;QAEAO;QAEAC;QACAvB"}
|
|
@@ -31,6 +31,7 @@ const attachmentClassNames = {
|
|
|
31
31
|
progress: 'fai-Attachment__progress'
|
|
32
32
|
};
|
|
33
33
|
const ATTACHMENT_MAXWIDTH = '180px';
|
|
34
|
+
const SMALL_ATTACHMENT_SIZE = '16px';
|
|
34
35
|
const ATTACHMENT_SIZE = '20px';
|
|
35
36
|
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r16wonf3", null, [
|
|
36
37
|
".r16wonf3{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;align-self:end;position:relative;}"
|
|
@@ -156,6 +157,72 @@ const useOverflowStyles = (0, _reactcomponents.__styles)({
|
|
|
156
157
|
".fly5x3f{width:100%;}"
|
|
157
158
|
]
|
|
158
159
|
});
|
|
160
|
+
const useSmallStyles = (0, _reactcomponents.__styles)({
|
|
161
|
+
primaryAction: {
|
|
162
|
+
B2u0y6b: "fyv37rf",
|
|
163
|
+
Byoj8tv: 0,
|
|
164
|
+
uwmqm3: 0,
|
|
165
|
+
z189sj: 0,
|
|
166
|
+
z8tnut: 0,
|
|
167
|
+
B0ocmuz: "f1o3rc9c"
|
|
168
|
+
},
|
|
169
|
+
media: {
|
|
170
|
+
Be2twd7: "f4ybsrx",
|
|
171
|
+
Bqenvij: "fd461yt",
|
|
172
|
+
Bg96gwp: "f104wqfl",
|
|
173
|
+
a9b677: "fjw5fx7"
|
|
174
|
+
},
|
|
175
|
+
content: {
|
|
176
|
+
Bahqtrf: "fk6fouc",
|
|
177
|
+
Be2twd7: "fy9rknc",
|
|
178
|
+
Bhrd7zp: "figsok6",
|
|
179
|
+
Bg96gwp: "fwrc4pm"
|
|
180
|
+
},
|
|
181
|
+
dismissButton: {
|
|
182
|
+
Byoj8tv: 0,
|
|
183
|
+
uwmqm3: 0,
|
|
184
|
+
z189sj: 0,
|
|
185
|
+
z8tnut: 0,
|
|
186
|
+
B0ocmuz: "fnsh2i4",
|
|
187
|
+
B2u0y6b: "fatynhj",
|
|
188
|
+
Bf4jedk: "fydhda"
|
|
189
|
+
},
|
|
190
|
+
dismissIcon: {
|
|
191
|
+
Be2twd7: "f4ybsrx",
|
|
192
|
+
Bqenvij: "fzi9ji0",
|
|
193
|
+
B2u0y6b: "f11qte0n",
|
|
194
|
+
Bf4jedk: "fy1a5sw"
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
d: [
|
|
198
|
+
".fyv37rf{max-width:calc(180px - 16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));}",
|
|
199
|
+
[
|
|
200
|
+
".f1o3rc9c{padding:var(--spacingVerticalXXS) var(--spacingHorizontalSNudge) var(--spacingVerticalXXS) var(--spacingHorizontalSNudge);}",
|
|
201
|
+
{
|
|
202
|
+
p: -1
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
".f4ybsrx{font-size:16px;}",
|
|
206
|
+
".fd461yt{height:16px;}",
|
|
207
|
+
".f104wqfl{line-height:16px;}",
|
|
208
|
+
".fjw5fx7{width:16px;}",
|
|
209
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
210
|
+
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
211
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
212
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
213
|
+
[
|
|
214
|
+
".fnsh2i4{padding:var(--spacingVerticalXXS) var(--spacingHorizontalXXS);}",
|
|
215
|
+
{
|
|
216
|
+
p: -1
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
".fatynhj{max-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);}",
|
|
220
|
+
".fydhda{min-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);}",
|
|
221
|
+
".fzi9ji0{height:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));}",
|
|
222
|
+
".f11qte0n{max-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));}",
|
|
223
|
+
".fy1a5sw{min-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));}"
|
|
224
|
+
]
|
|
225
|
+
});
|
|
159
226
|
const useAttachmentStyles_unstable = (state)=>{
|
|
160
227
|
'use no memo';
|
|
161
228
|
const rootBaseClassName = useRootBaseClassName();
|
|
@@ -167,15 +234,16 @@ const useAttachmentStyles_unstable = (state)=>{
|
|
|
167
234
|
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
168
235
|
const primaryActionStyles = usePrimaryActionStyles();
|
|
169
236
|
const imageOnlyStyles = useImageOnlyStyles();
|
|
170
|
-
const
|
|
237
|
+
const smallStyles = useSmallStyles();
|
|
238
|
+
const { imageOnly, primaryAction, size } = state;
|
|
171
239
|
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.root, rootBaseClassName, state.root.className);
|
|
172
|
-
state.primaryAction.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.primaryAction, primaryActionBaseClassName, primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button, imageOnly && imageOnlyStyles.primaryAction, state.primaryAction.className);
|
|
173
|
-
state.dismissButton.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.dismissButton, dismissButtonBaseClassName, state.dismissButton.className);
|
|
240
|
+
state.primaryAction.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.primaryAction, primaryActionBaseClassName, size === 'small' && smallStyles.primaryAction, primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button, imageOnly && imageOnlyStyles.primaryAction, state.primaryAction.className);
|
|
241
|
+
state.dismissButton.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.dismissButton, dismissButtonBaseClassName, size === 'small' && smallStyles.dismissButton, state.dismissButton.className);
|
|
174
242
|
if (state.media) {
|
|
175
|
-
state.media.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.media, mediaBaseClassName, state.media.className);
|
|
243
|
+
state.media.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.media, mediaBaseClassName, size === 'small' && smallStyles.media, state.media.className);
|
|
176
244
|
}
|
|
177
|
-
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.content, contentBaseClassName, imageOnly && imageOnlyStyles.content, state.content.className);
|
|
178
|
-
state.dismissIcon.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.dismissIcon, dismissIconBaseClassName, state.dismissIcon.className);
|
|
245
|
+
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.content, contentBaseClassName, size === 'small' && smallStyles.content, imageOnly && imageOnlyStyles.content, state.content.className);
|
|
246
|
+
state.dismissIcon.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.dismissIcon, dismissIconBaseClassName, size === 'small' && smallStyles.dismissIcon, state.dismissIcon.className);
|
|
179
247
|
if (state.progress) {
|
|
180
248
|
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
181
249
|
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|