@cloudscape-design/components-themeable 3.0.364 → 3.0.365
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/breadcrumb-group/item/styles.scss +1 -1
- package/lib/internal/scss/internal/styles/links.scss +2 -0
- package/lib/internal/scss/link/constants.scss +7 -6
- package/lib/internal/template/alert/internal.d.ts.map +1 -1
- package/lib/internal/template/alert/internal.js +15 -13
- package/lib/internal/template/alert/internal.js.map +1 -1
- 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/attribute-editor/styles.css.js +14 -14
- package/lib/internal/template/attribute-editor/styles.scoped.css +30 -31
- package/lib/internal/template/attribute-editor/styles.selectors.js +14 -14
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +9 -9
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +21 -21
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +9 -9
- package/lib/internal/template/button/styles.css.js +20 -20
- package/lib/internal/template/button/styles.scoped.css +152 -152
- package/lib/internal/template/button/styles.selectors.js +20 -20
- package/lib/internal/template/cards/index.d.ts.map +1 -1
- package/lib/internal/template/cards/index.js +9 -7
- package/lib/internal/template/cards/index.js.map +1 -1
- package/lib/internal/template/help-panel/index.d.ts.map +1 -1
- package/lib/internal/template/help-panel/index.js +3 -1
- package/lib/internal/template/help-panel/index.js.map +1 -1
- package/lib/internal/template/help-panel/styles.css.js +4 -4
- package/lib/internal/template/help-panel/styles.scoped.css +71 -72
- package/lib/internal/template/help-panel/styles.selectors.js +4 -4
- package/lib/internal/template/internal/base-component/styles.scoped.css +11 -26
- package/lib/internal/template/internal/components/token-list/styles.css.js +9 -9
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +22 -22
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +9 -9
- package/lib/internal/template/internal/context/link-default-variant-context.d.ts +6 -0
- package/lib/internal/template/internal/context/link-default-variant-context.d.ts.map +1 -0
- package/lib/internal/template/internal/context/link-default-variant-context.js +7 -0
- package/lib/internal/template/internal/context/link-default-variant-context.js.map +1 -0
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +0 -40
- package/lib/internal/template/internal/generated/theming/index.js +0 -40
- package/lib/internal/template/link/index.d.ts.map +1 -1
- package/lib/internal/template/link/index.js +2 -2
- package/lib/internal/template/link/index.js.map +1 -1
- package/lib/internal/template/link/interfaces.d.ts +7 -0
- package/lib/internal/template/link/interfaces.d.ts.map +1 -1
- package/lib/internal/template/link/interfaces.js.map +1 -1
- package/lib/internal/template/link/internal.d.ts.map +1 -1
- package/lib/internal/template/link/internal.js +4 -1
- package/lib/internal/template/link/internal.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +91 -90
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/popover/internal.d.ts.map +1 -1
- package/lib/internal/template/popover/internal.js +3 -1
- package/lib/internal/template/popover/internal.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +58 -56
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +12 -12
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +72 -74
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/lib/internal/template/wizard/wizard-navigation.js +1 -1
- package/lib/internal/template/wizard/wizard-navigation.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["link/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["link/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC;IAE9B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAE1D;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,SAAS,CAAC;IACzB,KAAY,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,mBAAmB,CAAC;IAC7E,KAAY,QAAQ,GAChB,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,SAAS,CAAC;IACd,KAAY,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;IAE1C,KAAY,YAAY,GAAG,oBAAoB,CAAC;IAEhD,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["link/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport React from 'react';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\n\nexport interface LinkProps extends BaseComponentProps {\n /**\n * Determines the visual style of the link as follows:\n * - `primary` - Displays the link text with bold styling for sufficient contrast with surrounding text.\n * Use this for links where the context doesn't imply interactivity such as\n * \"Learn more\" links and links within paragraphs.\n * - `secondary` - Does not provide any additional indicators for interactivity (except for an underline when the user hovers over or focuses the link).\n * This can be used in cases where the interactivity is strongly implied by its context,\n * such as in a table or a list of external links.\n * - `info` - Use for \"info\" links that link to content in a help panel.\n */\n variant?: LinkProps.Variant;\n\n /**\n * Determines the font size and line height.\n * This property is overridden if the variant is `info`.\n */\n fontSize?: LinkProps.FontSize;\n\n /**\n * Determines the text color of the link and its icon.\n * - `normal`: Use in most cases where a link is required.\n * - `inverted`: Use to style links inside Flashbars.\n *\n * This property is overridden if the variant is `info`.\n */\n color?: LinkProps.Color;\n\n /**\n * Marks the link as external by adding an icon after the text. If `href`\n * is provided, opens the link in a new tab when clicked.\n */\n external?: boolean;\n\n /**\n * Specifies where to open the linked URL. Set this to `_blank` to open the URL\n * in a new tab. If you set this property to `_blank`, the component\n * automatically adds `rel=\"noopener noreferrer\"` to avoid performance\n * and security issues.\n *\n * For other options see the documentation for <a> tag's\n * [target attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: string;\n\n /**\n * The URL that the link points to.\n * If an `href` is not provided, the component will render using a\n * \"button\" role and `target` will not be used.\n */\n href?: string;\n\n /**\n * The text to render inside the link.\n */\n children?: React.ReactNode;\n\n /**\n * Adds an aria-label to the HTML element.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-label to the external icon.\n * @i18n\n */\n externalIconAriaLabel?: string;\n\n /**\n * Called when a link is clicked without any modifier keys. If the link has no `href` provided, it will be called on\n * all clicks.\n *\n * If you want to implement client-side routing yourself, use this event and prevent default browser navigation\n * (by calling `preventDefault`).\n */\n onFollow?: CancelableEventHandler<LinkProps.FollowDetail>;\n\n /**\n * Adds a `rel` attribute to the link. If the `rel` property is provided, it overrides the default behaviour.\n * By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `external` is `true` or `target` is `\"_blank\"`.\n */\n rel?: string;\n}\n\nexport namespace LinkProps {\n export type Variant = 'primary' | 'secondary' | 'info' | 'awsui-value-large';\n export type FontSize =\n | 'body-s'\n | 'body-m'\n | 'heading-xs'\n | 'heading-s'\n | 'heading-m'\n | 'heading-l'\n | 'heading-xl'\n | 'display-l'\n | 'inherit';\n export type Color = 'normal' | 'inverted';\n\n export type FollowDetail = BaseNavigationDetail;\n\n export interface Ref {\n /**\n * Sets the browser focus on the anchor element.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["link/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport React from 'react';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\n\nexport interface LinkProps extends BaseComponentProps {\n /**\n * Determines the visual style of the link as follows:\n * - `primary` - Displays the link text with bold styling for sufficient contrast with surrounding text.\n * Use this for links where the context doesn't imply interactivity such as\n * \"Learn more\" links and links within paragraphs.\n * - `secondary` - Does not provide any additional indicators for interactivity (except for an underline when the user hovers over or focuses the link).\n * This can be used in cases where the interactivity is strongly implied by its context,\n * such as in a table or a list of external links.\n * - `info` - Use for \"info\" links that link to content in a help panel.\n *\n * The default is `secondary`, except inside the following components where it defaults to `primary`:\n * - Table\n * - Cards\n * - Alert\n * - Popover\n * - Help Panel (main `content` only)\n */\n variant?: LinkProps.Variant;\n\n /**\n * Determines the font size and line height.\n * This property is overridden if the variant is `info`.\n */\n fontSize?: LinkProps.FontSize;\n\n /**\n * Determines the text color of the link and its icon.\n * - `normal`: Use in most cases where a link is required.\n * - `inverted`: Use to style links inside Flashbars.\n *\n * This property is overridden if the variant is `info`.\n */\n color?: LinkProps.Color;\n\n /**\n * Marks the link as external by adding an icon after the text. If `href`\n * is provided, opens the link in a new tab when clicked.\n */\n external?: boolean;\n\n /**\n * Specifies where to open the linked URL. Set this to `_blank` to open the URL\n * in a new tab. If you set this property to `_blank`, the component\n * automatically adds `rel=\"noopener noreferrer\"` to avoid performance\n * and security issues.\n *\n * For other options see the documentation for <a> tag's\n * [target attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: string;\n\n /**\n * The URL that the link points to.\n * If an `href` is not provided, the component will render using a\n * \"button\" role and `target` will not be used.\n */\n href?: string;\n\n /**\n * The text to render inside the link.\n */\n children?: React.ReactNode;\n\n /**\n * Adds an aria-label to the HTML element.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-label to the external icon.\n * @i18n\n */\n externalIconAriaLabel?: string;\n\n /**\n * Called when a link is clicked without any modifier keys. If the link has no `href` provided, it will be called on\n * all clicks.\n *\n * If you want to implement client-side routing yourself, use this event and prevent default browser navigation\n * (by calling `preventDefault`).\n */\n onFollow?: CancelableEventHandler<LinkProps.FollowDetail>;\n\n /**\n * Adds a `rel` attribute to the link. If the `rel` property is provided, it overrides the default behaviour.\n * By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `external` is `true` or `target` is `\"_blank\"`.\n */\n rel?: string;\n}\n\nexport namespace LinkProps {\n export type Variant = 'primary' | 'secondary' | 'info' | 'awsui-value-large';\n export type FontSize =\n | 'body-s'\n | 'body-m'\n | 'heading-xs'\n | 'heading-s'\n | 'heading-m'\n | 'heading-l'\n | 'heading-xl'\n | 'display-l'\n | 'inherit';\n export type Color = 'normal' | 'inverted';\n\n export type FollowDetail = BaseNavigationDetail;\n\n export interface Ref {\n /**\n * Sets the browser focus on the anchor element.\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["link/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAQlD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["link/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAQlD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAuBlF,QAAA,MAAM,YAAY;cAHJ,SAAS,CAAC,SAAS,CAAC,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU;uCA4K1E,CAAC;AAqBF,eAAe,YAAY,CAAC"}
|
|
@@ -18,10 +18,13 @@ import { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytic
|
|
|
18
18
|
import { FunnelMetrics } from '../internal/analytics';
|
|
19
19
|
import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
20
20
|
import { DATA_ATTR_FUNNEL_VALUE, getFunnelValueSelector, getNameFromSelector, getSubStepAllSelector, } from '../internal/analytics/selectors';
|
|
21
|
+
import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
|
|
21
22
|
const InternalLink = React.forwardRef((_a, ref) => {
|
|
22
|
-
var { variant
|
|
23
|
+
var { variant: providedVariant, fontSize = 'body-m', color = 'normal', external = false, target, href, rel, ariaLabel, externalIconAriaLabel, onFollow, children, __internalRootRef = null } = _a, props = __rest(_a, ["variant", "fontSize", "color", "external", "target", "href", "rel", "ariaLabel", "externalIconAriaLabel", "onFollow", "children", "__internalRootRef"]);
|
|
23
24
|
checkSafeUrl('Link', href);
|
|
24
25
|
const isButton = !href;
|
|
26
|
+
const { defaultVariant } = useContext(LinkDefaultVariantContext);
|
|
27
|
+
const variant = providedVariant || defaultVariant;
|
|
25
28
|
const specialStyles = ['top-navigation', 'link', 'recovery'];
|
|
26
29
|
const hasSpecialStyle = specialStyles.indexOf(variant) > -1;
|
|
27
30
|
const i18n = useInternalI18n('link');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["link/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4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or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useRef } from 'react';\nimport clsx from 'clsx';\nimport InternalIcon from '../icon/internal';\nimport styles from './styles.css.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { KeyCode } from '../internal/keycode';\nimport { LinkProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { useInternalI18n } from '../i18n/context';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getNameFromSelector,\n getSubStepAllSelector,\n} from '../internal/analytics/selectors';\n\ntype InternalLinkProps = InternalBaseComponentProps &\n Omit<LinkProps, 'variant'> & {\n variant?: LinkProps['variant'] | 'top-navigation' | 'link' | 'recovery';\n };\n\nconst InternalLink = React.forwardRef(\n (\n {\n variant = 'secondary',\n fontSize = 'body-m',\n color = 'normal',\n external = false,\n target,\n href,\n rel,\n ariaLabel,\n externalIconAriaLabel,\n onFollow,\n children,\n __internalRootRef = null,\n ...props\n }: InternalLinkProps,\n ref: React.Ref<LinkProps.Ref>\n ) => {\n checkSafeUrl('Link', href);\n const isButton = !href;\n const specialStyles = ['top-navigation', 'link', 'recovery'];\n const hasSpecialStyle = specialStyles.indexOf(variant) > -1;\n\n const i18n = useInternalI18n('link');\n const baseProps = getBaseProps(props);\n const anchorTarget = target ?? (external ? '_blank' : undefined);\n const anchorRel = rel ?? (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);\n const uniqueId = useUniqueId('link');\n const linkId = useUniqueId('link-self');\n const infoId = useUniqueId('link-info');\n\n const infoLinkLabelFromContext = useContext(InfoLinkLabelContext);\n\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const fireFunnelEvent = (funnelInteractionId: string) => {\n if (variant === 'info') {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.helpPanelInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n } else if (external) {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n };\n\n const fireFollowEvent = (event: React.SyntheticEvent) => {\n if (funnelInteractionId) {\n fireFunnelEvent(funnelInteractionId);\n }\n\n fireCancelableEvent(onFollow, { href, external, target: anchorTarget }, event);\n };\n\n const handleLinkClick = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollowEvent(event);\n }\n };\n\n const handleButtonClick = (event: React.MouseEvent) => {\n fireFollowEvent(event);\n };\n\n const handleButtonKeyDown = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.space || event.keyCode === KeyCode.enter) {\n event.preventDefault();\n fireFollowEvent(event);\n }\n };\n\n const linkRef = useRef<HTMLElement>(null);\n const isVisualRefresh = useVisualRefresh();\n useForwardFocus(ref, linkRef);\n\n // Visual refresh should only add styles to buttons that don't already have unique styles (e.g. primary/secondary variants)\n const applyButtonStyles = isButton && isVisualRefresh && !hasSpecialStyle;\n\n const sharedProps = {\n id: linkId,\n ...baseProps,\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: useMergeRefs(linkRef as any, __internalRootRef),\n className: clsx(\n styles.link,\n baseProps.className,\n applyButtonStyles ? styles.button : null,\n styles[getVariantStyle(variant)],\n styles[getFontSizeStyle(variant, fontSize)],\n styles[getColorStyle(variant, color)]\n ),\n 'aria-label': ariaLabel,\n 'aria-labelledby': '',\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n };\n\n if (variant === 'info' && infoLinkLabelFromContext && !ariaLabel) {\n sharedProps['aria-labelledby'] = `${sharedProps.id} ${infoId} ${infoLinkLabelFromContext}`;\n }\n\n const renderedExternalIconAriaLabel = i18n('externalIconAriaLabel', externalIconAriaLabel);\n const content = (\n <>\n {children}\n {external && (\n <span className={styles['icon-wrapper']}>\n \n <span\n className={styles.icon}\n aria-label={renderedExternalIconAriaLabel}\n role={renderedExternalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" size=\"inherit\" />\n </span>\n </span>\n )}\n {variant === 'info' && (\n <span hidden={true} id={infoId}>\n :\n </span>\n )}\n </>\n );\n\n if (isButton) {\n return (\n <a {...sharedProps} role=\"button\" tabIndex={0} onKeyDown={handleButtonKeyDown} onClick={handleButtonClick}>\n {content}\n </a>\n );\n }\n\n return (\n // we dynamically set proper rel in the code above\n // eslint-disable-next-line react/jsx-no-target-blank\n <a {...sharedProps} target={anchorTarget} rel={anchorRel} href={href} onClick={handleLinkClick}>\n {content}\n </a>\n );\n }\n);\n\nfunction getVariantStyle(variant: Exclude<InternalLinkProps['variant'], undefined>) {\n return `variant-${variant.replace(/^awsui-/, '')}`;\n}\n\nfunction getFontSizeStyle(variant: InternalLinkProps['variant'], fontSize: InternalLinkProps['fontSize']) {\n switch (variant) {\n case 'info':\n return 'font-size-body-s';\n case 'awsui-value-large':\n return 'font-size-display-l';\n default:\n return `font-size-${fontSize}`;\n }\n}\n\nfunction getColorStyle(variant: InternalLinkProps['variant'], color: InternalLinkProps['color']) {\n return `color-${variant === 'info' ? 'normal' : color}`;\n}\n\nexport default InternalLink;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["link/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAEpG,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EA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E,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,KAC3F,OAAO,CACN,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,OAAyD;IAChF,OAAO,WAAW,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAqC,EAAE,QAAuC;IACtG,QAAQ,OAAO,EAAE;QACf,KAAK,MAAM;YACT,OAAO,kBAAkB,CAAC;QAC5B,KAAK,mBAAmB;YACtB,OAAO,qBAAqB,CAAC;QAC/B;YACE,OAAO,aAAa,QAAQ,EAAE,CAAC;KAClC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,OAAqC,EAAE,KAAiC;IAC7F,OAAO,SAAS,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useRef } from 'react';\nimport clsx from 'clsx';\nimport InternalIcon from '../icon/internal';\nimport styles from './styles.css.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { KeyCode } from '../internal/keycode';\nimport { LinkProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { useInternalI18n } from '../i18n/context';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getNameFromSelector,\n getSubStepAllSelector,\n} from '../internal/analytics/selectors';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\n\ntype InternalLinkProps = InternalBaseComponentProps &\n Omit<LinkProps, 'variant'> & {\n variant?: LinkProps['variant'] | 'top-navigation' | 'link' | 'recovery';\n };\n\nconst InternalLink = React.forwardRef(\n (\n {\n variant: providedVariant,\n fontSize = 'body-m',\n color = 'normal',\n external = false,\n target,\n href,\n rel,\n ariaLabel,\n externalIconAriaLabel,\n onFollow,\n children,\n __internalRootRef = null,\n ...props\n }: InternalLinkProps,\n ref: React.Ref<LinkProps.Ref>\n ) => {\n checkSafeUrl('Link', href);\n const isButton = !href;\n const { defaultVariant } = useContext(LinkDefaultVariantContext);\n const variant = providedVariant || defaultVariant;\n const specialStyles = ['top-navigation', 'link', 'recovery'];\n const hasSpecialStyle = specialStyles.indexOf(variant) > -1;\n\n const i18n = useInternalI18n('link');\n const baseProps = getBaseProps(props);\n const anchorTarget = target ?? (external ? '_blank' : undefined);\n const anchorRel = rel ?? (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);\n const uniqueId = useUniqueId('link');\n const linkId = useUniqueId('link-self');\n const infoId = useUniqueId('link-info');\n\n const infoLinkLabelFromContext = useContext(InfoLinkLabelContext);\n\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const fireFunnelEvent = (funnelInteractionId: string) => {\n if (variant === 'info') {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.helpPanelInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n } else if (external) {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n };\n\n const fireFollowEvent = (event: React.SyntheticEvent) => {\n if (funnelInteractionId) {\n fireFunnelEvent(funnelInteractionId);\n }\n\n fireCancelableEvent(onFollow, { href, external, target: anchorTarget }, event);\n };\n\n const handleLinkClick = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollowEvent(event);\n }\n };\n\n const handleButtonClick = (event: React.MouseEvent) => {\n fireFollowEvent(event);\n };\n\n const handleButtonKeyDown = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.space || event.keyCode === KeyCode.enter) {\n event.preventDefault();\n fireFollowEvent(event);\n }\n };\n\n const linkRef = useRef<HTMLElement>(null);\n const isVisualRefresh = useVisualRefresh();\n useForwardFocus(ref, linkRef);\n\n // Visual refresh should only add styles to buttons that don't already have unique styles (e.g. primary/secondary variants)\n const applyButtonStyles = isButton && isVisualRefresh && !hasSpecialStyle;\n\n const sharedProps = {\n id: linkId,\n ...baseProps,\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: useMergeRefs(linkRef as any, __internalRootRef),\n className: clsx(\n styles.link,\n baseProps.className,\n applyButtonStyles ? styles.button : null,\n styles[getVariantStyle(variant)],\n styles[getFontSizeStyle(variant, fontSize)],\n styles[getColorStyle(variant, color)]\n ),\n 'aria-label': ariaLabel,\n 'aria-labelledby': '',\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n };\n\n if (variant === 'info' && infoLinkLabelFromContext && !ariaLabel) {\n sharedProps['aria-labelledby'] = `${sharedProps.id} ${infoId} ${infoLinkLabelFromContext}`;\n }\n\n const renderedExternalIconAriaLabel = i18n('externalIconAriaLabel', externalIconAriaLabel);\n const content = (\n <>\n {children}\n {external && (\n <span className={styles['icon-wrapper']}>\n \n <span\n className={styles.icon}\n aria-label={renderedExternalIconAriaLabel}\n role={renderedExternalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" size=\"inherit\" />\n </span>\n </span>\n )}\n {variant === 'info' && (\n <span hidden={true} id={infoId}>\n :\n </span>\n )}\n </>\n );\n\n if (isButton) {\n return (\n <a {...sharedProps} role=\"button\" tabIndex={0} onKeyDown={handleButtonKeyDown} onClick={handleButtonClick}>\n {content}\n </a>\n );\n }\n\n return (\n // we dynamically set proper rel in the code above\n // eslint-disable-next-line react/jsx-no-target-blank\n <a {...sharedProps} target={anchorTarget} rel={anchorRel} href={href} onClick={handleLinkClick}>\n {content}\n </a>\n );\n }\n);\n\nfunction getVariantStyle(variant: Exclude<InternalLinkProps['variant'], undefined>) {\n return `variant-${variant.replace(/^awsui-/, '')}`;\n}\n\nfunction getFontSizeStyle(variant: InternalLinkProps['variant'], fontSize: InternalLinkProps['fontSize']) {\n switch (variant) {\n case 'info':\n return 'font-size-body-s';\n case 'awsui-value-large':\n return 'font-size-display-l';\n default:\n return `font-size-${fontSize}`;\n }\n}\n\nfunction getColorStyle(variant: InternalLinkProps['variant'], color: InternalLinkProps['color']) {\n return `color-${variant === 'info' ? 'normal' : color}`;\n}\n\nexport default InternalLink;\n"]}
|
|
@@ -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_g9csn_93",
|
|
5
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_g9csn_140",
|
|
6
|
+
"variant-primary": "awsui_variant-primary_4c84z_g9csn_177",
|
|
7
|
+
"variant-info": "awsui_variant-info_4c84z_g9csn_212",
|
|
8
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_g9csn_249",
|
|
9
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_g9csn_285",
|
|
10
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_g9csn_320",
|
|
11
|
+
"button": "awsui_button_4c84z_g9csn_355",
|
|
12
|
+
"color-inverted": "awsui_color-inverted_4c84z_g9csn_392",
|
|
13
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_g9csn_411",
|
|
14
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_g9csn_416",
|
|
15
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_g9csn_420",
|
|
16
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_g9csn_424",
|
|
17
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_g9csn_429",
|
|
18
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_g9csn_434",
|
|
19
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_g9csn_439",
|
|
20
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_g9csn_444",
|
|
21
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_g9csn_449",
|
|
22
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_g9csn_455",
|
|
23
|
+
"icon": "awsui_icon_4c84z_g9csn_455"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -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_g9csn_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,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
141
141
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
142
142
|
}
|
|
143
143
|
@media (prefers-reduced-motion: reduce) {
|
|
144
|
-
.
|
|
144
|
+
.awsui_link_4c84z_g9csn_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_g9csn_93:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93:not(#\9) {
|
|
150
150
|
animation: none;
|
|
151
151
|
transition: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_link_4c84z_g9csn_93:not(#\9):hover {
|
|
154
154
|
cursor: pointer;
|
|
155
|
-
color: var(--color-text-link-hover-
|
|
155
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_link_4c84z_g9csn_93:not(#\9):focus {
|
|
158
158
|
outline: none;
|
|
159
159
|
}
|
|
160
|
-
.
|
|
161
|
-
color: var(--color-text-link-hover-
|
|
160
|
+
.awsui_link_4c84z_g9csn_93:not(#\9):active {
|
|
161
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_link_4c84z_g9csn_93:not(#\9):active, .awsui_link_4c84z_g9csn_93:not(#\9):focus, .awsui_link_4c84z_g9csn_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_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9) {
|
|
169
169
|
-webkit-font-smoothing: inherit;
|
|
170
170
|
-moz-osx-font-smoothing: inherit;
|
|
171
171
|
color: var(--color-text-link-default-mwf535, #0073bb);
|
|
@@ -180,69 +180,68 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
180
180
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
181
181
|
}
|
|
182
182
|
@media (prefers-reduced-motion: reduce) {
|
|
183
|
-
.
|
|
183
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9) {
|
|
184
184
|
animation: none;
|
|
185
185
|
transition: none;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
.awsui-motion-disabled .
|
|
188
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9) {
|
|
189
189
|
animation: none;
|
|
190
190
|
transition: none;
|
|
191
191
|
}
|
|
192
|
-
.
|
|
192
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):hover {
|
|
193
193
|
cursor: pointer;
|
|
194
|
-
color: var(--color-text-link-hover-
|
|
194
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):focus {
|
|
197
197
|
outline: none;
|
|
198
198
|
}
|
|
199
|
-
.
|
|
200
|
-
color: var(--color-text-link-hover-
|
|
199
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):active {
|
|
200
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-secondary_4c84z_g9csn_140:not(#\9):hover {
|
|
203
203
|
text-decoration: underline;
|
|
204
204
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
205
205
|
text-decoration-color: currentColor;
|
|
206
206
|
}
|
|
207
|
-
.
|
|
207
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9) {
|
|
208
208
|
color: var(--color-text-link-default-mwf535, #0073bb);
|
|
209
|
-
font-weight:
|
|
210
|
-
letter-spacing:
|
|
211
|
-
|
|
212
|
-
text-decoration: var(--font-link-primary-decoration-g53302, none);
|
|
209
|
+
font-weight: inherit;
|
|
210
|
+
letter-spacing: normal;
|
|
211
|
+
text-decoration: underline;
|
|
213
212
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
214
|
-
text-decoration-color:
|
|
213
|
+
text-decoration-color: currentColor;
|
|
215
214
|
transition-property: color, -webkit-text-decoration;
|
|
216
215
|
transition-property: color, text-decoration;
|
|
217
216
|
transition-property: color, text-decoration, -webkit-text-decoration;
|
|
218
217
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
219
218
|
}
|
|
220
219
|
@media (prefers-reduced-motion: reduce) {
|
|
221
|
-
.
|
|
220
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9) {
|
|
222
221
|
animation: none;
|
|
223
222
|
transition: none;
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
|
-
.awsui-motion-disabled .
|
|
225
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9) {
|
|
227
226
|
animation: none;
|
|
228
227
|
transition: none;
|
|
229
228
|
}
|
|
230
|
-
.
|
|
229
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):hover {
|
|
231
230
|
cursor: pointer;
|
|
232
|
-
color: var(--color-text-link-hover-
|
|
231
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
233
232
|
}
|
|
234
|
-
.
|
|
233
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):focus {
|
|
235
234
|
outline: none;
|
|
236
235
|
}
|
|
237
|
-
.
|
|
238
|
-
color: var(--color-text-link-hover-
|
|
236
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):active {
|
|
237
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
239
238
|
}
|
|
240
|
-
.
|
|
239
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-primary_4c84z_g9csn_177:not(#\9):hover {
|
|
241
240
|
text-decoration: underline;
|
|
242
241
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
243
242
|
text-decoration-color: currentColor;
|
|
244
243
|
}
|
|
245
|
-
.
|
|
244
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9) {
|
|
246
245
|
-webkit-font-smoothing: var(--font-smoothing-webkit-r8w2d6, auto);
|
|
247
246
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ypl7oc, auto);
|
|
248
247
|
color: var(--color-text-link-default-mwf535, #0073bb);
|
|
@@ -257,67 +256,69 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
256
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
258
257
|
}
|
|
259
258
|
@media (prefers-reduced-motion: reduce) {
|
|
260
|
-
.
|
|
259
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9) {
|
|
261
260
|
animation: none;
|
|
262
261
|
transition: none;
|
|
263
262
|
}
|
|
264
263
|
}
|
|
265
|
-
.awsui-motion-disabled .
|
|
264
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9) {
|
|
266
265
|
animation: none;
|
|
267
266
|
transition: none;
|
|
268
267
|
}
|
|
269
|
-
.
|
|
268
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):hover {
|
|
270
269
|
cursor: pointer;
|
|
271
|
-
color: var(--color-text-link-hover-
|
|
270
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
272
271
|
}
|
|
273
|
-
.
|
|
272
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):focus {
|
|
274
273
|
outline: none;
|
|
275
274
|
}
|
|
276
|
-
.
|
|
277
|
-
color: var(--color-text-link-hover-
|
|
275
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):active {
|
|
276
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
278
277
|
}
|
|
279
|
-
.
|
|
278
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-info_4c84z_g9csn_212:not(#\9):hover {
|
|
280
279
|
text-decoration: underline;
|
|
281
280
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
282
281
|
text-decoration-color: var(--color-text-link-button-underline-hover-djlslb, currentColor);
|
|
283
282
|
}
|
|
284
|
-
.
|
|
283
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9) {
|
|
285
284
|
color: var(--color-text-link-default-mwf535, #0073bb);
|
|
286
285
|
font-weight: var(--font-box-value-large-weight-ucloqu, 300);
|
|
287
|
-
text-decoration:
|
|
286
|
+
text-decoration: underline;
|
|
288
287
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
289
|
-
text-decoration-color:
|
|
288
|
+
text-decoration-color: currentColor;
|
|
289
|
+
text-decoration-thickness: 0.3rem;
|
|
290
290
|
transition-property: color, -webkit-text-decoration;
|
|
291
291
|
transition-property: color, text-decoration;
|
|
292
292
|
transition-property: color, text-decoration, -webkit-text-decoration;
|
|
293
293
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
294
294
|
}
|
|
295
295
|
@media (prefers-reduced-motion: reduce) {
|
|
296
|
-
.
|
|
296
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9) {
|
|
297
297
|
animation: none;
|
|
298
298
|
transition: none;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
.awsui-motion-disabled .
|
|
301
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9) {
|
|
302
302
|
animation: none;
|
|
303
303
|
transition: none;
|
|
304
304
|
}
|
|
305
|
-
.
|
|
305
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):hover {
|
|
306
306
|
cursor: pointer;
|
|
307
|
-
color: var(--color-text-link-hover-
|
|
307
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):focus {
|
|
310
310
|
outline: none;
|
|
311
311
|
}
|
|
312
|
-
.
|
|
313
|
-
color: var(--color-text-link-hover-
|
|
312
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):active {
|
|
313
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-value-large_4c84z_g9csn_249:not(#\9):hover {
|
|
316
316
|
text-decoration: underline;
|
|
317
317
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
318
318
|
text-decoration-color: currentColor;
|
|
319
|
+
text-decoration-thickness: 0.3rem;
|
|
319
320
|
}
|
|
320
|
-
.
|
|
321
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9) {
|
|
321
322
|
color: var(--color-text-interactive-default-7wc1ct, #545b64);
|
|
322
323
|
font-weight: 700;
|
|
323
324
|
letter-spacing: 0.005em;
|
|
@@ -330,31 +331,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
330
331
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
331
332
|
}
|
|
332
333
|
@media (prefers-reduced-motion: reduce) {
|
|
333
|
-
.
|
|
334
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9) {
|
|
334
335
|
animation: none;
|
|
335
336
|
transition: none;
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
|
-
.awsui-motion-disabled .
|
|
339
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9) {
|
|
339
340
|
animation: none;
|
|
340
341
|
transition: none;
|
|
341
342
|
}
|
|
342
|
-
.
|
|
343
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):hover {
|
|
343
344
|
cursor: pointer;
|
|
344
345
|
color: var(--color-text-interactive-hover-78oj78, #16191f);
|
|
345
346
|
}
|
|
346
|
-
.
|
|
347
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):focus {
|
|
347
348
|
outline: none;
|
|
348
349
|
}
|
|
349
|
-
.
|
|
350
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):active {
|
|
350
351
|
color: var(--color-text-interactive-active-zv2spm, #16191f);
|
|
351
352
|
}
|
|
352
|
-
.
|
|
353
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-top-navigation_4c84z_g9csn_285:not(#\9):hover {
|
|
353
354
|
text-decoration: underline;
|
|
354
355
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
355
356
|
text-decoration-color: transparent;
|
|
356
357
|
}
|
|
357
|
-
.
|
|
358
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9) {
|
|
358
359
|
color: var(--color-text-link-default-mwf535, #0073bb);
|
|
359
360
|
font-weight: var(--font-link-button-weight-y3fyce, 400);
|
|
360
361
|
letter-spacing: var(--font-link-button-letter-spacing-qcov8t, normal);
|
|
@@ -367,31 +368,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
367
368
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
368
369
|
}
|
|
369
370
|
@media (prefers-reduced-motion: reduce) {
|
|
370
|
-
.
|
|
371
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9) {
|
|
371
372
|
animation: none;
|
|
372
373
|
transition: none;
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
.awsui-motion-disabled .
|
|
376
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9) {
|
|
376
377
|
animation: none;
|
|
377
378
|
transition: none;
|
|
378
379
|
}
|
|
379
|
-
.
|
|
380
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):hover {
|
|
380
381
|
cursor: pointer;
|
|
381
|
-
color: var(--color-text-link-hover-
|
|
382
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
382
383
|
}
|
|
383
|
-
.
|
|
384
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):focus {
|
|
384
385
|
outline: none;
|
|
385
386
|
}
|
|
386
|
-
.
|
|
387
|
-
color: var(--color-text-link-hover-
|
|
387
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):active {
|
|
388
|
+
color: var(--color-text-link-hover-162q5i, #0a4a74);
|
|
388
389
|
}
|
|
389
|
-
.
|
|
390
|
+
.awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_variant-recovery_4c84z_g9csn_320:not(#\9):hover {
|
|
390
391
|
text-decoration: underline;
|
|
391
392
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
392
393
|
text-decoration-color: var(--color-text-link-button-underline-hover-djlslb, currentColor);
|
|
393
394
|
}
|
|
394
|
-
.
|
|
395
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9) {
|
|
395
396
|
-webkit-font-smoothing: var(--font-smoothing-webkit-r8w2d6, auto);
|
|
396
397
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ypl7oc, auto);
|
|
397
398
|
color: var(--color-text-link-button-normal-default-w6ba0p, #545b64);
|
|
@@ -406,42 +407,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
406
407
|
transition-duration: var(--motion-duration-refresh-only-medium-1aoout, 165ms);
|
|
407
408
|
}
|
|
408
409
|
@media (prefers-reduced-motion: reduce) {
|
|
409
|
-
.
|
|
410
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9) {
|
|
410
411
|
animation: none;
|
|
411
412
|
transition: none;
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
.awsui-motion-disabled .
|
|
415
|
+
.awsui-motion-disabled .awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9), .awsui-mode-entering .awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9) {
|
|
415
416
|
animation: none;
|
|
416
417
|
transition: none;
|
|
417
418
|
}
|
|
418
|
-
.
|
|
419
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):hover {
|
|
419
420
|
cursor: pointer;
|
|
420
421
|
color: var(--color-text-link-button-normal-hover-w2i428, #16191f);
|
|
421
422
|
}
|
|
422
|
-
.
|
|
423
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):focus {
|
|
423
424
|
outline: none;
|
|
424
425
|
}
|
|
425
|
-
.
|
|
426
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):active {
|
|
426
427
|
color: var(--color-text-link-button-normal-active-bzgoeq, #16191f);
|
|
427
428
|
}
|
|
428
|
-
.
|
|
429
|
+
.awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):active, .awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):focus, .awsui_link_4c84z_g9csn_93.awsui_button_4c84z_g9csn_355:not(#\9):hover {
|
|
429
430
|
text-decoration: underline;
|
|
430
431
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
431
432
|
text-decoration-color: transparent;
|
|
432
433
|
}
|
|
433
|
-
.
|
|
434
|
+
.awsui_link_4c84z_g9csn_93.awsui_color-inverted_4c84z_g9csn_392:not(#\9) {
|
|
434
435
|
color: var(--color-text-notification-default-dvlvko, #fafafa);
|
|
435
436
|
}
|
|
436
|
-
.
|
|
437
|
+
.awsui_link_4c84z_g9csn_93.awsui_color-inverted_4c84z_g9csn_392:not(#\9):not(.awsui_button_4c84z_g9csn_355) {
|
|
437
438
|
text-decoration: underline;
|
|
438
439
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
439
440
|
text-decoration-color: currentColor;
|
|
440
441
|
}
|
|
441
|
-
.
|
|
442
|
+
.awsui_link_4c84z_g9csn_93.awsui_color-inverted_4c84z_g9csn_392:not(#\9):hover {
|
|
442
443
|
color: var(--color-text-link-inverted-hover-o7al0p, #fafafa);
|
|
443
444
|
}
|
|
444
|
-
body[data-awsui-focus-visible=true] .
|
|
445
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_g9csn_93:not(#\9):focus {
|
|
445
446
|
outline: thin dotted;
|
|
446
447
|
outline: var(--border-link-focus-ring-outline-y3uozn, 5px auto Highlight);
|
|
447
448
|
outline-offset: 2px;
|
|
@@ -449,54 +450,54 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_1elf4_93:not(#\9):focus {
|
|
|
449
450
|
border-radius: var(--border-radius-control-default-focus-ring-awoa2s, 2px);
|
|
450
451
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-btuheb, 0px) var(--color-border-item-focused-gjqsnp, #0073bb);
|
|
451
452
|
}
|
|
452
|
-
.
|
|
453
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-body-s_4c84z_g9csn_411:not(#\9) {
|
|
453
454
|
font-size: var(--font-body-s-size-wofdyf, 12px);
|
|
454
455
|
line-height: var(--font-body-s-line-height-hkht1z, 16px);
|
|
455
456
|
letter-spacing: var(--font-body-s-letter-spacing-bkw1uw, normal);
|
|
456
457
|
}
|
|
457
|
-
.
|
|
458
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-body-m_4c84z_g9csn_416:not(#\9) {
|
|
458
459
|
font-size: var(--font-body-m-size-q2y4dq, 14px);
|
|
459
460
|
line-height: var(--font-body-m-line-height-7pedlt, 22px);
|
|
460
461
|
}
|
|
461
|
-
.
|
|
462
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-heading-xs_4c84z_g9csn_420:not(#\9) {
|
|
462
463
|
font-size: var(--font-heading-xs-size-cj7yvf, 16px);
|
|
463
464
|
line-height: var(--font-heading-xs-line-height-eo46pq, 20px);
|
|
464
465
|
}
|
|
465
|
-
.
|
|
466
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-heading-s_4c84z_g9csn_424:not(#\9) {
|
|
466
467
|
font-size: var(--font-heading-s-size-50c3ux, 16px);
|
|
467
468
|
line-height: var(--font-heading-s-line-height-ykeawn, 20px);
|
|
468
469
|
letter-spacing: var(--font-heading-s-letter-spacing-dw4ti9, normal);
|
|
469
470
|
}
|
|
470
|
-
.
|
|
471
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-heading-m_4c84z_g9csn_429:not(#\9) {
|
|
471
472
|
font-size: var(--font-heading-m-size-pcxbv7, 18px);
|
|
472
473
|
line-height: var(--font-heading-m-line-height-u0fekd, 22px);
|
|
473
474
|
letter-spacing: var(--font-heading-m-letter-spacing-d3cpxu, normal);
|
|
474
475
|
}
|
|
475
|
-
.
|
|
476
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-heading-l_4c84z_g9csn_434:not(#\9) {
|
|
476
477
|
font-size: var(--font-heading-l-size-ogihwd, 18px);
|
|
477
478
|
line-height: var(--font-heading-l-line-height-imzcck, 22px);
|
|
478
479
|
letter-spacing: var(--font-heading-l-letter-spacing-bz1hn0, normal);
|
|
479
480
|
}
|
|
480
|
-
.
|
|
481
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-heading-xl_4c84z_g9csn_439:not(#\9) {
|
|
481
482
|
font-size: var(--font-heading-xl-size-c5vcsd, 28px);
|
|
482
483
|
line-height: var(--font-heading-xl-line-height-ar3qte, 36px);
|
|
483
484
|
letter-spacing: var(--font-heading-xl-letter-spacing-vfe8oi, normal);
|
|
484
485
|
}
|
|
485
|
-
.
|
|
486
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-display-l_4c84z_g9csn_444:not(#\9) {
|
|
486
487
|
font-size: var(--font-display-l-size-50gz06, 44px);
|
|
487
488
|
line-height: var(--font-display-l-line-height-bnhwv5, 56px);
|
|
488
489
|
letter-spacing: var(--font-display-l-letter-spacing-d16py1, normal);
|
|
489
490
|
}
|
|
490
|
-
.
|
|
491
|
+
.awsui_link_4c84z_g9csn_93.awsui_font-size-inherit_4c84z_g9csn_449:not(#\9) {
|
|
491
492
|
font-size: inherit;
|
|
492
493
|
line-height: inherit;
|
|
493
494
|
letter-spacing: inherit;
|
|
494
495
|
}
|
|
495
496
|
|
|
496
|
-
.awsui_icon-
|
|
497
|
+
.awsui_icon-wrapper_4c84z_g9csn_455:not(#\9) {
|
|
497
498
|
white-space: nowrap;
|
|
498
499
|
}
|
|
499
500
|
|
|
500
|
-
.
|
|
501
|
+
.awsui_icon_4c84z_g9csn_455:not(#\9) {
|
|
501
502
|
display: inline-block;
|
|
502
503
|
}
|