@cloudscape-design/components 3.0.177 → 3.0.179
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/container/index.d.ts.map +1 -1
- package/container/index.js +1 -1
- package/container/index.js.map +1 -1
- package/container/internal.js +1 -1
- package/container/internal.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +73 -71
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/radio-group/interfaces.d.ts +5 -0
- package/radio-group/interfaces.d.ts.map +1 -1
- package/radio-group/interfaces.js.map +1 -1
- package/radio-group/internal.d.ts.map +1 -1
- package/radio-group/internal.js +2 -2
- package/radio-group/internal.js.map +1 -1
package/container/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,cAAc,eAYhB"}
|
package/container/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export default function Container(_a) {
|
|
|
10
10
|
var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.disableHeaderPaddings, disableHeaderPaddings = _c === void 0 ? false : _c, _d = _a.disableContentPaddings, disableContentPaddings = _d === void 0 ? false : _d, props = __rest(_a, ["variant", "disableHeaderPaddings", "disableContentPaddings"]);
|
|
11
11
|
var baseComponentProps = useBaseComponent('Container');
|
|
12
12
|
var externalProps = getExternalProps(props);
|
|
13
|
-
return (React.createElement(InternalContainer, __assign({ variant: variant, disableHeaderPaddings: disableHeaderPaddings, disableContentPaddings: disableContentPaddings }, externalProps, baseComponentProps
|
|
13
|
+
return (React.createElement(InternalContainer, __assign({ variant: variant, disableHeaderPaddings: disableHeaderPaddings, disableContentPaddings: disableContentPaddings }, externalProps, baseComponentProps)));
|
|
14
14
|
}
|
|
15
15
|
applyDisplayName(Container, 'Container');
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/container/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAKjB;IAJf,IAAA,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,6BAA6B,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,8BAA8B,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,EAC3B,KAAK,cAJwB,8DAKjC,CADS;IAER,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzD,IAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CACL,oBAAC,iBAAiB,aAChB,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,qBAAqB,EAC5C,sBAAsB,EAAE,sBAAsB,IAC1C,aAAa,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAKjB;IAJf,IAAA,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,6BAA6B,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,8BAA8B,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,EAC3B,KAAK,cAJwB,8DAKjC,CADS;IAER,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzD,IAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CACL,oBAAC,iBAAiB,aAChB,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,qBAAqB,EAC5C,sBAAsB,EAAE,sBAAsB,IAC1C,aAAa,EACb,kBAAkB,EACtB,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,SAAS,EAAE,WAAW,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 InternalContainer from './internal';\nimport { ContainerProps } from './interfaces';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\n\nexport { ContainerProps };\n\nexport default function Container({\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n ...props\n}: ContainerProps) {\n const baseComponentProps = useBaseComponent('Container');\n const externalProps = getExternalProps(props);\n return (\n <InternalContainer\n variant={variant}\n disableHeaderPaddings={disableHeaderPaddings}\n disableContentPaddings={disableContentPaddings}\n {...externalProps}\n {...baseComponentProps}\n />\n );\n}\n\napplyDisplayName(Container, 'Container');\n"]}
|
package/container/internal.js
CHANGED
|
@@ -48,7 +48,7 @@ export default function InternalContainer(_a) {
|
|
|
48
48
|
_b[styles['header-dynamic-height']] = hasDynamicHeight,
|
|
49
49
|
_b[styles['header-stuck']] = isStuck,
|
|
50
50
|
_b[styles['with-paddings']] = !disableHeaderPaddings,
|
|
51
|
-
_b[styles['with-hidden-content']] = __hiddenContent,
|
|
51
|
+
_b[styles['with-hidden-content']] = !children || __hiddenContent,
|
|
52
52
|
_b)) }, headerIdProp, stickyStyles, { ref: headerMergedRef }), __darkHeader ? (React.createElement("div", { className: clsx(styles['dark-header'], 'awsui-context-content-header') }, header)) : (header)))),
|
|
53
53
|
React.createElement("div", { className: clsx(styles.content, (_c = {},
|
|
54
54
|
_c[styles['with-paddings']] = !disableContentPaddings,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,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AAG,MAAM,CAAO,CAC5F,CAAC,CAAC,CAAC,CACF,MAAM,CACP,CACG,CACuB,CAChC;QACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC5B,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,sBAAsB;oBAClD,IAED,QAAQ,CACL;QACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC3B,GAAC,MAAM,CAAC,cAAc,CAAC,IAAG,CAAC,sBAAsB;gBACjD,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,uBAAuB;oBACnD,IAED,MAAM,CACH,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __headerId?: string;\n __darkHeader?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n __stickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __headerId,\n __darkHeader = false,\n ...restProps\n}: InternalContainerProps) {\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset);\n const { setHasStickyBackground } = useAppLayoutContext();\n const isRefresh = useVisualRefresh();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__darkHeader });\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);\n const headerIdProp = __headerId ? { id: __headerId } : {};\n\n /**\n * The visual refresh AppLayout component needs to know if a child component\n * has a high contrast sticky header. This is to make sure the background element\n * stays in the same vertical position as the header content.\n */\n useEffect(() => {\n const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(true);\n }\n\n return () => {\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(false);\n }\n };\n }, [isSticky, setHasStickyBackground, variant]);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['root-fit-height']\n )}\n ref={mergedRef}\n >\n {header && (\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n })}\n {...headerIdProp}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {__darkHeader ? (\n <div className={clsx(styles['dark-header'], 'awsui-context-content-header')}>{header}</div>\n ) : (\n header\n )}\n </div>\n </StickyHeaderContext.Provider>\n )}\n <div\n className={clsx(styles.content, {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n );\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/link/styles.css.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"link": "
|
|
5
|
-
"variant-secondary": "awsui_variant-
|
|
6
|
-
"variant-primary": "awsui_variant-
|
|
7
|
-
"variant-info": "awsui_variant-
|
|
8
|
-
"variant-value-large": "awsui_variant-value-
|
|
9
|
-
"variant-top-navigation": "awsui_variant-top-
|
|
10
|
-
"variant-recovery": "awsui_variant-
|
|
11
|
-
"button": "
|
|
12
|
-
"color-inverted": "awsui_color-
|
|
13
|
-
"font-size-body-s": "awsui_font-size-body-
|
|
14
|
-
"font-size-body-m": "awsui_font-size-body-
|
|
15
|
-
"font-size-heading-xs": "awsui_font-size-heading-
|
|
16
|
-
"font-size-heading-s": "awsui_font-size-heading-
|
|
17
|
-
"font-size-heading-m": "awsui_font-size-heading-
|
|
18
|
-
"font-size-heading-l": "awsui_font-size-heading-
|
|
19
|
-
"font-size-heading-xl": "awsui_font-size-heading-
|
|
20
|
-
"font-size-display-l": "awsui_font-size-display-
|
|
21
|
-
"font-size-inherit": "awsui_font-size-
|
|
22
|
-
"icon-wrapper": "awsui_icon-
|
|
23
|
-
"icon": "
|
|
4
|
+
"link": "awsui_link_4c84z_1m28y_93",
|
|
5
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_1m28y_140",
|
|
6
|
+
"variant-primary": "awsui_variant-primary_4c84z_1m28y_177",
|
|
7
|
+
"variant-info": "awsui_variant-info_4c84z_1m28y_212",
|
|
8
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_1m28y_249",
|
|
9
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_1m28y_283",
|
|
10
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_1m28y_318",
|
|
11
|
+
"button": "awsui_button_4c84z_1m28y_353",
|
|
12
|
+
"color-inverted": "awsui_color-inverted_4c84z_1m28y_390",
|
|
13
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_1m28y_409",
|
|
14
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_1m28y_414",
|
|
15
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_1m28y_418",
|
|
16
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_1m28y_422",
|
|
17
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_1m28y_427",
|
|
18
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_1m28y_432",
|
|
19
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_1m28y_437",
|
|
20
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_1m28y_442",
|
|
21
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_1m28y_447",
|
|
22
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_1m28y_453",
|
|
23
|
+
"icon": "awsui_icon_4c84z_1m28y_453"
|
|
24
24
|
};
|
|
25
25
|
|
package/link/styles.scoped.css
CHANGED
|
@@ -90,7 +90,7 @@ 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_link_4c84z_1m28y_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -141,31 +141,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
141
141
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
142
142
|
}
|
|
143
143
|
@media (prefers-reduced-motion: reduce) {
|
|
144
|
-
.
|
|
144
|
+
.awsui_link_4c84z_1m28y_93:not(#\9) {
|
|
145
145
|
animation: none;
|
|
146
146
|
transition: none;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
.awsui-motion-disabled .
|
|
149
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93:not(#\9) {
|
|
150
150
|
animation: none;
|
|
151
151
|
transition: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_link_4c84z_1m28y_93:not(#\9):hover {
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_link_4c84z_1m28y_93:not(#\9):focus {
|
|
158
158
|
outline: none;
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_link_4c84z_1m28y_93:not(#\9):active {
|
|
161
161
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_link_4c84z_1m28y_93:not(#\9):active, .awsui_link_4c84z_1m28y_93:not(#\9):focus, .awsui_link_4c84z_1m28y_93:not(#\9):hover {
|
|
164
164
|
text-decoration: underline;
|
|
165
165
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
166
166
|
text-decoration-color: currentColor;
|
|
167
167
|
}
|
|
168
|
-
.
|
|
168
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9) {
|
|
169
|
+
-webkit-font-smoothing: inherit;
|
|
170
|
+
-moz-osx-font-smoothing: inherit;
|
|
169
171
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
170
172
|
font-weight: inherit;
|
|
171
173
|
letter-spacing: normal;
|
|
@@ -178,31 +180,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
178
180
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
179
181
|
}
|
|
180
182
|
@media (prefers-reduced-motion: reduce) {
|
|
181
|
-
.
|
|
183
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9) {
|
|
182
184
|
animation: none;
|
|
183
185
|
transition: none;
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
|
-
.awsui-motion-disabled .
|
|
188
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9) {
|
|
187
189
|
animation: none;
|
|
188
190
|
transition: none;
|
|
189
191
|
}
|
|
190
|
-
.
|
|
192
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):hover {
|
|
191
193
|
cursor: pointer;
|
|
192
194
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
193
195
|
}
|
|
194
|
-
.
|
|
196
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):focus {
|
|
195
197
|
outline: none;
|
|
196
198
|
}
|
|
197
|
-
.
|
|
199
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):active {
|
|
198
200
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
199
201
|
}
|
|
200
|
-
.
|
|
202
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-secondary_4c84z_1m28y_140:not(#\9):hover {
|
|
201
203
|
text-decoration: underline;
|
|
202
204
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
203
205
|
text-decoration-color: currentColor;
|
|
204
206
|
}
|
|
205
|
-
.
|
|
207
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9) {
|
|
206
208
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
207
209
|
font-weight: var(--font-link-primary-weight-91pybi, "inherit");
|
|
208
210
|
letter-spacing: var(--font-link-primary-letter-spacing-vmsgcx, "inherit");
|
|
@@ -216,31 +218,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
218
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
217
219
|
}
|
|
218
220
|
@media (prefers-reduced-motion: reduce) {
|
|
219
|
-
.
|
|
221
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9) {
|
|
220
222
|
animation: none;
|
|
221
223
|
transition: none;
|
|
222
224
|
}
|
|
223
225
|
}
|
|
224
|
-
.awsui-motion-disabled .
|
|
226
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9) {
|
|
225
227
|
animation: none;
|
|
226
228
|
transition: none;
|
|
227
229
|
}
|
|
228
|
-
.
|
|
230
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):hover {
|
|
229
231
|
cursor: pointer;
|
|
230
232
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
231
233
|
}
|
|
232
|
-
.
|
|
234
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):focus {
|
|
233
235
|
outline: none;
|
|
234
236
|
}
|
|
235
|
-
.
|
|
237
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):active {
|
|
236
238
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
237
239
|
}
|
|
238
|
-
.
|
|
240
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-primary_4c84z_1m28y_177:not(#\9):hover {
|
|
239
241
|
text-decoration: underline;
|
|
240
242
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
241
243
|
text-decoration-color: currentColor;
|
|
242
244
|
}
|
|
243
|
-
.
|
|
245
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9) {
|
|
244
246
|
-webkit-font-smoothing: var(--font-smoothing-webkit-vu3hx4, antialiased);
|
|
245
247
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-nkh1jb, grayscale);
|
|
246
248
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
@@ -255,31 +257,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
255
257
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
256
258
|
}
|
|
257
259
|
@media (prefers-reduced-motion: reduce) {
|
|
258
|
-
.
|
|
260
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9) {
|
|
259
261
|
animation: none;
|
|
260
262
|
transition: none;
|
|
261
263
|
}
|
|
262
264
|
}
|
|
263
|
-
.awsui-motion-disabled .
|
|
265
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9) {
|
|
264
266
|
animation: none;
|
|
265
267
|
transition: none;
|
|
266
268
|
}
|
|
267
|
-
.
|
|
269
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):hover {
|
|
268
270
|
cursor: pointer;
|
|
269
271
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
270
272
|
}
|
|
271
|
-
.
|
|
273
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):focus {
|
|
272
274
|
outline: none;
|
|
273
275
|
}
|
|
274
|
-
.
|
|
276
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):active {
|
|
275
277
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
276
278
|
}
|
|
277
|
-
.
|
|
279
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-info_4c84z_1m28y_212:not(#\9):hover {
|
|
278
280
|
text-decoration: underline;
|
|
279
281
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
280
282
|
text-decoration-color: var(--color-text-link-button-underline-hover-ei09le, transparent);
|
|
281
283
|
}
|
|
282
|
-
.
|
|
284
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9) {
|
|
283
285
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
284
286
|
font-weight: var(--font-box-value-large-weight-dyt1pj, 800);
|
|
285
287
|
text-decoration: none;
|
|
@@ -291,31 +293,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
291
293
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
292
294
|
}
|
|
293
295
|
@media (prefers-reduced-motion: reduce) {
|
|
294
|
-
.
|
|
296
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9) {
|
|
295
297
|
animation: none;
|
|
296
298
|
transition: none;
|
|
297
299
|
}
|
|
298
300
|
}
|
|
299
|
-
.awsui-motion-disabled .
|
|
301
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9) {
|
|
300
302
|
animation: none;
|
|
301
303
|
transition: none;
|
|
302
304
|
}
|
|
303
|
-
.
|
|
305
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):hover {
|
|
304
306
|
cursor: pointer;
|
|
305
307
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
306
308
|
}
|
|
307
|
-
.
|
|
309
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):focus {
|
|
308
310
|
outline: none;
|
|
309
311
|
}
|
|
310
|
-
.
|
|
312
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):active {
|
|
311
313
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
312
314
|
}
|
|
313
|
-
.
|
|
315
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-value-large_4c84z_1m28y_249:not(#\9):hover {
|
|
314
316
|
text-decoration: underline;
|
|
315
317
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
316
318
|
text-decoration-color: currentColor;
|
|
317
319
|
}
|
|
318
|
-
.
|
|
320
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9) {
|
|
319
321
|
color: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
320
322
|
font-weight: 700;
|
|
321
323
|
letter-spacing: 0.005em;
|
|
@@ -328,31 +330,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
328
330
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
329
331
|
}
|
|
330
332
|
@media (prefers-reduced-motion: reduce) {
|
|
331
|
-
.
|
|
333
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9) {
|
|
332
334
|
animation: none;
|
|
333
335
|
transition: none;
|
|
334
336
|
}
|
|
335
337
|
}
|
|
336
|
-
.awsui-motion-disabled .
|
|
338
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9) {
|
|
337
339
|
animation: none;
|
|
338
340
|
transition: none;
|
|
339
341
|
}
|
|
340
|
-
.
|
|
342
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):hover {
|
|
341
343
|
cursor: pointer;
|
|
342
344
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
343
345
|
}
|
|
344
|
-
.
|
|
346
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):focus {
|
|
345
347
|
outline: none;
|
|
346
348
|
}
|
|
347
|
-
.
|
|
349
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):active {
|
|
348
350
|
color: var(--color-text-interactive-active-vol84d, #000716);
|
|
349
351
|
}
|
|
350
|
-
.
|
|
352
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-top-navigation_4c84z_1m28y_283:not(#\9):hover {
|
|
351
353
|
text-decoration: underline;
|
|
352
354
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
353
355
|
text-decoration-color: transparent;
|
|
354
356
|
}
|
|
355
|
-
.
|
|
357
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9) {
|
|
356
358
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
357
359
|
font-weight: var(--font-link-button-weight-4f1hjr, 800);
|
|
358
360
|
letter-spacing: var(--font-link-button-letter-spacing-58wset, 0.005em);
|
|
@@ -365,31 +367,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
365
367
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
366
368
|
}
|
|
367
369
|
@media (prefers-reduced-motion: reduce) {
|
|
368
|
-
.
|
|
370
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9) {
|
|
369
371
|
animation: none;
|
|
370
372
|
transition: none;
|
|
371
373
|
}
|
|
372
374
|
}
|
|
373
|
-
.awsui-motion-disabled .
|
|
375
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9) {
|
|
374
376
|
animation: none;
|
|
375
377
|
transition: none;
|
|
376
378
|
}
|
|
377
|
-
.
|
|
379
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):hover {
|
|
378
380
|
cursor: pointer;
|
|
379
381
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
380
382
|
}
|
|
381
|
-
.
|
|
383
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):focus {
|
|
382
384
|
outline: none;
|
|
383
385
|
}
|
|
384
|
-
.
|
|
386
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):active {
|
|
385
387
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
386
388
|
}
|
|
387
|
-
.
|
|
389
|
+
.awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_variant-recovery_4c84z_1m28y_318:not(#\9):hover {
|
|
388
390
|
text-decoration: underline;
|
|
389
391
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
390
392
|
text-decoration-color: var(--color-text-link-button-underline-hover-ei09le, transparent);
|
|
391
393
|
}
|
|
392
|
-
.
|
|
394
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9) {
|
|
393
395
|
-webkit-font-smoothing: var(--font-smoothing-webkit-vu3hx4, antialiased);
|
|
394
396
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-nkh1jb, grayscale);
|
|
395
397
|
color: var(--color-text-link-button-normal-default-2yrp9u, #0972d3);
|
|
@@ -404,42 +406,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
404
406
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
405
407
|
}
|
|
406
408
|
@media (prefers-reduced-motion: reduce) {
|
|
407
|
-
.
|
|
409
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9) {
|
|
408
410
|
animation: none;
|
|
409
411
|
transition: none;
|
|
410
412
|
}
|
|
411
413
|
}
|
|
412
|
-
.awsui-motion-disabled .
|
|
414
|
+
.awsui-motion-disabled .awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9), .awsui-mode-entering .awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9) {
|
|
413
415
|
animation: none;
|
|
414
416
|
transition: none;
|
|
415
417
|
}
|
|
416
|
-
.
|
|
418
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):hover {
|
|
417
419
|
cursor: pointer;
|
|
418
420
|
color: var(--color-text-link-button-normal-hover-gz8y5b, #033160);
|
|
419
421
|
}
|
|
420
|
-
.
|
|
422
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):focus {
|
|
421
423
|
outline: none;
|
|
422
424
|
}
|
|
423
|
-
.
|
|
425
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):active {
|
|
424
426
|
color: var(--color-text-link-button-normal-active-8lhs8f, #033160);
|
|
425
427
|
}
|
|
426
|
-
.
|
|
428
|
+
.awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):active, .awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):focus, .awsui_link_4c84z_1m28y_93.awsui_button_4c84z_1m28y_353:not(#\9):hover {
|
|
427
429
|
text-decoration: underline;
|
|
428
430
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
429
431
|
text-decoration-color: transparent;
|
|
430
432
|
}
|
|
431
|
-
.
|
|
433
|
+
.awsui_link_4c84z_1m28y_93.awsui_color-inverted_4c84z_1m28y_390:not(#\9) {
|
|
432
434
|
color: var(--color-text-notification-default-2kpcxy, #fbfbfb);
|
|
433
435
|
}
|
|
434
|
-
.
|
|
436
|
+
.awsui_link_4c84z_1m28y_93.awsui_color-inverted_4c84z_1m28y_390:not(#\9):not(.awsui_button_4c84z_1m28y_353) {
|
|
435
437
|
text-decoration: underline;
|
|
436
438
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
437
439
|
text-decoration-color: currentColor;
|
|
438
440
|
}
|
|
439
|
-
.
|
|
441
|
+
.awsui_link_4c84z_1m28y_93.awsui_color-inverted_4c84z_1m28y_390:not(#\9):hover {
|
|
440
442
|
color: var(--color-text-link-inverted-hover-5tnsdi, #ffffff);
|
|
441
443
|
}
|
|
442
|
-
.
|
|
444
|
+
.awsui_link_4c84z_1m28y_93[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
443
445
|
outline: thin dotted;
|
|
444
446
|
outline: var(--border-link-focus-ring-outline-k2wccv, 0);
|
|
445
447
|
outline-offset: 2px;
|
|
@@ -447,54 +449,54 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
447
449
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
448
450
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-nv4ahb, 2px) var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
449
451
|
}
|
|
450
|
-
.
|
|
452
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-body-s_4c84z_1m28y_409:not(#\9) {
|
|
451
453
|
font-size: var(--font-body-s-size-ukw2p9, 12px);
|
|
452
454
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
453
455
|
letter-spacing: var(--font-body-s-letter-spacing-cy0oxj, 0.005em);
|
|
454
456
|
}
|
|
455
|
-
.
|
|
457
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-body-m_4c84z_1m28y_414:not(#\9) {
|
|
456
458
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
457
459
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
458
460
|
}
|
|
459
|
-
.
|
|
461
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-heading-xs_4c84z_1m28y_418:not(#\9) {
|
|
460
462
|
font-size: var(--font-heading-xs-size-fryxro, 14px);
|
|
461
463
|
line-height: var(--font-heading-xs-line-height-5x131j, 18px);
|
|
462
464
|
}
|
|
463
|
-
.
|
|
465
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-heading-s_4c84z_1m28y_422:not(#\9) {
|
|
464
466
|
font-size: var(--font-heading-s-size-9clg8y, 16px);
|
|
465
467
|
line-height: var(--font-heading-s-line-height-5b7f0q, 20px);
|
|
466
468
|
letter-spacing: var(--font-heading-s-letter-spacing-4d69jc, -0.005em);
|
|
467
469
|
}
|
|
468
|
-
.
|
|
470
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-heading-m_4c84z_1m28y_427:not(#\9) {
|
|
469
471
|
font-size: var(--font-heading-m-size-6e3jmg, 20px);
|
|
470
472
|
line-height: var(--font-heading-m-line-height-u3t54f, 24px);
|
|
471
473
|
letter-spacing: var(--font-heading-m-letter-spacing-r00pg3, -0.01em);
|
|
472
474
|
}
|
|
473
|
-
.
|
|
475
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-heading-l_4c84z_1m28y_432:not(#\9) {
|
|
474
476
|
font-size: var(--font-heading-l-size-otmxys, 24px);
|
|
475
477
|
line-height: var(--font-heading-l-line-height-gev4n1, 30px);
|
|
476
478
|
letter-spacing: var(--font-heading-l-letter-spacing-f6wvtk, -0.015em);
|
|
477
479
|
}
|
|
478
|
-
.
|
|
480
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-heading-xl_4c84z_1m28y_437:not(#\9) {
|
|
479
481
|
font-size: var(--font-heading-xl-size-d0vjbk, 32px);
|
|
480
482
|
line-height: var(--font-heading-xl-line-height-doxfdj, 40px);
|
|
481
483
|
letter-spacing: var(--font-heading-xl-letter-spacing-9tcsmy, -0.02em);
|
|
482
484
|
}
|
|
483
|
-
.
|
|
485
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-display-l_4c84z_1m28y_442:not(#\9) {
|
|
484
486
|
font-size: var(--font-display-l-size-03lgcb, 48px);
|
|
485
487
|
line-height: var(--font-display-l-line-height-71tnj3, 54px);
|
|
486
488
|
letter-spacing: var(--font-display-l-letter-spacing-4ff418, -0.03em);
|
|
487
489
|
}
|
|
488
|
-
.
|
|
490
|
+
.awsui_link_4c84z_1m28y_93.awsui_font-size-inherit_4c84z_1m28y_447:not(#\9) {
|
|
489
491
|
font-size: inherit;
|
|
490
492
|
line-height: inherit;
|
|
491
493
|
letter-spacing: inherit;
|
|
492
494
|
}
|
|
493
495
|
|
|
494
|
-
.awsui_icon-
|
|
496
|
+
.awsui_icon-wrapper_4c84z_1m28y_453:not(#\9) {
|
|
495
497
|
white-space: nowrap;
|
|
496
498
|
}
|
|
497
499
|
|
|
498
|
-
.
|
|
500
|
+
.awsui_icon_4c84z_1m28y_453:not(#\9) {
|
|
499
501
|
display: inline-block;
|
|
500
502
|
}
|
package/link/styles.selectors.js
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"link": "
|
|
6
|
-
"variant-secondary": "awsui_variant-
|
|
7
|
-
"variant-primary": "awsui_variant-
|
|
8
|
-
"variant-info": "awsui_variant-
|
|
9
|
-
"variant-value-large": "awsui_variant-value-
|
|
10
|
-
"variant-top-navigation": "awsui_variant-top-
|
|
11
|
-
"variant-recovery": "awsui_variant-
|
|
12
|
-
"button": "
|
|
13
|
-
"color-inverted": "awsui_color-
|
|
14
|
-
"font-size-body-s": "awsui_font-size-body-
|
|
15
|
-
"font-size-body-m": "awsui_font-size-body-
|
|
16
|
-
"font-size-heading-xs": "awsui_font-size-heading-
|
|
17
|
-
"font-size-heading-s": "awsui_font-size-heading-
|
|
18
|
-
"font-size-heading-m": "awsui_font-size-heading-
|
|
19
|
-
"font-size-heading-l": "awsui_font-size-heading-
|
|
20
|
-
"font-size-heading-xl": "awsui_font-size-heading-
|
|
21
|
-
"font-size-display-l": "awsui_font-size-display-
|
|
22
|
-
"font-size-inherit": "awsui_font-size-
|
|
23
|
-
"icon-wrapper": "awsui_icon-
|
|
24
|
-
"icon": "
|
|
5
|
+
"link": "awsui_link_4c84z_1m28y_93",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_1m28y_140",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_1m28y_177",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_1m28y_212",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_1m28y_249",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_1m28y_283",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_1m28y_318",
|
|
12
|
+
"button": "awsui_button_4c84z_1m28y_353",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_1m28y_390",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_1m28y_409",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_1m28y_414",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_1m28y_418",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_1m28y_422",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_1m28y_427",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_1m28y_432",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_1m28y_437",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_1m28y_442",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_1m28y_447",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_1m28y_453",
|
|
24
|
+
"icon": "awsui_icon_4c84z_1m28y_453"
|
|
25
25
|
};
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -32,6 +32,11 @@ export interface RadioGroupProps extends BaseComponentProps, FormFieldControlPro
|
|
|
32
32
|
* Adds `aria-required` to the group.
|
|
33
33
|
*/
|
|
34
34
|
ariaRequired?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Adds `aria-controls` attribute to the radio group.
|
|
37
|
+
* If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.
|
|
38
|
+
*/
|
|
39
|
+
ariaControls?: string;
|
|
35
40
|
/**
|
|
36
41
|
* Called when the user selects a different radio button. The event `detail` contains the current `value`.
|
|
37
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/radio-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qBAAqB;IAChF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAE7D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAEnE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;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iB,qBAAqB;QACpC,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/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';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n}\n\nexport namespace RadioGroupProps {\n export interface RadioButtonDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/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';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Adds `aria-controls` attribute to the radio group.\n * If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n}\n\nexport namespace RadioGroupProps {\n export interface RadioButtonDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,QAAA,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,QAAA,MAAM,kBAAkB,0HAmDvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/radio-group/internal.js
CHANGED
|
@@ -10,12 +10,12 @@ import { useFormFieldContext } from '../internal/context/form-field-context';
|
|
|
10
10
|
import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
11
11
|
import useRadioGroupForwardFocus from '../internal/hooks/forward-focus/radio-group';
|
|
12
12
|
var InternalRadioGroup = React.forwardRef(function (_a, ref) {
|
|
13
|
-
var name = _a.name, value = _a.value, items = _a.items, ariaLabel = _a.ariaLabel, ariaRequired = _a.ariaRequired, onChange = _a.onChange, _b = _a.__internalRootRef, __internalRootRef = _b === void 0 ? null : _b, props = __rest(_a, ["name", "value", "items", "ariaLabel", "ariaRequired", "onChange", "__internalRootRef"]);
|
|
13
|
+
var name = _a.name, value = _a.value, items = _a.items, ariaLabel = _a.ariaLabel, ariaRequired = _a.ariaRequired, ariaControls = _a.ariaControls, onChange = _a.onChange, _b = _a.__internalRootRef, __internalRootRef = _b === void 0 ? null : _b, props = __rest(_a, ["name", "value", "items", "ariaLabel", "ariaRequired", "ariaControls", "onChange", "__internalRootRef"]);
|
|
14
14
|
var _c = useFormFieldContext(props), ariaDescribedby = _c.ariaDescribedby, ariaLabelledby = _c.ariaLabelledby;
|
|
15
15
|
var baseProps = getBaseProps(props);
|
|
16
16
|
var generatedName = useUniqueId('awsui-radio-');
|
|
17
17
|
var _d = useRadioGroupForwardFocus(ref, items, value), radioButtonRef = _d[0], radioButtonRefIndex = _d[1];
|
|
18
|
-
return (React.createElement("div", __assign({ role: "radiogroup", "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired }, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }), items &&
|
|
18
|
+
return (React.createElement("div", __assign({ role: "radiogroup", "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired, "aria-controls": ariaControls }, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }), items &&
|
|
19
19
|
items.map(function (item, index) { return (React.createElement(RadioButton, { key: item.value, ref: index === radioButtonRefIndex ? radioButtonRef : undefined, checked: item.value === value, name: name || generatedName, value: item.value, label: item.label, description: item.description, disabled: item.disabled, onChange: onChange, controlId: item.controlId })); })));
|
|
20
20
|
});
|
|
21
21
|
export default InternalRadioGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,yBAAyB,MAAM,6CAA6C,CAAC;AAIpF,IAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CACzC,UACE,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,yBAAyB,MAAM,6CAA6C,CAAC;AAIpF,IAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CACzC,UACE,EAU0B,EAC1B,GAAmC;IAVjC,IAAA,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACL,SAAS,eAA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P,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { RadioGroupProps } from './interfaces';\nimport RadioButton from './radio-button';\nimport styles from './styles.css.js';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport useRadioGroupForwardFocus from '../internal/hooks/forward-focus/radio-group';\n\ntype InternalRadioGroupProps = RadioGroupProps & InternalBaseComponentProps;\n\nconst InternalRadioGroup = React.forwardRef(\n (\n {\n name,\n value,\n items,\n ariaLabel,\n ariaRequired,\n ariaControls,\n onChange,\n __internalRootRef = null,\n ...props\n }: InternalRadioGroupProps,\n ref: React.Ref<RadioGroupProps.Ref>\n ) => {\n const { ariaDescribedby, ariaLabelledby } = useFormFieldContext(props);\n const baseProps = getBaseProps(props);\n const generatedName = useUniqueId('awsui-radio-');\n\n const [radioButtonRef, radioButtonRefIndex] = useRadioGroupForwardFocus(ref, items, value);\n\n return (\n <div\n role=\"radiogroup\"\n aria-labelledby={ariaLabelledby}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-required={ariaRequired}\n aria-controls={ariaControls}\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n >\n {items &&\n items.map((item, index) => (\n <RadioButton\n key={item.value}\n ref={index === radioButtonRefIndex ? radioButtonRef : undefined}\n checked={item.value === value}\n name={name || generatedName}\n value={item.value}\n label={item.label}\n description={item.description}\n disabled={item.disabled}\n onChange={onChange}\n controlId={item.controlId}\n />\n ))}\n </div>\n );\n }\n);\n\nexport default InternalRadioGroup;\n"]}
|