@cloudscape-design/components-themeable 3.0.327 → 3.0.328
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/expandable-section/styles.scss +14 -9
- package/lib/internal/template/app-layout/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/index.js +19 -2
- package/lib/internal/template/app-layout/index.js.map +1 -1
- package/lib/internal/template/app-layout/runtime-api.d.ts +8 -0
- package/lib/internal/template/app-layout/runtime-api.d.ts.map +1 -0
- package/lib/internal/template/app-layout/runtime-api.js +32 -0
- package/lib/internal/template/app-layout/runtime-api.js.map +1 -0
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +10 -10
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.d.ts +1 -1
- package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +31 -29
- package/lib/internal/template/expandable-section/styles.scoped.css +56 -51
- package/lib/internal/template/expandable-section/styles.selectors.js +31 -29
- package/lib/internal/template/expandable-section/utils.js +1 -1
- package/lib/internal/template/expandable-section/utils.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/plugins/api.d.ts +15 -0
- package/lib/internal/template/internal/plugins/api.d.ts.map +1 -0
- package/lib/internal/template/internal/plugins/api.js +50 -0
- package/lib/internal/template/internal/plugins/api.js.map +1 -0
- package/lib/internal/template/internal/plugins/drawers-controller.d.ts +17 -0
- package/lib/internal/template/internal/plugins/drawers-controller.d.ts.map +1 -0
- package/lib/internal/template/internal/plugins/drawers-controller.js +34 -0
- package/lib/internal/template/internal/plugins/drawers-controller.js.map +1 -0
- package/lib/internal/template/internal/plugins/index.d.ts +2 -0
- package/lib/internal/template/internal/plugins/index.d.ts.map +1 -0
- package/lib/internal/template/internal/plugins/index.js +4 -0
- package/lib/internal/template/internal/plugins/index.js.map +1 -0
- package/lib/internal/template/table/body-cell/td-element.d.ts +1 -1
- package/lib/internal/template/table/body-cell/td-element.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/td-element.js +1 -1
- package/lib/internal/template/table/body-cell/td-element.js.map +1 -1
- package/lib/internal/template/table/column-widths-utils.d.ts +3 -0
- package/lib/internal/template/table/column-widths-utils.d.ts.map +1 -0
- package/lib/internal/template/table/column-widths-utils.js +16 -0
- package/lib/internal/template/table/column-widths-utils.js.map +1 -0
- package/lib/internal/template/table/header-cell/index.d.ts +2 -2
- package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/index.js +1 -1
- package/lib/internal/template/table/header-cell/index.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +14 -9
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
- package/lib/internal/template/table/resizer/index.js +2 -2
- package/lib/internal/template/table/resizer/index.js.map +1 -1
- package/lib/internal/template/table/thead.d.ts +1 -0
- package/lib/internal/template/table/thead.d.ts.map +1 -1
- package/lib/internal/template/table/thead.js +4 -4
- package/lib/internal/template/table/thead.js.map +1 -1
- package/lib/internal/template/table/use-column-widths.d.ts +10 -8
- package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
- package/lib/internal/template/table/use-column-widths.js +30 -47
- package/lib/internal/template/table/use-column-widths.js.map +1 -1
- package/lib/internal/template/table/use-sticky-columns.d.ts +6 -8
- package/lib/internal/template/table/use-sticky-columns.d.ts.map +1 -1
- package/lib/internal/template/table/use-sticky-columns.js +0 -1
- package/lib/internal/template/table/use-sticky-columns.js.map +1 -1
- package/lib/internal/template/test-utils/dom/app-layout/index.d.ts +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Note that this only\n * works with the `headerText` slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-enter": "awsui_content-
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"trigger-expanded": "awsui_trigger-
|
|
7
|
-
"icon": "
|
|
8
|
-
"root": "
|
|
9
|
-
"expand-button": "awsui_expand-
|
|
10
|
-
"expanded": "
|
|
11
|
-
"icon-container": "awsui_icon-
|
|
12
|
-
"icon-container-container": "awsui_icon-container-
|
|
13
|
-
"wrapper": "
|
|
14
|
-
"wrapper-default": "awsui_wrapper-
|
|
15
|
-
"wrapper-footer": "awsui_wrapper-
|
|
16
|
-
"wrapper-navigation": "awsui_wrapper-
|
|
17
|
-
"wrapper-container": "awsui_wrapper-
|
|
18
|
-
"wrapper-expanded": "awsui_wrapper-
|
|
19
|
-
"header": "
|
|
20
|
-
"header-wrapper": "awsui_header-
|
|
21
|
-
"header-deprecated": "awsui_header-
|
|
22
|
-
"header-button": "awsui_header-
|
|
23
|
-
"header-container-button": "awsui_header-container-
|
|
24
|
-
"header-container": "awsui_header-
|
|
25
|
-
"header-navigation": "awsui_header-
|
|
26
|
-
"content": "
|
|
27
|
-
"content-default": "awsui_content-
|
|
28
|
-
"content-footer": "awsui_content-
|
|
29
|
-
"content-expanded": "awsui_content-
|
|
30
|
-
"focusable": "
|
|
31
|
-
"click-target": "awsui_click-
|
|
32
|
-
"description-default": "awsui_description-
|
|
4
|
+
"content-enter": "awsui_content-enter_gwq0h_10oc0_97",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_10oc0_1",
|
|
6
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_10oc0_119",
|
|
7
|
+
"icon": "awsui_icon_gwq0h_10oc0_133",
|
|
8
|
+
"root": "awsui_root_gwq0h_10oc0_151",
|
|
9
|
+
"expand-button": "awsui_expand-button_gwq0h_10oc0_168",
|
|
10
|
+
"expanded": "awsui_expanded_gwq0h_10oc0_175",
|
|
11
|
+
"icon-container": "awsui_icon-container_gwq0h_10oc0_179",
|
|
12
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_10oc0_184",
|
|
13
|
+
"wrapper": "awsui_wrapper_gwq0h_10oc0_188",
|
|
14
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_10oc0_195",
|
|
15
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_10oc0_198",
|
|
16
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_10oc0_204",
|
|
17
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_10oc0_207",
|
|
18
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_10oc0_224",
|
|
19
|
+
"header": "awsui_header_gwq0h_10oc0_228",
|
|
20
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_10oc0_231",
|
|
21
|
+
"header-deprecated": "awsui_header-deprecated_gwq0h_10oc0_231",
|
|
22
|
+
"header-button": "awsui_header-button_gwq0h_10oc0_241",
|
|
23
|
+
"header-container-button": "awsui_header-container-button_gwq0h_10oc0_245",
|
|
24
|
+
"header-container": "awsui_header-container_gwq0h_10oc0_245",
|
|
25
|
+
"header-navigation": "awsui_header-navigation_gwq0h_10oc0_269",
|
|
26
|
+
"content": "awsui_content_gwq0h_10oc0_97",
|
|
27
|
+
"content-default": "awsui_content-default_gwq0h_10oc0_305",
|
|
28
|
+
"content-footer": "awsui_content-footer_gwq0h_10oc0_308",
|
|
29
|
+
"content-expanded": "awsui_content-expanded_gwq0h_10oc0_311",
|
|
30
|
+
"focusable": "awsui_focusable_gwq0h_10oc0_315",
|
|
31
|
+
"click-target": "awsui_click-target_gwq0h_10oc0_326",
|
|
32
|
+
"description-default": "awsui_description-default_gwq0h_10oc0_333",
|
|
33
|
+
"description-footer": "awsui_description-footer_gwq0h_10oc0_334",
|
|
34
|
+
"description-container": "awsui_description-container_gwq0h_10oc0_338"
|
|
33
35
|
};
|
|
34
36
|
|
|
@@ -94,10 +94,10 @@ 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
|
-
.awsui_content-
|
|
98
|
-
animation: awsui_awsui-motion-fade-
|
|
97
|
+
.awsui_content-enter_gwq0h_10oc0_97:not(#\9) {
|
|
98
|
+
animation: awsui_awsui-motion-fade-in_gwq0h_10oc0_1 var(--motion-duration-show-paced-et23hs, 180ms) var(--motion-easing-show-paced-ddbkug, ease-out);
|
|
99
99
|
}
|
|
100
|
-
@keyframes awsui_awsui-motion-fade-
|
|
100
|
+
@keyframes awsui_awsui-motion-fade-in_gwq0h_10oc0_1 {
|
|
101
101
|
from {
|
|
102
102
|
opacity: 0.2;
|
|
103
103
|
}
|
|
@@ -106,40 +106,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
@media (prefers-reduced-motion: reduce) {
|
|
109
|
-
.awsui_content-
|
|
109
|
+
.awsui_content-enter_gwq0h_10oc0_97:not(#\9) {
|
|
110
110
|
animation: none;
|
|
111
111
|
transition: none;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
.awsui-motion-disabled .awsui_content-
|
|
114
|
+
.awsui-motion-disabled .awsui_content-enter_gwq0h_10oc0_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_10oc0_97:not(#\9) {
|
|
115
115
|
animation: none;
|
|
116
116
|
transition: none;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.awsui_trigger-
|
|
119
|
+
.awsui_trigger-expanded_gwq0h_10oc0_119:not(#\9) {
|
|
120
120
|
transition: border-bottom-color var(--motion-duration-show-paced-et23hs, 180ms) var(--motion-easing-show-paced-ddbkug, ease-out);
|
|
121
121
|
}
|
|
122
122
|
@media (prefers-reduced-motion: reduce) {
|
|
123
|
-
.awsui_trigger-
|
|
123
|
+
.awsui_trigger-expanded_gwq0h_10oc0_119:not(#\9) {
|
|
124
124
|
animation: none;
|
|
125
125
|
transition: none;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
.awsui-motion-disabled .awsui_trigger-
|
|
128
|
+
.awsui-motion-disabled .awsui_trigger-expanded_gwq0h_10oc0_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_10oc0_119:not(#\9) {
|
|
129
129
|
animation: none;
|
|
130
130
|
transition: none;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
.awsui_icon_gwq0h_10oc0_133:not(#\9) {
|
|
134
134
|
transition: transform var(--motion-duration-rotate-90-l1syz5, 135ms) var(--motion-easing-rotate-90-8xzw2x, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
135
135
|
}
|
|
136
136
|
@media (prefers-reduced-motion: reduce) {
|
|
137
|
-
.
|
|
137
|
+
.awsui_icon_gwq0h_10oc0_133:not(#\9) {
|
|
138
138
|
animation: none;
|
|
139
139
|
transition: none;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
.awsui-motion-disabled .
|
|
142
|
+
.awsui-motion-disabled .awsui_icon_gwq0h_10oc0_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_10oc0_133:not(#\9) {
|
|
143
143
|
animation: none;
|
|
144
144
|
transition: none;
|
|
145
145
|
}
|
|
@@ -148,7 +148,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
148
148
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
149
149
|
SPDX-License-Identifier: Apache-2.0
|
|
150
150
|
*/
|
|
151
|
-
.
|
|
151
|
+
.awsui_root_gwq0h_10oc0_151:not(#\9) {
|
|
152
152
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
153
153
|
border-collapse: separate;
|
|
154
154
|
border-spacing: 0;
|
|
@@ -191,91 +191,91 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
display: block;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.awsui_expand-
|
|
194
|
+
.awsui_expand-button_gwq0h_10oc0_168:not(#\9) {
|
|
195
195
|
/* used in test-utils */
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.
|
|
198
|
+
.awsui_icon_gwq0h_10oc0_133:not(#\9) {
|
|
199
199
|
transform: rotate(-90deg);
|
|
200
200
|
}
|
|
201
|
-
.
|
|
201
|
+
.awsui_icon_gwq0h_10oc0_133.awsui_expanded_gwq0h_10oc0_175:not(#\9) {
|
|
202
202
|
transform: rotate(0deg);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
.awsui_icon-
|
|
205
|
+
.awsui_icon-container_gwq0h_10oc0_179:not(#\9) {
|
|
206
206
|
position: relative;
|
|
207
207
|
margin-left: calc((var(--font-body-m-line-height-9vkzhc, 22px) - var(--size-icon-normal-sz51st, 16px)) / -2);
|
|
208
208
|
margin-right: calc(var(--space-xxs-xx079q, 4px) + var(--border-divider-list-width-iu80dg, 1px));
|
|
209
209
|
}
|
|
210
|
-
.awsui_icon-container-
|
|
210
|
+
.awsui_icon-container-container_gwq0h_10oc0_184:not(#\9) {
|
|
211
211
|
margin-right: var(--space-xs-7veqkr, 8px);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
.
|
|
214
|
+
.awsui_wrapper_gwq0h_10oc0_188:not(#\9) {
|
|
215
215
|
box-sizing: border-box;
|
|
216
216
|
border: none;
|
|
217
217
|
width: 100%;
|
|
218
218
|
line-height: var(--font-body-m-line-height-9vkzhc, 22px);
|
|
219
219
|
text-align: left;
|
|
220
220
|
}
|
|
221
|
-
.awsui_wrapper-
|
|
221
|
+
.awsui_wrapper-default_gwq0h_10oc0_195:not(#\9) {
|
|
222
222
|
padding: var(--space-scaled-xxs-gmgwxk, 4px) var(--space-xxs-xx079q, 4px);
|
|
223
223
|
}
|
|
224
|
-
.awsui_wrapper-
|
|
224
|
+
.awsui_wrapper-footer_gwq0h_10oc0_198:not(#\9) {
|
|
225
225
|
padding: var(--space-scaled-xxs-gmgwxk, 4px) 0;
|
|
226
226
|
}
|
|
227
|
-
.awsui_wrapper-
|
|
227
|
+
.awsui_wrapper-default_gwq0h_10oc0_195:not(#\9), .awsui_wrapper-footer_gwq0h_10oc0_198:not(#\9) {
|
|
228
228
|
border: var(--border-divider-section-width-p0xg84, 1px) solid transparent;
|
|
229
229
|
}
|
|
230
|
-
.awsui_wrapper-
|
|
230
|
+
.awsui_wrapper-navigation_gwq0h_10oc0_204:not(#\9) {
|
|
231
231
|
border-left: var(--border-divider-section-width-p0xg84, 1px) solid transparent;
|
|
232
232
|
}
|
|
233
|
-
.awsui_wrapper-
|
|
233
|
+
.awsui_wrapper-navigation_gwq0h_10oc0_204:not(#\9), .awsui_wrapper-container_gwq0h_10oc0_207:not(#\9) {
|
|
234
234
|
display: flex;
|
|
235
235
|
font-weight: var(--font-heading-s-weight-rxw9ij, 700);
|
|
236
236
|
}
|
|
237
|
-
.awsui_wrapper-
|
|
237
|
+
.awsui_wrapper-default_gwq0h_10oc0_195:not(#\9), .awsui_wrapper-navigation_gwq0h_10oc0_204:not(#\9), .awsui_wrapper-footer_gwq0h_10oc0_198:not(#\9) {
|
|
238
238
|
color: var(--color-text-expandable-section-default-dhf1fv, #545b64);
|
|
239
239
|
-webkit-font-smoothing: var(--font-smoothing-webkit-teqshp, auto);
|
|
240
240
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-apq2ca, auto);
|
|
241
241
|
font-size: var(--font-expandable-heading-size-x20mdp, 14px);
|
|
242
242
|
letter-spacing: var(--font-heading-s-letter-spacing-jp7jyt, normal);
|
|
243
243
|
}
|
|
244
|
-
.awsui_wrapper-
|
|
244
|
+
.awsui_wrapper-container_gwq0h_10oc0_207:not(#\9) {
|
|
245
245
|
padding: var(--space-container-header-vertical-ezarcz, 12px) var(--space-container-horizontal-7bp7wa, 20px);
|
|
246
246
|
}
|
|
247
|
-
body[data-awsui-focus-visible=true] .awsui_wrapper-
|
|
247
|
+
body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_10oc0_207:not(#\9):focus {
|
|
248
248
|
padding: calc(var(--space-scaled-s-73r995, 12px) - var(--border-divider-section-width-p0xg84, 1px)) calc(var(--space-l-z6h7qi, 20px) - var(--border-divider-section-width-p0xg84, 1px));
|
|
249
249
|
}
|
|
250
|
-
.awsui_wrapper-
|
|
250
|
+
.awsui_wrapper-default_gwq0h_10oc0_195.awsui_wrapper-expanded_gwq0h_10oc0_224:not(#\9) {
|
|
251
251
|
border-bottom-color: var(--color-border-divider-default-uqjcpn, #eaeded);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
.
|
|
254
|
+
.awsui_header_gwq0h_10oc0_228:not(#\9) {
|
|
255
255
|
/* used in test-utils */
|
|
256
256
|
}
|
|
257
|
-
.awsui_header-
|
|
257
|
+
.awsui_header-wrapper_gwq0h_10oc0_231:not(#\9), .awsui_header-deprecated_gwq0h_10oc0_231:not(#\9) {
|
|
258
258
|
display: flex;
|
|
259
259
|
font-weight: var(--font-heading-s-weight-rxw9ij, 700);
|
|
260
260
|
}
|
|
261
|
-
.awsui_header-
|
|
261
|
+
.awsui_header-wrapper_gwq0h_10oc0_231:not(#\9) {
|
|
262
262
|
font-size: inherit;
|
|
263
263
|
letter-spacing: inherit;
|
|
264
264
|
margin: 0;
|
|
265
265
|
padding: 0;
|
|
266
266
|
}
|
|
267
|
-
.awsui_header-
|
|
267
|
+
.awsui_header-button_gwq0h_10oc0_241:not(#\9) {
|
|
268
268
|
box-sizing: border-box;
|
|
269
269
|
display: flex;
|
|
270
270
|
}
|
|
271
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
271
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_10oc0_241:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_10oc0_245:not(#\9):focus {
|
|
272
272
|
position: relative;
|
|
273
273
|
}
|
|
274
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
274
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_10oc0_241:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_10oc0_245:not(#\9):focus {
|
|
275
275
|
outline: 2px dotted transparent;
|
|
276
276
|
outline-offset: calc(0px - 1px);
|
|
277
277
|
}
|
|
278
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
278
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_10oc0_241:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_10oc0_245:not(#\9):focus::before {
|
|
279
279
|
content: " ";
|
|
280
280
|
display: block;
|
|
281
281
|
position: absolute;
|
|
@@ -286,13 +286,13 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_5ydn8_241:not(#\9
|
|
|
286
286
|
border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
|
|
287
287
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-4clyb1, #0073bb);
|
|
288
288
|
}
|
|
289
|
-
.awsui_header-
|
|
289
|
+
.awsui_header-container_gwq0h_10oc0_245:not(#\9) {
|
|
290
290
|
width: 100%;
|
|
291
291
|
}
|
|
292
|
-
.awsui_header-
|
|
292
|
+
.awsui_header-container_gwq0h_10oc0_245 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9) {
|
|
293
293
|
margin-top: var(--space-expandable-section-icon-offset-top-4ysrlk, 8px);
|
|
294
294
|
}
|
|
295
|
-
.awsui_header-
|
|
295
|
+
.awsui_header-navigation_gwq0h_10oc0_269 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9) {
|
|
296
296
|
display: inline-flex;
|
|
297
297
|
cursor: pointer;
|
|
298
298
|
color: var(--color-text-expandable-section-navigation-icon-default-7jwgwp, #879596);
|
|
@@ -303,17 +303,17 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_5ydn8_241:not(#\9
|
|
|
303
303
|
text-decoration: none;
|
|
304
304
|
flex-direction: column;
|
|
305
305
|
}
|
|
306
|
-
.awsui_header-
|
|
306
|
+
.awsui_header-navigation_gwq0h_10oc0_269 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9):hover {
|
|
307
307
|
color: var(--color-text-expandable-section-hover-q765vp, #16191f);
|
|
308
308
|
}
|
|
309
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
309
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_10oc0_269 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9):focus {
|
|
310
310
|
position: relative;
|
|
311
311
|
}
|
|
312
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
312
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_10oc0_269 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9):focus {
|
|
313
313
|
outline: 2px dotted transparent;
|
|
314
314
|
outline-offset: calc(2px - 1px);
|
|
315
315
|
}
|
|
316
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
316
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_10oc0_269 > .awsui_icon-container_gwq0h_10oc0_179:not(#\9):focus::before {
|
|
317
317
|
content: " ";
|
|
318
318
|
display: block;
|
|
319
319
|
position: absolute;
|
|
@@ -325,37 +325,42 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_5ydn8_269 > .
|
|
|
325
325
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-4clyb1, #0073bb);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
.
|
|
328
|
+
.awsui_content_gwq0h_10oc0_97:not(#\9) {
|
|
329
329
|
display: none;
|
|
330
330
|
}
|
|
331
|
-
.awsui_content-
|
|
331
|
+
.awsui_content-default_gwq0h_10oc0_305:not(#\9) {
|
|
332
332
|
padding: var(--space-scaled-xs-sg3tfb, 8px) 0;
|
|
333
333
|
}
|
|
334
|
-
.awsui_content-
|
|
334
|
+
.awsui_content-footer_gwq0h_10oc0_308:not(#\9) {
|
|
335
335
|
padding: var(--space-xs-7veqkr, 8px) 0;
|
|
336
336
|
}
|
|
337
|
-
.awsui_content-
|
|
337
|
+
.awsui_content-expanded_gwq0h_10oc0_311:not(#\9) {
|
|
338
338
|
display: block;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
.
|
|
341
|
+
.awsui_focusable_gwq0h_10oc0_315:not(#\9):focus {
|
|
342
342
|
outline: none;
|
|
343
343
|
text-decoration: none;
|
|
344
344
|
}
|
|
345
|
-
body[data-awsui-focus-visible=true] .
|
|
345
|
+
body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_10oc0_315:not(#\9):focus {
|
|
346
346
|
outline: 2px dotted transparent;
|
|
347
347
|
border: var(--border-field-width-gmdyxy, 1px) solid var(--color-border-item-focused-4clyb1, #0073bb);
|
|
348
348
|
border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
|
|
349
349
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-qycpr2, 1px) var(--color-border-item-focused-4clyb1, #0073bb);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
.awsui_click-
|
|
352
|
+
.awsui_click-target_gwq0h_10oc0_326:not(#\9) {
|
|
353
353
|
cursor: pointer;
|
|
354
354
|
}
|
|
355
|
-
.awsui_click-
|
|
355
|
+
.awsui_click-target_gwq0h_10oc0_326:not(#\9):not(.awsui_wrapper-container_gwq0h_10oc0_207):not(.awsui_header-container-button_gwq0h_10oc0_245):hover {
|
|
356
356
|
color: var(--color-text-expandable-section-hover-q765vp, #16191f);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
.awsui_description-
|
|
360
|
-
|
|
359
|
+
.awsui_description-default_gwq0h_10oc0_333:not(#\9),
|
|
360
|
+
.awsui_description-footer_gwq0h_10oc0_334:not(#\9) {
|
|
361
|
+
padding-left: calc(var(--size-icon-normal-sz51st, 16px) + (var(--font-body-m-line-height-9vkzhc, 22px) - var(--size-icon-normal-sz51st, 16px)) / -2 + var(--space-xxs-xx079q, 4px) + var(--border-divider-list-width-iu80dg, 1px));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.awsui_description-container_gwq0h_10oc0_338:not(#\9) {
|
|
365
|
+
padding-left: calc(var(--size-icon-medium-9v2l3x, 16px) + (var(--font-body-m-line-height-9vkzhc, 22px) - var(--size-icon-normal-sz51st, 16px)) / -2 + var(--space-xs-7veqkr, 8px));
|
|
361
366
|
}
|
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-enter": "awsui_content-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"trigger-expanded": "awsui_trigger-
|
|
8
|
-
"icon": "
|
|
9
|
-
"root": "
|
|
10
|
-
"expand-button": "awsui_expand-
|
|
11
|
-
"expanded": "
|
|
12
|
-
"icon-container": "awsui_icon-
|
|
13
|
-
"icon-container-container": "awsui_icon-container-
|
|
14
|
-
"wrapper": "
|
|
15
|
-
"wrapper-default": "awsui_wrapper-
|
|
16
|
-
"wrapper-footer": "awsui_wrapper-
|
|
17
|
-
"wrapper-navigation": "awsui_wrapper-
|
|
18
|
-
"wrapper-container": "awsui_wrapper-
|
|
19
|
-
"wrapper-expanded": "awsui_wrapper-
|
|
20
|
-
"header": "
|
|
21
|
-
"header-wrapper": "awsui_header-
|
|
22
|
-
"header-deprecated": "awsui_header-
|
|
23
|
-
"header-button": "awsui_header-
|
|
24
|
-
"header-container-button": "awsui_header-container-
|
|
25
|
-
"header-container": "awsui_header-
|
|
26
|
-
"header-navigation": "awsui_header-
|
|
27
|
-
"content": "
|
|
28
|
-
"content-default": "awsui_content-
|
|
29
|
-
"content-footer": "awsui_content-
|
|
30
|
-
"content-expanded": "awsui_content-
|
|
31
|
-
"focusable": "
|
|
32
|
-
"click-target": "awsui_click-
|
|
33
|
-
"description-default": "awsui_description-
|
|
5
|
+
"content-enter": "awsui_content-enter_gwq0h_10oc0_97",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_10oc0_1",
|
|
7
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_10oc0_119",
|
|
8
|
+
"icon": "awsui_icon_gwq0h_10oc0_133",
|
|
9
|
+
"root": "awsui_root_gwq0h_10oc0_151",
|
|
10
|
+
"expand-button": "awsui_expand-button_gwq0h_10oc0_168",
|
|
11
|
+
"expanded": "awsui_expanded_gwq0h_10oc0_175",
|
|
12
|
+
"icon-container": "awsui_icon-container_gwq0h_10oc0_179",
|
|
13
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_10oc0_184",
|
|
14
|
+
"wrapper": "awsui_wrapper_gwq0h_10oc0_188",
|
|
15
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_10oc0_195",
|
|
16
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_10oc0_198",
|
|
17
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_10oc0_204",
|
|
18
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_10oc0_207",
|
|
19
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_10oc0_224",
|
|
20
|
+
"header": "awsui_header_gwq0h_10oc0_228",
|
|
21
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_10oc0_231",
|
|
22
|
+
"header-deprecated": "awsui_header-deprecated_gwq0h_10oc0_231",
|
|
23
|
+
"header-button": "awsui_header-button_gwq0h_10oc0_241",
|
|
24
|
+
"header-container-button": "awsui_header-container-button_gwq0h_10oc0_245",
|
|
25
|
+
"header-container": "awsui_header-container_gwq0h_10oc0_245",
|
|
26
|
+
"header-navigation": "awsui_header-navigation_gwq0h_10oc0_269",
|
|
27
|
+
"content": "awsui_content_gwq0h_10oc0_97",
|
|
28
|
+
"content-default": "awsui_content-default_gwq0h_10oc0_305",
|
|
29
|
+
"content-footer": "awsui_content-footer_gwq0h_10oc0_308",
|
|
30
|
+
"content-expanded": "awsui_content-expanded_gwq0h_10oc0_311",
|
|
31
|
+
"focusable": "awsui_focusable_gwq0h_10oc0_315",
|
|
32
|
+
"click-target": "awsui_click-target_gwq0h_10oc0_326",
|
|
33
|
+
"description-default": "awsui_description-default_gwq0h_10oc0_333",
|
|
34
|
+
"description-footer": "awsui_description-footer_gwq0h_10oc0_334",
|
|
35
|
+
"description-container": "awsui_description-container_gwq0h_10oc0_338"
|
|
34
36
|
};
|
|
35
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"lib/default/","sources":["expandable-section/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CAAC,OAAuC;IAChF,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"lib/default/","sources":["expandable-section/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CAAC,OAAuC;IAChF,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,QAAQ,CAAC;AAClF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ExpandableSectionProps } from './interfaces';\n\nexport function variantSupportsDescription(variant: ExpandableSectionProps.Variant) {\n return variant === 'container' || variant === 'default' || variant === 'footer';\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DrawerConfig, DrawersRegistrationListener } from './drawers-controller';
|
|
2
|
+
interface AwsuiPluginApiPublic {
|
|
3
|
+
appLayout: {
|
|
4
|
+
registerDrawer(config: DrawerConfig): void;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
interface AwsuiPluginApiInternal {
|
|
8
|
+
appLayout: {
|
|
9
|
+
clearRegisteredDrawers(): void;
|
|
10
|
+
onDrawersRegistered(listener: DrawersRegistrationListener): () => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const awsuiPlugins: AwsuiPluginApiPublic, awsuiPluginsInternal: AwsuiPluginApiInternal;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"lib/default/","sources":["internal/plugins/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAqB,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIpG,UAAU,oBAAoB;IAC5B,SAAS,EAAE;QACT,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;KAC5C,CAAC;CACH;AACD,UAAU,sBAAsB;IAC9B,SAAS,EAAE;QACT,sBAAsB,IAAI,IAAI,CAAC;QAC/B,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,MAAM,IAAI,CAAC;KACxE,CAAC;CACH;AA0CD,eAAO,MAAQ,YAAY,wBAAE,oBAAoB,wBAAc,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { DrawersController } from './drawers-controller';
|
|
4
|
+
const storageKey = Symbol.for('awsui-plugin-api');
|
|
5
|
+
function findUpApi(currentWindow) {
|
|
6
|
+
try {
|
|
7
|
+
if (currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow[storageKey]) {
|
|
8
|
+
return currentWindow[storageKey];
|
|
9
|
+
}
|
|
10
|
+
if (!currentWindow || currentWindow.parent === currentWindow) {
|
|
11
|
+
// When the window has no more parents, it references itself
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
return findUpApi(currentWindow.parent);
|
|
15
|
+
}
|
|
16
|
+
catch (ex) {
|
|
17
|
+
// Most likely a cross-origin access error
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function loadApi() {
|
|
22
|
+
if (typeof window === 'undefined') {
|
|
23
|
+
return createApi();
|
|
24
|
+
}
|
|
25
|
+
const win = window;
|
|
26
|
+
const api = findUpApi(win);
|
|
27
|
+
if (api) {
|
|
28
|
+
return api;
|
|
29
|
+
}
|
|
30
|
+
win[storageKey] = createApi();
|
|
31
|
+
return win[storageKey];
|
|
32
|
+
}
|
|
33
|
+
export const { awsuiPlugins, awsuiPluginsInternal } = loadApi();
|
|
34
|
+
function createApi() {
|
|
35
|
+
const drawers = new DrawersController();
|
|
36
|
+
return {
|
|
37
|
+
awsuiPlugins: {
|
|
38
|
+
appLayout: {
|
|
39
|
+
registerDrawer: drawers.registerDrawer,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
awsuiPluginsInternal: {
|
|
43
|
+
appLayout: {
|
|
44
|
+
clearRegisteredDrawers: drawers.clearRegisteredDrawers,
|
|
45
|
+
onDrawersRegistered: drawers.onDrawersRegistered,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"lib/default/","sources":["internal/plugins/api.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAgB,iBAAiB,EAA+B,MAAM,sBAAsB,CAAC;AAEpG,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAuBlD,SAAS,SAAS,CAAC,aAA4B;IAC7C,IAAI;QACF,IAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,UAAU,CAAC,EAAE;YAC/B,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,aAAa,EAAE;YAC5D,4DAA4D;YAC5D,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,SAAS,CAAC,aAAa,CAAC,MAAuB,CAAC,CAAC;KACzD;IAAC,OAAO,EAAE,EAAE;QACX,0CAA0C;QAC1C,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAED,SAAS,OAAO;IACd,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO,SAAS,EAAE,CAAC;KACpB;IACD,MAAM,GAAG,GAAG,MAAkC,CAAC;IAC/C,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC;KACZ;IACD,GAAG,CAAC,UAAU,CAAC,GAAG,SAAS,EAAE,CAAC;IAC9B,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,OAAO,EAAE,CAAC;AAEhE,SAAS,SAAS;IAChB,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAExC,OAAO;QACL,YAAY,EAAE;YACZ,SAAS,EAAE;gBACT,cAAc,EAAE,OAAO,CAAC,cAAc;aACvC;SACF;QACD,oBAAoB,EAAE;YACpB,SAAS,EAAE;gBACT,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;gBACtD,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;aACjD;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DrawerConfig, DrawersController, DrawersRegistrationListener } from './drawers-controller';\n\nconst storageKey = Symbol.for('awsui-plugin-api');\n\ninterface AwsuiPluginApiPublic {\n appLayout: {\n registerDrawer(config: DrawerConfig): void;\n };\n}\ninterface AwsuiPluginApiInternal {\n appLayout: {\n clearRegisteredDrawers(): void;\n onDrawersRegistered(listener: DrawersRegistrationListener): () => void;\n };\n}\n\ninterface AwsuiApi {\n awsuiPlugins: AwsuiPluginApiPublic;\n awsuiPluginsInternal: AwsuiPluginApiInternal;\n}\n\ninterface WindowWithApi extends Window {\n [storageKey]: AwsuiApi;\n}\n\nfunction findUpApi(currentWindow: WindowWithApi): AwsuiApi | undefined {\n try {\n if (currentWindow?.[storageKey]) {\n return currentWindow[storageKey];\n }\n\n if (!currentWindow || currentWindow.parent === currentWindow) {\n // When the window has no more parents, it references itself\n return undefined;\n }\n\n return findUpApi(currentWindow.parent as WindowWithApi);\n } catch (ex) {\n // Most likely a cross-origin access error\n return undefined;\n }\n}\n\nfunction loadApi() {\n if (typeof window === 'undefined') {\n return createApi();\n }\n const win = window as unknown as WindowWithApi;\n const api = findUpApi(win);\n if (api) {\n return api;\n }\n win[storageKey] = createApi();\n return win[storageKey];\n}\n\nexport const { awsuiPlugins, awsuiPluginsInternal } = loadApi();\n\nfunction createApi(): AwsuiApi {\n const drawers = new DrawersController();\n\n return {\n awsuiPlugins: {\n appLayout: {\n registerDrawer: drawers.registerDrawer,\n },\n },\n awsuiPluginsInternal: {\n appLayout: {\n clearRegisteredDrawers: drawers.clearRegisteredDrawers,\n onDrawersRegistered: drawers.onDrawersRegistered,\n },\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DrawerItem } from '../../app-layout/drawer/interfaces';
|
|
2
|
+
export type DrawerConfig = Omit<DrawerItem, 'content'> & {
|
|
3
|
+
orderPriority?: number;
|
|
4
|
+
mountContent: (container: HTMLElement) => void;
|
|
5
|
+
unmountContent: (container: HTMLElement) => void;
|
|
6
|
+
};
|
|
7
|
+
export type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;
|
|
8
|
+
export declare class DrawersController {
|
|
9
|
+
private drawers;
|
|
10
|
+
private drawersRegistrationListener;
|
|
11
|
+
private updateTimeout;
|
|
12
|
+
private scheduleUpdate;
|
|
13
|
+
registerDrawer: (config: DrawerConfig) => void;
|
|
14
|
+
onDrawersRegistered: (listener: DrawersRegistrationListener) => () => void;
|
|
15
|
+
clearRegisteredDrawers: () => void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=drawers-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawers-controller.d.ts","sourceRoot":"lib/default/","sources":["internal/plugins/drawers-controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;CAClD,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;AAEjF,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,2BAA2B,CAA4C;IAC/E,OAAO,CAAC,aAAa,CAA8C;IAEnE,OAAO,CAAC,cAAc;IAStB,cAAc,WAAY,YAAY,UAGpC;IAEF,mBAAmB,aAAc,2BAA2B,gBAS1D;IAEF,sBAAsB,aAEpB;CACH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class DrawersController {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.drawers = [];
|
|
4
|
+
this.drawersRegistrationListener = null;
|
|
5
|
+
this.updateTimeout = null;
|
|
6
|
+
this.registerDrawer = (config) => {
|
|
7
|
+
this.drawers = this.drawers.concat(config);
|
|
8
|
+
this.scheduleUpdate();
|
|
9
|
+
};
|
|
10
|
+
this.onDrawersRegistered = (listener) => {
|
|
11
|
+
if (this.drawersRegistrationListener !== null) {
|
|
12
|
+
console.warn('[AwsUi] [runtime plugins] multiple app layout instances detected');
|
|
13
|
+
}
|
|
14
|
+
this.drawersRegistrationListener = listener;
|
|
15
|
+
this.scheduleUpdate();
|
|
16
|
+
return () => {
|
|
17
|
+
this.drawersRegistrationListener = null;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
this.clearRegisteredDrawers = () => {
|
|
21
|
+
this.drawers = [];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
scheduleUpdate() {
|
|
25
|
+
if (this.updateTimeout) {
|
|
26
|
+
clearTimeout(this.updateTimeout);
|
|
27
|
+
}
|
|
28
|
+
this.updateTimeout = setTimeout(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = this.drawersRegistrationListener) === null || _a === void 0 ? void 0 : _a.call(this, this.drawers);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=drawers-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawers-controller.js","sourceRoot":"lib/default/","sources":["internal/plugins/drawers-controller.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,iBAAiB;IAA9B;QACU,YAAO,GAAwB,EAAE,CAAC;QAClC,gCAA2B,GAAuC,IAAI,CAAC;QACvE,kBAAa,GAAyC,IAAI,CAAC;QAWnE,mBAAc,GAAG,CAAC,MAAoB,EAAE,EAAE;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC;QAEF,wBAAmB,GAAG,CAAC,QAAqC,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,2BAA2B,KAAK,IAAI,EAAE;gBAC7C,OAAO,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;aAClF;YACD,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CAAC;YAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC;YAC1C,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,2BAAsB,GAAG,GAAG,EAAE;YAC5B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC;IA5BS,cAAc;QACpB,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAClC;QACD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;;YACnC,MAAA,IAAI,CAAC,2BAA2B,qDAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;CAqBF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DrawerItem } from '../../app-layout/drawer/interfaces';\n\nexport type DrawerConfig = Omit<DrawerItem, 'content'> & {\n orderPriority?: number;\n mountContent: (container: HTMLElement) => void;\n unmountContent: (container: HTMLElement) => void;\n};\nexport type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private updateTimeout: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleUpdate() {\n if (this.updateTimeout) {\n clearTimeout(this.updateTimeout);\n }\n this.updateTimeout = setTimeout(() => {\n this.drawersRegistrationListener?.(this.drawers);\n });\n }\n\n registerDrawer = (config: DrawerConfig) => {\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n console.warn('[AwsUi] [runtime plugins] multiple app layout instances detected');\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/plugins/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/plugins/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { awsuiPlugins as default } from './api';\n"]}
|