@aws-amplify/ui-react 6.7.0 → 6.7.2

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.
@@ -9900,12 +9900,18 @@ const PrimitiveCatalog = {
9900
9900
  },
9901
9901
  "Placeholder": {
9902
9902
  "properties": {
9903
+ "endColor": {
9904
+ "type": "string"
9905
+ },
9903
9906
  "isLoaded": {
9904
9907
  "type": "boolean"
9905
9908
  },
9906
9909
  "size": {
9907
9910
  "type": "string"
9908
9911
  },
9912
+ "startColor": {
9913
+ "type": "string"
9914
+ },
9909
9915
  "isDisabled": {
9910
9916
  "type": "boolean"
9911
9917
  },
@@ -3,11 +3,16 @@ import { classNames, ComponentClassName, classNameModifier } from '@aws-amplify/
3
3
  import { View } from '../View/View.mjs';
4
4
  import { primitiveWithForwardRef } from '../utils/primitiveWithForwardRef.mjs';
5
5
 
6
- const PlaceholderPrimitive = ({ className, children, isLoaded, size, ...rest }, ref) => {
6
+ const CSS_VAR_START_COLOR = '--amplify-components-placeholder-start-color';
7
+ const CSS_VAR_END_COLOR = '--amplify-components-placeholder-end-color';
8
+ const PlaceholderPrimitive = ({ className, children, endColor, isLoaded, size, startColor, ...rest }, ref) => {
7
9
  if (isLoaded) {
8
10
  return React.createElement(React.Fragment, null, children);
9
11
  }
10
- return (React.createElement(View, { className: classNames(ComponentClassName.Placeholder, classNameModifier(ComponentClassName.Placeholder, size), className), ref: ref, ...rest }));
12
+ return (React.createElement(View, { className: classNames(ComponentClassName.Placeholder, classNameModifier(ComponentClassName.Placeholder, size), className), ref: ref, style: {
13
+ [CSS_VAR_START_COLOR]: startColor && `${startColor}`,
14
+ [CSS_VAR_END_COLOR]: endColor && `${endColor}`,
15
+ }, ...rest }));
11
16
  };
12
17
  /**
13
18
  * [📖 Docs](https://ui.docs.amplify.aws/react/components/placeholder)
@@ -15,4 +20,4 @@ const PlaceholderPrimitive = ({ className, children, isLoaded, size, ...rest },
15
20
  const Placeholder = primitiveWithForwardRef(PlaceholderPrimitive);
16
21
  Placeholder.displayName = 'Placeholder';
17
22
 
18
- export { Placeholder };
23
+ export { CSS_VAR_END_COLOR, CSS_VAR_START_COLOR, Placeholder };
@@ -1,3 +1,3 @@
1
- const VERSION = '6.7.0';
1
+ const VERSION = '6.7.2';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -1581,11 +1581,16 @@ const PhoneNumberFieldPrimitive = ({ autoComplete = 'tel-national', className, d
1581
1581
  const PhoneNumberField = Field.primitiveWithForwardRef(PhoneNumberFieldPrimitive);
1582
1582
  PhoneNumberField.displayName = 'PhoneNumberField';
1583
1583
 
1584
- const PlaceholderPrimitive = ({ className, children, isLoaded, size, ...rest }, ref) => {
1584
+ const CSS_VAR_START_COLOR = '--amplify-components-placeholder-start-color';
1585
+ const CSS_VAR_END_COLOR = '--amplify-components-placeholder-end-color';
1586
+ const PlaceholderPrimitive = ({ className, children, endColor, isLoaded, size, startColor, ...rest }, ref) => {
1585
1587
  if (isLoaded) {
1586
1588
  return React__namespace.createElement(React__namespace.Fragment, null, children);
1587
1589
  }
1588
- return (React__namespace.createElement(Field.View, { className: ui.classNames(ui.ComponentClassName.Placeholder, ui.classNameModifier(ui.ComponentClassName.Placeholder, size), className), ref: ref, ...rest }));
1590
+ return (React__namespace.createElement(Field.View, { className: ui.classNames(ui.ComponentClassName.Placeholder, ui.classNameModifier(ui.ComponentClassName.Placeholder, size), className), ref: ref, style: {
1591
+ [CSS_VAR_START_COLOR]: startColor && `${startColor}`,
1592
+ [CSS_VAR_END_COLOR]: endColor && `${endColor}`,
1593
+ }, ...rest }));
1589
1594
  };
1590
1595
  /**
1591
1596
  * [📖 Docs](https://ui.docs.amplify.aws/react/components/placeholder)
@@ -2482,7 +2487,7 @@ const defaultDeleteUserDisplayText = {
2482
2487
  warningText: 'Deleting your account is not reversible. You will lose access to your account and all data associated with it.',
2483
2488
  };
2484
2489
 
2485
- const VERSION = '6.7.0';
2490
+ const VERSION = '6.7.2';
2486
2491
 
2487
2492
  const logger$2 = ui.getLogger('AccountSettings');
2488
2493
  const getIsDisabled = (formValues, validationError) => {
package/dist/internal.js CHANGED
@@ -10123,12 +10123,18 @@ const PrimitiveCatalog = {
10123
10123
  },
10124
10124
  "Placeholder": {
10125
10125
  "properties": {
10126
+ "endColor": {
10127
+ "type": "string"
10128
+ },
10126
10129
  "isLoaded": {
10127
10130
  "type": "boolean"
10128
10131
  },
10129
10132
  "size": {
10130
10133
  "type": "string"
10131
10134
  },
10135
+ "startColor": {
10136
+ "type": "string"
10137
+ },
10132
10138
  "isDisabled": {
10133
10139
  "type": "boolean"
10134
10140
  },
@@ -89,12 +89,16 @@
89
89
  flex-direction: row;
90
90
  align-items: flex-start;
91
91
  gap: var(--amplify-components-ai-conversation-form-gap);
92
- padding: var(--amplify-components-ai-conversation-form-padding);
93
92
  }
94
93
  .amplify-ai-conversation__form__dropzone {
95
94
  text-align: initial;
96
95
  border: none;
96
+ padding: var(--amplify-components-ai-conversation-form-padding);
97
+ }
98
+ .amplify-ai-conversation__form__error {
97
99
  padding: 0;
100
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
101
+ gap: var(--amplify-components-ai-conversation-attachment-gap);
98
102
  }
99
103
  .amplify-ai-conversation__attachment {
100
104
  display: flex;
@@ -114,7 +118,7 @@
114
118
  flex-direction: row;
115
119
  flex-wrap: wrap;
116
120
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
117
- padding-block-start: var(--amplify-components-ai-conversation-attachment-padding-block-start);
121
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
118
122
  }
119
123
  .amplify-ai-conversation__attachment__image {
120
124
  width: var(--amplify-components-ai-conversation-attachment-image-width);
@@ -90,12 +90,16 @@
90
90
  flex-direction: row;
91
91
  align-items: flex-start;
92
92
  gap: var(--amplify-components-ai-conversation-form-gap);
93
- padding: var(--amplify-components-ai-conversation-form-padding);
94
93
  }
95
94
  .amplify-ai-conversation__form__dropzone {
96
95
  text-align: initial;
97
96
  border: none;
97
+ padding: var(--amplify-components-ai-conversation-form-padding);
98
+ }
99
+ .amplify-ai-conversation__form__error {
98
100
  padding: 0;
101
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
102
+ gap: var(--amplify-components-ai-conversation-attachment-gap);
99
103
  }
100
104
  .amplify-ai-conversation__attachment {
101
105
  display: flex;
@@ -115,7 +119,7 @@
115
119
  flex-direction: row;
116
120
  flex-wrap: wrap;
117
121
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
118
- padding-block-start: var(--amplify-components-ai-conversation-attachment-padding-block-start);
122
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
119
123
  }
120
124
  .amplify-ai-conversation__attachment__image {
121
125
  width: var(--amplify-components-ai-conversation-attachment-image-width);
package/dist/styles.css CHANGED
@@ -6842,12 +6842,16 @@ html[dir=rtl] .amplify-field-group__inner-start {
6842
6842
  flex-direction: row;
6843
6843
  align-items: flex-start;
6844
6844
  gap: var(--amplify-components-ai-conversation-form-gap);
6845
- padding: var(--amplify-components-ai-conversation-form-padding);
6846
6845
  }
6847
6846
  .amplify-ai-conversation__form__dropzone {
6848
6847
  text-align: initial;
6849
6848
  border: none;
6849
+ padding: var(--amplify-components-ai-conversation-form-padding);
6850
+ }
6851
+ .amplify-ai-conversation__form__error {
6850
6852
  padding: 0;
6853
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6854
+ gap: var(--amplify-components-ai-conversation-attachment-gap);
6851
6855
  }
6852
6856
  .amplify-ai-conversation__attachment {
6853
6857
  display: flex;
@@ -6867,7 +6871,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6867
6871
  flex-direction: row;
6868
6872
  flex-wrap: wrap;
6869
6873
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
6870
- padding-block-start: var(--amplify-components-ai-conversation-attachment-padding-block-start);
6874
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6871
6875
  }
6872
6876
  .amplify-ai-conversation__attachment__image {
6873
6877
  width: var(--amplify-components-ai-conversation-attachment-image-width);
@@ -6843,12 +6843,16 @@ html[dir=rtl] .amplify-field-group__inner-start {
6843
6843
  flex-direction: row;
6844
6844
  align-items: flex-start;
6845
6845
  gap: var(--amplify-components-ai-conversation-form-gap);
6846
- padding: var(--amplify-components-ai-conversation-form-padding);
6847
6846
  }
6848
6847
  .amplify-ai-conversation__form__dropzone {
6849
6848
  text-align: initial;
6850
6849
  border: none;
6850
+ padding: var(--amplify-components-ai-conversation-form-padding);
6851
+ }
6852
+ .amplify-ai-conversation__form__error {
6851
6853
  padding: 0;
6854
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6855
+ gap: var(--amplify-components-ai-conversation-attachment-gap);
6852
6856
  }
6853
6857
  .amplify-ai-conversation__attachment {
6854
6858
  display: flex;
@@ -6868,7 +6872,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6868
6872
  flex-direction: row;
6869
6873
  flex-wrap: wrap;
6870
6874
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
6871
- padding-block-start: var(--amplify-components-ai-conversation-attachment-padding-block-start);
6875
+ padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6872
6876
  }
6873
6877
  .amplify-ai-conversation__attachment__image {
6874
6878
  width: var(--amplify-components-ai-conversation-attachment-image-width);
@@ -1,4 +1,6 @@
1
1
  import { BasePlaceholderProps, ForwardRefPrimitive } from '../types';
2
+ export declare const CSS_VAR_START_COLOR: string;
3
+ export declare const CSS_VAR_END_COLOR: string;
2
4
  /**
3
5
  * [📖 Docs](https://ui.docs.amplify.aws/react/components/placeholder)
4
6
  */
@@ -1,8 +1,15 @@
1
+ import { Property } from 'csstype';
1
2
  import { Sizes } from './base';
3
+ import { StyleToken } from './style';
2
4
  import { ElementType, PrimitiveProps, BaseViewProps } from './view';
3
5
  export type PlaceholderSizes = Sizes;
4
6
  /** @deprecated For internal use only */
5
7
  export interface BasePlaceholderProps extends BaseViewProps {
8
+ /**
9
+ * @description
10
+ * This property will change the animation end color of the placeholder component
11
+ */
12
+ endColor?: StyleToken<Property.Color>;
6
13
  /**
7
14
  * @description
8
15
  * If true, the placeholder won't show, if false the placeholder will show.
@@ -15,5 +22,10 @@ export interface BasePlaceholderProps extends BaseViewProps {
15
22
  * Controls the display size of placeholder
16
23
  */
17
24
  size?: PlaceholderSizes;
25
+ /**
26
+ * @description
27
+ * This property will change the animation start color of the placeholder component
28
+ */
29
+ startColor?: StyleToken<Property.Color>;
18
30
  }
19
31
  export type PlaceholderProps<Element extends ElementType = 'div'> = PrimitiveProps<BasePlaceholderProps, Element>;
@@ -1 +1 @@
1
- export declare const VERSION = "6.7.0";
1
+ export declare const VERSION = "6.7.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "6.7.0",
3
+ "version": "6.7.2",
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.7.0",
59
- "@aws-amplify/ui-react-core": "3.1.0",
58
+ "@aws-amplify/ui": "6.7.2",
59
+ "@aws-amplify/ui-react-core": "3.1.2",
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",