@aws-amplify/ui-react 6.3.1 → 6.5.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/{ThemeStyle-b2dce96a.js → ThemeStyle-1fee4302.js} +19 -10
- package/dist/esm/PrimitiveCatalog.mjs +3 -0
- package/dist/esm/components/ThemeProvider/ComponentStyle.mjs +23 -0
- package/dist/esm/components/ThemeProvider/Style.mjs +64 -0
- package/dist/esm/components/ThemeProvider/ThemeStyle.mjs +2 -53
- package/dist/esm/primitives/Avatar/Avatar.mjs +5 -2
- package/dist/esm/server.mjs +1 -0
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +6 -4
- package/dist/internal.js +3 -0
- package/dist/server.js +49 -13
- package/dist/styles/avatar.css +20 -0
- package/dist/styles/avatar.layer.css +20 -0
- package/dist/styles/breadcrumbs.css +4 -2
- package/dist/styles/breadcrumbs.layer.css +4 -2
- package/dist/styles/button.css +19 -10
- package/dist/styles/button.layer.css +19 -10
- package/dist/styles/input.css +3 -2
- package/dist/styles/input.layer.css +3 -2
- package/dist/styles/link.css +10 -5
- package/dist/styles/link.layer.css +10 -5
- package/dist/styles/reset.css +4 -1
- package/dist/styles/reset.layer.css +4 -1
- package/dist/styles/sliderField.css +3 -2
- package/dist/styles/sliderField.layer.css +3 -2
- package/dist/styles/textArea.css +3 -2
- package/dist/styles/textArea.layer.css +3 -2
- package/dist/styles.css +62 -23
- package/dist/styles.layer.css +62 -23
- package/dist/types/components/ThemeProvider/ComponentStyle.d.ts +20 -0
- package/dist/types/components/ThemeProvider/Style.d.ts +11 -0
- package/dist/types/primitives/Avatar/types.d.ts +5 -0
- package/dist/types/server.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -23,10 +23,7 @@ function _interopNamespace(e) {
|
|
|
23
23
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
if (!theme)
|
|
28
|
-
return null;
|
|
29
|
-
const { name, cssText } = theme;
|
|
26
|
+
const StylePrimitive = ({ cssText, ...rest }, ref) => {
|
|
30
27
|
/*
|
|
31
28
|
Only inject theme CSS variables if given a theme.
|
|
32
29
|
The CSS file users import already has the default theme variables in it.
|
|
@@ -72,14 +69,25 @@ const ThemeStylePrimitive = ({ theme, nonce, ...rest }, ref) => {
|
|
|
72
69
|
Therefore, by only rendering CSS text which does not include a closing '</style>' tag,
|
|
73
70
|
we ensure that the browser will correctly interpret all the text as CSS.
|
|
74
71
|
*/
|
|
75
|
-
if (/<\/style/i.test(cssText)) {
|
|
72
|
+
if (cssText === undefined || /<\/style/i.test(cssText)) {
|
|
76
73
|
return null;
|
|
77
74
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
return (React__namespace.createElement("style", { ...rest, ref: ref,
|
|
76
|
+
// eslint-disable-next-line react/no-danger
|
|
77
|
+
dangerouslySetInnerHTML: { __html: cssText } }));
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* @experimental
|
|
81
|
+
* [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
|
|
82
|
+
*/
|
|
83
|
+
const Style = primitiveWithForwardRef.primitiveWithForwardRef(StylePrimitive);
|
|
84
|
+
Style.displayName = 'Style';
|
|
85
|
+
|
|
86
|
+
const ThemeStylePrimitive = ({ theme, nonce, ...rest }, ref) => {
|
|
87
|
+
if (!theme)
|
|
88
|
+
return null;
|
|
89
|
+
const { name, cssText } = theme;
|
|
90
|
+
return (React__namespace.createElement(Style, { ...rest, ref: ref, cssText: cssText, nonce: nonce, id: `amplify-theme-${name}` }));
|
|
83
91
|
};
|
|
84
92
|
/**
|
|
85
93
|
* @experimental
|
|
@@ -88,4 +96,5 @@ const ThemeStylePrimitive = ({ theme, nonce, ...rest }, ref) => {
|
|
|
88
96
|
const ThemeStyle = primitiveWithForwardRef.primitiveWithForwardRef(ThemeStylePrimitive);
|
|
89
97
|
ThemeStyle.displayName = 'ThemeStyle';
|
|
90
98
|
|
|
99
|
+
exports.Style = Style;
|
|
91
100
|
exports.ThemeStyle = ThemeStyle;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponentCSS } from '@aws-amplify/ui';
|
|
3
|
+
import { primitiveWithForwardRef } from '../../primitives/utils/primitiveWithForwardRef.mjs';
|
|
4
|
+
import { Style } from './Style.mjs';
|
|
5
|
+
|
|
6
|
+
const ComponentStylePrimitive = ({ theme, componentThemes = [], ...rest }, ref) => {
|
|
7
|
+
if (!theme || !componentThemes.length) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const cssText = createComponentCSS({
|
|
11
|
+
theme,
|
|
12
|
+
components: componentThemes,
|
|
13
|
+
});
|
|
14
|
+
return React.createElement(Style, { ...rest, ref: ref, cssText: cssText });
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @experimental
|
|
18
|
+
* [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
|
|
19
|
+
*/
|
|
20
|
+
const ComponentStyle = primitiveWithForwardRef(ComponentStylePrimitive);
|
|
21
|
+
ComponentStyle.displayName = 'ComponentStyle';
|
|
22
|
+
|
|
23
|
+
export { ComponentStyle };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { primitiveWithForwardRef } from '../../primitives/utils/primitiveWithForwardRef.mjs';
|
|
3
|
+
|
|
4
|
+
const StylePrimitive = ({ cssText, ...rest }, ref) => {
|
|
5
|
+
/*
|
|
6
|
+
Only inject theme CSS variables if given a theme.
|
|
7
|
+
The CSS file users import already has the default theme variables in it.
|
|
8
|
+
This will allow users to use the provider and theme with CSS variables
|
|
9
|
+
without having to worry about specificity issues because this stylesheet
|
|
10
|
+
will likely come after a user's defined CSS.
|
|
11
|
+
|
|
12
|
+
Q: Why are we using dangerouslySetInnerHTML?
|
|
13
|
+
A: We need to directly inject the theme's CSS string into the <style> tag without typical HTML escaping.
|
|
14
|
+
For example, JSX would escape characters meaningful in CSS such as ', ", < and >, thus breaking the CSS.
|
|
15
|
+
Q: Why not use a sanitization library such as DOMPurify?
|
|
16
|
+
A: For our use case, we specifically want to purify CSS text, *not* HTML.
|
|
17
|
+
DOMPurify, as well as any other HTML sanitization library, would escape/encode meaningful CSS characters
|
|
18
|
+
and break our CSS in the same way that JSX would.
|
|
19
|
+
|
|
20
|
+
Q: Are there any security risks in this particular use case?
|
|
21
|
+
A: Anything set inside of a <style> tag is always interpreted as CSS text, *not* HTML.
|
|
22
|
+
Reference: “Restrictions on the content of raw text elements” https://html.spec.whatwg.org/dev/syntax.html#cdata-rcdata-restrictions
|
|
23
|
+
And in our case, we are using dangerouslySetInnerHTML to set CSS text inside of a <style> tag.
|
|
24
|
+
|
|
25
|
+
Thus, it really comes down to the question: Could a malicious user escape from the context of the <style> tag?
|
|
26
|
+
For example, when inserting HTML into the DOM, could someone prematurely close the </style> tag and add a <script> tag?
|
|
27
|
+
e.g., </style><script>alert('hello')</script>
|
|
28
|
+
The answer depends on whether the code is rendered on the client or server side.
|
|
29
|
+
|
|
30
|
+
Client side
|
|
31
|
+
- To prevent XSS inside of the <style> tag, we need to make sure it's not closed prematurely.
|
|
32
|
+
- This is prevented by React because React creates a style DOM node (e.g., React.createElement(‘style’, ...)), and directly sets innerHTML as a string.
|
|
33
|
+
- Even if the string contains a closing </style> tag, it will still be interpreted as CSS text by the browser.
|
|
34
|
+
- Therefore, there is not an XSS vulnerability on the client side.
|
|
35
|
+
|
|
36
|
+
Server side
|
|
37
|
+
- When React code is rendered on the server side (e.g., NextJS), the code is sent to the browser as HTML text.
|
|
38
|
+
- Therefore, it *IS* possible to insert a closing </style> tag and escape the CSS context, which opens an XSS vulnerability.
|
|
39
|
+
|
|
40
|
+
Q: How are we mitigating the potential attack vector?
|
|
41
|
+
A: To fix this potential attack vector on the server side, we need to filter out any closing </style> tags,
|
|
42
|
+
as this the only way to escape from the context of the browser interpreting the text as CSS.
|
|
43
|
+
We also need to catch cases where there is any kind of whitespace character </style[HERE]>, such as tabs, carriage returns, etc:
|
|
44
|
+
</style
|
|
45
|
+
|
|
46
|
+
>
|
|
47
|
+
Therefore, by only rendering CSS text which does not include a closing '</style>' tag,
|
|
48
|
+
we ensure that the browser will correctly interpret all the text as CSS.
|
|
49
|
+
*/
|
|
50
|
+
if (cssText === undefined || /<\/style/i.test(cssText)) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return (React.createElement("style", { ...rest, ref: ref,
|
|
54
|
+
// eslint-disable-next-line react/no-danger
|
|
55
|
+
dangerouslySetInnerHTML: { __html: cssText } }));
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @experimental
|
|
59
|
+
* [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
|
|
60
|
+
*/
|
|
61
|
+
const Style = primitiveWithForwardRef(StylePrimitive);
|
|
62
|
+
Style.displayName = 'Style';
|
|
63
|
+
|
|
64
|
+
export { Style };
|
|
@@ -1,63 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { primitiveWithForwardRef } from '../../primitives/utils/primitiveWithForwardRef.mjs';
|
|
3
|
+
import { Style } from './Style.mjs';
|
|
3
4
|
|
|
4
5
|
const ThemeStylePrimitive = ({ theme, nonce, ...rest }, ref) => {
|
|
5
6
|
if (!theme)
|
|
6
7
|
return null;
|
|
7
8
|
const { name, cssText } = theme;
|
|
8
|
-
|
|
9
|
-
Only inject theme CSS variables if given a theme.
|
|
10
|
-
The CSS file users import already has the default theme variables in it.
|
|
11
|
-
This will allow users to use the provider and theme with CSS variables
|
|
12
|
-
without having to worry about specificity issues because this stylesheet
|
|
13
|
-
will likely come after a user's defined CSS.
|
|
14
|
-
|
|
15
|
-
Q: Why are we using dangerouslySetInnerHTML?
|
|
16
|
-
A: We need to directly inject the theme's CSS string into the <style> tag without typical HTML escaping.
|
|
17
|
-
For example, JSX would escape characters meaningful in CSS such as ', ", < and >, thus breaking the CSS.
|
|
18
|
-
Q: Why not use a sanitization library such as DOMPurify?
|
|
19
|
-
A: For our use case, we specifically want to purify CSS text, *not* HTML.
|
|
20
|
-
DOMPurify, as well as any other HTML sanitization library, would escape/encode meaningful CSS characters
|
|
21
|
-
and break our CSS in the same way that JSX would.
|
|
22
|
-
|
|
23
|
-
Q: Are there any security risks in this particular use case?
|
|
24
|
-
A: Anything set inside of a <style> tag is always interpreted as CSS text, *not* HTML.
|
|
25
|
-
Reference: “Restrictions on the content of raw text elements” https://html.spec.whatwg.org/dev/syntax.html#cdata-rcdata-restrictions
|
|
26
|
-
And in our case, we are using dangerouslySetInnerHTML to set CSS text inside of a <style> tag.
|
|
27
|
-
|
|
28
|
-
Thus, it really comes down to the question: Could a malicious user escape from the context of the <style> tag?
|
|
29
|
-
For example, when inserting HTML into the DOM, could someone prematurely close the </style> tag and add a <script> tag?
|
|
30
|
-
e.g., </style><script>alert('hello')</script>
|
|
31
|
-
The answer depends on whether the code is rendered on the client or server side.
|
|
32
|
-
|
|
33
|
-
Client side
|
|
34
|
-
- To prevent XSS inside of the <style> tag, we need to make sure it's not closed prematurely.
|
|
35
|
-
- This is prevented by React because React creates a style DOM node (e.g., React.createElement(‘style’, ...)), and directly sets innerHTML as a string.
|
|
36
|
-
- Even if the string contains a closing </style> tag, it will still be interpreted as CSS text by the browser.
|
|
37
|
-
- Therefore, there is not an XSS vulnerability on the client side.
|
|
38
|
-
|
|
39
|
-
Server side
|
|
40
|
-
- When React code is rendered on the server side (e.g., NextJS), the code is sent to the browser as HTML text.
|
|
41
|
-
- Therefore, it *IS* possible to insert a closing </style> tag and escape the CSS context, which opens an XSS vulnerability.
|
|
42
|
-
|
|
43
|
-
Q: How are we mitigating the potential attack vector?
|
|
44
|
-
A: To fix this potential attack vector on the server side, we need to filter out any closing </style> tags,
|
|
45
|
-
as this the only way to escape from the context of the browser interpreting the text as CSS.
|
|
46
|
-
We also need to catch cases where there is any kind of whitespace character </style[HERE]>, such as tabs, carriage returns, etc:
|
|
47
|
-
</style
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
Therefore, by only rendering CSS text which does not include a closing '</style>' tag,
|
|
51
|
-
we ensure that the browser will correctly interpret all the text as CSS.
|
|
52
|
-
*/
|
|
53
|
-
if (/<\/style/i.test(cssText)) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return (React.createElement("style", { ...rest, ref: ref, id: `amplify-theme-${name}`,
|
|
58
|
-
// eslint-disable-next-line react/no-danger
|
|
59
|
-
dangerouslySetInnerHTML: { __html: cssText }, nonce: nonce }));
|
|
60
|
-
}
|
|
9
|
+
return (React.createElement(Style, { ...rest, ref: ref, cssText: cssText, nonce: nonce, id: `amplify-theme-${name}` }));
|
|
61
10
|
};
|
|
62
11
|
/**
|
|
63
12
|
* @experimental
|
|
@@ -7,12 +7,15 @@ import '../Icon/context/IconsContext.mjs';
|
|
|
7
7
|
import { useIcons } from '../Icon/context/useIcons.mjs';
|
|
8
8
|
import { IconUser } from '../Icon/icons/IconUser.mjs';
|
|
9
9
|
import { Image } from '../Image/Image.mjs';
|
|
10
|
+
import { Loader } from '../Loader/Loader.mjs';
|
|
10
11
|
|
|
11
|
-
const AvatarPrimitive = ({ className, children, variation, colorTheme, size, src, alt, ...rest }, ref) => {
|
|
12
|
+
const AvatarPrimitive = ({ className, children, variation, colorTheme, size, src, alt, isLoading, ...rest }, ref) => {
|
|
12
13
|
const icons = useIcons('avatar');
|
|
13
14
|
const icon = icons?.user ?? React.createElement(IconUser, null);
|
|
14
15
|
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 },
|
|
16
|
+
return (React.createElement(View, { as: "span", className: componentClasses, ref: ref, ...rest },
|
|
17
|
+
src ? (React.createElement(Image, { className: ComponentClassName.AvatarImage, src: src, alt: alt })) : (children ?? (React.createElement(View, { as: "span", className: ComponentClassName.AvatarIcon, "aria-hidden": "true" }, icon))),
|
|
18
|
+
isLoading ? (React.createElement(Loader, { className: ComponentClassName.AvatarLoader })) : null));
|
|
16
19
|
};
|
|
17
20
|
/**
|
|
18
21
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/avatar)
|
package/dist/esm/server.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { ThemeStyle } from './components/ThemeProvider/ThemeStyle.mjs';
|
|
2
|
+
export { ComponentStyle } from './components/ThemeProvider/ComponentStyle.mjs';
|
|
2
3
|
export { createComponentClasses, createTheme, defaultDarkModeOverride, defaultTheme, defineComponentTheme } from '@aws-amplify/ui';
|
package/dist/esm/version.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var RadixSlider = require('@radix-ui/react-slider');
|
|
|
15
15
|
var QRCode = require('qrcode');
|
|
16
16
|
var utils = require('aws-amplify/utils');
|
|
17
17
|
var RadixDirection = require('@radix-ui/react-direction');
|
|
18
|
-
var ThemeStyle = require('./ThemeStyle-
|
|
18
|
+
var ThemeStyle = require('./ThemeStyle-1fee4302.js');
|
|
19
19
|
require('@aws-amplify/core');
|
|
20
20
|
require('aws-amplify/auth');
|
|
21
21
|
|
|
@@ -669,11 +669,13 @@ const ImagePrimitive = ({ className, ...rest }, ref) => (React__namespace.create
|
|
|
669
669
|
const Image = primitiveWithForwardRef.primitiveWithForwardRef(ImagePrimitive);
|
|
670
670
|
Image.displayName = 'Image';
|
|
671
671
|
|
|
672
|
-
const AvatarPrimitive = ({ className, children, variation, colorTheme, size, src, alt, ...rest }, ref) => {
|
|
672
|
+
const AvatarPrimitive = ({ className, children, variation, colorTheme, size, src, alt, isLoading, ...rest }, ref) => {
|
|
673
673
|
const icons = Field.useIcons('avatar');
|
|
674
674
|
const icon = icons?.user ?? React__namespace.createElement(Field.IconUser, null);
|
|
675
675
|
const componentClasses = ui.classNames(ui.ComponentClassName.Avatar, className, ui.classNameModifier(ui.ComponentClassName.Avatar, variation), ui.classNameModifier(ui.ComponentClassName.Avatar, size), ui.classNameModifier(ui.ComponentClassName.Avatar, colorTheme));
|
|
676
|
-
return (React__namespace.createElement(Field.View, { as: "span", className: componentClasses, ref: ref, ...rest },
|
|
676
|
+
return (React__namespace.createElement(Field.View, { as: "span", className: componentClasses, ref: ref, ...rest },
|
|
677
|
+
src ? (React__namespace.createElement(Image, { className: ui.ComponentClassName.AvatarImage, src: src, alt: alt })) : (children ?? (React__namespace.createElement(Field.View, { as: "span", className: ui.ComponentClassName.AvatarIcon, "aria-hidden": "true" }, icon))),
|
|
678
|
+
isLoading ? (React__namespace.createElement(Field.Loader, { className: ui.ComponentClassName.AvatarLoader })) : null));
|
|
677
679
|
};
|
|
678
680
|
/**
|
|
679
681
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/avatar)
|
|
@@ -2521,7 +2523,7 @@ const defaultDeleteUserDisplayText = {
|
|
|
2521
2523
|
warningText: 'Deleting your account is not reversible. You will lose access to your account and all data associated with it.',
|
|
2522
2524
|
};
|
|
2523
2525
|
|
|
2524
|
-
const VERSION = '6.
|
|
2526
|
+
const VERSION = '6.5.0';
|
|
2525
2527
|
|
|
2526
2528
|
const logger$2 = ui.getLogger('AccountSettings');
|
|
2527
2529
|
const getIsDisabled = (formValues, validationError) => {
|
package/dist/internal.js
CHANGED
package/dist/server.js
CHANGED
|
@@ -2,31 +2,67 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ThemeStyle = require('./ThemeStyle-
|
|
5
|
+
var ThemeStyle = require('./ThemeStyle-1fee4302.js');
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var ui = require('@aws-amplify/ui');
|
|
7
|
-
require('
|
|
8
|
-
require('./primitiveWithForwardRef-7e929242.js');
|
|
8
|
+
var primitiveWithForwardRef = require('./primitiveWithForwardRef-7e929242.js');
|
|
9
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
10
27
|
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
|
|
30
|
+
const ComponentStylePrimitive = ({ theme, componentThemes = [], ...rest }, ref) => {
|
|
31
|
+
if (!theme || !componentThemes.length) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const cssText = ui.createComponentCSS({
|
|
35
|
+
theme,
|
|
36
|
+
components: componentThemes,
|
|
37
|
+
});
|
|
38
|
+
return React__namespace.createElement(ThemeStyle.Style, { ...rest, ref: ref, cssText: cssText });
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @experimental
|
|
42
|
+
* [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
|
|
43
|
+
*/
|
|
44
|
+
const ComponentStyle = primitiveWithForwardRef.primitiveWithForwardRef(ComponentStylePrimitive);
|
|
45
|
+
ComponentStyle.displayName = 'ComponentStyle';
|
|
11
46
|
|
|
12
47
|
exports.ThemeStyle = ThemeStyle.ThemeStyle;
|
|
13
48
|
Object.defineProperty(exports, 'createComponentClasses', {
|
|
14
|
-
|
|
15
|
-
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return ui.createComponentClasses; }
|
|
16
51
|
});
|
|
17
52
|
Object.defineProperty(exports, 'createTheme', {
|
|
18
|
-
|
|
19
|
-
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return ui.createTheme; }
|
|
20
55
|
});
|
|
21
56
|
Object.defineProperty(exports, 'defaultDarkModeOverride', {
|
|
22
|
-
|
|
23
|
-
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return ui.defaultDarkModeOverride; }
|
|
24
59
|
});
|
|
25
60
|
Object.defineProperty(exports, 'defaultTheme', {
|
|
26
|
-
|
|
27
|
-
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return ui.defaultTheme; }
|
|
28
63
|
});
|
|
29
64
|
Object.defineProperty(exports, 'defineComponentTheme', {
|
|
30
|
-
|
|
31
|
-
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return ui.defineComponentTheme; }
|
|
32
67
|
});
|
|
68
|
+
exports.ComponentStyle = ComponentStyle;
|
package/dist/styles/avatar.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
--avatar-border-color: var(--amplify-components-avatar-border-color);
|
|
7
7
|
--avatar-size: var(--amplify-components-avatar-width);
|
|
8
8
|
--amplify-components-icon-height: 100%;
|
|
9
|
+
position: relative;
|
|
9
10
|
display: inline-flex;
|
|
10
11
|
align-items: center;
|
|
11
12
|
justify-content: center;
|
|
@@ -56,6 +57,9 @@
|
|
|
56
57
|
--avatar-filled-color: var(
|
|
57
58
|
--amplify-components-avatar-warning-background-color
|
|
58
59
|
);
|
|
60
|
+
--amplify-components-loader-stroke-filled: var(
|
|
61
|
+
--amplify-components-avatar-warning-color
|
|
62
|
+
);
|
|
59
63
|
}
|
|
60
64
|
.amplify-avatar--error {
|
|
61
65
|
--avatar-border-color: var(--amplify-components-avatar-error-border-color);
|
|
@@ -69,6 +73,9 @@
|
|
|
69
73
|
--avatar-filled-color: var(
|
|
70
74
|
--amplify-components-avatar-error-background-color
|
|
71
75
|
);
|
|
76
|
+
--amplify-components-loader-stroke-filled: var(
|
|
77
|
+
--amplify-components-avatar-error-color
|
|
78
|
+
);
|
|
72
79
|
}
|
|
73
80
|
.amplify-avatar--info {
|
|
74
81
|
--avatar-border-color: var(--amplify-components-avatar-info-border-color);
|
|
@@ -82,6 +89,9 @@
|
|
|
82
89
|
--avatar-filled-color: var(
|
|
83
90
|
--amplify-components-avatar-info-background-color
|
|
84
91
|
);
|
|
92
|
+
--amplify-components-loader-stroke-filled: var(
|
|
93
|
+
--amplify-components-avatar-info-color
|
|
94
|
+
);
|
|
85
95
|
}
|
|
86
96
|
.amplify-avatar--success {
|
|
87
97
|
--avatar-border-color: var(
|
|
@@ -97,6 +107,9 @@
|
|
|
97
107
|
--avatar-filled-color: var(
|
|
98
108
|
--amplify-components-avatar-success-background-color
|
|
99
109
|
);
|
|
110
|
+
--amplify-components-loader-stroke-filled: var(
|
|
111
|
+
--amplify-components-avatar-success-color
|
|
112
|
+
);
|
|
100
113
|
}
|
|
101
114
|
.amplify-avatar__icon {
|
|
102
115
|
display: flex;
|
|
@@ -108,4 +121,11 @@
|
|
|
108
121
|
-o-object-fit: cover;
|
|
109
122
|
object-fit: cover;
|
|
110
123
|
display: block;
|
|
124
|
+
}
|
|
125
|
+
.amplify-avatar__loader {
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
width: 100%;
|
|
129
|
+
height: 100%;
|
|
130
|
+
stroke: transparent;
|
|
111
131
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--avatar-border-color: var(--amplify-components-avatar-border-color);
|
|
8
8
|
--avatar-size: var(--amplify-components-avatar-width);
|
|
9
9
|
--amplify-components-icon-height: 100%;
|
|
10
|
+
position: relative;
|
|
10
11
|
display: inline-flex;
|
|
11
12
|
align-items: center;
|
|
12
13
|
justify-content: center;
|
|
@@ -57,6 +58,9 @@
|
|
|
57
58
|
--avatar-filled-color: var(
|
|
58
59
|
--amplify-components-avatar-warning-background-color
|
|
59
60
|
);
|
|
61
|
+
--amplify-components-loader-stroke-filled: var(
|
|
62
|
+
--amplify-components-avatar-warning-color
|
|
63
|
+
);
|
|
60
64
|
}
|
|
61
65
|
.amplify-avatar--error {
|
|
62
66
|
--avatar-border-color: var(--amplify-components-avatar-error-border-color);
|
|
@@ -70,6 +74,9 @@
|
|
|
70
74
|
--avatar-filled-color: var(
|
|
71
75
|
--amplify-components-avatar-error-background-color
|
|
72
76
|
);
|
|
77
|
+
--amplify-components-loader-stroke-filled: var(
|
|
78
|
+
--amplify-components-avatar-error-color
|
|
79
|
+
);
|
|
73
80
|
}
|
|
74
81
|
.amplify-avatar--info {
|
|
75
82
|
--avatar-border-color: var(--amplify-components-avatar-info-border-color);
|
|
@@ -83,6 +90,9 @@
|
|
|
83
90
|
--avatar-filled-color: var(
|
|
84
91
|
--amplify-components-avatar-info-background-color
|
|
85
92
|
);
|
|
93
|
+
--amplify-components-loader-stroke-filled: var(
|
|
94
|
+
--amplify-components-avatar-info-color
|
|
95
|
+
);
|
|
86
96
|
}
|
|
87
97
|
.amplify-avatar--success {
|
|
88
98
|
--avatar-border-color: var(
|
|
@@ -98,6 +108,9 @@
|
|
|
98
108
|
--avatar-filled-color: var(
|
|
99
109
|
--amplify-components-avatar-success-background-color
|
|
100
110
|
);
|
|
111
|
+
--amplify-components-loader-stroke-filled: var(
|
|
112
|
+
--amplify-components-avatar-success-color
|
|
113
|
+
);
|
|
101
114
|
}
|
|
102
115
|
.amplify-avatar__icon {
|
|
103
116
|
display: flex;
|
|
@@ -110,4 +123,11 @@
|
|
|
110
123
|
object-fit: cover;
|
|
111
124
|
display: block;
|
|
112
125
|
}
|
|
126
|
+
.amplify-avatar__loader {
|
|
127
|
+
position: absolute;
|
|
128
|
+
inset: 0;
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
stroke: transparent;
|
|
132
|
+
}
|
|
113
133
|
}
|
|
@@ -27,12 +27,14 @@
|
|
|
27
27
|
font-weight: var(--amplify-components-breadcrumbs-link-font-weight);
|
|
28
28
|
padding-inline: var(--amplify-components-breadcrumbs-link-padding-inline);
|
|
29
29
|
padding-block: var(--amplify-components-breadcrumbs-link-padding-block);
|
|
30
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
30
|
+
-webkit-text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
31
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.amplify-breadcrumbs__link--current {
|
|
34
35
|
color: var(--amplify-components-breadcrumbs-link-current-color);
|
|
35
36
|
font-size: var(--amplify-components-breadcrumbs-link-current-font-size);
|
|
36
37
|
font-weight: var(--amplify-components-breadcrumbs-link-current-font-weight);
|
|
37
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
38
|
+
-webkit-text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
39
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
38
40
|
}
|
|
@@ -28,13 +28,15 @@
|
|
|
28
28
|
font-weight: var(--amplify-components-breadcrumbs-link-font-weight);
|
|
29
29
|
padding-inline: var(--amplify-components-breadcrumbs-link-padding-inline);
|
|
30
30
|
padding-block: var(--amplify-components-breadcrumbs-link-padding-block);
|
|
31
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
31
|
+
-webkit-text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
32
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-text-decoration);
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.amplify-breadcrumbs__link--current {
|
|
35
36
|
color: var(--amplify-components-breadcrumbs-link-current-color);
|
|
36
37
|
font-size: var(--amplify-components-breadcrumbs-link-current-font-size);
|
|
37
38
|
font-weight: var(--amplify-components-breadcrumbs-link-current-font-weight);
|
|
38
|
-
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
39
|
+
-webkit-text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
40
|
+
text-decoration: var(--amplify-components-breadcrumbs-link-current-text-decoration);
|
|
39
41
|
}
|
|
40
42
|
}
|
package/dist/styles/button.css
CHANGED
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
padding-inline-start: var(--amplify-components-button-padding-inline-start);
|
|
35
35
|
padding-inline-end: var(--amplify-components-button-padding-inline-end);
|
|
36
36
|
transition: all var(--amplify-components-button-transition-duration);
|
|
37
|
-
-
|
|
38
|
-
|
|
37
|
+
-webkit-user-select: none;
|
|
38
|
+
-moz-user-select: none;
|
|
39
|
+
user-select: none;
|
|
39
40
|
--amplify-internal-button-disabled-color: var(
|
|
40
41
|
--amplify-components-button-disabled-color
|
|
41
42
|
);
|
|
@@ -1056,50 +1057,58 @@
|
|
|
1056
1057
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
1057
1058
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
1058
1059
|
color: var(--amplify-internal-button-disabled-color);
|
|
1059
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1060
|
+
-webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1061
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1060
1062
|
cursor: not-allowed;
|
|
1061
1063
|
}
|
|
1062
1064
|
.amplify-button--disabled:hover {
|
|
1063
1065
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
1064
1066
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
1065
1067
|
color: var(--amplify-internal-button-disabled-color);
|
|
1066
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1068
|
+
-webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1069
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1067
1070
|
}
|
|
1068
1071
|
.amplify-button--disabled :focus {
|
|
1069
1072
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
1070
1073
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
1071
1074
|
color: var(--amplify-internal-button-disabled-color);
|
|
1072
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1075
|
+
-webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1076
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1073
1077
|
}
|
|
1074
1078
|
.amplify-button--disabled:active {
|
|
1075
1079
|
background-color: var(--amplify-internal-button-disabled-background-color);
|
|
1076
1080
|
border-color: var(--amplify-internal-button-disabled-border-color);
|
|
1077
1081
|
color: var(--amplify-internal-button-disabled-color);
|
|
1078
|
-
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1082
|
+
-webkit-text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1083
|
+
text-decoration: var(--amplify-internal-button-disabled-text-decoration);
|
|
1079
1084
|
}
|
|
1080
1085
|
.amplify-button--loading {
|
|
1081
1086
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
1082
1087
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
1083
1088
|
color: var(--amplify-components-button-loading-color);
|
|
1084
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1089
|
+
-webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1090
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1085
1091
|
}
|
|
1086
1092
|
.amplify-button--loading:hover {
|
|
1087
1093
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
1088
1094
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
1089
1095
|
color: var(--amplify-components-button-loading-color);
|
|
1090
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1096
|
+
-webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1097
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1091
1098
|
}
|
|
1092
1099
|
.amplify-button--loading:focus {
|
|
1093
1100
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
1094
1101
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
1095
1102
|
color: var(--amplify-components-button-loading-color);
|
|
1096
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1103
|
+
-webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1104
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1097
1105
|
}
|
|
1098
1106
|
.amplify-button--loading:active {
|
|
1099
1107
|
background-color: var(--amplify-internal-button-loading-background-color);
|
|
1100
1108
|
border-color: var(--amplify-internal-button-loading-border-color);
|
|
1101
1109
|
color: var(--amplify-components-button-loading-color);
|
|
1102
|
-
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1110
|
+
-webkit-text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1111
|
+
text-decoration: var(--amplify-internal-button-loading-text-decoration);
|
|
1103
1112
|
}
|
|
1104
1113
|
.amplify-button__loader-wrapper {
|
|
1105
1114
|
align-items: var(--amplify-components-button-loader-wrapper-align-items);
|