@aws-amplify/ui-react 6.2.2 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/{Field-d47a49dc.js → Field-4b189104.js} +11 -0
  2. package/dist/esm/PrimitiveCatalog.mjs +285 -17
  3. package/dist/esm/components/AccountSettings/ChangePassword/ChangePassword.mjs +1 -0
  4. package/dist/esm/components/AccountSettings/ChangePassword/defaults.mjs +1 -0
  5. package/dist/esm/components/AccountSettings/DeleteUser/DeleteUser.mjs +1 -0
  6. package/dist/esm/components/AccountSettings/DeleteUser/defaults.mjs +1 -0
  7. package/dist/esm/components/AccountSettings/shared/Defaults.mjs +1 -0
  8. package/dist/esm/index.mjs +1 -0
  9. package/dist/esm/internal.mjs +4 -0
  10. package/dist/esm/primitives/Avatar/Avatar.mjs +23 -0
  11. package/dist/esm/primitives/Icon/icons/IconAssistant.mjs +15 -0
  12. package/dist/esm/primitives/Icon/icons/IconAttach.mjs +15 -0
  13. package/dist/esm/primitives/Icon/icons/IconSend.mjs +15 -0
  14. package/dist/esm/primitives/Icon/icons/IconUser.mjs +15 -0
  15. package/dist/esm/primitives/ScrollView/ScrollView.mjs +21 -1
  16. package/dist/esm/primitives/TextArea/AutoresizeTextarea.mjs +19 -0
  17. package/dist/esm/primitives/TextArea/useAutoresizeTextarea.mjs +28 -0
  18. package/dist/esm/primitives/TextAreaField/TextAreaField.mjs +3 -2
  19. package/dist/esm/primitives/index.mjs +1 -0
  20. package/dist/esm/version.mjs +1 -1
  21. package/dist/index.js +98 -28
  22. package/dist/internal.js +320 -18
  23. package/dist/styles/AIConversation.css +108 -0
  24. package/dist/styles/AIConversation.layer.css +110 -0
  25. package/dist/styles/FileUploader.css +138 -0
  26. package/dist/styles/FileUploader.layer.css +140 -0
  27. package/dist/styles/avatar.css +111 -0
  28. package/dist/styles/avatar.layer.css +113 -0
  29. package/dist/styles/base.css +90 -0
  30. package/dist/styles/base.layer.css +90 -0
  31. package/dist/styles.css +450 -0
  32. package/dist/styles.layer.css +450 -0
  33. package/dist/types/primitives/Avatar/Avatar.d.ts +6 -0
  34. package/dist/types/primitives/Avatar/index.d.ts +2 -0
  35. package/dist/types/primitives/Avatar/types.d.ts +36 -0
  36. package/dist/types/primitives/Icon/context/IconsContext.d.ts +2 -0
  37. package/dist/types/primitives/Icon/icons/IconAssistant.d.ts +5 -0
  38. package/dist/types/primitives/Icon/icons/IconAttach.d.ts +5 -0
  39. package/dist/types/primitives/Icon/icons/IconSend.d.ts +5 -0
  40. package/dist/types/primitives/Icon/icons/IconUser.d.ts +5 -0
  41. package/dist/types/primitives/Icon/icons/index.d.ts +4 -0
  42. package/dist/types/primitives/TextArea/AutoresizeTextarea.d.ts +3 -0
  43. package/dist/types/primitives/TextArea/index.d.ts +1 -0
  44. package/dist/types/primitives/TextArea/useAutoresizeTextarea.d.ts +1 -0
  45. package/dist/types/primitives/components.d.ts +1 -0
  46. package/dist/types/primitives/types/scrollView.d.ts +5 -0
  47. package/dist/types/primitives/types/textAreaField.d.ts +7 -0
  48. package/dist/types/version.d.ts +1 -1
  49. package/package.json +5 -5
@@ -834,6 +834,16 @@ const IconStar = (props) => {
834
834
  React__namespace.createElement("path", { d: "M12 17.27L18.18 21L16.54 13.97L22 9.24L14.81 8.63L12 2L9.19 8.63L2 9.24L7.46 13.97L5.82 21L12 17.27Z", fill: "currentColor" }))));
835
835
  };
836
836
 
837
+ /**
838
+ * @internal For internal Amplify UI use only. May be removed in a future release.
839
+ */
840
+ const IconUser = (props) => {
841
+ const { className, ...rest } = props;
842
+ return (React__namespace.createElement(View, { as: "span", width: "1em", height: "1em", className: ui.classNames(ui.ComponentClassName.Icon, className), ...rest },
843
+ React__namespace.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
844
+ React__namespace.createElement("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z", fill: "currentColor" }))));
845
+ };
846
+
837
847
  /**
838
848
  * @internal For internal Amplify UI use only. May be removed in a future release.
839
849
  */
@@ -1162,6 +1172,7 @@ exports.IconMenu = IconMenu;
1162
1172
  exports.IconRemove = IconRemove;
1163
1173
  exports.IconSearch = IconSearch;
1164
1174
  exports.IconStar = IconStar;
1175
+ exports.IconUser = IconUser;
1165
1176
  exports.IconVisibility = IconVisibility;
1166
1177
  exports.IconVisibilityOff = IconVisibilityOff;
1167
1178
  exports.IconWarning = IconWarning;
@@ -641,6 +641,268 @@ const PrimitiveCatalog = {
641
641
  }
642
642
  }
643
643
  },
644
+ "Avatar": {
645
+ "properties": {
646
+ "src": {
647
+ "type": "string"
648
+ },
649
+ "alt": {
650
+ "type": "string"
651
+ },
652
+ "variation": {
653
+ "type": "string"
654
+ },
655
+ "colorTheme": {
656
+ "type": "string"
657
+ },
658
+ "size": {
659
+ "type": "string"
660
+ },
661
+ "isDisabled": {
662
+ "type": "boolean"
663
+ },
664
+ "id": {
665
+ "type": "string"
666
+ },
667
+ "children": {
668
+ "type": "string"
669
+ },
670
+ "className": {
671
+ "type": "string"
672
+ },
673
+ "testId": {
674
+ "type": "string"
675
+ },
676
+ "inert": {
677
+ "type": "boolean"
678
+ },
679
+ "alignSelf": {
680
+ "type": "string"
681
+ },
682
+ "backgroundColor": {
683
+ "type": "string"
684
+ },
685
+ "backgroundImage": {
686
+ "type": "string"
687
+ },
688
+ "border": {
689
+ "type": "string"
690
+ },
691
+ "borderColor": {
692
+ "type": "string"
693
+ },
694
+ "borderWidth": {
695
+ "type": "string"
696
+ },
697
+ "borderStyle": {
698
+ "type": "string"
699
+ },
700
+ "borderRadius": {
701
+ "type": "string"
702
+ },
703
+ "bottom": {
704
+ "type": "string"
705
+ },
706
+ "boxShadow": {
707
+ "type": "string"
708
+ },
709
+ "color": {
710
+ "type": "string"
711
+ },
712
+ "display": {
713
+ "type": "string"
714
+ },
715
+ "fontFamily": {
716
+ "type": "string"
717
+ },
718
+ "fontSize": {
719
+ "type": "string"
720
+ },
721
+ "fontStyle": {
722
+ "type": "string"
723
+ },
724
+ "fontWeight": {
725
+ "type": "string"
726
+ },
727
+ "height": {
728
+ "type": "string"
729
+ },
730
+ "left": {
731
+ "type": "string"
732
+ },
733
+ "letterSpacing": {
734
+ "type": "string"
735
+ },
736
+ "lineHeight": {
737
+ "type": "string"
738
+ },
739
+ "margin": {
740
+ "type": "string"
741
+ },
742
+ "marginBlock": {
743
+ "type": "string"
744
+ },
745
+ "marginBlockEnd": {
746
+ "type": "string"
747
+ },
748
+ "marginBlockStart": {
749
+ "type": "string"
750
+ },
751
+ "marginBottom": {
752
+ "type": "string"
753
+ },
754
+ "marginInline": {
755
+ "type": "string"
756
+ },
757
+ "marginInlineEnd": {
758
+ "type": "string"
759
+ },
760
+ "marginInlineStart": {
761
+ "type": "string"
762
+ },
763
+ "marginLeft": {
764
+ "type": "string"
765
+ },
766
+ "marginRight": {
767
+ "type": "string"
768
+ },
769
+ "marginTop": {
770
+ "type": "string"
771
+ },
772
+ "maxHeight": {
773
+ "type": "string"
774
+ },
775
+ "maxWidth": {
776
+ "type": "string"
777
+ },
778
+ "minHeight": {
779
+ "type": "string"
780
+ },
781
+ "minWidth": {
782
+ "type": "string"
783
+ },
784
+ "opacity": {
785
+ "type": "string"
786
+ },
787
+ "overflow": {
788
+ "type": "string"
789
+ },
790
+ "padding": {
791
+ "type": "string"
792
+ },
793
+ "paddingBlock": {
794
+ "type": "string"
795
+ },
796
+ "paddingBlockEnd": {
797
+ "type": "string"
798
+ },
799
+ "paddingBlockStart": {
800
+ "type": "string"
801
+ },
802
+ "paddingBottom": {
803
+ "type": "string"
804
+ },
805
+ "paddingInline": {
806
+ "type": "string"
807
+ },
808
+ "paddingInlineEnd": {
809
+ "type": "string"
810
+ },
811
+ "paddingInlineStart": {
812
+ "type": "string"
813
+ },
814
+ "paddingLeft": {
815
+ "type": "string"
816
+ },
817
+ "paddingRight": {
818
+ "type": "string"
819
+ },
820
+ "paddingTop": {
821
+ "type": "string"
822
+ },
823
+ "position": {
824
+ "type": "string"
825
+ },
826
+ "right": {
827
+ "type": "string"
828
+ },
829
+ "textAlign": {
830
+ "type": "string"
831
+ },
832
+ "textDecoration": {
833
+ "type": "string"
834
+ },
835
+ "textTransform": {
836
+ "type": "string"
837
+ },
838
+ "top": {
839
+ "type": "string"
840
+ },
841
+ "transform": {
842
+ "type": "string"
843
+ },
844
+ "transformOrigin": {
845
+ "type": "string"
846
+ },
847
+ "width": {
848
+ "type": "string"
849
+ },
850
+ "whiteSpace": {
851
+ "type": "string"
852
+ },
853
+ "flex": {
854
+ "type": "string"
855
+ },
856
+ "order": {
857
+ "type": "string"
858
+ },
859
+ "grow": {
860
+ "type": "string"
861
+ },
862
+ "shrink": {
863
+ "type": "string"
864
+ },
865
+ "basis": {
866
+ "type": "string"
867
+ },
868
+ "area": {
869
+ "type": "string"
870
+ },
871
+ "column": {
872
+ "type": "string"
873
+ },
874
+ "columnEnd": {
875
+ "type": "string"
876
+ },
877
+ "columnSpan": {
878
+ "type": "string"
879
+ },
880
+ "columnStart": {
881
+ "type": "string"
882
+ },
883
+ "row": {
884
+ "type": "string"
885
+ },
886
+ "rowEnd": {
887
+ "type": "string"
888
+ },
889
+ "rowSpan": {
890
+ "type": "string"
891
+ },
892
+ "rowStart": {
893
+ "type": "string"
894
+ },
895
+ "ariaLabel": {
896
+ "type": "string"
897
+ },
898
+ "ariaValuetext": {
899
+ "type": "string"
900
+ },
901
+ "role": {
902
+ "type": "string"
903
+ }
904
+ }
905
+ },
644
906
  "Badge": {
645
907
  "properties": {
646
908
  "variation": {
@@ -1711,10 +1973,10 @@ const PrimitiveCatalog = {
1711
1973
  "rowGap": {
1712
1974
  "type": "string"
1713
1975
  },
1714
- "size": {
1976
+ "variation": {
1715
1977
  "type": "string"
1716
1978
  },
1717
- "variation": {
1979
+ "size": {
1718
1980
  "type": "string"
1719
1981
  }
1720
1982
  }
@@ -3852,10 +4114,10 @@ const PrimitiveCatalog = {
3852
4114
  "type": {
3853
4115
  "type": "string"
3854
4116
  },
3855
- "size": {
4117
+ "variation": {
3856
4118
  "type": "string"
3857
4119
  },
3858
- "variation": {
4120
+ "size": {
3859
4121
  "type": "string"
3860
4122
  }
3861
4123
  }
@@ -7348,10 +7610,10 @@ const PrimitiveCatalog = {
7348
7610
  "type": {
7349
7611
  "type": "string"
7350
7612
  },
7351
- "size": {
7613
+ "variation": {
7352
7614
  "type": "string"
7353
7615
  },
7354
- "variation": {
7616
+ "size": {
7355
7617
  "type": "string"
7356
7618
  },
7357
7619
  "direction": {
@@ -7637,10 +7899,10 @@ const PrimitiveCatalog = {
7637
7899
  "type": {
7638
7900
  "type": "string"
7639
7901
  },
7640
- "size": {
7902
+ "variation": {
7641
7903
  "type": "string"
7642
7904
  },
7643
- "variation": {
7905
+ "size": {
7644
7906
  "type": "string"
7645
7907
  },
7646
7908
  "direction": {
@@ -8867,13 +9129,13 @@ const PrimitiveCatalog = {
8867
9129
  "type": {
8868
9130
  "type": "string"
8869
9131
  },
9132
+ "variation": {
9133
+ "type": "string"
9134
+ },
8870
9135
  "size": {
8871
9136
  "type": "string",
8872
9137
  "priority": true
8873
9138
  },
8874
- "variation": {
8875
- "type": "string"
8876
- },
8877
9139
  "descriptiveText": {
8878
9140
  "type": "string",
8879
9141
  "priority": true
@@ -9252,10 +9514,10 @@ const PrimitiveCatalog = {
9252
9514
  "aria-valuenow": {
9253
9515
  "type": "number"
9254
9516
  },
9255
- "alt": {
9517
+ "src": {
9256
9518
  "type": "string"
9257
9519
  },
9258
- "src": {
9520
+ "alt": {
9259
9521
  "type": "string"
9260
9522
  },
9261
9523
  "accept": {
@@ -10488,6 +10750,9 @@ const PrimitiveCatalog = {
10488
10750
  "orientation": {
10489
10751
  "type": "string"
10490
10752
  },
10753
+ "autoScroll": {
10754
+ "type": "string"
10755
+ },
10491
10756
  "isDisabled": {
10492
10757
  "type": "boolean"
10493
10758
  },
@@ -13001,6 +13266,9 @@ const PrimitiveCatalog = {
13001
13266
  },
13002
13267
  "TextAreaField": {
13003
13268
  "properties": {
13269
+ "autoResize": {
13270
+ "type": "boolean"
13271
+ },
13004
13272
  "descriptiveText": {
13005
13273
  "type": "string",
13006
13274
  "priority": true
@@ -13941,10 +14209,10 @@ const PrimitiveCatalog = {
13941
14209
  "type": {
13942
14210
  "type": "string"
13943
14211
  },
13944
- "size": {
14212
+ "variation": {
13945
14213
  "type": "string"
13946
14214
  },
13947
- "variation": {
14215
+ "size": {
13948
14216
  "type": "string"
13949
14217
  },
13950
14218
  "direction": {
@@ -14254,10 +14522,10 @@ const PrimitiveCatalog = {
14254
14522
  "rowGap": {
14255
14523
  "type": "string"
14256
14524
  },
14257
- "size": {
14525
+ "variation": {
14258
14526
  "type": "string"
14259
14527
  },
14260
- "variation": {
14528
+ "size": {
14261
14529
  "type": "string"
14262
14530
  }
14263
14531
  }
@@ -14,6 +14,7 @@ import '../../../primitives/Field/FieldErrorMessage.mjs';
14
14
  import '../../../primitives/Field/Field.mjs';
15
15
  import '../../../primitives/Alert/Alert.mjs';
16
16
  import '../../../primitives/Autocomplete/Autocomplete.mjs';
17
+ import '../../../primitives/Avatar/Avatar.mjs';
17
18
  import '../../../primitives/Badge/Badge.mjs';
18
19
  import '../../../primitives/Breadcrumbs/Breadcrumbs.mjs';
19
20
  import '../../../primitives/Button/Button.mjs';
@@ -1,6 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import '../../../primitives/Alert/Alert.mjs';
3
3
  import '../../../primitives/Autocomplete/Autocomplete.mjs';
4
+ import '../../../primitives/Avatar/Avatar.mjs';
4
5
  import '../../../primitives/Badge/Badge.mjs';
5
6
  import '../../../primitives/Breadcrumbs/Breadcrumbs.mjs';
6
7
  import { Button } from '../../../primitives/Button/Button.mjs';
@@ -13,6 +13,7 @@ import '../../../primitives/Field/FieldErrorMessage.mjs';
13
13
  import '../../../primitives/Field/Field.mjs';
14
14
  import '../../../primitives/Alert/Alert.mjs';
15
15
  import '../../../primitives/Autocomplete/Autocomplete.mjs';
16
+ import '../../../primitives/Avatar/Avatar.mjs';
16
17
  import '../../../primitives/Badge/Badge.mjs';
17
18
  import '../../../primitives/Breadcrumbs/Breadcrumbs.mjs';
18
19
  import '../../../primitives/Button/Button.mjs';
@@ -1,6 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import '../../../primitives/Alert/Alert.mjs';
3
3
  import '../../../primitives/Autocomplete/Autocomplete.mjs';
4
+ import '../../../primitives/Avatar/Avatar.mjs';
4
5
  import '../../../primitives/Badge/Badge.mjs';
5
6
  import '../../../primitives/Breadcrumbs/Breadcrumbs.mjs';
6
7
  import { Button } from '../../../primitives/Button/Button.mjs';
@@ -1,6 +1,7 @@
1
1
  import React__default from 'react';
2
2
  import { Alert } from '../../../primitives/Alert/Alert.mjs';
3
3
  import '../../../primitives/Autocomplete/Autocomplete.mjs';
4
+ import '../../../primitives/Avatar/Avatar.mjs';
4
5
  import '../../../primitives/Badge/Badge.mjs';
5
6
  import '../../../primitives/Breadcrumbs/Breadcrumbs.mjs';
6
7
  import '../../../primitives/Button/Button.mjs';
@@ -13,6 +13,7 @@ export { ThemeProvider } from './components/ThemeProvider/ThemeProvider.mjs';
13
13
  export { IconsProvider } from './primitives/Icon/context/IconsProvider.mjs';
14
14
  export { Alert } from './primitives/Alert/Alert.mjs';
15
15
  export { Autocomplete } from './primitives/Autocomplete/Autocomplete.mjs';
16
+ export { Avatar } from './primitives/Avatar/Avatar.mjs';
16
17
  export { Badge } from './primitives/Badge/Badge.mjs';
17
18
  export { Breadcrumbs } from './primitives/Breadcrumbs/Breadcrumbs.mjs';
18
19
  export { Button } from './primitives/Button/Button.mjs';
@@ -6,6 +6,8 @@ export { useColorMode } from './hooks/useTheme.mjs';
6
6
  export { FilterChildren } from './components/FilterChildren/FilterChildren.mjs';
7
7
  export { AlertIcon } from './primitives/Alert/AlertIcon.mjs';
8
8
  export { IconAdd } from './primitives/Icon/icons/IconAdd.mjs';
9
+ export { IconAssistant } from './primitives/Icon/icons/IconAssistant.mjs';
10
+ export { IconAttach } from './primitives/Icon/icons/IconAttach.mjs';
9
11
  export { IconCheckCircleOutline } from './primitives/Icon/icons/IconCheckCircleOutline.mjs';
10
12
  export { IconCheckCircle } from './primitives/Icon/icons/IconCheckCircle.mjs';
11
13
  export { IconCheck } from './primitives/Icon/icons/IconCheck.mjs';
@@ -21,8 +23,10 @@ export { IconInfo } from './primitives/Icon/icons/IconInfo.mjs';
21
23
  export { IconMenu } from './primitives/Icon/icons/IconMenu.mjs';
22
24
  export { IconRemove } from './primitives/Icon/icons/IconRemove.mjs';
23
25
  export { IconSearch } from './primitives/Icon/icons/IconSearch.mjs';
26
+ export { IconSend } from './primitives/Icon/icons/IconSend.mjs';
24
27
  export { IconStar } from './primitives/Icon/icons/IconStar.mjs';
25
28
  export { IconUpload } from './primitives/Icon/icons/IconUpload.mjs';
29
+ export { IconUser } from './primitives/Icon/icons/IconUser.mjs';
26
30
  export { IconVisibilityOff } from './primitives/Icon/icons/IconVisibilityOff.mjs';
27
31
  export { IconVisibility } from './primitives/Icon/icons/IconVisibility.mjs';
28
32
  export { IconWarning } from './primitives/Icon/icons/IconWarning.mjs';
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { classNames, ComponentClassName, classNameModifier } from '@aws-amplify/ui';
3
+ import { primitiveWithForwardRef } from '../utils/primitiveWithForwardRef.mjs';
4
+ import { View } from '../View/View.mjs';
5
+ import '../Icon/Icon.mjs';
6
+ import '../Icon/context/IconsContext.mjs';
7
+ import { useIcons } from '../Icon/context/useIcons.mjs';
8
+ import { IconUser } from '../Icon/icons/IconUser.mjs';
9
+ import { Image } from '../Image/Image.mjs';
10
+
11
+ const AvatarPrimitive = ({ className, children, variation, colorTheme, size, src, alt, ...rest }, ref) => {
12
+ const icons = useIcons('avatar');
13
+ const icon = icons?.user ?? React.createElement(IconUser, null);
14
+ const componentClasses = classNames(ComponentClassName.Avatar, className, classNameModifier(ComponentClassName.Avatar, variation), classNameModifier(ComponentClassName.Avatar, size), classNameModifier(ComponentClassName.Avatar, colorTheme));
15
+ return (React.createElement(View, { as: "span", className: componentClasses, ref: ref, ...rest }, src ? (React.createElement(Image, { className: ComponentClassName.AvatarImage, src: src, alt: alt })) : (children ?? (React.createElement(View, { as: "span", className: ComponentClassName.AvatarIcon, "aria-hidden": "true" }, icon)))));
16
+ };
17
+ /**
18
+ * [📖 Docs](https://ui.docs.amplify.aws/react/components/avatar)
19
+ */
20
+ const Avatar = primitiveWithForwardRef(AvatarPrimitive);
21
+ Avatar.displayName = 'Avatar';
22
+
23
+ export { Avatar };
@@ -0,0 +1,15 @@
1
+ import { classNames, ComponentClassName } from '@aws-amplify/ui';
2
+ import * as React from 'react';
3
+ import { View } from '../../View/View.mjs';
4
+
5
+ /**
6
+ * @internal For internal Amplify UI use only. May be removed in a future release.
7
+ */
8
+ const IconAssistant = (props) => {
9
+ const { className, ...rest } = props;
10
+ return (React.createElement(View, { as: "span", width: "1em", height: "1em", className: classNames(ComponentClassName.Icon, className), ...rest },
11
+ React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.8548 1.40981C12.693 0.801759 11.3069 0.801759 10.1451 1.40981L2.14518 5.59679C0.826447 6.28698 0 7.65232 0 9.14075V16.8593C0 18.3477 0.826447 19.713 2.14518 20.4032L10.1451 24.5902C11.3069 25.1982 12.693 25.1982 13.8548 24.5902L21.8547 20.4032C23.1735 19.713 23.9999 18.3477 23.9999 16.8592V9.14075C23.9999 7.65232 23.1735 6.28698 21.8547 5.59679L13.8548 1.40981ZM12.9258 6.05676C12.5872 5.22732 11.4127 5.22732 11.0741 6.05676L9.42869 10.0877C9.31871 10.3572 9.0968 10.5653 8.82088 10.6579L4.665 12.0519C3.7557 12.3569 3.7557 13.6431 4.665 13.9481L8.82088 15.3421C9.0968 15.4347 9.31871 15.6428 9.42869 15.9123L11.0741 19.9432C11.4127 20.7727 12.5872 20.7727 12.9258 19.9432L14.5712 15.9123C14.6812 15.6428 14.9031 15.4347 15.179 15.3421L19.3349 13.9481C20.2442 13.6431 20.2442 12.3569 19.3349 12.0519L15.179 10.6579C14.9031 10.5653 14.6812 10.3572 14.5712 10.0877L12.9258 6.05676Z", fill: "currentColor" }))));
13
+ };
14
+
15
+ export { IconAssistant };
@@ -0,0 +1,15 @@
1
+ import { classNames, ComponentClassName } from '@aws-amplify/ui';
2
+ import * as React from 'react';
3
+ import { View } from '../../View/View.mjs';
4
+
5
+ /**
6
+ * @internal For internal Amplify UI use only. May be removed in a future release.
7
+ */
8
+ const IconAttach = (props) => {
9
+ const { className, ...rest } = props;
10
+ return (React.createElement(View, { as: "span", width: "1em", height: "1em", className: classNames(ComponentClassName.Icon, className), ...rest },
11
+ React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.3928 1.93491L4.23565 11.8583C2.3257 13.7243 2.3257 16.7379 4.23565 18.6039C6.161 20.4849 9.29378 20.4849 11.2191 18.6039L21.2003 8.85257C22.3571 7.72235 22.3571 5.86149 21.2003 4.73128C20.0748 3.63171 18.2753 3.63857 17.1582 4.74668L7.17456 14.6503C6.86543 14.9523 6.8654 15.4303 7.17454 15.7323C7.49908 16.0494 8.03642 16.0494 8.36095 15.7323L18.338 5.98493L19.9926 7.67849L10.0155 17.4259C8.77102 18.6417 6.76446 18.6417 5.51997 17.4259C4.26127 16.1962 4.26007 14.1915 5.51637 12.9603L15.4908 3.06578C17.5259 1.04696 20.8044 1.03447 22.8548 3.03772C24.9625 5.09681 24.9625 8.48703 22.8548 10.5461L12.8737 20.2975C10.0284 23.0773 5.42639 23.0773 2.58108 20.2975C-0.279632 17.5026 -0.279632 12.9596 2.58108 10.1647L12.7383 0.241356L14.3928 1.93491Z", fill: "currentColor" }))));
13
+ };
14
+
15
+ export { IconAttach };
@@ -0,0 +1,15 @@
1
+ import { classNames, ComponentClassName } from '@aws-amplify/ui';
2
+ import * as React from 'react';
3
+ import { View } from '../../View/View.mjs';
4
+
5
+ /**
6
+ * @internal For internal Amplify UI use only. May be removed in a future release.
7
+ */
8
+ const IconSend = (props) => {
9
+ const { className, ...rest } = props;
10
+ return (React.createElement(View, { as: "span", width: "1em", height: "1em", className: classNames(ComponentClassName.Icon, className), ...rest },
11
+ React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.34374 0.774436C1.72319 0.451324 2.26162 0.393083 2.70138 0.627584L23.173 11.544C23.5704 11.7559 23.8177 12.1704 23.8155 12.6207C23.8133 13.071 23.5618 13.4831 23.1624 13.691L2.69073 24.3477C2.24914 24.5776 1.71196 24.5144 1.33575 24.1884C0.959534 23.8624 0.820634 23.3396 0.98539 22.8698L4.58366 12.6099L0.982433 2.09133C0.821002 1.61982 0.964295 1.09755 1.34374 0.774436ZM6.72819 13.8281L4.29043 20.779L17.6432 13.8281H6.72819ZM17.7477 11.4013H6.735L4.27542 4.21725L17.7477 11.4013Z", fill: "currentColor" }))));
13
+ };
14
+
15
+ export { IconSend };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { classNames, ComponentClassName } from '@aws-amplify/ui';
3
+ import { View } from '../../View/View.mjs';
4
+
5
+ /**
6
+ * @internal For internal Amplify UI use only. May be removed in a future release.
7
+ */
8
+ const IconUser = (props) => {
9
+ const { className, ...rest } = props;
10
+ return (React.createElement(View, { as: "span", width: "1em", height: "1em", className: classNames(ComponentClassName.Icon, className), ...rest },
11
+ React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ React.createElement("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z", fill: "currentColor" }))));
13
+ };
14
+
15
+ export { IconUser };
@@ -2,8 +2,28 @@ import * as React from 'react';
2
2
  import { classNames, ComponentClassName, classNameModifier } from '@aws-amplify/ui';
3
3
  import { View } from '../View/View.mjs';
4
4
  import { primitiveWithForwardRef } from '../utils/primitiveWithForwardRef.mjs';
5
+ import { useComposeRefsCallback } from '../../hooks/useComposeRefsCallback.mjs';
5
6
 
6
- const ScrollViewPrimitive = ({ children, className, orientation, ...rest }, ref) => (React.createElement(View, { className: classNames(ComponentClassName.ScrollView, classNameModifier(ComponentClassName.ScrollView, orientation), className), ref: ref, ...rest }, children));
7
+ const ScrollViewPrimitive = ({ children, className, orientation, autoScroll, ...rest }, externalRef) => {
8
+ const internalRef = React.useRef(null);
9
+ const composedRefs = useComposeRefsCallback({
10
+ externalRef,
11
+ internalRef,
12
+ });
13
+ React.useEffect(() => {
14
+ if (autoScroll) {
15
+ internalRef.current?.scrollTo({
16
+ top: internalRef.current?.scrollHeight,
17
+ left: internalRef.current?.scrollWidth,
18
+ behavior: autoScroll,
19
+ });
20
+ }
21
+ }, [
22
+ children,
23
+ autoScroll,
24
+ ]);
25
+ return (React.createElement(View, { className: classNames(ComponentClassName.ScrollView, classNameModifier(ComponentClassName.ScrollView, orientation), className), ref: composedRefs, ...rest }, children));
26
+ };
7
27
  /**
8
28
  * [📖 Docs](https://ui.docs.amplify.aws/react/components/scrollview)
9
29
  */
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { primitiveWithForwardRef } from '../utils/primitiveWithForwardRef.mjs';
3
+ import { TextArea } from './TextArea.mjs';
4
+ import { useAutoresizeTextArea } from './useAutoresizeTextarea.mjs';
5
+ import { useComposeRefsCallback } from '../../hooks/useComposeRefsCallback.mjs';
6
+
7
+ const AutoresizeTextAreaPrimitive = ({ value, ...rest }, externalRef) => {
8
+ const internalRef = React.useRef(null);
9
+ useAutoresizeTextArea(internalRef.current, value);
10
+ const composedRef = useComposeRefsCallback({
11
+ externalRef,
12
+ internalRef,
13
+ });
14
+ return React.createElement(TextArea, { ...rest, ref: composedRef, value: value });
15
+ };
16
+ const AutoresizeTextArea = primitiveWithForwardRef(AutoresizeTextAreaPrimitive);
17
+ AutoresizeTextArea.displayName = 'AutoresizeTextArea';
18
+
19
+ export { AutoresizeTextArea };