@fluentui-copilot/react-attachments 0.10.4 → 0.10.5
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 +28 -1
- package/CHANGELOG.md +2 -2
- package/dist/index.d.ts +33 -0
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,34 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 07 Feb 2025 02:01:25 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-attachments_v0.10.5",
|
|
7
|
+
"version": "0.10.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jiangemma@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-attachments",
|
|
13
|
+
"commit": "5241649bf6e20e0d46fe7631923dfb7236bb9239",
|
|
14
|
+
"comment": "docs(react-attachments): Remove stories of deprecated components"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "jiangemma@microsoft.com",
|
|
18
|
+
"package": "@fluentui-copilot/react-attachments",
|
|
19
|
+
"commit": "51290b6805d1f1823c3c3b471da9d717ff076352",
|
|
20
|
+
"comment": "docs: Add slot/prop descriptions for `Attachment`"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "jiangemma@microsoft.com",
|
|
24
|
+
"package": "@fluentui-copilot/react-attachments",
|
|
25
|
+
"commit": "666bc197ec5646a5f10334bd6ced558c570fdeaf",
|
|
26
|
+
"comment": "docs: Add slot/prop descriptions for `AttachmentList`"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Wed, 18 Dec 2024 08:55:41 GMT",
|
|
6
33
|
"tag": "@fluentui-copilot/react-attachments_v0.10.4",
|
|
7
34
|
"version": "0.10.4",
|
|
8
35
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-attachments
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed, 18 Dec 2024 08:
|
|
3
|
+
This log was last generated on Wed, 18 Dec 2024 08:55:41 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
7
|
## [0.10.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.10.4)
|
|
8
8
|
|
|
9
|
-
Wed, 18 Dec 2024 08:
|
|
9
|
+
Wed, 18 Dec 2024 08:55:41 GMT
|
|
10
10
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.10.3..@fluentui-copilot/react-attachments_v0.10.4)
|
|
11
11
|
|
|
12
12
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,13 @@ declare type AttachmentListContextValues = {
|
|
|
47
47
|
* AttachmentList Props
|
|
48
48
|
*/
|
|
49
49
|
export declare type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {
|
|
50
|
+
/**
|
|
51
|
+
* Callback fired when an attachment is dismissed.
|
|
52
|
+
*/
|
|
50
53
|
onAttachmentDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>, data: AttachmentDismissedData) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Props that will be passed to the overflow menu.
|
|
56
|
+
*/
|
|
51
57
|
overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;
|
|
52
58
|
/**
|
|
53
59
|
* The maximum number of attachments to display before the overflow button is shown even if there is
|
|
@@ -62,6 +68,10 @@ export declare const AttachmentListProvider: Provider<AttachmentListContextValue
|
|
|
62
68
|
|
|
63
69
|
export declare type AttachmentListSlots = {
|
|
64
70
|
root: Slot<'div'>;
|
|
71
|
+
/**
|
|
72
|
+
* An AttachmentList has an overflow menu when `maxVisibleAttachments` is exceeded.
|
|
73
|
+
* Adding a custom button for the overflow menu is supported.
|
|
74
|
+
*/
|
|
65
75
|
overflowMenuButton: Slot<'span'>;
|
|
66
76
|
};
|
|
67
77
|
|
|
@@ -156,6 +166,11 @@ export declare type AttachmentOverflowMenuState = MenuState & {
|
|
|
156
166
|
* Attachment Props
|
|
157
167
|
*/
|
|
158
168
|
export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {
|
|
169
|
+
/**
|
|
170
|
+
* Use this prop if an attachment has no text content.
|
|
171
|
+
*
|
|
172
|
+
* @default false
|
|
173
|
+
*/
|
|
159
174
|
imageOnly?: boolean;
|
|
160
175
|
/**
|
|
161
176
|
* An attachment supports different sizes.
|
|
@@ -167,11 +182,29 @@ export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &
|
|
|
167
182
|
|
|
168
183
|
export declare type AttachmentSlots = {
|
|
169
184
|
root: NonNullable<Slot<'div'>>;
|
|
185
|
+
/**
|
|
186
|
+
* Attachments support a primary action.
|
|
187
|
+
*/
|
|
170
188
|
primaryAction: NonNullable<Slot<'button', 'span'>>;
|
|
189
|
+
/**
|
|
190
|
+
* Attachments have a dismiss button.
|
|
191
|
+
*/
|
|
171
192
|
dismissButton: NonNullable<Slot<'button'>>;
|
|
193
|
+
/**
|
|
194
|
+
* Attachments can include an image or other media.
|
|
195
|
+
*/
|
|
172
196
|
media?: Slot<'span'>;
|
|
197
|
+
/**
|
|
198
|
+
* The content of the attachment.
|
|
199
|
+
*/
|
|
173
200
|
content: NonNullable<Slot<'span'>>;
|
|
201
|
+
/**
|
|
202
|
+
* The icon that renders for the `dismissButton`.
|
|
203
|
+
*/
|
|
174
204
|
dismissIcon: NonNullable<Slot<'span'>>;
|
|
205
|
+
/**
|
|
206
|
+
* An attachment supports a progress bar, which can display the attachment's upload progress.
|
|
207
|
+
*/
|
|
175
208
|
progress?: Slot<typeof ProgressBar>;
|
|
176
209
|
};
|
|
177
210
|
|
|
@@ -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 * 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":"
|
|
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\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAuDA;;CAEC,GACD,WAKI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps } from '../Attachment';\nimport type { AttachmentOverflowMenuProps } from '../AttachmentOverflowMenu';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n overflowMenuButton: Slot<'span'>;\n};\n\nexport type AttachmentDismissedData = {\n content?: AttachmentProps['children'];\n media?: AttachmentProps['media'];\n id?: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;\n /**\n * The maximum number of attachments to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleAttachments?: number;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {\n attachments: AttachmentProps[];\n shouldUseOverflow: boolean;\n };\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"
|
|
1
|
+
{"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps } from '../Attachment';\nimport type { AttachmentOverflowMenuProps } from '../AttachmentOverflowMenu';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n\n /**\n * An AttachmentList has an overflow menu when `maxVisibleAttachments` is exceeded.\n * Adding a custom button for the overflow menu is supported.\n */\n overflowMenuButton: Slot<'span'>;\n};\n\nexport type AttachmentDismissedData = {\n content?: AttachmentProps['children'];\n media?: AttachmentProps['media'];\n id?: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n /**\n * Callback fired when an attachment is dismissed.\n */\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n\n /**\n * Props that will be passed to the overflow menu.\n */\n overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;\n\n /**\n * The maximum number of attachments to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleAttachments?: number;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {\n attachments: AttachmentProps[];\n shouldUseOverflow: boolean;\n };\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AAwDA,WAEE"}
|
|
@@ -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 * 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":"
|
|
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\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAuDA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps } from '../Attachment';\nimport type { AttachmentOverflowMenuProps } from '../AttachmentOverflowMenu';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n overflowMenuButton: Slot<'span'>;\n};\n\nexport type AttachmentDismissedData = {\n content?: AttachmentProps['children'];\n media?: AttachmentProps['media'];\n id?: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;\n /**\n * The maximum number of attachments to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleAttachments?: number;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {\n attachments: AttachmentProps[];\n shouldUseOverflow: boolean;\n };\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
1
|
+
{"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps } from '../Attachment';\nimport type { AttachmentOverflowMenuProps } from '../AttachmentOverflowMenu';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n\n /**\n * An AttachmentList has an overflow menu when `maxVisibleAttachments` is exceeded.\n * Adding a custom button for the overflow menu is supported.\n */\n overflowMenuButton: Slot<'span'>;\n};\n\nexport type AttachmentDismissedData = {\n content?: AttachmentProps['children'];\n media?: AttachmentProps['media'];\n id?: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n /**\n * Callback fired when an attachment is dismissed.\n */\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n\n /**\n * Props that will be passed to the overflow menu.\n */\n overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;\n\n /**\n * The maximum number of attachments to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleAttachments?: number;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {\n attachments: AttachmentProps[];\n shouldUseOverflow: boolean;\n };\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "A set of components related to attaching files in Copilot experiences.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@fluentui-copilot/react-provider": "^0.9.3",
|
|
16
|
-
"@fluentui-copilot/react-utilities": "^0.0.
|
|
16
|
+
"@fluentui-copilot/react-utilities": "^0.0.5",
|
|
17
17
|
"@fluentui-copilot/tokens": "^0.3.3",
|
|
18
18
|
"@swc/helpers": "^0.5.1"
|
|
19
19
|
},
|