@aws-amplify/ui 6.2.0 → 6.4.0
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/dist/esm/theme/tokens/components/avatar.mjs +49 -0
- package/dist/esm/theme/tokens/components/index.mjs +2 -0
- package/dist/esm/types/primitives/componentClassName.mjs +44 -0
- package/dist/esm/utils/setUserAgent/constants.mjs +6 -2
- package/dist/esm/utils/setUserAgent/setUserAgent.mjs +8 -1
- package/dist/index.js +104 -0
- package/dist/styles/AIConversation.css +108 -0
- package/dist/styles/AIConversation.layer.css +110 -0
- package/dist/styles/avatar.css +111 -0
- package/dist/styles/avatar.layer.css +113 -0
- package/dist/styles/base.css +29 -0
- package/dist/styles/base.layer.css +29 -0
- package/dist/styles.css +250 -0
- package/dist/styles.layer.css +250 -0
- package/dist/theme.css +29 -0
- package/dist/types/theme/components/avatar.d.ts +5 -0
- package/dist/types/theme/components/fileUploader.d.ts +20 -0
- package/dist/types/theme/components/index.d.ts +3 -1
- package/dist/types/theme/tokens/components/avatar.d.ts +14 -0
- package/dist/types/theme/tokens/components/index.d.ts +2 -0
- package/dist/types/types/primitives/componentClassName.d.ts +44 -0
- package/dist/types/utils/setUserAgent/constants.d.ts +1 -0
- package/dist/types/utils/setUserAgent/setUserAgent.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const avatar = {
|
|
2
|
+
// Default styles
|
|
3
|
+
color: { value: '{colors.font.tertiary.value}' },
|
|
4
|
+
lineHeight: { value: 1 },
|
|
5
|
+
fontWeight: { value: '{fontWeights.semibold.value}' },
|
|
6
|
+
fontSize: { value: '{fontSizes.small.value}' },
|
|
7
|
+
textAlign: { value: 'center' },
|
|
8
|
+
width: { value: '{fontSizes.xxl.value}' },
|
|
9
|
+
height: { value: '{fontSizes.xxl.value}' },
|
|
10
|
+
backgroundColor: { value: '{colors.background.tertiary}' },
|
|
11
|
+
borderRadius: { value: '100%' },
|
|
12
|
+
borderColor: { value: '{colors.border.primary.value}' },
|
|
13
|
+
borderWidth: { value: '{borderWidths.medium.value}' },
|
|
14
|
+
// Color Theme Variations
|
|
15
|
+
info: {
|
|
16
|
+
color: { value: '{colors.font.info.value}' },
|
|
17
|
+
backgroundColor: { value: '{colors.background.info.value}' },
|
|
18
|
+
borderColor: { value: '{colors.border.info.value}' },
|
|
19
|
+
},
|
|
20
|
+
warning: {
|
|
21
|
+
color: { value: '{colors.font.warning.value}' },
|
|
22
|
+
backgroundColor: { value: '{colors.background.warning.value}' },
|
|
23
|
+
borderColor: { value: '{colors.border.warning.value}' },
|
|
24
|
+
},
|
|
25
|
+
success: {
|
|
26
|
+
color: { value: '{colors.font.success.value}' },
|
|
27
|
+
backgroundColor: { value: '{colors.background.success.value}' },
|
|
28
|
+
borderColor: { value: '{colors.border.success.value}' },
|
|
29
|
+
},
|
|
30
|
+
error: {
|
|
31
|
+
color: { value: '{colors.font.error.value}' },
|
|
32
|
+
backgroundColor: { value: '{colors.background.error.value}' },
|
|
33
|
+
borderColor: { value: '{colors.border.error.value}' },
|
|
34
|
+
},
|
|
35
|
+
// Sizes
|
|
36
|
+
small: {
|
|
37
|
+
fontSize: { value: '{fontSizes.xs.value}' },
|
|
38
|
+
width: { value: '{fontSizes.xl.value}' },
|
|
39
|
+
height: { value: '{fontSizes.xl.value}' },
|
|
40
|
+
},
|
|
41
|
+
// medium is the default size
|
|
42
|
+
large: {
|
|
43
|
+
fontSize: { value: '{fontSizes.medium.value}' },
|
|
44
|
+
width: { value: '{fontSizes.xxxl.value}' },
|
|
45
|
+
height: { value: '{fontSizes.xxxl.value}' },
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { avatar };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { alert } from './alert.mjs';
|
|
2
2
|
import { autocomplete } from './autocomplete.mjs';
|
|
3
3
|
import { authenticator } from './authenticator.mjs';
|
|
4
|
+
import { avatar } from './avatar.mjs';
|
|
4
5
|
import { badge } from './badge.mjs';
|
|
5
6
|
import { breadcrumbs } from './breadcrumbs.mjs';
|
|
6
7
|
import { button } from './button.mjs';
|
|
@@ -57,6 +58,7 @@ const components = {
|
|
|
57
58
|
alert,
|
|
58
59
|
authenticator,
|
|
59
60
|
autocomplete,
|
|
61
|
+
avatar,
|
|
60
62
|
badge,
|
|
61
63
|
breadcrumbs,
|
|
62
64
|
button,
|
|
@@ -17,6 +17,31 @@ const ComponentClassName = {
|
|
|
17
17
|
AutocompleteMenuLoading: 'amplify-autocomplete__menu--loading',
|
|
18
18
|
AutocompleteMenuOption: 'amplify-autocomplete__menu__option',
|
|
19
19
|
AutocompleteMenuOptions: 'amplify-autocomplete__menu__options',
|
|
20
|
+
Avatar: 'amplify-avatar',
|
|
21
|
+
AvatarIcon: 'amplify-avatar__icon',
|
|
22
|
+
AvatarImage: 'amplify-avatar__image',
|
|
23
|
+
AIConversation: 'amplify-ai-conversation',
|
|
24
|
+
AIConversationAttachment: 'amplify-ai-conversation__attachment',
|
|
25
|
+
AIConversationAttachmentList: 'amplify-ai-conversation__attachment__list',
|
|
26
|
+
AIConversationAttachmentImage: 'amplify-ai-conversation__attachment__image',
|
|
27
|
+
AIConversationAttachmentName: 'amplify-ai-conversation__attachment__name',
|
|
28
|
+
AIConversationAttachmentSize: 'amplify-ai-conversation__attachment__size',
|
|
29
|
+
AIConversationAttachmentRemove: 'amplify-ai-conversation__attachment__remove',
|
|
30
|
+
AIConversationForm: 'amplify-ai-conversation__form',
|
|
31
|
+
AIConversationFormAttach: 'amplify-ai-conversation__form__attach',
|
|
32
|
+
AIConversationFormSend: 'amplify-ai-conversation__form__send',
|
|
33
|
+
AIConversationFormField: 'amplify-ai-conversation__form__field',
|
|
34
|
+
AIConversationFormDropzone: 'amplify-ai-conversation__form__dropzone',
|
|
35
|
+
AIConversationMessage: 'amplify-ai-conversation__message',
|
|
36
|
+
AIConversationMessageAvatar: 'amplify-ai-conversation__message__avatar',
|
|
37
|
+
AIConversationMessageSender: 'amplify-ai-conversation__message__sender',
|
|
38
|
+
AIConversationMessageSenderUsername: 'amplify-ai-conversation__message__sender__username',
|
|
39
|
+
AIConversationMessageSenderTimestamp: 'amplify-ai-conversation__message__sender__timestamp',
|
|
40
|
+
AIConversationMessageBody: 'amplify-ai-conversation__message__body',
|
|
41
|
+
AIConversationMessageContent: 'amplify-ai-conversation__message__content',
|
|
42
|
+
AIConversationMessageActions: 'amplify-ai-conversation__message__actions',
|
|
43
|
+
AIConversationMessageList: 'amplify-ai-conversation__message__list',
|
|
44
|
+
AIConversationPrompt: 'amplify-ai-conversation__prompt',
|
|
20
45
|
Badge: 'amplify-badge',
|
|
21
46
|
Breadcrumbs: 'amplify-breadcrumbs',
|
|
22
47
|
BreadcrumbsList: 'amplify-breadcrumbs__list',
|
|
@@ -59,6 +84,25 @@ const ComponentClassName = {
|
|
|
59
84
|
FieldGroupFieldWrapper: 'amplify-field-group__field-wrapper',
|
|
60
85
|
Fieldset: 'amplify-fieldset',
|
|
61
86
|
FieldsetLegend: 'amplify-fieldset__legend',
|
|
87
|
+
FileUploader: 'amplify-fileuploader',
|
|
88
|
+
FileUploaderDropZone: 'amplify-fileuploader__dropzone',
|
|
89
|
+
FileUploaderDropZoneIcon: 'amplify-fileuploader__dropzone__icon',
|
|
90
|
+
FileUploaderDropZoneText: 'amplify-fileuploader__dropzone__text',
|
|
91
|
+
FileUploaderFilePicker: 'amplify-fileuploader__file__picker',
|
|
92
|
+
FileUploaderFile: 'amplify-fileuploader__file',
|
|
93
|
+
FileUploaderFileWrapper: 'amplify-fileuploader__file__wrapper',
|
|
94
|
+
FileUploaderFileList: 'amplify-fileuploader__file__list',
|
|
95
|
+
FileUploaderFileName: 'amplify-fileuploader__file__name',
|
|
96
|
+
FileUploaderFileSize: 'amplify-fileuploader__file__size',
|
|
97
|
+
FileUploaderFileInfo: 'amplify-fileuploader__file__info',
|
|
98
|
+
FileUploaderFileImage: 'amplify-fileuploader__file__image',
|
|
99
|
+
FileUploaderFileMain: 'amplify-fileuploader__file__main',
|
|
100
|
+
FileUploaderFileStatus: 'amplify-fileuploader__file__status',
|
|
101
|
+
FileUploaderLoader: 'amplify-fileuploader__loader',
|
|
102
|
+
FileUploaderPreviewer: 'amplify-fileuploader__previewer',
|
|
103
|
+
FileUploaderPreviewerText: 'amplify-fileuploader__previewer__text',
|
|
104
|
+
FileUploaderPreviewerActions: 'amplify-fileuploader__previewer__actions',
|
|
105
|
+
FileUploaderPreviewerFooter: 'amplify-fileuploader__previewer__footer',
|
|
62
106
|
Flex: 'amplify-flex',
|
|
63
107
|
Grid: 'amplify-grid',
|
|
64
108
|
Heading: 'amplify-heading',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthAction, Category, InAppMessagingAction, GeoAction
|
|
1
|
+
import { AuthAction, Category, StorageAction, InAppMessagingAction, GeoAction } from '@aws-amplify/core/internals/utils';
|
|
2
2
|
|
|
3
3
|
const ACCOUNT_SETTINGS_INPUT_BASE = {
|
|
4
4
|
apis: [AuthAction.DeleteUser, AuthAction.UpdatePassword],
|
|
@@ -19,6 +19,10 @@ const AUTHENTICATOR_INPUT_BASE = {
|
|
|
19
19
|
],
|
|
20
20
|
category: Category.Auth,
|
|
21
21
|
};
|
|
22
|
+
const FILE_UPLOADER_BASE_INPUT = {
|
|
23
|
+
apis: [StorageAction.UploadData],
|
|
24
|
+
category: Category.Storage,
|
|
25
|
+
};
|
|
22
26
|
const IN_APP_MESSAGING_INPUT_BASE = {
|
|
23
27
|
apis: [InAppMessagingAction.NotifyMessageInteraction],
|
|
24
28
|
category: Category.InAppMessaging,
|
|
@@ -40,4 +44,4 @@ const STORAGE_MANAGER_INPUT_BASE = {
|
|
|
40
44
|
category: Category.Storage,
|
|
41
45
|
};
|
|
42
46
|
|
|
43
|
-
export { ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, MAP_VIEW_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE };
|
|
47
|
+
export { ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, IN_APP_MESSAGING_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, MAP_VIEW_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setCustomUserAgent } from '@aws-amplify/core/internals/utils';
|
|
2
|
-
import { STORAGE_MANAGER_INPUT_BASE, MAP_VIEW_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE } from './constants.mjs';
|
|
2
|
+
import { STORAGE_MANAGER_INPUT_BASE, MAP_VIEW_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE } from './constants.mjs';
|
|
3
3
|
import { noop } from '../utils.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -30,6 +30,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
30
30
|
});
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
|
+
case 'FileUploader': {
|
|
34
|
+
setCustomUserAgent({
|
|
35
|
+
...FILE_UPLOADER_BASE_INPUT,
|
|
36
|
+
additionalDetails: [[componentName], packageData],
|
|
37
|
+
});
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
33
40
|
case 'InAppMessaging': {
|
|
34
41
|
setCustomUserAgent({
|
|
35
42
|
...IN_APP_MESSAGING_INPUT_BASE,
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,10 @@ const AUTHENTICATOR_INPUT_BASE = {
|
|
|
55
55
|
],
|
|
56
56
|
category: utils.Category.Auth,
|
|
57
57
|
};
|
|
58
|
+
const FILE_UPLOADER_BASE_INPUT = {
|
|
59
|
+
apis: [utils.StorageAction.UploadData],
|
|
60
|
+
category: utils.Category.Storage,
|
|
61
|
+
};
|
|
58
62
|
const IN_APP_MESSAGING_INPUT_BASE = {
|
|
59
63
|
apis: [utils.InAppMessagingAction.NotifyMessageInteraction],
|
|
60
64
|
category: utils.Category.InAppMessaging,
|
|
@@ -350,6 +354,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
350
354
|
});
|
|
351
355
|
break;
|
|
352
356
|
}
|
|
357
|
+
case 'FileUploader': {
|
|
358
|
+
utils.setCustomUserAgent({
|
|
359
|
+
...FILE_UPLOADER_BASE_INPUT,
|
|
360
|
+
additionalDetails: [[componentName], packageData],
|
|
361
|
+
});
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
353
364
|
case 'InAppMessaging': {
|
|
354
365
|
utils.setCustomUserAgent({
|
|
355
366
|
...IN_APP_MESSAGING_INPUT_BASE,
|
|
@@ -2857,6 +2868,31 @@ const ComponentClassName = {
|
|
|
2857
2868
|
AutocompleteMenuLoading: 'amplify-autocomplete__menu--loading',
|
|
2858
2869
|
AutocompleteMenuOption: 'amplify-autocomplete__menu__option',
|
|
2859
2870
|
AutocompleteMenuOptions: 'amplify-autocomplete__menu__options',
|
|
2871
|
+
Avatar: 'amplify-avatar',
|
|
2872
|
+
AvatarIcon: 'amplify-avatar__icon',
|
|
2873
|
+
AvatarImage: 'amplify-avatar__image',
|
|
2874
|
+
AIConversation: 'amplify-ai-conversation',
|
|
2875
|
+
AIConversationAttachment: 'amplify-ai-conversation__attachment',
|
|
2876
|
+
AIConversationAttachmentList: 'amplify-ai-conversation__attachment__list',
|
|
2877
|
+
AIConversationAttachmentImage: 'amplify-ai-conversation__attachment__image',
|
|
2878
|
+
AIConversationAttachmentName: 'amplify-ai-conversation__attachment__name',
|
|
2879
|
+
AIConversationAttachmentSize: 'amplify-ai-conversation__attachment__size',
|
|
2880
|
+
AIConversationAttachmentRemove: 'amplify-ai-conversation__attachment__remove',
|
|
2881
|
+
AIConversationForm: 'amplify-ai-conversation__form',
|
|
2882
|
+
AIConversationFormAttach: 'amplify-ai-conversation__form__attach',
|
|
2883
|
+
AIConversationFormSend: 'amplify-ai-conversation__form__send',
|
|
2884
|
+
AIConversationFormField: 'amplify-ai-conversation__form__field',
|
|
2885
|
+
AIConversationFormDropzone: 'amplify-ai-conversation__form__dropzone',
|
|
2886
|
+
AIConversationMessage: 'amplify-ai-conversation__message',
|
|
2887
|
+
AIConversationMessageAvatar: 'amplify-ai-conversation__message__avatar',
|
|
2888
|
+
AIConversationMessageSender: 'amplify-ai-conversation__message__sender',
|
|
2889
|
+
AIConversationMessageSenderUsername: 'amplify-ai-conversation__message__sender__username',
|
|
2890
|
+
AIConversationMessageSenderTimestamp: 'amplify-ai-conversation__message__sender__timestamp',
|
|
2891
|
+
AIConversationMessageBody: 'amplify-ai-conversation__message__body',
|
|
2892
|
+
AIConversationMessageContent: 'amplify-ai-conversation__message__content',
|
|
2893
|
+
AIConversationMessageActions: 'amplify-ai-conversation__message__actions',
|
|
2894
|
+
AIConversationMessageList: 'amplify-ai-conversation__message__list',
|
|
2895
|
+
AIConversationPrompt: 'amplify-ai-conversation__prompt',
|
|
2860
2896
|
Badge: 'amplify-badge',
|
|
2861
2897
|
Breadcrumbs: 'amplify-breadcrumbs',
|
|
2862
2898
|
BreadcrumbsList: 'amplify-breadcrumbs__list',
|
|
@@ -2899,6 +2935,25 @@ const ComponentClassName = {
|
|
|
2899
2935
|
FieldGroupFieldWrapper: 'amplify-field-group__field-wrapper',
|
|
2900
2936
|
Fieldset: 'amplify-fieldset',
|
|
2901
2937
|
FieldsetLegend: 'amplify-fieldset__legend',
|
|
2938
|
+
FileUploader: 'amplify-fileuploader',
|
|
2939
|
+
FileUploaderDropZone: 'amplify-fileuploader__dropzone',
|
|
2940
|
+
FileUploaderDropZoneIcon: 'amplify-fileuploader__dropzone__icon',
|
|
2941
|
+
FileUploaderDropZoneText: 'amplify-fileuploader__dropzone__text',
|
|
2942
|
+
FileUploaderFilePicker: 'amplify-fileuploader__file__picker',
|
|
2943
|
+
FileUploaderFile: 'amplify-fileuploader__file',
|
|
2944
|
+
FileUploaderFileWrapper: 'amplify-fileuploader__file__wrapper',
|
|
2945
|
+
FileUploaderFileList: 'amplify-fileuploader__file__list',
|
|
2946
|
+
FileUploaderFileName: 'amplify-fileuploader__file__name',
|
|
2947
|
+
FileUploaderFileSize: 'amplify-fileuploader__file__size',
|
|
2948
|
+
FileUploaderFileInfo: 'amplify-fileuploader__file__info',
|
|
2949
|
+
FileUploaderFileImage: 'amplify-fileuploader__file__image',
|
|
2950
|
+
FileUploaderFileMain: 'amplify-fileuploader__file__main',
|
|
2951
|
+
FileUploaderFileStatus: 'amplify-fileuploader__file__status',
|
|
2952
|
+
FileUploaderLoader: 'amplify-fileuploader__loader',
|
|
2953
|
+
FileUploaderPreviewer: 'amplify-fileuploader__previewer',
|
|
2954
|
+
FileUploaderPreviewerText: 'amplify-fileuploader__previewer__text',
|
|
2955
|
+
FileUploaderPreviewerActions: 'amplify-fileuploader__previewer__actions',
|
|
2956
|
+
FileUploaderPreviewerFooter: 'amplify-fileuploader__previewer__footer',
|
|
2902
2957
|
Flex: 'amplify-flex',
|
|
2903
2958
|
Grid: 'amplify-grid',
|
|
2904
2959
|
Heading: 'amplify-heading',
|
|
@@ -5533,6 +5588,54 @@ const authenticator = {
|
|
|
5533
5588
|
},
|
|
5534
5589
|
};
|
|
5535
5590
|
|
|
5591
|
+
const avatar = {
|
|
5592
|
+
// Default styles
|
|
5593
|
+
color: { value: '{colors.font.tertiary.value}' },
|
|
5594
|
+
lineHeight: { value: 1 },
|
|
5595
|
+
fontWeight: { value: '{fontWeights.semibold.value}' },
|
|
5596
|
+
fontSize: { value: '{fontSizes.small.value}' },
|
|
5597
|
+
textAlign: { value: 'center' },
|
|
5598
|
+
width: { value: '{fontSizes.xxl.value}' },
|
|
5599
|
+
height: { value: '{fontSizes.xxl.value}' },
|
|
5600
|
+
backgroundColor: { value: '{colors.background.tertiary}' },
|
|
5601
|
+
borderRadius: { value: '100%' },
|
|
5602
|
+
borderColor: { value: '{colors.border.primary.value}' },
|
|
5603
|
+
borderWidth: { value: '{borderWidths.medium.value}' },
|
|
5604
|
+
// Color Theme Variations
|
|
5605
|
+
info: {
|
|
5606
|
+
color: { value: '{colors.font.info.value}' },
|
|
5607
|
+
backgroundColor: { value: '{colors.background.info.value}' },
|
|
5608
|
+
borderColor: { value: '{colors.border.info.value}' },
|
|
5609
|
+
},
|
|
5610
|
+
warning: {
|
|
5611
|
+
color: { value: '{colors.font.warning.value}' },
|
|
5612
|
+
backgroundColor: { value: '{colors.background.warning.value}' },
|
|
5613
|
+
borderColor: { value: '{colors.border.warning.value}' },
|
|
5614
|
+
},
|
|
5615
|
+
success: {
|
|
5616
|
+
color: { value: '{colors.font.success.value}' },
|
|
5617
|
+
backgroundColor: { value: '{colors.background.success.value}' },
|
|
5618
|
+
borderColor: { value: '{colors.border.success.value}' },
|
|
5619
|
+
},
|
|
5620
|
+
error: {
|
|
5621
|
+
color: { value: '{colors.font.error.value}' },
|
|
5622
|
+
backgroundColor: { value: '{colors.background.error.value}' },
|
|
5623
|
+
borderColor: { value: '{colors.border.error.value}' },
|
|
5624
|
+
},
|
|
5625
|
+
// Sizes
|
|
5626
|
+
small: {
|
|
5627
|
+
fontSize: { value: '{fontSizes.xs.value}' },
|
|
5628
|
+
width: { value: '{fontSizes.xl.value}' },
|
|
5629
|
+
height: { value: '{fontSizes.xl.value}' },
|
|
5630
|
+
},
|
|
5631
|
+
// medium is the default size
|
|
5632
|
+
large: {
|
|
5633
|
+
fontSize: { value: '{fontSizes.medium.value}' },
|
|
5634
|
+
width: { value: '{fontSizes.xxxl.value}' },
|
|
5635
|
+
height: { value: '{fontSizes.xxxl.value}' },
|
|
5636
|
+
},
|
|
5637
|
+
};
|
|
5638
|
+
|
|
5536
5639
|
const badge = {
|
|
5537
5640
|
// Default styles
|
|
5538
5641
|
color: { value: '{colors.font.primary.value}' },
|
|
@@ -7953,6 +8056,7 @@ const components = {
|
|
|
7953
8056
|
alert,
|
|
7954
8057
|
authenticator,
|
|
7955
8058
|
autocomplete,
|
|
8059
|
+
avatar,
|
|
7956
8060
|
badge,
|
|
7957
8061
|
breadcrumbs,
|
|
7958
8062
|
button,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.amplify-ai-conversation {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.amplify-ai-conversation__message {
|
|
7
|
+
--content-bg: transparent;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: var(--flex-direction);
|
|
10
|
+
gap: var(--amplify-space-small);
|
|
11
|
+
padding: var(--amplify-space-small);
|
|
12
|
+
}
|
|
13
|
+
.amplify-ai-conversation__message__list {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
.amplify-ai-conversation__message__avatar {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
}
|
|
20
|
+
.amplify-ai-conversation__message__sender {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: var(--flex-direction);
|
|
23
|
+
align-items: center;
|
|
24
|
+
height: var(--amplify-components-avatar-height);
|
|
25
|
+
gap: var(--amplify-space-small);
|
|
26
|
+
}
|
|
27
|
+
.amplify-ai-conversation__message__sender__username {
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
}
|
|
30
|
+
.amplify-ai-conversation__message__sender__timestamp {
|
|
31
|
+
color: var(--amplify-colors-font-tertiary);
|
|
32
|
+
font-size: var(--amplify-font-sizes-small);
|
|
33
|
+
}
|
|
34
|
+
.amplify-ai-conversation__message__body {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: var(--body-align-items);
|
|
38
|
+
gap: var(--amplify-space-xs);
|
|
39
|
+
}
|
|
40
|
+
.amplify-ai-conversation__message__content {
|
|
41
|
+
background-color: var(--content-bg);
|
|
42
|
+
border-radius: var(--amplify-radii-medium);
|
|
43
|
+
padding: var(--content-padding);
|
|
44
|
+
}
|
|
45
|
+
.amplify-ai-conversation__message__actions {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
}
|
|
49
|
+
.amplify-ai-conversation__message--bubble {
|
|
50
|
+
--content-bg: var(--bg-color);
|
|
51
|
+
--content-padding: var(--amplify-space-xxs) var(--amplify-space-xs);
|
|
52
|
+
--flex-direction: row-reverse;
|
|
53
|
+
--body-align-items: flex-end;
|
|
54
|
+
}
|
|
55
|
+
.amplify-ai-conversation__message--user {
|
|
56
|
+
--bg-color: var(--amplify-colors-background-secondary);
|
|
57
|
+
}
|
|
58
|
+
.amplify-ai-conversation__message--assistant {
|
|
59
|
+
--bg-color: var(--amplify-colors-primary-10);
|
|
60
|
+
--flex-direction: row;
|
|
61
|
+
--body-align-items: flex-start;
|
|
62
|
+
}
|
|
63
|
+
.amplify-ai-conversation__form {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
align-items: flex-start;
|
|
67
|
+
gap: var(--amplify-space-small);
|
|
68
|
+
}
|
|
69
|
+
.amplify-ai-conversation__form__dropzone {
|
|
70
|
+
text-align: initial;
|
|
71
|
+
border: none;
|
|
72
|
+
padding: var(--amplify-space-xs);
|
|
73
|
+
}
|
|
74
|
+
.amplify-ai-conversation__attachment {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
padding-block: var(--amplify-space-xxxs);
|
|
78
|
+
padding-inline: var(--amplify-space-xs);
|
|
79
|
+
border-width: var(--amplify-border-widths-small);
|
|
80
|
+
border-style: solid;
|
|
81
|
+
border-color: var(--amplify-colors-border-secondary);
|
|
82
|
+
border-radius: var(--amplify-radii-small);
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--amplify-space-xs);
|
|
85
|
+
font-size: var(--amplify-font-sizes-small);
|
|
86
|
+
}
|
|
87
|
+
.amplify-ai-conversation__attachment__list {
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: row;
|
|
90
|
+
flex-wrap: wrap;
|
|
91
|
+
gap: var(--amplify-space-small);
|
|
92
|
+
padding-block-start: var(--amplify-space-small);
|
|
93
|
+
}
|
|
94
|
+
.amplify-ai-conversation__attachment__image {
|
|
95
|
+
width: 1rem;
|
|
96
|
+
height: 1rem;
|
|
97
|
+
-o-object-fit: cover;
|
|
98
|
+
object-fit: cover;
|
|
99
|
+
}
|
|
100
|
+
.amplify-ai-conversation__attachment__size {
|
|
101
|
+
color: var(--amplify-colors-font-tertiary);
|
|
102
|
+
}
|
|
103
|
+
.amplify-ai-conversation__attachment__remove {
|
|
104
|
+
padding: var(--amplify-space-xxs);
|
|
105
|
+
}
|
|
106
|
+
.amplify-ai-conversation__prompt {
|
|
107
|
+
font-weight: normal;
|
|
108
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@layer amplify.components {
|
|
2
|
+
.amplify-ai-conversation {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
.amplify-ai-conversation__message {
|
|
8
|
+
--content-bg: transparent;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: var(--flex-direction);
|
|
11
|
+
gap: var(--amplify-space-small);
|
|
12
|
+
padding: var(--amplify-space-small);
|
|
13
|
+
}
|
|
14
|
+
.amplify-ai-conversation__message__list {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
}
|
|
18
|
+
.amplify-ai-conversation__message__avatar {
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
}
|
|
21
|
+
.amplify-ai-conversation__message__sender {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: var(--flex-direction);
|
|
24
|
+
align-items: center;
|
|
25
|
+
height: var(--amplify-components-avatar-height);
|
|
26
|
+
gap: var(--amplify-space-small);
|
|
27
|
+
}
|
|
28
|
+
.amplify-ai-conversation__message__sender__username {
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
}
|
|
31
|
+
.amplify-ai-conversation__message__sender__timestamp {
|
|
32
|
+
color: var(--amplify-colors-font-tertiary);
|
|
33
|
+
font-size: var(--amplify-font-sizes-small);
|
|
34
|
+
}
|
|
35
|
+
.amplify-ai-conversation__message__body {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: var(--body-align-items);
|
|
39
|
+
gap: var(--amplify-space-xs);
|
|
40
|
+
}
|
|
41
|
+
.amplify-ai-conversation__message__content {
|
|
42
|
+
background-color: var(--content-bg);
|
|
43
|
+
border-radius: var(--amplify-radii-medium);
|
|
44
|
+
padding: var(--content-padding);
|
|
45
|
+
}
|
|
46
|
+
.amplify-ai-conversation__message__actions {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
}
|
|
50
|
+
.amplify-ai-conversation__message--bubble {
|
|
51
|
+
--content-bg: var(--bg-color);
|
|
52
|
+
--content-padding: var(--amplify-space-xxs) var(--amplify-space-xs);
|
|
53
|
+
--flex-direction: row-reverse;
|
|
54
|
+
--body-align-items: flex-end;
|
|
55
|
+
}
|
|
56
|
+
.amplify-ai-conversation__message--user {
|
|
57
|
+
--bg-color: var(--amplify-colors-background-secondary);
|
|
58
|
+
}
|
|
59
|
+
.amplify-ai-conversation__message--assistant {
|
|
60
|
+
--bg-color: var(--amplify-colors-primary-10);
|
|
61
|
+
--flex-direction: row;
|
|
62
|
+
--body-align-items: flex-start;
|
|
63
|
+
}
|
|
64
|
+
.amplify-ai-conversation__form {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
align-items: flex-start;
|
|
68
|
+
gap: var(--amplify-space-small);
|
|
69
|
+
}
|
|
70
|
+
.amplify-ai-conversation__form__dropzone {
|
|
71
|
+
text-align: initial;
|
|
72
|
+
border: none;
|
|
73
|
+
padding: var(--amplify-space-xs);
|
|
74
|
+
}
|
|
75
|
+
.amplify-ai-conversation__attachment {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
padding-block: var(--amplify-space-xxxs);
|
|
79
|
+
padding-inline: var(--amplify-space-xs);
|
|
80
|
+
border-width: var(--amplify-border-widths-small);
|
|
81
|
+
border-style: solid;
|
|
82
|
+
border-color: var(--amplify-colors-border-secondary);
|
|
83
|
+
border-radius: var(--amplify-radii-small);
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: var(--amplify-space-xs);
|
|
86
|
+
font-size: var(--amplify-font-sizes-small);
|
|
87
|
+
}
|
|
88
|
+
.amplify-ai-conversation__attachment__list {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
flex-wrap: wrap;
|
|
92
|
+
gap: var(--amplify-space-small);
|
|
93
|
+
padding-block-start: var(--amplify-space-small);
|
|
94
|
+
}
|
|
95
|
+
.amplify-ai-conversation__attachment__image {
|
|
96
|
+
width: 1rem;
|
|
97
|
+
height: 1rem;
|
|
98
|
+
-o-object-fit: cover;
|
|
99
|
+
object-fit: cover;
|
|
100
|
+
}
|
|
101
|
+
.amplify-ai-conversation__attachment__size {
|
|
102
|
+
color: var(--amplify-colors-font-tertiary);
|
|
103
|
+
}
|
|
104
|
+
.amplify-ai-conversation__attachment__remove {
|
|
105
|
+
padding: var(--amplify-space-xxs);
|
|
106
|
+
}
|
|
107
|
+
.amplify-ai-conversation__prompt {
|
|
108
|
+
font-weight: normal;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.amplify-avatar {
|
|
2
|
+
--avatar-color: var(--amplify-components-avatar-color);
|
|
3
|
+
--avatar-background-color: var(--amplify-components-avatar-background-color);
|
|
4
|
+
--avatar-filled-background-color: var(--amplify-components-avatar-color);
|
|
5
|
+
--avatar-filled-color: var(--amplify-components-avatar-background-color);
|
|
6
|
+
--avatar-border-color: var(--amplify-components-avatar-border-color);
|
|
7
|
+
--avatar-size: var(--amplify-components-avatar-width);
|
|
8
|
+
--amplify-components-icon-height: 100%;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
color: var(--avatar-color);
|
|
13
|
+
background-color: var(--avatar-background-color);
|
|
14
|
+
font-weight: var(--amplify-components-avatar-font-weight);
|
|
15
|
+
font-size: var(--amplify-components-avatar-font-size);
|
|
16
|
+
width: var(--amplify-components-avatar-width);
|
|
17
|
+
height: var(--amplify-components-avatar-height);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
border-radius: var(--amplify-components-avatar-border-radius);
|
|
20
|
+
}
|
|
21
|
+
.amplify-avatar--filled {
|
|
22
|
+
background-color: var(--avatar-filled-background-color);
|
|
23
|
+
color: var(--avatar-filled-color);
|
|
24
|
+
}
|
|
25
|
+
.amplify-avatar--outlined {
|
|
26
|
+
border-width: var(--amplify-components-avatar-border-width);
|
|
27
|
+
border-style: solid;
|
|
28
|
+
padding: var(--amplify-components-avatar-border-width);
|
|
29
|
+
border-color: var(--avatar-border-color);
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
color: var(--avatar-color);
|
|
32
|
+
}
|
|
33
|
+
.amplify-avatar--small {
|
|
34
|
+
--avatar-size: var(--amplify-components-avatar-small-width);
|
|
35
|
+
width: var(--amplify-components-avatar-small-width);
|
|
36
|
+
height: var(--amplify-components-avatar-small-height);
|
|
37
|
+
font-size: var(--amplify-components-avatar-small-font-size);
|
|
38
|
+
}
|
|
39
|
+
.amplify-avatar--large {
|
|
40
|
+
--avatar-size: var(--amplify-components-avatar-large-width);
|
|
41
|
+
width: var(--amplify-components-avatar-large-width);
|
|
42
|
+
height: var(--amplify-components-avatar-large-height);
|
|
43
|
+
font-size: var(--amplify-components-avatar-large-font-size);
|
|
44
|
+
}
|
|
45
|
+
.amplify-avatar--warning {
|
|
46
|
+
--avatar-border-color: var(
|
|
47
|
+
--amplify-components-avatar-warning-border-color
|
|
48
|
+
);
|
|
49
|
+
--avatar-background-color: var(
|
|
50
|
+
--amplify-components-avatar-warning-background-color
|
|
51
|
+
);
|
|
52
|
+
--avatar-color: var(--amplify-components-avatar-warning-color);
|
|
53
|
+
--avatar-filled-background-color: var(
|
|
54
|
+
--amplify-components-avatar-warning-color
|
|
55
|
+
);
|
|
56
|
+
--avatar-filled-color: var(
|
|
57
|
+
--amplify-components-avatar-warning-background-color
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
.amplify-avatar--error {
|
|
61
|
+
--avatar-border-color: var(--amplify-components-avatar-error-border-color);
|
|
62
|
+
--avatar-background-color: var(
|
|
63
|
+
--amplify-components-avatar-error-background-color
|
|
64
|
+
);
|
|
65
|
+
--avatar-color: var(--amplify-components-avatar-error-color);
|
|
66
|
+
--avatar-filled-background-color: var(
|
|
67
|
+
--amplify-components-avatar-error-color
|
|
68
|
+
);
|
|
69
|
+
--avatar-filled-color: var(
|
|
70
|
+
--amplify-components-avatar-error-background-color
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
.amplify-avatar--info {
|
|
74
|
+
--avatar-border-color: var(--amplify-components-avatar-info-border-color);
|
|
75
|
+
--avatar-background-color: var(
|
|
76
|
+
--amplify-components-avatar-info-background-color
|
|
77
|
+
);
|
|
78
|
+
--avatar-color: var(--amplify-components-avatar-info-color);
|
|
79
|
+
--avatar-filled-background-color: var(
|
|
80
|
+
--amplify-components-avatar-info-color
|
|
81
|
+
);
|
|
82
|
+
--avatar-filled-color: var(
|
|
83
|
+
--amplify-components-avatar-info-background-color
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
.amplify-avatar--success {
|
|
87
|
+
--avatar-border-color: var(
|
|
88
|
+
--amplify-components-avatar-success-border-color
|
|
89
|
+
);
|
|
90
|
+
--avatar-background-color: var(
|
|
91
|
+
--amplify-components-avatar-success-background-color
|
|
92
|
+
);
|
|
93
|
+
--avatar-color: var(--amplify-components-avatar-success-color);
|
|
94
|
+
--avatar-filled-background-color: var(
|
|
95
|
+
--amplify-components-avatar-success-color
|
|
96
|
+
);
|
|
97
|
+
--avatar-filled-color: var(
|
|
98
|
+
--amplify-components-avatar-success-background-color
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
.amplify-avatar__icon {
|
|
102
|
+
display: flex;
|
|
103
|
+
font-size: calc(var(--avatar-size) * 0.6);
|
|
104
|
+
}
|
|
105
|
+
.amplify-avatar__image {
|
|
106
|
+
width: 100%;
|
|
107
|
+
height: 100%;
|
|
108
|
+
-o-object-fit: cover;
|
|
109
|
+
object-fit: cover;
|
|
110
|
+
display: block;
|
|
111
|
+
}
|