@cloudscape-design/components-themeable 3.0.949 → 3.0.951
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/alert/styles.scss +23 -34
- package/lib/internal/scss/flashbar/styles.scss +8 -11
- package/lib/internal/scss/popover/styles.scss +1 -0
- package/lib/internal/template/alert/actions-wrapper/index.d.ts +3 -1
- package/lib/internal/template/alert/actions-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/alert/actions-wrapper/index.js +24 -3
- package/lib/internal/template/alert/actions-wrapper/index.js.map +1 -1
- package/lib/internal/template/alert/internal.d.ts.map +1 -1
- package/lib/internal/template/alert/internal.js +18 -17
- package/lib/internal/template/alert/internal.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -28
- package/lib/internal/template/alert/styles.scoped.css +53 -54
- package/lib/internal/template/alert/styles.selectors.js +27 -28
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +2 -2
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/common.d.ts +0 -1
- package/lib/internal/template/flashbar/common.d.ts.map +1 -1
- package/lib/internal/template/flashbar/common.js +1 -4
- package/lib/internal/template/flashbar/common.js.map +1 -1
- package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
- package/lib/internal/template/flashbar/flash.js +4 -2
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js +2 -2
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +151 -153
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/internal/base-component/styles.scoped.css +3 -0
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +15 -4
- package/lib/internal/template/internal/generated/theming/index.js +15 -4
- package/lib/internal/template/popover/styles.css.js +54 -54
- package/lib/internal/template/popover/styles.scoped.css +84 -77
- package/lib/internal/template/popover/styles.selectors.js +54 -54
- package/package.json +1 -1
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
.alert {
|
|
24
24
|
@include styles.styles-reset;
|
|
25
25
|
position: relative;
|
|
26
|
-
display:
|
|
27
|
-
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
28
|
border-block: awsui.$border-width-alert solid;
|
|
29
29
|
border-inline: awsui.$border-width-alert solid;
|
|
30
30
|
border-start-start-radius: awsui.$border-radius-alert;
|
|
@@ -34,21 +34,14 @@
|
|
|
34
34
|
padding-block: awsui.$space-alert-vertical;
|
|
35
35
|
padding-inline: awsui.$space-alert-horizontal;
|
|
36
36
|
background-color: awsui.$color-background-container-content;
|
|
37
|
+
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
// Below the breakpoint, arrange actions below the content
|
|
46
|
-
&.breakpoint-default.with-action {
|
|
47
|
-
grid-template-columns: 1fr auto;
|
|
48
|
-
}
|
|
49
|
-
&.breakpoint-default:not(.with-dismiss) {
|
|
50
|
-
grid-template-columns: 1fr;
|
|
51
|
-
}
|
|
39
|
+
.alert-wrapper {
|
|
40
|
+
flex: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
column-gap: awsui.$space-alert-action-left;
|
|
52
45
|
}
|
|
53
46
|
|
|
54
47
|
.hidden {
|
|
@@ -67,7 +60,6 @@
|
|
|
67
60
|
|
|
68
61
|
.action {
|
|
69
62
|
white-space: nowrap;
|
|
70
|
-
margin-inline-start: awsui.$space-alert-action-left;
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
.action-slot,
|
|
@@ -76,6 +68,8 @@
|
|
|
76
68
|
}
|
|
77
69
|
|
|
78
70
|
.alert-focus-wrapper {
|
|
71
|
+
flex: 1;
|
|
72
|
+
min-inline-size: 70%;
|
|
79
73
|
display: grid;
|
|
80
74
|
grid-template-columns: min-content auto;
|
|
81
75
|
|
|
@@ -102,23 +96,18 @@
|
|
|
102
96
|
}
|
|
103
97
|
}
|
|
104
98
|
|
|
105
|
-
.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
grid-row: 2;
|
|
109
|
-
margin-block-end: awsui.$space-xxs;
|
|
110
|
-
}
|
|
99
|
+
.action-wrapped {
|
|
100
|
+
margin-block-end: awsui.$space-xxs;
|
|
101
|
+
}
|
|
111
102
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
margin-inline-start: calc(#{awsui.$size-icon-normal} + #{awsui.$space-xs});
|
|
121
|
-
}
|
|
103
|
+
.icon-size-medium > .alert-wrapper > .action-wrapped {
|
|
104
|
+
margin-inline-start: calc(#{awsui.$size-icon-medium} + #{awsui.$space-xs});
|
|
105
|
+
}
|
|
106
|
+
.icon-size-big > .alert-wrapper > .action-wrapped {
|
|
107
|
+
margin-inline-start: calc(#{awsui.$size-icon-big} + #{awsui.$space-xs});
|
|
108
|
+
}
|
|
109
|
+
.icon-size-normal > .alert-wrapper > .action-wrapped {
|
|
110
|
+
margin-inline-start: calc(#{awsui.$size-icon-normal} + #{awsui.$space-xs});
|
|
122
111
|
}
|
|
123
112
|
|
|
124
113
|
.content,
|
|
@@ -160,7 +149,7 @@ $_text-colors: (
|
|
|
160
149
|
.type-#{$type} {
|
|
161
150
|
border-color: #{map.get($_border-colors, $type)};
|
|
162
151
|
background-color: #{map.get($_background-colors, $type)};
|
|
163
|
-
> .alert-focus-wrapper > .icon {
|
|
152
|
+
> .alert-wrapper > .alert-focus-wrapper > .icon {
|
|
164
153
|
color: #{map.get($_text-colors, $type)};
|
|
165
154
|
}
|
|
166
155
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: flex-start;
|
|
31
31
|
align-items: flex-start;
|
|
32
|
-
padding-block: awsui.$space-
|
|
32
|
+
padding-block: awsui.$space-flashbar-vertical;
|
|
33
33
|
padding-inline: awsui.$space-flashbar-horizontal;
|
|
34
34
|
border-start-start-radius: awsui.$border-radius-flashbar;
|
|
35
35
|
border-start-end-radius: awsui.$border-radius-flashbar;
|
|
@@ -62,14 +62,16 @@
|
|
|
62
62
|
|
|
63
63
|
.flash-body {
|
|
64
64
|
display: flex;
|
|
65
|
+
flex-wrap: wrap;
|
|
65
66
|
flex-grow: 1;
|
|
66
67
|
min-inline-size: 0;
|
|
68
|
+
column-gap: awsui.$space-flashbar-action-left;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
.flash-focus-container {
|
|
70
72
|
display: flex;
|
|
71
73
|
flex: 1;
|
|
72
|
-
min-inline-size:
|
|
74
|
+
min-inline-size: 70%;
|
|
73
75
|
|
|
74
76
|
&:focus {
|
|
75
77
|
outline: none;
|
|
@@ -122,16 +124,11 @@
|
|
|
122
124
|
|
|
123
125
|
.action-button-wrapper {
|
|
124
126
|
white-space: nowrap;
|
|
125
|
-
margin-inline-start: awsui.$space-flashbar-action-left;
|
|
126
127
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
margin-inline-start: awsui.$space-l;
|
|
132
|
-
padding-inline-start: awsui.$space-xxs;
|
|
133
|
-
margin-block-end: awsui.$space-xxs;
|
|
134
|
-
}
|
|
128
|
+
.action-wrapped {
|
|
129
|
+
margin-inline-start: awsui.$space-l;
|
|
130
|
+
padding-inline-start: awsui.$space-xxs;
|
|
131
|
+
margin-block-end: awsui.$space-xxs;
|
|
135
132
|
}
|
|
136
133
|
|
|
137
134
|
.action-button,
|
|
@@ -9,8 +9,10 @@ interface ActionsWrapperProps {
|
|
|
9
9
|
action: React.ReactNode;
|
|
10
10
|
discoveredActions: Array<React.ReactNode>;
|
|
11
11
|
buttonText: React.ReactNode;
|
|
12
|
+
wrappedClass?: string;
|
|
13
|
+
containerWidth?: number;
|
|
12
14
|
onButtonClick: InternalButtonProps['onClick'];
|
|
13
15
|
}
|
|
14
|
-
export declare const ActionsWrapper: ({ className, testUtilClasses, action, discoveredActions, buttonText, onButtonClick, }: ActionsWrapperProps) => JSX.Element | null;
|
|
16
|
+
export declare const ActionsWrapper: ({ className, testUtilClasses, action, discoveredActions, buttonText, wrappedClass, containerWidth, onButtonClick, }: ActionsWrapperProps) => JSX.Element | null;
|
|
15
17
|
export {};
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,OAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA2B5E,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,cAAc,wHASxB,mBAAmB,uBAiCrB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useLayoutEffect, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { getIsRtl } from '@cloudscape-design/component-toolkit/internal';
|
|
5
6
|
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
7
|
import InternalButton from '../../button/internal';
|
|
7
8
|
import styles from './styles.css.js';
|
|
@@ -14,12 +15,32 @@ function createActionButton(testUtilClasses, action, buttonText, onButtonClick)
|
|
|
14
15
|
}
|
|
15
16
|
return action ? React.createElement("div", { className: testUtilClasses.actionSlot }, action) : null;
|
|
16
17
|
}
|
|
17
|
-
export const ActionsWrapper = ({ className, testUtilClasses, action, discoveredActions, buttonText, onButtonClick, }) => {
|
|
18
|
+
export const ActionsWrapper = ({ className, testUtilClasses, action, discoveredActions, buttonText, wrappedClass, containerWidth, onButtonClick, }) => {
|
|
19
|
+
const [wrapped, setWrapped] = useState(false);
|
|
20
|
+
const ref = React.useRef(null);
|
|
21
|
+
useLayoutEffect(() => {
|
|
22
|
+
if (!ref.current || !containerWidth || !wrappedClass) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
function check() {
|
|
26
|
+
const isRtl = getIsRtl(ref.current);
|
|
27
|
+
const { offsetWidth, offsetLeft } = ref.current;
|
|
28
|
+
const start = isRtl ? containerWidth - offsetWidth - offsetLeft : offsetLeft;
|
|
29
|
+
// if the action slot is towards the left (right in RTL) of its container
|
|
30
|
+
setWrapped(start < 100);
|
|
31
|
+
}
|
|
32
|
+
// Discovered actions are rendered by their plugin, so don't cause a
|
|
33
|
+
// re-render of our React tree. So we observe for changes.
|
|
34
|
+
const observer = new MutationObserver(check);
|
|
35
|
+
observer.observe(ref.current, { attributes: false, childList: true, subtree: true });
|
|
36
|
+
check();
|
|
37
|
+
return () => observer.disconnect();
|
|
38
|
+
});
|
|
18
39
|
const actionButton = createActionButton(testUtilClasses, action, buttonText, onButtonClick);
|
|
19
40
|
if (!actionButton && discoveredActions.length === 0) {
|
|
20
41
|
return null;
|
|
21
42
|
}
|
|
22
|
-
return (React.createElement("div", { className: clsx(styles.root, className) },
|
|
43
|
+
return (React.createElement("div", { ref: ref, className: clsx(styles.root, className, wrapped && wrappedClass) },
|
|
23
44
|
actionButton,
|
|
24
45
|
discoveredActions));
|
|
25
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAuC,MAAM,uBAAuB,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,SAAS,kBAAkB,CACzB,eAAuD,EACvD,MAAuB,EACvB,UAA2B,EAC3B,aAA6C;IAE7C,IAAI,CAAC,MAAM,IAAI,UAAU,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QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACrF,KAAK,EAAE,CAAC;QACR,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IAC5F,IAAI,CAAC,YAAY,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,IAAI,YAAY,CAAC;QAC5E,YAAY;QACZ,iBAAiB,CACd,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getIsRtl } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton, { InternalButtonProps } from '../../button/internal';\nimport { GeneratedAnalyticsMetadataAlertButtonClick } from '../analytics-metadata/interfaces';\n\nimport styles from './styles.css.js';\n\nfunction createActionButton(\n testUtilClasses: ActionsWrapperProps['testUtilClasses'],\n action: React.ReactNode,\n buttonText: React.ReactNode,\n onButtonClick: InternalButtonProps['onClick']\n) {\n if (!action && buttonText) {\n action = (\n <span\n {...getAnalyticsMetadataAttribute({\n action: 'buttonClick',\n } as Partial<GeneratedAnalyticsMetadataAlertButtonClick>)}\n >\n <InternalButton className={testUtilClasses.actionButton} onClick={onButtonClick} formAction=\"none\">\n {buttonText}\n </InternalButton>\n </span>\n );\n }\n return action ? <div className={testUtilClasses.actionSlot}>{action}</div> : null;\n}\n\ninterface ActionsWrapperProps {\n className: string;\n testUtilClasses: { actionSlot: string; actionButton: string };\n action: React.ReactNode;\n discoveredActions: Array<React.ReactNode>;\n buttonText: React.ReactNode;\n wrappedClass?: string;\n containerWidth?: number;\n onButtonClick: InternalButtonProps['onClick'];\n}\n\nexport const ActionsWrapper = ({\n className,\n testUtilClasses,\n action,\n discoveredActions,\n buttonText,\n wrappedClass,\n containerWidth,\n onButtonClick,\n}: ActionsWrapperProps) => {\n const [wrapped, setWrapped] = useState(false);\n const ref = React.useRef<HTMLDivElement>(null);\n useLayoutEffect(() => {\n if (!ref.current || !containerWidth || !wrappedClass) {\n return;\n }\n function check() {\n const isRtl = getIsRtl(ref.current);\n const { offsetWidth, offsetLeft } = ref.current!;\n const start = isRtl ? containerWidth! - offsetWidth - offsetLeft : offsetLeft;\n // if the action slot is towards the left (right in RTL) of its container\n setWrapped(start < 100);\n }\n\n // Discovered actions are rendered by their plugin, so don't cause a\n // re-render of our React tree. So we observe for changes.\n const observer = new MutationObserver(check);\n observer.observe(ref.current, { attributes: false, childList: true, subtree: true });\n check();\n return () => observer.disconnect();\n });\n const actionButton = createActionButton(testUtilClasses, action, buttonText, onButtonClick);\n if (!actionButton && discoveredActions.length === 0) {\n return null;\n }\n\n return (\n <div ref={ref} className={clsx(styles.root, className, wrapped && wrappedClass)}>\n {actionButton}\n {discoveredActions}\n </div>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAetC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,QAAA,MAAM,aAAa;;;;wCAmKlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -12,12 +12,12 @@ import { getBaseProps } from '../internal/base-component';
|
|
|
12
12
|
import VisualContext from '../internal/components/visual-context';
|
|
13
13
|
import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
|
|
14
14
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
15
|
-
import { useContainerBreakpoints } from '../internal/hooks/container-queries';
|
|
16
15
|
import useForwardFocus from '../internal/hooks/forward-focus';
|
|
17
16
|
import { useMergeRefs } from '../internal/hooks/use-merge-refs';
|
|
18
17
|
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
19
18
|
import { awsuiPluginsInternal } from '../internal/plugins/api';
|
|
20
19
|
import { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';
|
|
20
|
+
import useContainerWidth from '../internal/utils/use-container-width';
|
|
21
21
|
import { ActionsWrapper } from './actions-wrapper';
|
|
22
22
|
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
23
23
|
import styles from './styles.css.js';
|
|
@@ -36,10 +36,10 @@ const InternalAlert = React.forwardRef((_a, ref) => {
|
|
|
36
36
|
const i18n = useInternalI18n('alert');
|
|
37
37
|
const focusRef = useRef(null);
|
|
38
38
|
useForwardFocus(ref, focusRef);
|
|
39
|
-
const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);
|
|
40
|
-
const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);
|
|
41
39
|
const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);
|
|
42
40
|
const { initialHidden, headerReplacementType, contentReplacementType, headerRef: headerRefContent, contentRef: contentRefContent, replacementHeaderRef, replacementContentRef, } = useDiscoveredContent({ type, header, children });
|
|
41
|
+
const [containerWidth, containerMeasureRef] = useContainerWidth();
|
|
42
|
+
const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);
|
|
43
43
|
const headerRef = useMergeRefs(headerRefAction, headerRefContent);
|
|
44
44
|
const contentRef = useMergeRefs(contentRefAction, contentRefContent);
|
|
45
45
|
const isRefresh = useVisualRefresh();
|
|
@@ -54,22 +54,23 @@ const InternalAlert = React.forwardRef((_a, ref) => {
|
|
|
54
54
|
};
|
|
55
55
|
const statusIconAriaLabel = i18n(`i18nStrings.${type}IconAriaLabel`, (_b = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings[`${type}IconAriaLabel`]) !== null && _b !== void 0 ? _b : deprecatedStatusIconAriaLabel);
|
|
56
56
|
const dismissAriaLabel = i18n('i18nStrings.dismissAriaLabel', (_c = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.dismissAriaLabel) !== null && _c !== void 0 ? _c : i18n('dismissAriaLabel', deprecatedDismissAriaLabel));
|
|
57
|
-
return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden }, baseProps.className), ref:
|
|
57
|
+
return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden }, baseProps.className), ref: containerRef }),
|
|
58
58
|
React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
|
|
59
59
|
React.createElement(VisualContext, { contextName: "alert" },
|
|
60
|
-
React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss']
|
|
61
|
-
React.createElement("div", { className: styles['alert-
|
|
62
|
-
React.createElement("div", { className:
|
|
63
|
-
React.createElement(
|
|
64
|
-
|
|
65
|
-
React.createElement("div", { className: clsx(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss']) },
|
|
61
|
+
React.createElement("div", { className: styles['alert-wrapper'] },
|
|
62
|
+
React.createElement("div", { className: styles['alert-focus-wrapper'], tabIndex: -1, ref: focusRef },
|
|
63
|
+
React.createElement("div", { className: clsx(styles.icon, styles.text) },
|
|
64
|
+
React.createElement(InternalIcon, { name: typeToIcon[type], size: size, ariaLabel: statusIconAriaLabel })),
|
|
65
|
+
React.createElement("div", { className: clsx(styles.message, styles.text), id: messageSlotId },
|
|
66
|
+
React.createElement("div", { className: clsx(header && styles.header, headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header), ref: headerRef }, header),
|
|
67
|
+
React.createElement("div", { className: clsx(styles['header-replacement'], headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header), ref: replacementHeaderRef }),
|
|
68
|
+
React.createElement("div", { className: clsx(styles.content, contentReplacementType !== 'original' && styles.hidden), ref: contentRef }, children),
|
|
69
|
+
React.createElement("div", { className: clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden), ref: replacementContentRef }))),
|
|
70
|
+
React.createElement(ActionsWrapper, { className: styles.action, testUtilClasses: {
|
|
71
|
+
actionSlot: styles['action-slot'],
|
|
72
|
+
actionButton: styles['action-button'],
|
|
73
|
+
}, action: action, discoveredActions: discoveredActions, buttonText: buttonText, onButtonClick: () => fireNonCancelableEvent(onButtonClick), containerWidth: containerWidth, wrappedClass: styles['action-wrapped'] })),
|
|
73
74
|
dismissible && (React.createElement("div", Object.assign({ className: styles.dismiss }, getAnalyticsMetadataAttribute({
|
|
74
75
|
action: 'dismiss',
|
|
75
76
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],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,MAAM,CAAC,EACvF,GAAG,EAAE,UAAU,IAEd,QAAQ,CACL;4BACN,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,qBAAqB,CAAC,EAC7B,sBAAsB,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,CACvD,EACD,GAAG,EAAE,qBAAqB,GACrB,CACH,CACF;oBACN,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,eAAe,EAAE;4BACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;4BACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;yBACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAC1D;oBACD,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps<HTMLDivElement> & {\n messageSlotId?: string;\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);\n const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={mergedRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss'],\n styles[`breakpoint-${breakpoint}`]\n )}\n >\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n />\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AA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CACF;wBACN,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,eAAe,EAAE;gCACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;gCACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;6BACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAC1D,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACtC,CACE;oBACL,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps<HTMLDivElement> & {\n messageSlotId?: string;\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"alert": "
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"root": "
|
|
7
|
-
"hidden": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"action": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"icon-size-
|
|
22
|
-
"icon-size-
|
|
23
|
-
"
|
|
24
|
-
"content": "
|
|
25
|
-
"
|
|
26
|
-
"dismiss": "
|
|
27
|
-
"
|
|
28
|
-
"type-
|
|
29
|
-
"type-
|
|
30
|
-
"type-
|
|
31
|
-
"type-info": "awsui_type-info_mx3cw_yl080_429"
|
|
4
|
+
"alert": "awsui_alert_mx3cw_i9lhn_193",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_i9lhn_1",
|
|
6
|
+
"root": "awsui_root_mx3cw_i9lhn_215",
|
|
7
|
+
"hidden": "awsui_hidden_mx3cw_i9lhn_250",
|
|
8
|
+
"alert-wrapper": "awsui_alert-wrapper_mx3cw_i9lhn_298",
|
|
9
|
+
"initial-hidden": "awsui_initial-hidden_mx3cw_i9lhn_310",
|
|
10
|
+
"header": "awsui_header_mx3cw_i9lhn_315",
|
|
11
|
+
"header-replacement": "awsui_header-replacement_mx3cw_i9lhn_316",
|
|
12
|
+
"action": "awsui_action_mx3cw_i9lhn_320",
|
|
13
|
+
"action-slot": "awsui_action-slot_mx3cw_i9lhn_324",
|
|
14
|
+
"action-button": "awsui_action-button_mx3cw_i9lhn_325",
|
|
15
|
+
"alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_i9lhn_329",
|
|
16
|
+
"text": "awsui_text_mx3cw_i9lhn_360",
|
|
17
|
+
"icon": "awsui_icon_mx3cw_i9lhn_367",
|
|
18
|
+
"message": "awsui_message_mx3cw_i9lhn_370",
|
|
19
|
+
"action-wrapped": "awsui_action-wrapped_mx3cw_i9lhn_374",
|
|
20
|
+
"icon-size-medium": "awsui_icon-size-medium_mx3cw_i9lhn_378",
|
|
21
|
+
"icon-size-big": "awsui_icon-size-big_mx3cw_i9lhn_382",
|
|
22
|
+
"icon-size-normal": "awsui_icon-size-normal_mx3cw_i9lhn_386",
|
|
23
|
+
"content": "awsui_content_mx3cw_i9lhn_390",
|
|
24
|
+
"content-replacement": "awsui_content-replacement_mx3cw_i9lhn_391",
|
|
25
|
+
"dismiss": "awsui_dismiss_mx3cw_i9lhn_395",
|
|
26
|
+
"dismiss-button": "awsui_dismiss-button_mx3cw_i9lhn_400",
|
|
27
|
+
"type-error": "awsui_type-error_mx3cw_i9lhn_404",
|
|
28
|
+
"type-warning": "awsui_type-warning_mx3cw_i9lhn_412",
|
|
29
|
+
"type-success": "awsui_type-success_mx3cw_i9lhn_420",
|
|
30
|
+
"type-info": "awsui_type-info_mx3cw_i9lhn_428"
|
|
32
31
|
};
|
|
33
32
|
|