@cloudscape-design/components 3.0.684 → 3.0.686
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/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +31 -31
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/visual-refresh/styles.css.js +82 -82
- package/app-layout/visual-refresh/styles.scoped.css +255 -255
- package/app-layout/visual-refresh/styles.selectors.js +82 -82
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +16 -16
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +37 -37
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +16 -16
- package/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/area-chart/model/use-chart-model.js +2 -1
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/area-chart/model/utils.d.ts +0 -1
- package/area-chart/model/utils.d.ts.map +1 -1
- package/area-chart/model/utils.js +0 -10
- package/area-chart/model/utils.js.map +1 -1
- package/button/interfaces.d.ts +1 -1
- package/button/interfaces.js.map +1 -1
- package/button-dropdown/item-element/index.js +1 -1
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +12 -11
- package/button-dropdown/item-element/styles.scoped.css +14 -14
- package/button-dropdown/item-element/styles.selectors.js +12 -11
- package/button-dropdown/tooltip.d.ts +2 -1
- package/button-dropdown/tooltip.d.ts.map +1 -1
- package/button-dropdown/tooltip.js +2 -2
- package/button-dropdown/tooltip.js.map +1 -1
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/copy-to-clipboard/index.d.ts +1 -1
- package/copy-to-clipboard/index.d.ts.map +1 -1
- package/copy-to-clipboard/index.js +2 -2
- package/copy-to-clipboard/index.js.map +1 -1
- package/copy-to-clipboard/interfaces.d.ts +8 -0
- package/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/copy-to-clipboard/interfaces.js.map +1 -1
- package/copy-to-clipboard/internal.d.ts +1 -1
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +2 -2
- package/copy-to-clipboard/internal.js.map +1 -1
- package/flashbar/styles.css.js +47 -47
- package/flashbar/styles.scoped.css +171 -171
- package/flashbar/styles.selectors.js +47 -47
- package/i18n/dynamic.js +2 -0
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.ar.d.ts +3 -0
- package/i18n/messages/all.ar.js +1 -0
- package/i18n/messages/all.ar.json +1 -0
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +12 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/icon/styles.css.js +38 -37
- package/icon/styles.scoped.css +82 -80
- package/icon/styles.selectors.js +38 -37
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +1 -1
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +40 -40
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/custom-css-properties/index.d.ts +2 -0
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +57 -55
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +1 -2
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/circle-index.d.ts +2 -0
- package/internal/utils/circle-index.d.ts.map +1 -0
- package/internal/utils/circle-index.js +13 -0
- package/internal/utils/circle-index.js.map +1 -0
- package/key-value-pairs/index.d.ts +1 -1
- package/key-value-pairs/index.d.ts.map +1 -1
- package/key-value-pairs/index.js +2 -2
- package/key-value-pairs/index.js.map +1 -1
- package/key-value-pairs/interfaces.d.ts +11 -0
- package/key-value-pairs/interfaces.d.ts.map +1 -1
- package/key-value-pairs/interfaces.js.map +1 -1
- package/key-value-pairs/internal.d.ts.map +1 -1
- package/key-value-pairs/internal.js +2 -2
- package/key-value-pairs/internal.js.map +1 -1
- package/mixed-line-bar-chart/hooks/use-navigation.d.ts.map +1 -1
- package/mixed-line-bar-chart/hooks/use-navigation.js +1 -10
- package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
- package/package.json +4 -1
- package/prompt-input/index.d.ts +6 -0
- package/prompt-input/index.d.ts.map +1 -0
- package/prompt-input/index.js +27 -0
- package/prompt-input/index.js.map +1 -0
- package/prompt-input/interfaces.d.ts +82 -0
- package/prompt-input/interfaces.d.ts.map +1 -0
- package/prompt-input/interfaces.js +2 -0
- package/prompt-input/interfaces.js.map +1 -0
- package/prompt-input/internal.d.ts +8 -0
- package/prompt-input/internal.d.ts.map +1 -0
- package/prompt-input/internal.js +109 -0
- package/prompt-input/internal.js.map +1 -0
- package/prompt-input/styles.css.js +13 -0
- package/prompt-input/styles.scoped.css +248 -0
- package/prompt-input/styles.selectors.js +14 -0
- package/prompt-input/test-classes/styles.css.js +8 -0
- package/prompt-input/test-classes/styles.scoped.css +15 -0
- package/prompt-input/test-classes/styles.selectors.js +9 -0
- package/property-filter/filtering-token/index.d.ts.map +1 -0
- package/{internal/components → property-filter}/filtering-token/index.js +7 -6
- package/property-filter/filtering-token/index.js.map +1 -0
- package/property-filter/filtering-token/styles.css.js +12 -0
- package/{internal/components → property-filter}/filtering-token/styles.scoped.css +15 -15
- package/property-filter/filtering-token/styles.selectors.js +13 -0
- package/property-filter/test-classes/styles.css.js +14 -0
- package/property-filter/test-classes/styles.scoped.css +39 -0
- package/property-filter/test-classes/styles.selectors.js +15 -0
- package/property-filter/token-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +7 -5
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.js +1 -1
- package/property-filter/token.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/slider/styles.css.js +26 -27
- package/slider/styles.scoped.css +90 -90
- package/slider/styles.selectors.js +26 -27
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +39 -39
- package/spinner/styles.selectors.js +13 -13
- package/table/body-cell/styles.css.js +46 -46
- package/table/body-cell/styles.scoped.css +525 -274
- package/table/body-cell/styles.selectors.js +46 -46
- package/table/body-cell/td-element.d.ts.map +1 -1
- package/table/body-cell/td-element.js +3 -4
- package/table/body-cell/td-element.js.map +1 -1
- package/tabs/styles.css.js +28 -28
- package/tabs/styles.scoped.css +53 -53
- package/tabs/styles.selectors.js +28 -28
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +1 -9
- package/tabs/tab-header-bar.js.map +1 -1
- package/test-utils/dom/copy-to-clipboard/index.d.ts +3 -1
- package/test-utils/dom/copy-to-clipboard/index.js +2 -2
- package/test-utils/dom/copy-to-clipboard/index.js.map +1 -1
- package/test-utils/dom/index.d.ts +3 -0
- package/test-utils/dom/index.js +10 -2
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/dom/prompt-input/index.d.ts +18 -0
- package/test-utils/dom/prompt-input/index.js +49 -0
- package/test-utils/dom/prompt-input/index.js.map +1 -0
- package/test-utils/dom/property-filter/index.d.ts +25 -2
- package/test-utils/dom/property-filter/index.js +59 -6
- package/test-utils/dom/property-filter/index.js.map +1 -1
- package/test-utils/selectors/copy-to-clipboard/index.d.ts +3 -1
- package/test-utils/selectors/copy-to-clipboard/index.js +4 -2
- package/test-utils/selectors/copy-to-clipboard/index.js.map +1 -1
- package/test-utils/selectors/index.d.ts +3 -0
- package/test-utils/selectors/index.js +10 -2
- package/test-utils/selectors/index.js.map +1 -1
- package/test-utils/selectors/prompt-input/index.d.ts +6 -0
- package/test-utils/selectors/prompt-input/index.js +15 -0
- package/test-utils/selectors/prompt-input/index.js.map +1 -0
- package/test-utils/selectors/property-filter/index.d.ts +25 -2
- package/test-utils/selectors/property-filter/index.js +61 -6
- package/test-utils/selectors/property-filter/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/internal/components/filtering-token/index.d.ts.map +0 -1
- package/internal/components/filtering-token/index.js.map +0 -1
- package/internal/components/filtering-token/styles.css.js +0 -12
- package/internal/components/filtering-token/styles.selectors.js +0 -13
- package/internal/hooks/focus-visible/index.d.ts +0 -3
- package/internal/hooks/focus-visible/index.d.ts.map +0 -1
- package/internal/hooks/focus-visible/index.js +0 -49
- package/internal/hooks/focus-visible/index.js.map +0 -1
- package/test-utils/dom/internal/filtering-token.d.ts +0 -8
- package/test-utils/dom/internal/filtering-token.js +0 -21
- package/test-utils/dom/internal/filtering-token.js.map +0 -1
- package/test-utils/selectors/internal/filtering-token.d.ts +0 -8
- package/test-utils/selectors/internal/filtering-token.js +0 -21
- package/test-utils/selectors/internal/filtering-token.js.map +0 -1
- /package/{internal/components → property-filter}/filtering-token/index.d.ts +0 -0
|
@@ -94,72 +94,72 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
98
|
-
--awsui-content-layout-default-horizontal-padding-
|
|
99
|
-
--awsui-content-layout-max-content-width-
|
|
100
|
-
--awsui-content-layout-main-gap-
|
|
97
|
+
.awsui_layout_5gtk3_1hkx1_97:not(#\9) {
|
|
98
|
+
--awsui-content-layout-default-horizontal-padding-g964ok: var(--space-layout-content-horizontal-7l52k3, 24px);
|
|
99
|
+
--awsui-content-layout-max-content-width-g964ok: 0px;
|
|
100
|
+
--awsui-content-layout-main-gap-g964ok: 0px;
|
|
101
101
|
display: grid;
|
|
102
|
-
grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-
|
|
103
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
102
|
+
grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-g964ok)) 1fr 0 0;
|
|
103
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-g964ok) min-content min-content auto var(--space-dark-header-overlap-distance-lxpp0s, 36px) 1fr;
|
|
104
104
|
min-block-size: 100%;
|
|
105
105
|
}
|
|
106
106
|
@media (max-width: 688px) {
|
|
107
|
-
.
|
|
108
|
-
--awsui-content-layout-default-horizontal-padding-
|
|
107
|
+
.awsui_layout_5gtk3_1hkx1_97:not(#\9) {
|
|
108
|
+
--awsui-content-layout-default-horizontal-padding-g964ok: var(--space-l-t419sm, 20px);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
.
|
|
111
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_background_5gtk3_1hkx1_111:not(#\9) {
|
|
112
112
|
grid-column: 1/8;
|
|
113
113
|
grid-row: 1/6;
|
|
114
114
|
color: var(--color-text-body-default-at06ol, #000716);
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_background_5gtk3_1hkx1_111.awsui_is-overlap-disabled_5gtk3_1hkx1_116:not(#\9) {
|
|
117
117
|
grid-row: 1/5;
|
|
118
118
|
}
|
|
119
|
-
.
|
|
119
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_background_5gtk3_1hkx1_111 > .awsui_header-background_5gtk3_1hkx1_119:not(#\9) {
|
|
120
120
|
inline-size: 100%;
|
|
121
121
|
block-size: 100%;
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_notifications_5gtk3_1hkx1_123:not(#\9) {
|
|
124
124
|
grid-column: 4;
|
|
125
125
|
grid-row: 2;
|
|
126
126
|
padding-block-end: var(--space-xs-zb16t3, 8px);
|
|
127
127
|
}
|
|
128
|
-
.
|
|
128
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_breadcrumbs_5gtk3_1hkx1_128:not(#\9) {
|
|
129
129
|
grid-column: 4;
|
|
130
130
|
grid-row: 3;
|
|
131
131
|
padding-block-end: var(--space-xs-zb16t3, 8px);
|
|
132
132
|
}
|
|
133
|
-
.
|
|
134
|
-
--awsui-content-layout-main-gap-
|
|
135
|
-
grid-template-columns: var(--awsui-toggles-left-width-
|
|
133
|
+
.awsui_layout_5gtk3_1hkx1_97.awsui_default-padding_5gtk3_1hkx1_133:not(#\9) {
|
|
134
|
+
--awsui-content-layout-main-gap-g964ok: var(--space-scaled-m-mo5yse, 16px);
|
|
135
|
+
grid-template-columns: var(--awsui-toggles-left-width-g964ok, 0) var(--awsui-content-layout-default-horizontal-padding-g964ok, 0) 1fr minmax(0, var(--awsui-content-layout-max-content-width-g964ok)) 1fr var(--awsui-content-layout-default-horizontal-padding-g964ok, 0) var(--awsui-toggles-right-width-g964ok, 0);
|
|
136
136
|
}
|
|
137
|
-
.
|
|
137
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_header-wrapper_5gtk3_1hkx1_137:not(#\9) {
|
|
138
138
|
grid-column: 4;
|
|
139
139
|
grid-row: 4;
|
|
140
140
|
padding-block-end: var(--space-content-header-padding-bottom-y2enua, 16px);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_header-wrapper_5gtk3_1hkx1_137.awsui_with-divider_5gtk3_1hkx1_142:not(#\9) {
|
|
143
143
|
border-block-end: 1px solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.awsui_layout_5gtk3_1hkx1_97 > .awsui_content_5gtk3_1hkx1_145:not(#\9) {
|
|
146
146
|
grid-column: 4;
|
|
147
147
|
grid-row: 5/8;
|
|
148
148
|
}
|
|
149
|
-
.
|
|
150
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
149
|
+
.awsui_layout_5gtk3_1hkx1_97:not(#\9):not(.awsui_has-header_5gtk3_1hkx1_149) {
|
|
150
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-g964ok) min-content min-content 0 calc(var(--space-dark-header-overlap-distance-lxpp0s, 36px)) 1fr;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
153
|
-
grid-template-rows: var(--awsui-content-layout-main-gap-
|
|
152
|
+
.awsui_layout_5gtk3_1hkx1_97.awsui_is-overlap-disabled_5gtk3_1hkx1_116:not(#\9) {
|
|
153
|
+
grid-template-rows: var(--awsui-content-layout-main-gap-g964ok) min-content min-content auto 0 1fr;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
.
|
|
156
|
+
.awsui_layout_5gtk3_1hkx1_97.awsui_is-visual-refresh_5gtk3_1hkx1_156 > .awsui_background_5gtk3_1hkx1_111.awsui_has-default-background_5gtk3_1hkx1_156:not(#\9) {
|
|
157
157
|
background-color: var(--color-background-layout-main-nx09lr, #ffffff);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
161
|
-
--awsui-content-layout-main-gap-
|
|
160
|
+
.awsui_layout_5gtk3_1hkx1_97:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1hkx1_156).awsui_has-notifications_5gtk3_1hkx1_160 {
|
|
161
|
+
--awsui-content-layout-main-gap-g964ok: 0px;
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_layout_5gtk3_1hkx1_97:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1hkx1_156) > .awsui_notifications_5gtk3_1hkx1_123 {
|
|
164
164
|
grid-column: 1/8;
|
|
165
165
|
}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"layout": "
|
|
6
|
-
"background": "
|
|
7
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
8
|
-
"header-background": "awsui_header-
|
|
9
|
-
"notifications": "
|
|
10
|
-
"breadcrumbs": "
|
|
11
|
-
"default-padding": "awsui_default-
|
|
12
|
-
"header-wrapper": "awsui_header-
|
|
13
|
-
"with-divider": "awsui_with-
|
|
14
|
-
"content": "
|
|
15
|
-
"has-header": "awsui_has-
|
|
16
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
17
|
-
"has-default-background": "awsui_has-default-
|
|
18
|
-
"has-notifications": "awsui_has-
|
|
5
|
+
"layout": "awsui_layout_5gtk3_1hkx1_97",
|
|
6
|
+
"background": "awsui_background_5gtk3_1hkx1_111",
|
|
7
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1hkx1_116",
|
|
8
|
+
"header-background": "awsui_header-background_5gtk3_1hkx1_119",
|
|
9
|
+
"notifications": "awsui_notifications_5gtk3_1hkx1_123",
|
|
10
|
+
"breadcrumbs": "awsui_breadcrumbs_5gtk3_1hkx1_128",
|
|
11
|
+
"default-padding": "awsui_default-padding_5gtk3_1hkx1_133",
|
|
12
|
+
"header-wrapper": "awsui_header-wrapper_5gtk3_1hkx1_137",
|
|
13
|
+
"with-divider": "awsui_with-divider_5gtk3_1hkx1_142",
|
|
14
|
+
"content": "awsui_content_5gtk3_1hkx1_145",
|
|
15
|
+
"has-header": "awsui_has-header_5gtk3_1hkx1_149",
|
|
16
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1hkx1_156",
|
|
17
|
+
"has-default-background": "awsui_has-default-background_5gtk3_1hkx1_156",
|
|
18
|
+
"has-notifications": "awsui_has-notifications_5gtk3_1hkx1_160"
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CopyToClipboardProps } from './interfaces';
|
|
3
3
|
export { CopyToClipboardProps };
|
|
4
|
-
export default function CopyToClipboard({ variant, ...restProps }: CopyToClipboardProps): JSX.Element;
|
|
4
|
+
export default function CopyToClipboard({ variant, popoverRenderWithPortal, ...restProps }: CopyToClipboardProps): JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAkB,EAClB,uBAA+B,EAC/B,GAAG,SAAS,EACb,EAAE,oBAAoB,eActB"}
|
|
@@ -7,12 +7,12 @@ import useBaseComponent from '../internal/hooks/use-base-component';
|
|
|
7
7
|
import InternalCopyToClipboard from './internal';
|
|
8
8
|
import { getExternalProps } from '../internal/utils/external-props';
|
|
9
9
|
export default function CopyToClipboard(_a) {
|
|
10
|
-
var { variant = 'button' } = _a, restProps = __rest(_a, ["variant"]);
|
|
10
|
+
var { variant = 'button', popoverRenderWithPortal = false } = _a, restProps = __rest(_a, ["variant", "popoverRenderWithPortal"]);
|
|
11
11
|
const baseProps = useBaseComponent('CopyToClipboard', {
|
|
12
12
|
props: { variant },
|
|
13
13
|
});
|
|
14
14
|
const filteredProps = getExternalProps(restProps);
|
|
15
|
-
return React.createElement(InternalCopyToClipboard, Object.assign({ variant: variant }, baseProps, filteredProps));
|
|
15
|
+
return (React.createElement(InternalCopyToClipboard, Object.assign({ variant: variant, popoverRenderWithPortal: popoverRenderWithPortal }, baseProps, filteredProps)));
|
|
16
16
|
}
|
|
17
17
|
applyDisplayName(CopyToClipboard, 'CopyToClipboard');
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,uBAAuB,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,uBAAuB,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAIjB;QAJiB,EACtC,OAAO,GAAG,QAAQ,EAClB,uBAAuB,GAAG,KAAK,OAEV,EADlB,SAAS,cAH0B,sCAIvC,CADa;IAEZ,MAAM,SAAS,GAAG,gBAAgB,CAAC,iBAAiB,EAAE;QACpD,KAAK,EAAE,EAAE,OAAO,EAAE;KACnB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAElD,OAAO,CACL,oBAAC,uBAAuB,kBACtB,OAAO,EAAE,OAAO,EAChB,uBAAuB,EAAE,uBAAuB,IAC5C,SAAS,EACT,aAAa,EACjB,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { CopyToClipboardProps } from './interfaces';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport InternalCopyToClipboard from './internal';\nimport { getExternalProps } from '../internal/utils/external-props';\n\nexport { CopyToClipboardProps };\n\nexport default function CopyToClipboard({\n variant = 'button',\n popoverRenderWithPortal = false,\n ...restProps\n}: CopyToClipboardProps) {\n const baseProps = useBaseComponent('CopyToClipboard', {\n props: { variant },\n });\n const filteredProps = getExternalProps(restProps);\n\n return (\n <InternalCopyToClipboard\n variant={variant}\n popoverRenderWithPortal={popoverRenderWithPortal}\n {...baseProps}\n {...filteredProps}\n />\n );\n}\n\napplyDisplayName(CopyToClipboard, 'CopyToClipboard');\n"]}
|
|
@@ -30,6 +30,14 @@ export interface CopyToClipboardProps extends BaseComponentProps {
|
|
|
30
30
|
* The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).
|
|
31
31
|
*/
|
|
32
32
|
copyErrorText: string;
|
|
33
|
+
/**
|
|
34
|
+
* By default, the popover is constrained to fit inside its parent
|
|
35
|
+
* [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).
|
|
36
|
+
* Enabling this property will allow the popover to be rendered in the root stack context using
|
|
37
|
+
* [React Portals](https://reactjs.org/docs/portals.html).
|
|
38
|
+
* Enable this setting if you need the popover to ignore its parent stacking context.
|
|
39
|
+
*/
|
|
40
|
+
popoverRenderWithPortal?: boolean;
|
|
33
41
|
}
|
|
34
42
|
export declare namespace CopyToClipboardProps {
|
|
35
43
|
type Variant = 'button' | 'icon' | 'inline';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC;IAEvC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC;IAEvC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;CACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"`, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"`, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n\n /**\n * By default, the popover is constrained to fit inside its parent\n * [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).\n * Enabling this property will allow the popover to be rendered in the root stack context using\n * [React Portals](https://reactjs.org/docs/portals.html).\n * Enable this setting if you need the popover to ignore its parent stacking context.\n */\n popoverRenderWithPortal?: boolean;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n}\n"]}
|
|
@@ -3,5 +3,5 @@ import { CopyToClipboardProps } from './interfaces';
|
|
|
3
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
4
4
|
export interface InternalCopyToClipboardProps extends CopyToClipboardProps, InternalBaseComponentProps {
|
|
5
5
|
}
|
|
6
|
-
export default function InternalCopyToClipboard({ variant, copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, __internalRootRef, ...restProps }: InternalCopyToClipboardProps): JSX.Element;
|
|
6
|
+
export default function InternalCopyToClipboard({ variant, copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, popoverRenderWithPortal, __internalRootRef, ...restProps }: InternalCopyToClipboardProps): JSX.Element;
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AASpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,WAAW,4BAA6B,SAAQ,oBAAoB,EAAE,0BAA0B;CAAG;AAEzG,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,iBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,4BAA4B,eAqE9B"}
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AASpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,WAAW,4BAA6B,SAAQ,oBAAoB,EAAE,0BAA0B;CAAG;AAEzG,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,iBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,4BAA4B,eAqE9B"}
|
|
@@ -10,7 +10,7 @@ import testStyles from './test-classes/styles.css.js';
|
|
|
10
10
|
import clsx from 'clsx';
|
|
11
11
|
import { getBaseProps } from '../internal/base-component';
|
|
12
12
|
export default function InternalCopyToClipboard(_a) {
|
|
13
|
-
var { variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, __internalRootRef = null } = _a, restProps = __rest(_a, ["variant", "copyButtonAriaLabel", "copyButtonText", "copySuccessText", "copyErrorText", "textToCopy", "__internalRootRef"]);
|
|
13
|
+
var { variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, popoverRenderWithPortal, __internalRootRef = null } = _a, restProps = __rest(_a, ["variant", "copyButtonAriaLabel", "copyButtonText", "copySuccessText", "copyErrorText", "textToCopy", "popoverRenderWithPortal", "__internalRootRef"]);
|
|
14
14
|
const [status, setStatus] = useState('pending');
|
|
15
15
|
const [statusText, setStatusText] = useState('');
|
|
16
16
|
const baseProps = getBaseProps(restProps);
|
|
@@ -39,7 +39,7 @@ export default function InternalCopyToClipboard(_a) {
|
|
|
39
39
|
icon: 'icon',
|
|
40
40
|
inline: 'inline-icon',
|
|
41
41
|
}[variant];
|
|
42
|
-
const trigger = (React.createElement(InternalPopover, { size: "medium", position: "top", triggerType: "custom", dismissButton: false, renderWithPortal:
|
|
42
|
+
const trigger = (React.createElement(InternalPopover, { size: "medium", position: "top", triggerType: "custom", dismissButton: false, renderWithPortal: popoverRenderWithPortal, content: React.createElement(InternalStatusIndicator, { type: status }, statusText) },
|
|
43
43
|
React.createElement(InternalButton, { ariaLabel: copyButtonAriaLabel !== null && copyButtonAriaLabel !== void 0 ? copyButtonAriaLabel : copyButtonText, iconName: "copy", onClick: onClick, variant: triggerVariant, wrapText: false, formAction: "none" }, copyButtonText)));
|
|
44
44
|
return (React.createElement("span", Object.assign({}, baseProps, { ref: __internalRootRef, className: clsx(baseProps.className, styles.root, testStyles.root) }), variant === 'inline' ? (React.createElement("span", { className: styles['inline-container'] },
|
|
45
45
|
React.createElement("span", { className: styles['inline-container-trigger'] }, trigger),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK1D,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState } from 'react';\nimport { CopyToClipboardProps } from './interfaces';\nimport InternalButton from '../button/internal';\nimport InternalPopover from '../popover/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\n\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface InternalCopyToClipboardProps extends CopyToClipboardProps, InternalBaseComponentProps {}\n\nexport default function InternalCopyToClipboard({\n variant = 'button',\n copyButtonAriaLabel,\n copyButtonText,\n copySuccessText,\n copyErrorText,\n textToCopy,\n popoverRenderWithPortal,\n __internalRootRef = null,\n ...restProps\n}: InternalCopyToClipboardProps) {\n const [status, setStatus] = useState<'pending' | 'success' | 'error'>('pending');\n const [statusText, setStatusText] = useState('');\n\n const baseProps = getBaseProps(restProps);\n const onClick = () => {\n if (!navigator.clipboard) {\n // The clipboard API is not available in insecure contexts.\n setStatus('error');\n setStatusText(copyErrorText);\n return;\n }\n\n setStatus('pending');\n setStatusText('');\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n setStatus('success');\n setStatusText(copySuccessText);\n })\n .catch(() => {\n setStatus('error');\n setStatusText(copyErrorText);\n });\n };\n\n const triggerVariant = (\n {\n button: 'normal',\n icon: 'icon',\n inline: 'inline-icon',\n } as const\n )[variant];\n\n const trigger = (\n <InternalPopover\n size=\"medium\"\n position=\"top\"\n triggerType=\"custom\"\n dismissButton={false}\n renderWithPortal={popoverRenderWithPortal}\n content={<InternalStatusIndicator type={status}>{statusText}</InternalStatusIndicator>}\n >\n <InternalButton\n ariaLabel={copyButtonAriaLabel ?? copyButtonText}\n iconName=\"copy\"\n onClick={onClick}\n variant={triggerVariant}\n wrapText={false}\n formAction=\"none\"\n >\n {copyButtonText}\n </InternalButton>\n </InternalPopover>\n );\n\n return (\n <span {...baseProps} ref={__internalRootRef} className={clsx(baseProps.className, styles.root, testStyles.root)}>\n {variant === 'inline' ? (\n <span className={styles['inline-container']}>\n <span className={styles['inline-container-trigger']}>{trigger}</span>\n <span className={testStyles['text-to-copy']}>{textToCopy}</span>\n </span>\n ) : (\n trigger\n )}\n </span>\n );\n}\n"]}
|
package/flashbar/styles.css.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"flash-with-motion": "awsui_flash-with-
|
|
5
|
-
"enter": "
|
|
6
|
-
"flash-body": "awsui_flash-
|
|
7
|
-
"flash-message": "awsui_flash-
|
|
8
|
-
"flash-header": "awsui_flash-
|
|
9
|
-
"flash-content": "awsui_flash-
|
|
10
|
-
"action-button-wrapper": "awsui_action-button-
|
|
11
|
-
"dismiss-button-wrapper": "awsui_dismiss-button-
|
|
12
|
-
"flash-icon": "awsui_flash-
|
|
13
|
-
"entering": "
|
|
14
|
-
"entered": "
|
|
15
|
-
"exiting": "
|
|
16
|
-
"stack": "
|
|
17
|
-
"animation-running": "awsui_animation-
|
|
18
|
-
"item": "
|
|
19
|
-
"flash-list-item": "awsui_flash-list-
|
|
20
|
-
"notification-bar": "awsui_notification-
|
|
21
|
-
"collapsed": "
|
|
22
|
-
"animation-ready": "awsui_animation-
|
|
23
|
-
"expanded-only": "awsui_expanded-
|
|
24
|
-
"expanded": "
|
|
25
|
-
"flash": "
|
|
26
|
-
"collapsible": "
|
|
27
|
-
"short-list": "awsui_short-
|
|
28
|
-
"visual-refresh": "awsui_visual-
|
|
29
|
-
"status": "
|
|
30
|
-
"header": "
|
|
31
|
-
"item-count": "awsui_item-
|
|
32
|
-
"button": "
|
|
33
|
-
"type-count": "awsui_type-
|
|
34
|
-
"count-number": "awsui_count-
|
|
35
|
-
"icon": "
|
|
36
|
-
"floating": "
|
|
37
|
-
"flashbar": "
|
|
38
|
-
"flash-refresh": "awsui_flash-
|
|
39
|
-
"flash-list": "awsui_flash-
|
|
40
|
-
"flash-focus-container": "awsui_flash-focus-
|
|
41
|
-
"flash-text": "awsui_flash-
|
|
42
|
-
"dismiss-button": "awsui_dismiss-
|
|
43
|
-
"breakpoint-default": "awsui_breakpoint-
|
|
44
|
-
"action-button": "awsui_action-
|
|
45
|
-
"action-slot": "awsui_action-
|
|
46
|
-
"flash-type-success": "awsui_flash-type-
|
|
47
|
-
"flash-type-error": "awsui_flash-type-
|
|
48
|
-
"flash-type-info": "awsui_flash-type-
|
|
49
|
-
"flash-type-in-progress": "awsui_flash-type-in-
|
|
50
|
-
"flash-type-warning": "awsui_flash-type-
|
|
4
|
+
"flash-with-motion": "awsui_flash-with-motion_1q84n_1mepa_97",
|
|
5
|
+
"enter": "awsui_enter_1q84n_1mepa_97",
|
|
6
|
+
"flash-body": "awsui_flash-body_1q84n_1mepa_111",
|
|
7
|
+
"flash-message": "awsui_flash-message_1q84n_1mepa_111",
|
|
8
|
+
"flash-header": "awsui_flash-header_1q84n_1mepa_111",
|
|
9
|
+
"flash-content": "awsui_flash-content_1q84n_1mepa_112",
|
|
10
|
+
"action-button-wrapper": "awsui_action-button-wrapper_1q84n_1mepa_113",
|
|
11
|
+
"dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_1mepa_114",
|
|
12
|
+
"flash-icon": "awsui_flash-icon_1q84n_1mepa_137",
|
|
13
|
+
"entering": "awsui_entering_1q84n_1mepa_150",
|
|
14
|
+
"entered": "awsui_entered_1q84n_1mepa_171",
|
|
15
|
+
"exiting": "awsui_exiting_1q84n_1mepa_276",
|
|
16
|
+
"stack": "awsui_stack_1q84n_1mepa_298",
|
|
17
|
+
"animation-running": "awsui_animation-running_1q84n_1mepa_298",
|
|
18
|
+
"item": "awsui_item_1q84n_1mepa_298",
|
|
19
|
+
"flash-list-item": "awsui_flash-list-item_1q84n_1mepa_299",
|
|
20
|
+
"notification-bar": "awsui_notification-bar_1q84n_1mepa_300",
|
|
21
|
+
"collapsed": "awsui_collapsed_1q84n_1mepa_320",
|
|
22
|
+
"animation-ready": "awsui_animation-ready_1q84n_1mepa_320",
|
|
23
|
+
"expanded-only": "awsui_expanded-only_1q84n_1mepa_320",
|
|
24
|
+
"expanded": "awsui_expanded_1q84n_1mepa_320",
|
|
25
|
+
"flash": "awsui_flash_1q84n_1mepa_97",
|
|
26
|
+
"collapsible": "awsui_collapsible_1q84n_1mepa_384",
|
|
27
|
+
"short-list": "awsui_short-list_1q84n_1mepa_390",
|
|
28
|
+
"visual-refresh": "awsui_visual-refresh_1q84n_1mepa_390",
|
|
29
|
+
"status": "awsui_status_1q84n_1mepa_597",
|
|
30
|
+
"header": "awsui_header_1q84n_1mepa_597",
|
|
31
|
+
"item-count": "awsui_item-count_1q84n_1mepa_598",
|
|
32
|
+
"button": "awsui_button_1q84n_1mepa_599",
|
|
33
|
+
"type-count": "awsui_type-count_1q84n_1mepa_632",
|
|
34
|
+
"count-number": "awsui_count-number_1q84n_1mepa_632",
|
|
35
|
+
"icon": "awsui_icon_1q84n_1mepa_666",
|
|
36
|
+
"floating": "awsui_floating_1q84n_1mepa_707",
|
|
37
|
+
"flashbar": "awsui_flashbar_1q84n_1mepa_715",
|
|
38
|
+
"flash-refresh": "awsui_flash-refresh_1q84n_1mepa_790",
|
|
39
|
+
"flash-list": "awsui_flash-list_1q84n_1mepa_299",
|
|
40
|
+
"flash-focus-container": "awsui_flash-focus-container_1q84n_1mepa_811",
|
|
41
|
+
"flash-text": "awsui_flash-text_1q84n_1mepa_841",
|
|
42
|
+
"dismiss-button": "awsui_dismiss-button_1q84n_1mepa_114",
|
|
43
|
+
"breakpoint-default": "awsui_breakpoint-default_1q84n_1mepa_883",
|
|
44
|
+
"action-button": "awsui_action-button_1q84n_1mepa_113",
|
|
45
|
+
"action-slot": "awsui_action-slot_1q84n_1mepa_893",
|
|
46
|
+
"flash-type-success": "awsui_flash-type-success_1q84n_1mepa_897",
|
|
47
|
+
"flash-type-error": "awsui_flash-type-error_1q84n_1mepa_901",
|
|
48
|
+
"flash-type-info": "awsui_flash-type-info_1q84n_1mepa_905",
|
|
49
|
+
"flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_1mepa_906",
|
|
50
|
+
"flash-type-warning": "awsui_flash-type-warning_1q84n_1mepa_910"
|
|
51
51
|
};
|
|
52
52
|
|