@cloudscape-design/components 3.0.245 → 3.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js +1 -3
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +29 -29
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/visual-refresh/styles.css.js +61 -61
- package/app-layout/visual-refresh/styles.scoped.css +151 -151
- package/app-layout/visual-refresh/styles.selectors.js +61 -61
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +2 -4
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/breadcrumb-group/item/item.d.ts.map +1 -1
- package/breadcrumb-group/item/item.js +2 -5
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +17 -17
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -3
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +19 -18
- package/button/styles.scoped.css +136 -136
- package/button/styles.selectors.js +19 -18
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js +2 -4
- package/calendar/grid/index.js.map +1 -1
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +38 -38
- package/calendar/styles.selectors.js +18 -18
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +109 -109
- package/code-editor/styles.selectors.js +32 -32
- package/code-editor/tab-button.d.ts.map +1 -1
- package/code-editor/tab-button.js +2 -4
- package/code-editor/tab-button.js.map +1 -1
- package/date-picker/index.d.ts.map +1 -1
- package/date-picker/index.js +1 -3
- package/date-picker/index.js.map +1 -1
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +9 -9
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +1 -3
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +1 -3
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/date-range-picker/calendar/grids/styles.scoped.css +42 -42
- package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +1 -3
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +45 -45
- package/date-range-picker/styles.selectors.js +38 -38
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +3 -7
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +23 -23
- package/expandable-section/styles.scoped.css +44 -44
- package/expandable-section/styles.selectors.js +23 -23
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +1 -3
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +1 -3
- package/flashbar/flash.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +144 -144
- package/flashbar/styles.selectors.js +45 -45
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +8 -4
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +19 -19
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +1 -3
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +9 -9
- package/internal/components/button-trigger/styles.scoped.css +23 -23
- package/internal/components/button-trigger/styles.selectors.js +9 -9
- package/internal/components/chart-legend/index.d.ts.map +1 -1
- package/internal/components/chart-legend/index.js +2 -4
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +15 -15
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +25 -3
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/filtering-token/index.d.ts +2 -1
- package/internal/components/filtering-token/index.d.ts.map +1 -1
- package/internal/components/filtering-token/index.js +3 -5
- package/internal/components/filtering-token/index.js.map +1 -1
- package/internal/components/filtering-token/styles.css.js +7 -7
- package/internal/components/filtering-token/styles.scoped.css +13 -13
- package/internal/components/filtering-token/styles.selectors.js +7 -7
- package/internal/components/menu-dropdown/index.d.ts.map +1 -1
- package/internal/components/menu-dropdown/index.js +2 -4
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +13 -13
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/token-list/index.d.ts +1 -1
- package/internal/components/token-list/index.d.ts.map +1 -1
- package/internal/components/token-list/index.js +3 -3
- package/internal/components/token-list/index.js.map +1 -1
- package/internal/components/token-list/interfaces.d.ts +0 -1
- package/internal/components/token-list/interfaces.d.ts.map +1 -1
- package/internal/components/token-list/interfaces.js.map +1 -1
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +20 -20
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/components/token-list/token-focus-controller.js +1 -1
- package/internal/components/token-list/token-focus-controller.js.map +1 -1
- package/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
- package/internal/components/token-list/token-limit-toggle.js +1 -3
- package/internal/components/token-list/token-limit-toggle.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/hooks/focus-visible/index.d.ts +2 -5
- package/internal/hooks/focus-visible/index.d.ts.map +1 -1
- package/internal/hooks/focus-visible/index.js +42 -22
- package/internal/hooks/focus-visible/index.js.map +1 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +2 -0
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +1 -3
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +71 -71
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +1 -3
- package/pagination/internal.js.map +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +23 -23
- package/pagination/styles.selectors.js +9 -9
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +1 -3
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +63 -63
- package/popover/styles.selectors.js +50 -50
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +2 -2
- package/property-filter/index.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +1 -1
- package/property-filter/token.js.map +1 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +1 -3
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +33 -33
- package/segmented-control/styles.selectors.js +14 -14
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +2 -5
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/styles.css.js +27 -27
- package/side-navigation/styles.scoped.css +37 -37
- package/side-navigation/styles.selectors.js +27 -27
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +1 -3
- package/split-panel/index.js.map +1 -1
- package/split-panel/styles.css.js +59 -59
- package/split-panel/styles.scoped.css +81 -81
- package/split-panel/styles.selectors.js +59 -59
- package/table/body-cell/index.d.ts.map +1 -1
- package/table/body-cell/index.js +3 -3
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/styles.css.js +18 -18
- package/table/body-cell/styles.scoped.css +57 -55
- package/table/body-cell/styles.selectors.js +18 -18
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +11 -9
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +19 -19
- package/table/header-cell/styles.scoped.css +32 -32
- package/table/header-cell/styles.selectors.js +19 -19
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +1 -3
- package/table/internal.js.map +1 -1
- package/table/resizer/styles.css.js +6 -6
- package/table/resizer/styles.scoped.css +11 -11
- package/table/resizer/styles.selectors.js +6 -6
- package/table/styles.css.js +33 -33
- package/table/styles.scoped.css +41 -41
- package/table/styles.selectors.js +33 -33
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +8 -3
- package/tabs/index.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +38 -38
- package/tabs/styles.selectors.js +21 -21
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +9 -3
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js +2 -4
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +10 -10
- package/tag-editor/styles.selectors.js +3 -3
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +1 -3
- package/token-group/dismiss-button.js.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/token-group/styles.css.js +5 -5
- package/token-group/styles.scoped.css +12 -12
- package/token-group/styles.selectors.js +5 -5
- package/token-group/token.d.ts +3 -5
- package/token-group/token.d.ts.map +1 -1
- package/token-group/token.js +2 -2
- package/token-group/token.js.map +1 -1
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.js +1 -3
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +42 -42
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js +1 -3
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +3 -7
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +66 -66
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +1 -3
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +27 -27
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/wizard/styles.css.js +32 -32
- package/wizard/styles.scoped.css +63 -63
- package/wizard/styles.selectors.js +32 -32
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -3
- package/wizard/wizard-form.js.map +1 -1
package/link/internal.js
CHANGED
|
@@ -5,7 +5,6 @@ import React, { useRef } from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import InternalIcon from '../icon/internal';
|
|
7
7
|
import styles from './styles.css.js';
|
|
8
|
-
import useFocusVisible from '../internal/hooks/focus-visible';
|
|
9
8
|
import { getBaseProps } from '../internal/base-component';
|
|
10
9
|
import { fireCancelableEvent, isPlainLeftClick } from '../internal/events';
|
|
11
10
|
import useForwardFocus from '../internal/hooks/forward-focus';
|
|
@@ -19,7 +18,6 @@ const InternalLink = React.forwardRef((_a, ref) => {
|
|
|
19
18
|
const isButton = !href;
|
|
20
19
|
const specialStyles = ['top-navigation', 'link', 'recovery'];
|
|
21
20
|
const hasSpecialStyle = specialStyles.indexOf(variant) > -1;
|
|
22
|
-
const focusVisible = useFocusVisible();
|
|
23
21
|
const baseProps = getBaseProps(props);
|
|
24
22
|
const anchorTarget = target !== null && target !== void 0 ? target : (external ? '_blank' : undefined);
|
|
25
23
|
const anchorRel = rel !== null && rel !== void 0 ? rel : (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);
|
|
@@ -45,7 +43,7 @@ const InternalLink = React.forwardRef((_a, ref) => {
|
|
|
45
43
|
useForwardFocus(ref, linkRef);
|
|
46
44
|
// Visual refresh should only add styles to buttons that don't already have unique styles (e.g. primary/secondary variants)
|
|
47
45
|
const applyButtonStyles = isButton && isVisualRefresh && !hasSpecialStyle;
|
|
48
|
-
const sharedProps = Object.assign(Object.assign(
|
|
46
|
+
const sharedProps = Object.assign(Object.assign({}, baseProps), {
|
|
49
47
|
// https://github.com/microsoft/TypeScript/issues/36659
|
|
50
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
49
|
ref: useMergeRefs(linkRef, __internalRootRef), className: clsx(styles.link, baseProps.className, applyButtonStyles ? styles.button : null, styles[getVariantStyle(variant)], styles[getFontSizeStyle(variant, fontSize)], styles[getColorStyle(variant, color)]), 'aria-label': ariaLabel });
|
package/link/internal.js.map
CHANGED
|
@@ -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,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OA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,WAAW,IAAE,MAAM,EAAE,YAAY,EAAE,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, { 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';\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 baseProps = getBaseProps(props);\n const anchorTarget = target ?? (external ? '_blank' : undefined);\n const anchorRel = rel ?? (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);\n\n const fireFollowEvent = (event: React.SyntheticEvent) => {\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 ...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 };\n\n const content = (\n <>\n {children}\n {external && (\n <span className={styles['icon-wrapper']}>\n \n <span\n className={styles.icon}\n aria-label={externalIconAriaLabel}\n role={externalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" size=\"inherit\" />\n </span>\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"]}
|
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_vt4lg_93",
|
|
5
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_vt4lg_140",
|
|
6
|
+
"variant-primary": "awsui_variant-primary_4c84z_vt4lg_177",
|
|
7
|
+
"variant-info": "awsui_variant-info_4c84z_vt4lg_212",
|
|
8
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_vt4lg_249",
|
|
9
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_vt4lg_283",
|
|
10
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_vt4lg_318",
|
|
11
|
+
"button": "awsui_button_4c84z_vt4lg_353",
|
|
12
|
+
"color-inverted": "awsui_color-inverted_4c84z_vt4lg_390",
|
|
13
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_vt4lg_409",
|
|
14
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_vt4lg_414",
|
|
15
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_vt4lg_418",
|
|
16
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_vt4lg_422",
|
|
17
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_vt4lg_427",
|
|
18
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_vt4lg_432",
|
|
19
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_vt4lg_437",
|
|
20
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_vt4lg_442",
|
|
21
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_vt4lg_447",
|
|
22
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_vt4lg_453",
|
|
23
|
+
"icon": "awsui_icon_4c84z_vt4lg_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_vt4lg_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-5flen2, 165ms);
|
|
142
142
|
}
|
|
143
143
|
@media (prefers-reduced-motion: reduce) {
|
|
144
|
-
.
|
|
144
|
+
.awsui_link_4c84z_vt4lg_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_vt4lg_93:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93:not(#\9) {
|
|
150
150
|
animation: none;
|
|
151
151
|
transition: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_link_4c84z_vt4lg_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_vt4lg_93:not(#\9):focus {
|
|
158
158
|
outline: none;
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_link_4c84z_vt4lg_93:not(#\9):active {
|
|
161
161
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_link_4c84z_vt4lg_93:not(#\9):active, .awsui_link_4c84z_vt4lg_93:not(#\9):focus, .awsui_link_4c84z_vt4lg_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_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9) {
|
|
169
169
|
-webkit-font-smoothing: inherit;
|
|
170
170
|
-moz-osx-font-smoothing: inherit;
|
|
171
171
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
@@ -180,31 +180,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
180
180
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
181
181
|
}
|
|
182
182
|
@media (prefers-reduced-motion: reduce) {
|
|
183
|
-
.
|
|
183
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_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_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9) {
|
|
189
189
|
animation: none;
|
|
190
190
|
transition: none;
|
|
191
191
|
}
|
|
192
|
-
.
|
|
192
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9):hover {
|
|
193
193
|
cursor: pointer;
|
|
194
194
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9):focus {
|
|
197
197
|
outline: none;
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9):active {
|
|
200
200
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_140:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-secondary_4c84z_vt4lg_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_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9) {
|
|
208
208
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
209
209
|
font-weight: var(--font-link-primary-weight-91pybi, "inherit");
|
|
210
210
|
letter-spacing: var(--font-link-primary-letter-spacing-vmsgcx, "inherit");
|
|
@@ -218,31 +218,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
218
218
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
219
219
|
}
|
|
220
220
|
@media (prefers-reduced-motion: reduce) {
|
|
221
|
-
.
|
|
221
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9) {
|
|
222
222
|
animation: none;
|
|
223
223
|
transition: none;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
.awsui-motion-disabled .
|
|
226
|
+
.awsui-motion-disabled .awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9) {
|
|
227
227
|
animation: none;
|
|
228
228
|
transition: none;
|
|
229
229
|
}
|
|
230
|
-
.
|
|
230
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):hover {
|
|
231
231
|
cursor: pointer;
|
|
232
232
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
233
233
|
}
|
|
234
|
-
.
|
|
234
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):focus {
|
|
235
235
|
outline: none;
|
|
236
236
|
}
|
|
237
|
-
.
|
|
237
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):active {
|
|
238
238
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
239
239
|
}
|
|
240
|
-
.
|
|
240
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-primary_4c84z_vt4lg_177:not(#\9):hover {
|
|
241
241
|
text-decoration: underline;
|
|
242
242
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
243
243
|
text-decoration-color: currentColor;
|
|
244
244
|
}
|
|
245
|
-
.
|
|
245
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9) {
|
|
246
246
|
-webkit-font-smoothing: var(--font-smoothing-webkit-vu3hx4, antialiased);
|
|
247
247
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-nkh1jb, grayscale);
|
|
248
248
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
@@ -257,31 +257,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
257
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
258
258
|
}
|
|
259
259
|
@media (prefers-reduced-motion: reduce) {
|
|
260
|
-
.
|
|
260
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9) {
|
|
261
261
|
animation: none;
|
|
262
262
|
transition: none;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
.awsui-motion-disabled .
|
|
265
|
+
.awsui-motion-disabled .awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9) {
|
|
266
266
|
animation: none;
|
|
267
267
|
transition: none;
|
|
268
268
|
}
|
|
269
|
-
.
|
|
269
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):hover {
|
|
270
270
|
cursor: pointer;
|
|
271
271
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
272
272
|
}
|
|
273
|
-
.
|
|
273
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):focus {
|
|
274
274
|
outline: none;
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):active {
|
|
277
277
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
278
278
|
}
|
|
279
|
-
.
|
|
279
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-info_4c84z_vt4lg_212:not(#\9):hover {
|
|
280
280
|
text-decoration: underline;
|
|
281
281
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
282
282
|
text-decoration-color: var(--color-text-link-button-underline-hover-ei09le, transparent);
|
|
283
283
|
}
|
|
284
|
-
.
|
|
284
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9) {
|
|
285
285
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
286
286
|
font-weight: var(--font-box-value-large-weight-dyt1pj, 800);
|
|
287
287
|
text-decoration: none;
|
|
@@ -293,31 +293,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
293
293
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
294
294
|
}
|
|
295
295
|
@media (prefers-reduced-motion: reduce) {
|
|
296
|
-
.
|
|
296
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_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_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9) {
|
|
302
302
|
animation: none;
|
|
303
303
|
transition: none;
|
|
304
304
|
}
|
|
305
|
-
.
|
|
305
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9):hover {
|
|
306
306
|
cursor: pointer;
|
|
307
307
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9):focus {
|
|
310
310
|
outline: none;
|
|
311
311
|
}
|
|
312
|
-
.
|
|
312
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9):active {
|
|
313
313
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_249:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-value-large_4c84z_vt4lg_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
319
|
}
|
|
320
|
-
.
|
|
320
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9) {
|
|
321
321
|
color: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
322
322
|
font-weight: 700;
|
|
323
323
|
letter-spacing: 0.005em;
|
|
@@ -330,31 +330,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
330
330
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
331
331
|
}
|
|
332
332
|
@media (prefers-reduced-motion: reduce) {
|
|
333
|
-
.
|
|
333
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9) {
|
|
334
334
|
animation: none;
|
|
335
335
|
transition: none;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
.awsui-motion-disabled .
|
|
338
|
+
.awsui-motion-disabled .awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9) {
|
|
339
339
|
animation: none;
|
|
340
340
|
transition: none;
|
|
341
341
|
}
|
|
342
|
-
.
|
|
342
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):hover {
|
|
343
343
|
cursor: pointer;
|
|
344
344
|
color: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
345
345
|
}
|
|
346
|
-
.
|
|
346
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):focus {
|
|
347
347
|
outline: none;
|
|
348
348
|
}
|
|
349
|
-
.
|
|
349
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):active {
|
|
350
350
|
color: var(--color-text-interactive-active-vol84d, #000716);
|
|
351
351
|
}
|
|
352
|
-
.
|
|
352
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-top-navigation_4c84z_vt4lg_283:not(#\9):hover {
|
|
353
353
|
text-decoration: underline;
|
|
354
354
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
355
355
|
text-decoration-color: transparent;
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9) {
|
|
358
358
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
359
359
|
font-weight: var(--font-link-button-weight-4f1hjr, 800);
|
|
360
360
|
letter-spacing: var(--font-link-button-letter-spacing-58wset, 0.005em);
|
|
@@ -367,31 +367,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
367
367
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
368
368
|
}
|
|
369
369
|
@media (prefers-reduced-motion: reduce) {
|
|
370
|
-
.
|
|
370
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9) {
|
|
371
371
|
animation: none;
|
|
372
372
|
transition: none;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
.awsui-motion-disabled .
|
|
375
|
+
.awsui-motion-disabled .awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9) {
|
|
376
376
|
animation: none;
|
|
377
377
|
transition: none;
|
|
378
378
|
}
|
|
379
|
-
.
|
|
379
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):hover {
|
|
380
380
|
cursor: pointer;
|
|
381
381
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
382
382
|
}
|
|
383
|
-
.
|
|
383
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):focus {
|
|
384
384
|
outline: none;
|
|
385
385
|
}
|
|
386
|
-
.
|
|
386
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):active {
|
|
387
387
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
388
388
|
}
|
|
389
|
-
.
|
|
389
|
+
.awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_variant-recovery_4c84z_vt4lg_318:not(#\9):hover {
|
|
390
390
|
text-decoration: underline;
|
|
391
391
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
392
392
|
text-decoration-color: var(--color-text-link-button-underline-hover-ei09le, transparent);
|
|
393
393
|
}
|
|
394
|
-
.
|
|
394
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9) {
|
|
395
395
|
-webkit-font-smoothing: var(--font-smoothing-webkit-vu3hx4, antialiased);
|
|
396
396
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-nkh1jb, grayscale);
|
|
397
397
|
color: var(--color-text-link-button-normal-default-2yrp9u, #0972d3);
|
|
@@ -406,42 +406,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
406
406
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
407
407
|
}
|
|
408
408
|
@media (prefers-reduced-motion: reduce) {
|
|
409
|
-
.
|
|
409
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9) {
|
|
410
410
|
animation: none;
|
|
411
411
|
transition: none;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
.awsui-motion-disabled .
|
|
414
|
+
.awsui-motion-disabled .awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9), .awsui-mode-entering .awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9) {
|
|
415
415
|
animation: none;
|
|
416
416
|
transition: none;
|
|
417
417
|
}
|
|
418
|
-
.
|
|
418
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):hover {
|
|
419
419
|
cursor: pointer;
|
|
420
420
|
color: var(--color-text-link-button-normal-hover-gz8y5b, #033160);
|
|
421
421
|
}
|
|
422
|
-
.
|
|
422
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):focus {
|
|
423
423
|
outline: none;
|
|
424
424
|
}
|
|
425
|
-
.
|
|
425
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):active {
|
|
426
426
|
color: var(--color-text-link-button-normal-active-8lhs8f, #033160);
|
|
427
427
|
}
|
|
428
|
-
.
|
|
428
|
+
.awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):active, .awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):focus, .awsui_link_4c84z_vt4lg_93.awsui_button_4c84z_vt4lg_353:not(#\9):hover {
|
|
429
429
|
text-decoration: underline;
|
|
430
430
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
431
431
|
text-decoration-color: transparent;
|
|
432
432
|
}
|
|
433
|
-
.
|
|
433
|
+
.awsui_link_4c84z_vt4lg_93.awsui_color-inverted_4c84z_vt4lg_390:not(#\9) {
|
|
434
434
|
color: var(--color-text-notification-default-2kpcxy, #fbfbfb);
|
|
435
435
|
}
|
|
436
|
-
.
|
|
436
|
+
.awsui_link_4c84z_vt4lg_93.awsui_color-inverted_4c84z_vt4lg_390:not(#\9):not(.awsui_button_4c84z_vt4lg_353) {
|
|
437
437
|
text-decoration: underline;
|
|
438
438
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
439
439
|
text-decoration-color: currentColor;
|
|
440
440
|
}
|
|
441
|
-
.
|
|
441
|
+
.awsui_link_4c84z_vt4lg_93.awsui_color-inverted_4c84z_vt4lg_390:not(#\9):hover {
|
|
442
442
|
color: var(--color-text-link-inverted-hover-5tnsdi, #ffffff);
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_vt4lg_93:not(#\9):focus {
|
|
445
445
|
outline: thin dotted;
|
|
446
446
|
outline: var(--border-link-focus-ring-outline-k2wccv, 0);
|
|
447
447
|
outline-offset: 2px;
|
|
@@ -449,54 +449,54 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
449
449
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
450
450
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-nv4ahb, 2px) var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
451
451
|
}
|
|
452
|
-
.
|
|
452
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-body-s_4c84z_vt4lg_409:not(#\9) {
|
|
453
453
|
font-size: var(--font-body-s-size-ukw2p9, 12px);
|
|
454
454
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
455
455
|
letter-spacing: var(--font-body-s-letter-spacing-cy0oxj, 0.005em);
|
|
456
456
|
}
|
|
457
|
-
.
|
|
457
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-body-m_4c84z_vt4lg_414:not(#\9) {
|
|
458
458
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
459
459
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
460
460
|
}
|
|
461
|
-
.
|
|
461
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-heading-xs_4c84z_vt4lg_418:not(#\9) {
|
|
462
462
|
font-size: var(--font-heading-xs-size-fryxro, 14px);
|
|
463
463
|
line-height: var(--font-heading-xs-line-height-5x131j, 18px);
|
|
464
464
|
}
|
|
465
|
-
.
|
|
465
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-heading-s_4c84z_vt4lg_422:not(#\9) {
|
|
466
466
|
font-size: var(--font-heading-s-size-9clg8y, 16px);
|
|
467
467
|
line-height: var(--font-heading-s-line-height-5b7f0q, 20px);
|
|
468
468
|
letter-spacing: var(--font-heading-s-letter-spacing-4d69jc, -0.005em);
|
|
469
469
|
}
|
|
470
|
-
.
|
|
470
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-heading-m_4c84z_vt4lg_427:not(#\9) {
|
|
471
471
|
font-size: var(--font-heading-m-size-6e3jmg, 20px);
|
|
472
472
|
line-height: var(--font-heading-m-line-height-u3t54f, 24px);
|
|
473
473
|
letter-spacing: var(--font-heading-m-letter-spacing-r00pg3, -0.01em);
|
|
474
474
|
}
|
|
475
|
-
.
|
|
475
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-heading-l_4c84z_vt4lg_432:not(#\9) {
|
|
476
476
|
font-size: var(--font-heading-l-size-otmxys, 24px);
|
|
477
477
|
line-height: var(--font-heading-l-line-height-gev4n1, 30px);
|
|
478
478
|
letter-spacing: var(--font-heading-l-letter-spacing-f6wvtk, -0.015em);
|
|
479
479
|
}
|
|
480
|
-
.
|
|
480
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-heading-xl_4c84z_vt4lg_437:not(#\9) {
|
|
481
481
|
font-size: var(--font-heading-xl-size-d0vjbk, 32px);
|
|
482
482
|
line-height: var(--font-heading-xl-line-height-doxfdj, 40px);
|
|
483
483
|
letter-spacing: var(--font-heading-xl-letter-spacing-9tcsmy, -0.02em);
|
|
484
484
|
}
|
|
485
|
-
.
|
|
485
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-display-l_4c84z_vt4lg_442:not(#\9) {
|
|
486
486
|
font-size: var(--font-display-l-size-03lgcb, 48px);
|
|
487
487
|
line-height: var(--font-display-l-line-height-71tnj3, 54px);
|
|
488
488
|
letter-spacing: var(--font-display-l-letter-spacing-4ff418, -0.03em);
|
|
489
489
|
}
|
|
490
|
-
.
|
|
490
|
+
.awsui_link_4c84z_vt4lg_93.awsui_font-size-inherit_4c84z_vt4lg_447:not(#\9) {
|
|
491
491
|
font-size: inherit;
|
|
492
492
|
line-height: inherit;
|
|
493
493
|
letter-spacing: inherit;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
.awsui_icon-
|
|
496
|
+
.awsui_icon-wrapper_4c84z_vt4lg_453:not(#\9) {
|
|
497
497
|
white-space: nowrap;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
.
|
|
500
|
+
.awsui_icon_4c84z_vt4lg_453:not(#\9) {
|
|
501
501
|
display: inline-block;
|
|
502
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_vt4lg_93",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_vt4lg_140",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_vt4lg_177",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_vt4lg_212",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_vt4lg_249",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_vt4lg_283",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_vt4lg_318",
|
|
12
|
+
"button": "awsui_button_4c84z_vt4lg_353",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_vt4lg_390",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_vt4lg_409",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_vt4lg_414",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_vt4lg_418",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_vt4lg_422",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_vt4lg_427",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_vt4lg_432",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_vt4lg_437",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_vt4lg_442",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_vt4lg_447",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_vt4lg_453",
|
|
24
|
+
"icon": "awsui_icon_4c84z_vt4lg_453"
|
|
25
25
|
};
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["pagination/internal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["pagination/internal.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AA8D/C,KAAK,uBAAuB,GAAG,eAAe,GAAG,0BAA0B,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,iBAAwB,EACxB,GAAG,IAAI,EACR,EAAE,uBAAuB,eA0FzB"}
|
package/pagination/internal.js
CHANGED
|
@@ -6,7 +6,6 @@ import React from 'react';
|
|
|
6
6
|
import InternalIcon from '../icon/internal';
|
|
7
7
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
8
8
|
import { getBaseProps } from '../internal/base-component';
|
|
9
|
-
import useFocusVisible from '../internal/hooks/focus-visible';
|
|
10
9
|
import styles from './styles.css.js';
|
|
11
10
|
import { getPaginationState, range } from './utils';
|
|
12
11
|
import { useInternalI18n } from '../internal/i18n/context';
|
|
@@ -17,13 +16,12 @@ const defaultAriaLabels = {
|
|
|
17
16
|
pageLabel: pageNumber => `${pageNumber}`,
|
|
18
17
|
};
|
|
19
18
|
function PageButton({ className, ariaLabel, disabled, pageIndex, isCurrent = false, children, onClick, }) {
|
|
20
|
-
const focusVisible = useFocusVisible();
|
|
21
19
|
function handleClick(event) {
|
|
22
20
|
event.preventDefault();
|
|
23
21
|
onClick(pageIndex);
|
|
24
22
|
}
|
|
25
23
|
return (React.createElement("li", { className: styles['page-item'] },
|
|
26
|
-
React.createElement("button",
|
|
24
|
+
React.createElement("button", { className: clsx(className, styles.button, disabled && styles['button-disabled'], isCurrent && styles['button-current']), type: "button", "aria-label": ariaLabel, disabled: disabled, onClick: handleClick, "aria-current": isCurrent }, children)));
|
|
27
25
|
}
|
|
28
26
|
function PageNumber(_a) {
|
|
29
27
|
var { pageIndex } = _a, rest = __rest(_a, ["pageIndex"]);
|