@aws-amplify/ui-react 6.5.4 → 6.6.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.
@@ -22,10 +22,6 @@ function _interopNamespace(e) {
22
22
 
23
23
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
24
24
 
25
- /**
26
- * @experimental
27
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
28
- */
29
25
  const Style = ({ cssText, ...rest }) => {
30
26
  /*
31
27
  Only inject theme CSS variables if given a theme.
@@ -81,10 +77,6 @@ const Style = ({ cssText, ...rest }) => {
81
77
  };
82
78
  Style.displayName = 'Style';
83
79
 
84
- /**
85
- * @experimental
86
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
87
- */
88
80
  const ThemeStyle = ({ theme, ...rest }) => {
89
81
  if (!theme)
90
82
  return null;
@@ -14,7 +14,11 @@ const SignInSignUpTabs = ({ className, hideSignUp, variation, }) => {
14
14
  context.toSignIn,
15
15
  context.toSignUp,
16
16
  ]);
17
- return (React__default.createElement(RouteContainer, { className: className, variation: variation }, hideSignUp ? (React__default.createElement(View, { "data-amplify-router-content": "" }, route === 'signIn' && React__default.createElement(SignIn, null))) : (React__default.createElement(Tabs.Container, { value: route, isLazy: true, onValueChange: () => (route === 'signIn' ? toSignUp() : toSignIn()) },
17
+ return (React__default.createElement(RouteContainer, { className: className, variation: variation }, hideSignUp ? (React__default.createElement(View, { "data-amplify-router-content": "" }, route === 'signIn' && React__default.createElement(SignIn, null))) : (React__default.createElement(Tabs.Container, { value: route, isLazy: true, onValueChange: (newRoute) => {
18
+ if (newRoute !== route) {
19
+ newRoute === 'signIn' ? toSignIn() : toSignUp();
20
+ }
21
+ } },
18
22
  React__default.createElement(Tabs.List, { spacing: "equal", indicatorPosition: "top" },
19
23
  React__default.createElement(Tabs.Item, { value: "signIn" }, getSignInTabText()),
20
24
  React__default.createElement(Tabs.Item, { value: "signUp" }, getSignUpTabText())),
@@ -2,10 +2,6 @@ import * as React from 'react';
2
2
  import { createComponentCSS } from '@aws-amplify/ui';
3
3
  import { Style } from './Style.mjs';
4
4
 
5
- /**
6
- * @experimental
7
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
8
- */
9
5
  const ComponentStyle = ({ theme, componentThemes = [], ...rest }) => {
10
6
  if (!theme || !componentThemes.length) {
11
7
  return null;
@@ -2,10 +2,6 @@ import * as React from 'react';
2
2
  import { createGlobalCSS } from '@aws-amplify/ui';
3
3
  import { Style } from './Style.mjs';
4
4
 
5
- /**
6
- * @experimental
7
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
8
- */
9
5
  const GlobalStyle = ({ styles, ...rest }) => {
10
6
  if (!styles) {
11
7
  return null;
@@ -1,9 +1,5 @@
1
1
  import * as React from 'react';
2
2
 
3
- /**
4
- * @experimental
5
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
6
- */
7
3
  const Style = ({ cssText, ...rest }) => {
8
4
  /*
9
5
  Only inject theme CSS variables if given a theme.
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Style } from './Style.mjs';
3
3
 
4
- /**
5
- * @experimental
6
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
7
- */
8
4
  const ThemeStyle = ({ theme, ...rest }) => {
9
5
  if (!theme)
10
6
  return null;
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
4
4
  const useAutoresizeTextArea = (textAreaRef, value) => {
5
5
  useEffect(() => {
6
6
  const resizeTextArea = () => {
7
- if (textAreaRef && value) {
7
+ if (textAreaRef) {
8
8
  // We need to reset the height momentarily to get the correct scrollHeight for the textarea
9
9
  textAreaRef.style.height = 'auto';
10
10
  const { scrollHeight } = textAreaRef;
@@ -1,3 +1,3 @@
1
- const VERSION = '6.5.4';
1
+ const VERSION = '6.6.0';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var RadixSlider = require('@radix-ui/react-slider');
14
14
  var QRCode = require('qrcode');
15
15
  var utils = require('aws-amplify/utils');
16
16
  var RadixDirection = require('@radix-ui/react-direction');
17
- var ThemeStyle = require('./ThemeStyle-CgfvQJ7V.js');
17
+ var ThemeStyle = require('./ThemeStyle-DA2-Clfz.js');
18
18
  require('@aws-amplify/core');
19
19
  require('aws-amplify/auth');
20
20
 
@@ -2254,7 +2254,7 @@ TextArea.displayName = 'TextArea';
2254
2254
  const useAutoresizeTextArea = (textAreaRef, value) => {
2255
2255
  React.useEffect(() => {
2256
2256
  const resizeTextArea = () => {
2257
- if (textAreaRef && value) {
2257
+ if (textAreaRef) {
2258
2258
  // We need to reset the height momentarily to get the correct scrollHeight for the textarea
2259
2259
  textAreaRef.style.height = 'auto';
2260
2260
  const { scrollHeight } = textAreaRef;
@@ -2521,7 +2521,7 @@ const defaultDeleteUserDisplayText = {
2521
2521
  warningText: 'Deleting your account is not reversible. You will lose access to your account and all data associated with it.',
2522
2522
  };
2523
2523
 
2524
- const VERSION = '6.5.4';
2524
+ const VERSION = '6.6.0';
2525
2525
 
2526
2526
  const logger$2 = ui.getLogger('AccountSettings');
2527
2527
  const getIsDisabled = (formValues, validationError) => {
@@ -3172,7 +3172,11 @@ const SignInSignUpTabs = ({ className, hideSignUp, variation, }) => {
3172
3172
  context.toSignIn,
3173
3173
  context.toSignUp,
3174
3174
  ]);
3175
- return (React__namespace["default"].createElement(RouteContainer, { className: className, variation: variation }, hideSignUp ? (React__namespace["default"].createElement(Field.View, { "data-amplify-router-content": "" }, route === 'signIn' && React__namespace["default"].createElement(SignIn, null))) : (React__namespace["default"].createElement(Tabs.Container, { value: route, isLazy: true, onValueChange: () => (route === 'signIn' ? toSignUp() : toSignIn()) },
3175
+ return (React__namespace["default"].createElement(RouteContainer, { className: className, variation: variation }, hideSignUp ? (React__namespace["default"].createElement(Field.View, { "data-amplify-router-content": "" }, route === 'signIn' && React__namespace["default"].createElement(SignIn, null))) : (React__namespace["default"].createElement(Tabs.Container, { value: route, isLazy: true, onValueChange: (newRoute) => {
3176
+ if (newRoute !== route) {
3177
+ newRoute === 'signIn' ? toSignIn() : toSignUp();
3178
+ }
3179
+ } },
3176
3180
  React__namespace["default"].createElement(Tabs.List, { spacing: "equal", indicatorPosition: "top" },
3177
3181
  React__namespace["default"].createElement(Tabs.Item, { value: "signIn" }, getSignInTabText()),
3178
3182
  React__namespace["default"].createElement(Tabs.Item, { value: "signUp" }, getSignUpTabText())),
package/dist/server.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var ThemeStyle = require('./ThemeStyle-CgfvQJ7V.js');
5
+ var ThemeStyle = require('./ThemeStyle-DA2-Clfz.js');
6
6
  var React = require('react');
7
7
  var ui = require('@aws-amplify/ui');
8
8
 
@@ -26,10 +26,6 @@ function _interopNamespace(e) {
26
26
 
27
27
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
28
 
29
- /**
30
- * @experimental
31
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
32
- */
33
29
  const ComponentStyle = ({ theme, componentThemes = [], ...rest }) => {
34
30
  if (!theme || !componentThemes.length) {
35
31
  return null;
@@ -42,10 +38,6 @@ const ComponentStyle = ({ theme, componentThemes = [], ...rest }) => {
42
38
  };
43
39
  ComponentStyle.displayName = 'ComponentStyle';
44
40
 
45
- /**
46
- * @experimental
47
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
48
- */
49
41
  const GlobalStyle = ({ styles, ...rest }) => {
50
42
  if (!styles) {
51
43
  return null;
@@ -41,6 +41,7 @@
41
41
  }
42
42
  .amplify-ai-conversation__message__body {
43
43
  display: flex;
44
+ flex: 1;
44
45
  flex-direction: column;
45
46
  align-items: var(--internal-body-align-items);
46
47
  gap: var(--amplify-components-ai-conversation-message-body-gap);
@@ -49,10 +50,20 @@
49
50
  background-color: var(--internal-content-bg);
50
51
  border-radius: var(--amplify-radii-medium);
51
52
  padding: var(--internal-content-padding);
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: var(--amplify-space-small);
56
+ }
57
+ .amplify-ai-conversation__message__text {
58
+ display: block;
59
+ }
60
+ .amplify-ai-conversation__message__image {
61
+ max-width: 25%;
52
62
  }
53
63
  .amplify-ai-conversation__message__actions {
54
64
  display: flex;
55
65
  flex-direction: row;
66
+ gap: var(--amplify-components-ai-conversation-message-actions-gap);
56
67
  }
57
68
  .amplify-ai-conversation__message--bubble {
58
69
  --internal-content-bg: var(--internal-bg-color);
@@ -42,6 +42,7 @@
42
42
  }
43
43
  .amplify-ai-conversation__message__body {
44
44
  display: flex;
45
+ flex: 1;
45
46
  flex-direction: column;
46
47
  align-items: var(--internal-body-align-items);
47
48
  gap: var(--amplify-components-ai-conversation-message-body-gap);
@@ -50,10 +51,20 @@
50
51
  background-color: var(--internal-content-bg);
51
52
  border-radius: var(--amplify-radii-medium);
52
53
  padding: var(--internal-content-padding);
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: var(--amplify-space-small);
57
+ }
58
+ .amplify-ai-conversation__message__text {
59
+ display: block;
60
+ }
61
+ .amplify-ai-conversation__message__image {
62
+ max-width: 25%;
53
63
  }
54
64
  .amplify-ai-conversation__message__actions {
55
65
  display: flex;
56
66
  flex-direction: row;
67
+ gap: var(--amplify-components-ai-conversation-message-actions-gap);
57
68
  }
58
69
  .amplify-ai-conversation__message--bubble {
59
70
  --internal-content-bg: var(--internal-bg-color);
@@ -40,6 +40,7 @@
40
40
  --amplify-components-ai-conversation-message-sender-timestamp-font-size: inherit;
41
41
  --amplify-components-ai-conversation-message-sender-timestamp-font-weight: inherit;
42
42
  --amplify-components-ai-conversation-message-body-gap: var(--amplify-space-xs);
43
+ --amplify-components-ai-conversation-message-actions-gap: var(--amplify-space-xs);
43
44
  --amplify-components-ai-conversation-form-gap: var(--amplify-space-small);
44
45
  --amplify-components-ai-conversation-form-padding: var(--amplify-space-small);
45
46
  --amplify-components-ai-conversation-attachment-border-color: var(--amplify-colors-border-secondary);
@@ -41,6 +41,7 @@
41
41
  --amplify-components-ai-conversation-message-sender-timestamp-font-size: inherit;
42
42
  --amplify-components-ai-conversation-message-sender-timestamp-font-weight: inherit;
43
43
  --amplify-components-ai-conversation-message-body-gap: var(--amplify-space-xs);
44
+ --amplify-components-ai-conversation-message-actions-gap: var(--amplify-space-xs);
44
45
  --amplify-components-ai-conversation-form-gap: var(--amplify-space-small);
45
46
  --amplify-components-ai-conversation-form-padding: var(--amplify-space-small);
46
47
  --amplify-components-ai-conversation-attachment-border-color: var(--amplify-colors-border-secondary);
package/dist/styles.css CHANGED
@@ -40,6 +40,7 @@
40
40
  --amplify-components-ai-conversation-message-sender-timestamp-font-size: inherit;
41
41
  --amplify-components-ai-conversation-message-sender-timestamp-font-weight: inherit;
42
42
  --amplify-components-ai-conversation-message-body-gap: var(--amplify-space-xs);
43
+ --amplify-components-ai-conversation-message-actions-gap: var(--amplify-space-xs);
43
44
  --amplify-components-ai-conversation-form-gap: var(--amplify-space-small);
44
45
  --amplify-components-ai-conversation-form-padding: var(--amplify-space-small);
45
46
  --amplify-components-ai-conversation-attachment-border-color: var(--amplify-colors-border-secondary);
@@ -6642,6 +6643,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6642
6643
  }
6643
6644
  .amplify-ai-conversation__message__body {
6644
6645
  display: flex;
6646
+ flex: 1;
6645
6647
  flex-direction: column;
6646
6648
  align-items: var(--internal-body-align-items);
6647
6649
  gap: var(--amplify-components-ai-conversation-message-body-gap);
@@ -6650,10 +6652,20 @@ html[dir=rtl] .amplify-field-group__inner-start {
6650
6652
  background-color: var(--internal-content-bg);
6651
6653
  border-radius: var(--amplify-radii-medium);
6652
6654
  padding: var(--internal-content-padding);
6655
+ display: flex;
6656
+ flex-direction: column;
6657
+ gap: var(--amplify-space-small);
6658
+ }
6659
+ .amplify-ai-conversation__message__text {
6660
+ display: block;
6661
+ }
6662
+ .amplify-ai-conversation__message__image {
6663
+ max-width: 25%;
6653
6664
  }
6654
6665
  .amplify-ai-conversation__message__actions {
6655
6666
  display: flex;
6656
6667
  flex-direction: row;
6668
+ gap: var(--amplify-components-ai-conversation-message-actions-gap);
6657
6669
  }
6658
6670
  .amplify-ai-conversation__message--bubble {
6659
6671
  --internal-content-bg: var(--internal-bg-color);
@@ -41,6 +41,7 @@
41
41
  --amplify-components-ai-conversation-message-sender-timestamp-font-size: inherit;
42
42
  --amplify-components-ai-conversation-message-sender-timestamp-font-weight: inherit;
43
43
  --amplify-components-ai-conversation-message-body-gap: var(--amplify-space-xs);
44
+ --amplify-components-ai-conversation-message-actions-gap: var(--amplify-space-xs);
44
45
  --amplify-components-ai-conversation-form-gap: var(--amplify-space-small);
45
46
  --amplify-components-ai-conversation-form-padding: var(--amplify-space-small);
46
47
  --amplify-components-ai-conversation-attachment-border-color: var(--amplify-colors-border-secondary);
@@ -6643,6 +6644,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6643
6644
  }
6644
6645
  .amplify-ai-conversation__message__body {
6645
6646
  display: flex;
6647
+ flex: 1;
6646
6648
  flex-direction: column;
6647
6649
  align-items: var(--internal-body-align-items);
6648
6650
  gap: var(--amplify-components-ai-conversation-message-body-gap);
@@ -6651,10 +6653,20 @@ html[dir=rtl] .amplify-field-group__inner-start {
6651
6653
  background-color: var(--internal-content-bg);
6652
6654
  border-radius: var(--amplify-radii-medium);
6653
6655
  padding: var(--internal-content-padding);
6656
+ display: flex;
6657
+ flex-direction: column;
6658
+ gap: var(--amplify-space-small);
6659
+ }
6660
+ .amplify-ai-conversation__message__text {
6661
+ display: block;
6662
+ }
6663
+ .amplify-ai-conversation__message__image {
6664
+ max-width: 25%;
6654
6665
  }
6655
6666
  .amplify-ai-conversation__message__actions {
6656
6667
  display: flex;
6657
6668
  flex-direction: row;
6669
+ gap: var(--amplify-components-ai-conversation-message-actions-gap);
6658
6670
  }
6659
6671
  .amplify-ai-conversation__message--bubble {
6660
6672
  --internal-content-bg: var(--internal-bg-color);
@@ -11,10 +11,6 @@ interface ComponentStyleProps extends React.ComponentProps<'style'> {
11
11
  theme: Pick<WebTheme, 'name' | 'breakpoints' | 'tokens'>;
12
12
  componentThemes: BaseComponentTheme[];
13
13
  }
14
- /**
15
- * @experimental
16
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
17
- */
18
14
  export declare const ComponentStyle: {
19
15
  ({ theme, componentThemes, ...rest }: ComponentStyleProps): JSX.Element | null;
20
16
  displayName: string;
@@ -9,10 +9,6 @@ interface GlobalStyleProps extends React.ComponentProps<'style'> {
9
9
  nonce?: string;
10
10
  styles: Parameters<typeof createGlobalCSS>[0];
11
11
  }
12
- /**
13
- * @experimental
14
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
15
- */
16
12
  export declare const GlobalStyle: {
17
13
  ({ styles, ...rest }: GlobalStyleProps): JSX.Element | null;
18
14
  displayName: string;
@@ -2,10 +2,6 @@ import * as React from 'react';
2
2
  interface StyleProps extends React.ComponentProps<'style'> {
3
3
  cssText?: string;
4
4
  }
5
- /**
6
- * @experimental
7
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
8
- */
9
5
  export declare const Style: {
10
6
  ({ cssText, ...rest }: StyleProps): JSX.Element | null;
11
7
  displayName: string;
@@ -9,10 +9,6 @@ interface ThemeStyleProps extends React.ComponentProps<'style'> {
9
9
  nonce?: string;
10
10
  theme?: WebTheme;
11
11
  }
12
- /**
13
- * @experimental
14
- * [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
15
- */
16
12
  export declare const ThemeStyle: {
17
13
  ({ theme, ...rest }: ThemeStyleProps): JSX.Element | null;
18
14
  displayName: string;
@@ -1 +1 @@
1
- export declare const VERSION = "6.5.4";
1
+ export declare const VERSION = "6.6.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "6.5.4",
3
+ "version": "6.6.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -55,8 +55,8 @@
55
55
  "typecheck": "tsc --noEmit"
56
56
  },
57
57
  "dependencies": {
58
- "@aws-amplify/ui": "6.6.4",
59
- "@aws-amplify/ui-react-core": "3.0.28",
58
+ "@aws-amplify/ui": "6.6.6",
59
+ "@aws-amplify/ui-react-core": "3.0.30",
60
60
  "@radix-ui/react-direction": "1.0.0",
61
61
  "@radix-ui/react-dropdown-menu": "1.0.0",
62
62
  "@radix-ui/react-slider": "1.0.0",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@aws-amplify/core": "*",
70
- "aws-amplify": "^6.6.0",
70
+ "aws-amplify": "^6.6.5",
71
71
  "react": "^16.14.0 || ^17.0 || ^18.0",
72
72
  "react-dom": "^16.14.0 || ^17.0 || ^18.0"
73
73
  },