@aws-amplify/ui-react 6.7.1 → 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.
- package/dist/esm/PrimitiveCatalog.mjs +6 -0
- package/dist/esm/primitives/Placeholder/Placeholder.mjs +8 -3
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +8 -3
- package/dist/internal.js +6 -0
- package/dist/types/primitives/Placeholder/Placeholder.d.ts +2 -0
- package/dist/types/primitives/types/placeholder.d.ts +12 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -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
|
|
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,
|
|
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 };
|
package/dist/esm/version.mjs
CHANGED
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
|
|
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,
|
|
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.
|
|
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
|
},
|
|
@@ -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>;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "6.7.
|
|
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.
|
|
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.
|
|
59
|
-
"@aws-amplify/ui-react-core": "3.1.
|
|
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",
|