@cloudscape-design/components-themeable 3.0.401 → 3.0.403
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/anchor-navigation/styles.scss +113 -0
- package/lib/internal/scss/anchor-navigation/test-classes/styles.scss +28 -0
- package/lib/internal/scss/internal/components/dropdown/styles.scss +2 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +40 -39
- package/lib/internal/scss/internal/styles/utils/mixins.scss +2 -8
- package/lib/internal/scss/status-indicator/styles.scss +11 -7
- package/lib/internal/template/anchor-navigation/index.d.ts +5 -0
- package/lib/internal/template/anchor-navigation/index.d.ts.map +1 -0
- package/lib/internal/template/anchor-navigation/index.js +14 -0
- package/lib/internal/template/anchor-navigation/index.js.map +1 -0
- package/lib/internal/template/anchor-navigation/interfaces.d.ts +67 -0
- package/lib/internal/template/anchor-navigation/interfaces.d.ts.map +1 -0
- package/lib/internal/template/anchor-navigation/interfaces.js +4 -0
- package/lib/internal/template/anchor-navigation/interfaces.js.map +1 -0
- package/lib/internal/template/anchor-navigation/internal.d.ts +5 -0
- package/lib/internal/template/anchor-navigation/internal.d.ts.map +1 -0
- package/lib/internal/template/anchor-navigation/internal.js +48 -0
- package/lib/internal/template/anchor-navigation/internal.js.map +1 -0
- package/lib/internal/template/anchor-navigation/styles.css.js +13 -0
- package/lib/internal/template/anchor-navigation/styles.scoped.css +243 -0
- package/lib/internal/template/anchor-navigation/styles.selectors.js +14 -0
- package/lib/internal/template/anchor-navigation/test-classes/styles.css.js +11 -0
- package/lib/internal/template/anchor-navigation/test-classes/styles.scoped.css +27 -0
- package/lib/internal/template/anchor-navigation/test-classes/styles.selectors.js +12 -0
- package/lib/internal/template/anchor-navigation/use-scroll-spy.d.ts +18 -0
- package/lib/internal/template/anchor-navigation/use-scroll-spy.d.ts.map +1 -0
- package/lib/internal/template/anchor-navigation/use-scroll-spy.js +74 -0
- package/lib/internal/template/anchor-navigation/use-scroll-spy.js.map +1 -0
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +30 -30
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +75 -75
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +295 -295
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +75 -75
- package/lib/internal/template/button/styles.css.js +20 -20
- package/lib/internal/template/button/styles.scoped.css +151 -152
- package/lib/internal/template/button/styles.selectors.js +20 -20
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +15 -15
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +18 -19
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +15 -15
- package/lib/internal/template/cards/index.js +2 -2
- package/lib/internal/template/cards/index.js.map +1 -1
- package/lib/internal/template/code-editor/styles.css.js +32 -32
- package/lib/internal/template/code-editor/styles.scoped.css +177 -179
- package/lib/internal/template/code-editor/styles.selectors.js +32 -32
- package/lib/internal/template/collection-preferences/content-display/styles.css.js +11 -11
- package/lib/internal/template/collection-preferences/content-display/styles.scoped.css +17 -18
- package/lib/internal/template/collection-preferences/content-display/styles.selectors.js +11 -11
- package/lib/internal/template/collection-preferences/styles.css.js +37 -37
- package/lib/internal/template/collection-preferences/styles.scoped.css +44 -45
- package/lib/internal/template/collection-preferences/styles.selectors.js +37 -37
- package/lib/internal/template/container/index.d.ts.map +1 -1
- package/lib/internal/template/container/index.js +2 -2
- package/lib/internal/template/container/index.js.map +1 -1
- package/lib/internal/template/container/internal.d.ts +5 -1
- package/lib/internal/template/container/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +7 -4
- package/lib/internal/template/container/internal.js.map +1 -1
- package/lib/internal/template/content-layout/styles.css.js +7 -7
- package/lib/internal/template/content-layout/styles.scoped.css +13 -13
- package/lib/internal/template/content-layout/styles.selectors.js +7 -7
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts +5 -3
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-container.js +2 -2
- package/lib/internal/template/expandable-section/expandable-section-container.js.map +1 -1
- package/lib/internal/template/expandable-section/index.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/index.js +8 -3
- package/lib/internal/template/expandable-section/index.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +3 -3
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +2 -2
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +29 -29
- package/lib/internal/template/expandable-section/styles.scoped.css +58 -59
- package/lib/internal/template/expandable-section/styles.selectors.js +29 -29
- package/lib/internal/template/flashbar/styles.css.js +47 -47
- package/lib/internal/template/flashbar/styles.scoped.css +171 -172
- package/lib/internal/template/flashbar/styles.selectors.js +47 -47
- package/lib/internal/template/form-field/styles.css.js +19 -19
- package/lib/internal/template/form-field/styles.scoped.css +29 -30
- package/lib/internal/template/form-field/styles.selectors.js +19 -19
- package/lib/internal/template/header/styles.css.js +32 -32
- package/lib/internal/template/header/styles.scoped.css +48 -49
- package/lib/internal/template/header/styles.selectors.js +32 -32
- package/lib/internal/template/index.d.ts +1 -0
- package/lib/internal/template/index.d.ts.map +1 -1
- package/lib/internal/template/index.js +1 -0
- package/lib/internal/template/index.js.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +2 -2
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js +8 -2
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/lib/internal/template/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/hooks/use-funnel.js +2 -1
- package/lib/internal/template/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/lib/internal/template/internal/components/abstract-switch/styles.css.js +13 -13
- package/lib/internal/template/internal/components/abstract-switch/styles.scoped.css +19 -21
- package/lib/internal/template/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts +31 -2
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js +49 -7
- package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown/index.js +20 -2
- package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown/styles.css.js +21 -21
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +37 -36
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +21 -21
- package/lib/internal/template/internal/components/menu-dropdown/styles.css.js +7 -7
- package/lib/internal/template/internal/components/menu-dropdown/styles.scoped.css +13 -14
- package/lib/internal/template/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/option/styles.css.js +17 -17
- package/lib/internal/template/internal/components/option/styles.scoped.css +29 -30
- package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +40 -39
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/utils/scrollable-containers.d.ts +6 -1
- package/lib/internal/template/internal/utils/scrollable-containers.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/scrollable-containers.js +1 -1
- package/lib/internal/template/internal/utils/scrollable-containers.js.map +1 -1
- package/lib/internal/template/modal/internal.d.ts.map +1 -1
- package/lib/internal/template/modal/internal.js +6 -4
- package/lib/internal/template/modal/internal.js.map +1 -1
- package/lib/internal/template/package.json +1 -0
- package/lib/internal/template/progress-bar/styles.css.js +18 -18
- package/lib/internal/template/progress-bar/styles.scoped.css +32 -33
- package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
- package/lib/internal/template/property-filter/styles.css.js +30 -30
- package/lib/internal/template/property-filter/styles.scoped.css +32 -33
- package/lib/internal/template/property-filter/styles.selectors.js +30 -30
- package/lib/internal/template/side-navigation/styles.css.js +28 -28
- package/lib/internal/template/side-navigation/styles.scoped.css +38 -39
- package/lib/internal/template/side-navigation/styles.selectors.js +28 -28
- package/lib/internal/template/split-panel/styles.css.js +56 -56
- package/lib/internal/template/split-panel/styles.scoped.css +77 -78
- package/lib/internal/template/split-panel/styles.selectors.js +56 -56
- package/lib/internal/template/status-indicator/internal.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/internal.js +3 -1
- package/lib/internal/template/status-indicator/internal.js.map +1 -1
- package/lib/internal/template/status-indicator/styles.css.js +22 -22
- package/lib/internal/template/status-indicator/styles.scoped.css +36 -34
- package/lib/internal/template/status-indicator/styles.selectors.js +22 -22
- package/lib/internal/template/table/header-cell/index.d.ts +0 -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/index.d.ts.map +1 -1
- package/lib/internal/template/table/index.js +8 -4
- package/lib/internal/template/table/index.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts +1 -0
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +8 -2
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table/resizer/index.d.ts +3 -5
- package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
- package/lib/internal/template/table/resizer/index.js +44 -66
- package/lib/internal/template/table/resizer/index.js.map +1 -1
- package/lib/internal/template/table/resizer/resizer-lookup.d.ts +8 -0
- package/lib/internal/template/table/resizer/resizer-lookup.d.ts.map +1 -0
- package/lib/internal/template/table/resizer/resizer-lookup.js +39 -0
- package/lib/internal/template/table/resizer/resizer-lookup.js.map +1 -0
- package/lib/internal/template/tabs/styles.css.js +21 -21
- package/lib/internal/template/tabs/styles.scoped.css +39 -40
- package/lib/internal/template/tabs/styles.selectors.js +21 -21
- package/lib/internal/template/test-utils/dom/anchor-navigation/index.d.ts +16 -0
- package/lib/internal/template/test-utils/dom/anchor-navigation/index.js +58 -0
- package/lib/internal/template/test-utils/dom/anchor-navigation/index.js.map +1 -0
- package/lib/internal/template/test-utils/dom/index.d.ts +3 -0
- package/lib/internal/template/test-utils/dom/index.js +10 -2
- package/lib/internal/template/test-utils/dom/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/anchor-navigation/index.d.ts +15 -0
- package/lib/internal/template/test-utils/selectors/anchor-navigation/index.js +45 -0
- package/lib/internal/template/test-utils/selectors/anchor-navigation/index.js.map +1 -0
- package/lib/internal/template/test-utils/selectors/index.d.ts +3 -0
- package/lib/internal/template/test-utils/selectors/index.js +10 -2
- package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/lib/internal/template/tiles/styles.css.js +29 -29
- package/lib/internal/template/tiles/styles.scoped.css +70 -71
- package/lib/internal/template/tiles/styles.selectors.js +29 -29
- package/lib/internal/template/wizard/styles.css.js +31 -31
- package/lib/internal/template/wizard/styles.scoped.css +64 -68
- package/lib/internal/template/wizard/styles.selectors.js +31 -31
- package/package.json +1 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
/*
|
|
34
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
+
SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/
|
|
41
|
+
/*
|
|
42
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
+
SPDX-License-Identifier: Apache-2.0
|
|
44
|
+
*/
|
|
45
|
+
/*
|
|
46
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
+
SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
55
|
+
SPDX-License-Identifier: Apache-2.0
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
66
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
67
|
+
/*
|
|
68
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
|
+
SPDX-License-Identifier: Apache-2.0
|
|
70
|
+
*/
|
|
71
|
+
/*
|
|
72
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73
|
+
SPDX-License-Identifier: Apache-2.0
|
|
74
|
+
*/
|
|
75
|
+
/*
|
|
76
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
77
|
+
SPDX-License-Identifier: Apache-2.0
|
|
78
|
+
*/
|
|
79
|
+
/*
|
|
80
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
81
|
+
SPDX-License-Identifier: Apache-2.0
|
|
82
|
+
*/
|
|
83
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
84
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
85
|
+
/*
|
|
86
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
+
SPDX-License-Identifier: Apache-2.0
|
|
88
|
+
*/
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
.awsui_root_swimc_h60aw_93:not(#\9) {
|
|
94
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
|
+
border-collapse: separate;
|
|
96
|
+
border-spacing: 0;
|
|
97
|
+
caption-side: top;
|
|
98
|
+
cursor: auto;
|
|
99
|
+
direction: ltr;
|
|
100
|
+
empty-cells: show;
|
|
101
|
+
font-family: serif;
|
|
102
|
+
font-size: medium;
|
|
103
|
+
font-style: normal;
|
|
104
|
+
font-variant: normal;
|
|
105
|
+
font-weight: normal;
|
|
106
|
+
font-stretch: normal;
|
|
107
|
+
line-height: normal;
|
|
108
|
+
-webkit-hyphens: none;
|
|
109
|
+
hyphens: none;
|
|
110
|
+
letter-spacing: normal;
|
|
111
|
+
list-style: disc outside none;
|
|
112
|
+
tab-size: 8;
|
|
113
|
+
text-align: left;
|
|
114
|
+
text-align-last: auto;
|
|
115
|
+
text-indent: 0;
|
|
116
|
+
text-shadow: none;
|
|
117
|
+
text-transform: none;
|
|
118
|
+
visibility: visible;
|
|
119
|
+
white-space: normal;
|
|
120
|
+
widows: 2;
|
|
121
|
+
word-spacing: normal;
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
font-size: var(--font-size-body-m-pa3mqb, 14px);
|
|
124
|
+
line-height: var(--line-height-body-m-2zx78l, 22px);
|
|
125
|
+
color: var(--color-text-body-default-ki9w9u, #16191f);
|
|
126
|
+
font-weight: 400;
|
|
127
|
+
font-family: var(--font-family-base-0nmw8v, "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
128
|
+
-webkit-font-smoothing: auto;
|
|
129
|
+
-moz-osx-font-smoothing: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.awsui_anchor-list_swimc_h60aw_106:not(#\9) {
|
|
133
|
+
list-style: none;
|
|
134
|
+
margin: 0;
|
|
135
|
+
padding: 0;
|
|
136
|
+
position: relative;
|
|
137
|
+
text-indent: 0;
|
|
138
|
+
}
|
|
139
|
+
.awsui_anchor-list_swimc_h60aw_106:not(#\9)::before {
|
|
140
|
+
content: "";
|
|
141
|
+
background-color: var(--color-border-divider-default-cr3oi6, #eaeded);
|
|
142
|
+
border-radius: var(--border-radius-tabs-focus-ring-7k0vsi, 0px);
|
|
143
|
+
bottom: -2px;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: -2px;
|
|
147
|
+
width: 2px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.awsui_anchor-item_swimc_h60aw_124:not(#\9) {
|
|
151
|
+
transition: var(--motion-duration-slow-ncmroz, 180ms);
|
|
152
|
+
transition-property: all;
|
|
153
|
+
font-size: var(--font-size-body-m-pa3mqb, 14px);
|
|
154
|
+
line-height: var(--line-height-body-m-2zx78l, 22px);
|
|
155
|
+
color: var(--color-text-body-secondary-yttmze, #545b64);
|
|
156
|
+
font-weight: 400;
|
|
157
|
+
margin: var(--space-scaled-xxs-t7ij38, 4px) 0;
|
|
158
|
+
}
|
|
159
|
+
@media (prefers-reduced-motion: reduce) {
|
|
160
|
+
.awsui_anchor-item_swimc_h60aw_124:not(#\9) {
|
|
161
|
+
animation: none;
|
|
162
|
+
transition: none;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
.awsui-motion-disabled .awsui_anchor-item_swimc_h60aw_124:not(#\9), .awsui-mode-entering .awsui_anchor-item_swimc_h60aw_124:not(#\9) {
|
|
166
|
+
animation: none;
|
|
167
|
+
transition: none;
|
|
168
|
+
}
|
|
169
|
+
.awsui_anchor-item--active_swimc_h60aw_143:not(#\9) {
|
|
170
|
+
position: relative;
|
|
171
|
+
}
|
|
172
|
+
.awsui_anchor-item--active_swimc_h60aw_143:not(#\9)::before {
|
|
173
|
+
content: "";
|
|
174
|
+
background-color: var(--color-text-accent-yy9054, #0073bb);
|
|
175
|
+
border-radius: var(--border-radius-tabs-focus-ring-7k0vsi, 0px);
|
|
176
|
+
bottom: -2px;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: -2px;
|
|
180
|
+
width: 2px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.awsui_anchor-link_swimc_h60aw_157:not(#\9) {
|
|
184
|
+
transition: var(--motion-duration-slow-ncmroz, 180ms);
|
|
185
|
+
transition-property: all;
|
|
186
|
+
font-size: var(--font-size-body-m-pa3mqb, 14px);
|
|
187
|
+
line-height: var(--line-height-body-m-2zx78l, 22px);
|
|
188
|
+
align-items: baseline;
|
|
189
|
+
color: var(--color-text-body-secondary-yttmze, #545b64);
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: row;
|
|
192
|
+
font-weight: 400;
|
|
193
|
+
text-decoration: none;
|
|
194
|
+
}
|
|
195
|
+
@media (prefers-reduced-motion: reduce) {
|
|
196
|
+
.awsui_anchor-link_swimc_h60aw_157:not(#\9) {
|
|
197
|
+
animation: none;
|
|
198
|
+
transition: none;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
.awsui-motion-disabled .awsui_anchor-link_swimc_h60aw_157:not(#\9), .awsui-mode-entering .awsui_anchor-link_swimc_h60aw_157:not(#\9) {
|
|
202
|
+
animation: none;
|
|
203
|
+
transition: none;
|
|
204
|
+
}
|
|
205
|
+
body[data-awsui-focus-visible=true] .awsui_anchor-link_swimc_h60aw_157:not(#\9):focus {
|
|
206
|
+
outline: thin dotted;
|
|
207
|
+
outline: var(--border-link-focus-ring-outline-gygm43, 5px auto Highlight);
|
|
208
|
+
outline-offset: 2px;
|
|
209
|
+
outline-color: var(--color-border-item-focused-v8nq2m, #0073bb);
|
|
210
|
+
border-radius: var(--border-radius-control-default-focus-ring-a78bgq, 2px);
|
|
211
|
+
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-efbp5h, 0px) var(--color-border-item-focused-v8nq2m, #0073bb);
|
|
212
|
+
}
|
|
213
|
+
.awsui_anchor-link_swimc_h60aw_157:not(#\9):hover {
|
|
214
|
+
color: var(--color-text-accent-yy9054, #0073bb);
|
|
215
|
+
}
|
|
216
|
+
.awsui_anchor-link_swimc_h60aw_157:not(#\9):focus {
|
|
217
|
+
outline: none;
|
|
218
|
+
}
|
|
219
|
+
.awsui_anchor-link_swimc_h60aw_157:not(#\9):hover, .awsui_anchor-link_swimc_h60aw_157:not(#\9):focus {
|
|
220
|
+
text-decoration: none;
|
|
221
|
+
}
|
|
222
|
+
.awsui_anchor-link--active_swimc_h60aw_196:not(#\9) {
|
|
223
|
+
font-weight: var(--font-wayfinding-link-active-weight-wec2dg, 700);
|
|
224
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit-8fiijr, auto);
|
|
225
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-fw8n0n, auto);
|
|
226
|
+
color: var(--color-text-accent-yy9054, #0073bb);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.awsui_anchor-link-text_swimc_h60aw_203:not(#\9) {
|
|
230
|
+
display: block;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.awsui_anchor-link-info_swimc_h60aw_207:not(#\9) {
|
|
234
|
+
margin-left: var(--space-xs-xf5ch3, 8px);
|
|
235
|
+
font-size: var(--font-size-body-s-533prh, 12px);
|
|
236
|
+
line-height: var(--line-height-body-s-n0pazd, 16px);
|
|
237
|
+
letter-spacing: var(--letter-spacing-body-s-nkvets, normal);
|
|
238
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit-8fiijr, auto);
|
|
239
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-fw8n0n, auto);
|
|
240
|
+
font-weight: var(--font-button-weight-s67y37, 700);
|
|
241
|
+
letter-spacing: 0.005em;
|
|
242
|
+
color: var(--color-text-link-default-hop3gv, #0073bb);
|
|
243
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"root": "awsui_root_swimc_h60aw_93",
|
|
6
|
+
"anchor-list": "awsui_anchor-list_swimc_h60aw_106",
|
|
7
|
+
"anchor-item": "awsui_anchor-item_swimc_h60aw_124",
|
|
8
|
+
"anchor-item--active": "awsui_anchor-item--active_swimc_h60aw_143",
|
|
9
|
+
"anchor-link": "awsui_anchor-link_swimc_h60aw_157",
|
|
10
|
+
"anchor-link--active": "awsui_anchor-link--active_swimc_h60aw_196",
|
|
11
|
+
"anchor-link-text": "awsui_anchor-link-text_swimc_h60aw_203",
|
|
12
|
+
"anchor-link-info": "awsui_anchor-link-info_swimc_h60aw_207"
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"root": "awsui_root_17oho_5eh15_5",
|
|
5
|
+
"anchor-list": "awsui_anchor-list_17oho_5eh15_9",
|
|
6
|
+
"anchor-item--active": "awsui_anchor-item--active_17oho_5eh15_13",
|
|
7
|
+
"anchor-link": "awsui_anchor-link_17oho_5eh15_17",
|
|
8
|
+
"anchor-link-text": "awsui_anchor-link-text_17oho_5eh15_21",
|
|
9
|
+
"anchor-link-info": "awsui_anchor-link-info_17oho_5eh15_25"
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
.awsui_root_17oho_5eh15_5:not(#\9) {
|
|
6
|
+
/* used in test-utils */
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.awsui_anchor-list_17oho_5eh15_9:not(#\9) {
|
|
10
|
+
/* used in test-utils */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.awsui_anchor-item--active_17oho_5eh15_13:not(#\9) {
|
|
14
|
+
/* used in test-utils */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.awsui_anchor-link_17oho_5eh15_17:not(#\9) {
|
|
18
|
+
/* used in test-utils */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.awsui_anchor-link-text_17oho_5eh15_21:not(#\9) {
|
|
22
|
+
/* used in test-utils */
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.awsui_anchor-link-info_17oho_5eh15_25:not(#\9) {
|
|
26
|
+
/* used in test-utils */
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"root": "awsui_root_17oho_5eh15_5",
|
|
6
|
+
"anchor-list": "awsui_anchor-list_17oho_5eh15_9",
|
|
7
|
+
"anchor-item--active": "awsui_anchor-item--active_17oho_5eh15_13",
|
|
8
|
+
"anchor-link": "awsui_anchor-link_17oho_5eh15_17",
|
|
9
|
+
"anchor-link-text": "awsui_anchor-link-text_17oho_5eh15_21",
|
|
10
|
+
"anchor-link-info": "awsui_anchor-link-info_17oho_5eh15_25"
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to implement scroll-spy functionality.
|
|
3
|
+
*
|
|
4
|
+
* @param hrefs An array of href strings that correspond to the IDs of the target elements on the page.
|
|
5
|
+
* The hrefs should be sorted in the order they appear on the page for accurate scroll-spy behavior.
|
|
6
|
+
* @param scrollSpyOffset The number of pixels to offset from the top of the document when activating anchors.
|
|
7
|
+
* Useful for accommodating fixed or sticky headers.
|
|
8
|
+
* @param activeHref The currently active href. If provided, the hook will operate in a controlled manner,
|
|
9
|
+
* and the scroll-spy logic will be disabled.
|
|
10
|
+
*
|
|
11
|
+
* @returns {string | undefined} - The href of the currently active element as per scroll position, or undefined if none is active.
|
|
12
|
+
*/
|
|
13
|
+
export default function useScrollSpy({ hrefs, scrollSpyOffset, activeHref, }: {
|
|
14
|
+
hrefs: string[];
|
|
15
|
+
scrollSpyOffset: number;
|
|
16
|
+
activeHref?: string;
|
|
17
|
+
}): string | undefined;
|
|
18
|
+
//# sourceMappingURL=use-scroll-spy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scroll-spy.d.ts","sourceRoot":"lib/default/","sources":["anchor-navigation/use-scroll-spy.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAK,EACL,eAAe,EACf,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,GAAG,SAAS,CAgErB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
const isBrowser = typeof window !== 'undefined';
|
|
5
|
+
/**
|
|
6
|
+
* Hook to implement scroll-spy functionality.
|
|
7
|
+
*
|
|
8
|
+
* @param hrefs An array of href strings that correspond to the IDs of the target elements on the page.
|
|
9
|
+
* The hrefs should be sorted in the order they appear on the page for accurate scroll-spy behavior.
|
|
10
|
+
* @param scrollSpyOffset The number of pixels to offset from the top of the document when activating anchors.
|
|
11
|
+
* Useful for accommodating fixed or sticky headers.
|
|
12
|
+
* @param activeHref The currently active href. If provided, the hook will operate in a controlled manner,
|
|
13
|
+
* and the scroll-spy logic will be disabled.
|
|
14
|
+
*
|
|
15
|
+
* @returns {string | undefined} - The href of the currently active element as per scroll position, or undefined if none is active.
|
|
16
|
+
*/
|
|
17
|
+
export default function useScrollSpy({ hrefs, scrollSpyOffset, activeHref, }) {
|
|
18
|
+
const [currentHref, setCurrentHref] = useState(activeHref);
|
|
19
|
+
const [lastAnchorExists, setLastAnchorExists] = useState(false);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setCurrentHref(activeHref);
|
|
22
|
+
}, [activeHref]);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
var _a;
|
|
25
|
+
setLastAnchorExists(isBrowser && !!document.getElementById((_a = hrefs[hrefs.length - 1]) === null || _a === void 0 ? void 0 : _a.slice(1)));
|
|
26
|
+
}, [hrefs]);
|
|
27
|
+
// Get the bounding rectangle of an element by href
|
|
28
|
+
const getRectByHref = useCallback(href => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = document.getElementById(href.slice(1))) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
31
|
+
}, []);
|
|
32
|
+
// Check if we're scrolled to the bottom of the page
|
|
33
|
+
const isPageBottom = useCallback(() => {
|
|
34
|
+
return lastAnchorExists && Math.ceil(window.scrollY) >= Math.floor(document.body.scrollHeight - window.innerHeight);
|
|
35
|
+
}, [lastAnchorExists]);
|
|
36
|
+
// Find the first href for which the element is within the viewport
|
|
37
|
+
const findHrefInView = useCallback(() => {
|
|
38
|
+
return hrefs.find(href => {
|
|
39
|
+
const rect = getRectByHref(href);
|
|
40
|
+
return rect && rect.bottom <= window.innerHeight && rect.top >= scrollSpyOffset;
|
|
41
|
+
});
|
|
42
|
+
}, [getRectByHref, scrollSpyOffset, hrefs]);
|
|
43
|
+
// Find the last href where its element is above or within the viewport
|
|
44
|
+
const findLastHrefInView = useCallback(() => {
|
|
45
|
+
return [...hrefs].reverse().find(href => {
|
|
46
|
+
const rect = getRectByHref(href);
|
|
47
|
+
return rect && rect.bottom <= window.innerHeight;
|
|
48
|
+
});
|
|
49
|
+
}, [getRectByHref, hrefs]);
|
|
50
|
+
// Scroll event handler
|
|
51
|
+
const handleScroll = useCallback(() => {
|
|
52
|
+
if (activeHref || !isBrowser) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const { scrollY } = window;
|
|
56
|
+
if (document.body.scrollHeight > window.innerHeight && isPageBottom()) {
|
|
57
|
+
setCurrentHref(hrefs[hrefs.length - 1]);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
setCurrentHref(findHrefInView() || (scrollY > 0 ? findLastHrefInView() : undefined));
|
|
61
|
+
}
|
|
62
|
+
}, [activeHref, isPageBottom, findHrefInView, findLastHrefInView, hrefs]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (isBrowser) {
|
|
65
|
+
handleScroll();
|
|
66
|
+
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
67
|
+
return () => {
|
|
68
|
+
window.removeEventListener('scroll', handleScroll);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}, [handleScroll]);
|
|
72
|
+
return currentHref;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=use-scroll-spy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scroll-spy.js","sourceRoot":"lib/default/","sources":["anchor-navigation/use-scroll-spy.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 { useCallback, useEffect, useState } from 'react';\n\nconst isBrowser = typeof window !== 'undefined';\n\n/**\n * Hook to implement scroll-spy functionality.\n *\n * @param hrefs An array of href strings that correspond to the IDs of the target elements on the page.\n * The hrefs should be sorted in the order they appear on the page for accurate scroll-spy behavior.\n * @param scrollSpyOffset The number of pixels to offset from the top of the document when activating anchors.\n * Useful for accommodating fixed or sticky headers.\n * @param activeHref The currently active href. If provided, the hook will operate in a controlled manner,\n * and the scroll-spy logic will be disabled.\n *\n * @returns {string | undefined} - The href of the currently active element as per scroll position, or undefined if none is active.\n */\nexport default function useScrollSpy({\n hrefs,\n scrollSpyOffset,\n activeHref,\n}: {\n hrefs: string[];\n scrollSpyOffset: number;\n activeHref?: string;\n}): string | undefined {\n const [currentHref, setCurrentHref] = useState<string | undefined>(activeHref);\n const [lastAnchorExists, setLastAnchorExists] = useState(false);\n\n useEffect(() => {\n setCurrentHref(activeHref);\n }, [activeHref]);\n\n useEffect(() => {\n setLastAnchorExists(isBrowser && !!document.getElementById(hrefs[hrefs.length - 1]?.slice(1)));\n }, [hrefs]);\n\n // Get the bounding rectangle of an element by href\n const getRectByHref = useCallback(href => {\n return document.getElementById(href.slice(1))?.getBoundingClientRect();\n }, []);\n\n // Check if we're scrolled to the bottom of the page\n const isPageBottom = useCallback(() => {\n return lastAnchorExists && Math.ceil(window.scrollY) >= Math.floor(document.body.scrollHeight - window.innerHeight);\n }, [lastAnchorExists]);\n\n // Find the first href for which the element is within the viewport\n const findHrefInView = useCallback(() => {\n return hrefs.find(href => {\n const rect = getRectByHref(href);\n return rect && rect.bottom <= window.innerHeight && rect.top >= scrollSpyOffset;\n });\n }, [getRectByHref, scrollSpyOffset, hrefs]);\n\n // Find the last href where its element is above or within the viewport\n const findLastHrefInView = useCallback(() => {\n return [...hrefs].reverse().find(href => {\n const rect = getRectByHref(href);\n return rect && rect.bottom <= window.innerHeight;\n });\n }, [getRectByHref, hrefs]);\n\n // Scroll event handler\n const handleScroll = useCallback(() => {\n if (activeHref || !isBrowser) {\n return;\n }\n\n const { scrollY } = window;\n\n if (document.body.scrollHeight > window.innerHeight && isPageBottom()) {\n setCurrentHref(hrefs[hrefs.length - 1]);\n } else {\n setCurrentHref(findHrefInView() || (scrollY > 0 ? findLastHrefInView() : undefined));\n }\n }, [activeHref, isPageBottom, findHrefInView, findLastHrefInView, hrefs]);\n\n useEffect(() => {\n if (isBrowser) {\n handleScroll();\n window.addEventListener('scroll', handleScroll, { passive: true });\n return () => {\n window.removeEventListener('scroll', handleScroll);\n };\n }\n }, [handleScroll]);\n\n return currentHref;\n}\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
14
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
15
|
-
"annotation": "
|
|
16
|
-
"next-button": "awsui_next-
|
|
17
|
-
"previous-button": "awsui_previous-
|
|
18
|
-
"finish-button": "awsui_finish-
|
|
19
|
-
"header": "
|
|
20
|
-
"step-counter-content": "awsui_step-counter-
|
|
21
|
-
"content": "
|
|
22
|
-
"description": "
|
|
23
|
-
"actionBar": "
|
|
24
|
-
"stepCounter": "
|
|
25
|
-
"divider": "
|
|
26
|
-
"hotspot": "
|
|
27
|
-
"icon": "
|
|
4
|
+
"arrow": "awsui_arrow_1hpp3_rugxw_93",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_1hpp3_rugxw_97",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_1hpp3_rugxw_97",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_rugxw_128",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_rugxw_128",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_rugxw_131",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_rugxw_131",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_rugxw_134",
|
|
12
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_rugxw_134",
|
|
13
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_rugxw_137",
|
|
14
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_rugxw_137",
|
|
15
|
+
"annotation": "awsui_annotation_1hpp3_rugxw_145",
|
|
16
|
+
"next-button": "awsui_next-button_1hpp3_rugxw_146",
|
|
17
|
+
"previous-button": "awsui_previous-button_1hpp3_rugxw_147",
|
|
18
|
+
"finish-button": "awsui_finish-button_1hpp3_rugxw_148",
|
|
19
|
+
"header": "awsui_header_1hpp3_rugxw_149",
|
|
20
|
+
"step-counter-content": "awsui_step-counter-content_1hpp3_rugxw_150",
|
|
21
|
+
"content": "awsui_content_1hpp3_rugxw_151",
|
|
22
|
+
"description": "awsui_description_1hpp3_rugxw_155",
|
|
23
|
+
"actionBar": "awsui_actionBar_1hpp3_rugxw_160",
|
|
24
|
+
"stepCounter": "awsui_stepCounter_1hpp3_rugxw_167",
|
|
25
|
+
"divider": "awsui_divider_1hpp3_rugxw_171",
|
|
26
|
+
"hotspot": "awsui_hotspot_1hpp3_rugxw_175",
|
|
27
|
+
"icon": "awsui_icon_1hpp3_rugxw_215"
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -90,11 +90,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_arrow_1hpp3_rugxw_93:not(#\9) {
|
|
94
94
|
width: 20px;
|
|
95
95
|
height: 10px;
|
|
96
96
|
}
|
|
97
|
-
.awsui_arrow-
|
|
97
|
+
.awsui_arrow-outer_1hpp3_rugxw_97:not(#\9), .awsui_arrow-inner_1hpp3_rugxw_97:not(#\9) {
|
|
98
98
|
position: absolute;
|
|
99
99
|
overflow: hidden;
|
|
100
100
|
width: 20px;
|
|
@@ -102,7 +102,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
102
102
|
top: 0;
|
|
103
103
|
left: 0;
|
|
104
104
|
}
|
|
105
|
-
.awsui_arrow-
|
|
105
|
+
.awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after, .awsui_arrow-inner_1hpp3_rugxw_97:not(#\9)::after {
|
|
106
106
|
content: "";
|
|
107
107
|
box-sizing: border-box;
|
|
108
108
|
display: inline-block;
|
|
@@ -115,26 +115,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
115
115
|
transform: rotate(45deg);
|
|
116
116
|
transform-origin: 0 100%;
|
|
117
117
|
}
|
|
118
|
-
.awsui_arrow-
|
|
118
|
+
.awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after {
|
|
119
119
|
background-color: var(--color-border-status-info-q9np44, #0073bb);
|
|
120
120
|
}
|
|
121
|
-
.awsui_arrow-
|
|
121
|
+
.awsui_arrow-inner_1hpp3_rugxw_97:not(#\9) {
|
|
122
122
|
top: 2px;
|
|
123
123
|
}
|
|
124
|
-
.awsui_arrow-
|
|
124
|
+
.awsui_arrow-inner_1hpp3_rugxw_97:not(#\9)::after {
|
|
125
125
|
border-radius: 1px 0 0 0;
|
|
126
126
|
background-color: var(--color-background-status-info-pgxhez, #f1faff);
|
|
127
127
|
}
|
|
128
|
-
.awsui_arrow-position-right-
|
|
128
|
+
.awsui_arrow-position-right-top_1hpp3_rugxw_128 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_rugxw_128 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after {
|
|
129
129
|
box-shadow: -0.71px 0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
|
|
130
130
|
}
|
|
131
|
-
.awsui_arrow-position-left-
|
|
131
|
+
.awsui_arrow-position-left-top_1hpp3_rugxw_131 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_rugxw_131 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after {
|
|
132
132
|
box-shadow: 0.71px -0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
|
|
133
133
|
}
|
|
134
|
-
.awsui_arrow-position-top-
|
|
134
|
+
.awsui_arrow-position-top-center_1hpp3_rugxw_134 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_rugxw_134 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after {
|
|
135
135
|
box-shadow: -0.71px -0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
|
|
136
136
|
}
|
|
137
|
-
.awsui_arrow-position-bottom-
|
|
137
|
+
.awsui_arrow-position-bottom-center_1hpp3_rugxw_137 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_rugxw_137 > .awsui_arrow-outer_1hpp3_rugxw_97:not(#\9)::after {
|
|
138
138
|
box-shadow: 0.71px 0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -142,37 +142,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
142
142
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
143
143
|
SPDX-License-Identifier: Apache-2.0
|
|
144
144
|
*/
|
|
145
|
-
.
|
|
146
|
-
.awsui_next-
|
|
147
|
-
.awsui_previous-
|
|
148
|
-
.awsui_finish-
|
|
149
|
-
.
|
|
150
|
-
.awsui_step-counter-
|
|
151
|
-
.
|
|
145
|
+
.awsui_annotation_1hpp3_rugxw_145:not(#\9),
|
|
146
|
+
.awsui_next-button_1hpp3_rugxw_146:not(#\9),
|
|
147
|
+
.awsui_previous-button_1hpp3_rugxw_147:not(#\9),
|
|
148
|
+
.awsui_finish-button_1hpp3_rugxw_148:not(#\9),
|
|
149
|
+
.awsui_header_1hpp3_rugxw_149:not(#\9),
|
|
150
|
+
.awsui_step-counter-content_1hpp3_rugxw_150:not(#\9),
|
|
151
|
+
.awsui_content_1hpp3_rugxw_151:not(#\9) {
|
|
152
152
|
/* used in test-utils */
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.
|
|
155
|
+
.awsui_description_1hpp3_rugxw_155:not(#\9) {
|
|
156
156
|
overflow: hidden;
|
|
157
157
|
margin-top: var(--space-xxs-9rrxti, 4px);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
160
|
+
.awsui_actionBar_1hpp3_rugxw_160:not(#\9) {
|
|
161
161
|
display: flex;
|
|
162
162
|
justify-content: space-between;
|
|
163
163
|
align-items: center;
|
|
164
164
|
position: relative;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.
|
|
167
|
+
.awsui_stepCounter_1hpp3_rugxw_167:not(#\9) {
|
|
168
168
|
margin-right: 20px;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
171
|
+
.awsui_divider_1hpp3_rugxw_171:not(#\9) {
|
|
172
172
|
border-bottom: var(--border-divider-section-width-4ozgf3, 1px) solid var(--color-border-divider-default-cr3oi6, #eaeded);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.
|
|
175
|
+
.awsui_hotspot_1hpp3_rugxw_175:not(#\9) {
|
|
176
176
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
177
177
|
border-collapse: separate;
|
|
178
178
|
border-spacing: 0;
|
|
@@ -213,21 +213,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
213
213
|
border: none;
|
|
214
214
|
padding: 0;
|
|
215
215
|
cursor: pointer;
|
|
216
|
-
scroll-margin: var(--awsui-content-scroll-margin-
|
|
216
|
+
scroll-margin: var(--awsui-content-scroll-margin-y98gph, 40px 0 0 0);
|
|
217
217
|
width: 16px;
|
|
218
218
|
height: 16px;
|
|
219
219
|
}
|
|
220
|
-
.
|
|
220
|
+
.awsui_hotspot_1hpp3_rugxw_175:not(#\9):focus {
|
|
221
221
|
outline: none;
|
|
222
222
|
}
|
|
223
|
-
body[data-awsui-focus-visible=true] .
|
|
223
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_rugxw_175:not(#\9):focus {
|
|
224
224
|
position: relative;
|
|
225
225
|
}
|
|
226
|
-
body[data-awsui-focus-visible=true] .
|
|
226
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_rugxw_175:not(#\9):focus {
|
|
227
227
|
outline: 2px dotted transparent;
|
|
228
228
|
outline-offset: calc(2px - 1px);
|
|
229
229
|
}
|
|
230
|
-
body[data-awsui-focus-visible=true] .
|
|
230
|
+
body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_rugxw_175:not(#\9):focus::before {
|
|
231
231
|
content: " ";
|
|
232
232
|
display: block;
|
|
233
233
|
position: absolute;
|
|
@@ -238,13 +238,13 @@ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_qo5qq_175:not(#\9):focu
|
|
|
238
238
|
border-radius: var(--border-radius-control-circular-focus-ring-mxepal, 50%);
|
|
239
239
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-v8nq2m, #0073bb);
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
.awsui_hotspot_1hpp3_rugxw_175 > .awsui_icon_1hpp3_rugxw_215:not(#\9) {
|
|
242
242
|
position: relative;
|
|
243
243
|
stroke: var(--color-text-link-default-hop3gv, #0073bb);
|
|
244
244
|
}
|
|
245
|
-
.
|
|
245
|
+
.awsui_hotspot_1hpp3_rugxw_175:not(#\9):hover > .awsui_icon_1hpp3_rugxw_215 {
|
|
246
246
|
stroke: var(--color-text-link-hover-8s5z9d, #0a4a74);
|
|
247
247
|
}
|
|
248
|
-
.
|
|
248
|
+
.awsui_hotspot_1hpp3_rugxw_175:not(#\9):active > .awsui_icon_1hpp3_rugxw_215 {
|
|
249
249
|
stroke: var(--color-text-link-default-hop3gv, #0073bb);
|
|
250
250
|
}
|