@cloudscape-design/components-themeable 3.0.1095 → 3.0.1096
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/button/styles.scss +4 -0
- package/lib/internal/scss/button/test-classes/styles.scss +4 -4
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/button/icon-helper.d.ts.map +1 -1
- package/lib/internal/template/button/icon-helper.js +1 -2
- package/lib/internal/template/button/icon-helper.js.map +1 -1
- package/lib/internal/template/button/internal.d.ts +0 -2
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +2 -3
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +22 -21
- package/lib/internal/template/button/styles.scoped.css +72 -68
- package/lib/internal/template/button/styles.selectors.js +22 -21
- package/lib/internal/template/button/test-classes/styles.css.js +2 -5
- package/lib/internal/template/button/test-classes/styles.scoped.css +5 -5
- package/lib/internal/template/button/test-classes/styles.selectors.js +2 -5
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/test-utils/dom/button/index.js +5 -4
- package/lib/internal/template/test-utils/dom/button/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/toggle-button/index.js +4 -3
- package/lib/internal/template/test-utils/dom/toggle-button/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/button/index.js +5 -4
- package/lib/internal/template/test-utils/selectors/button/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/toggle-button/index.js +2 -2
- package/lib/internal/template/test-utils/selectors/toggle-button/index.js.map +1 -1
- package/lib/internal/template/toggle-button/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle-button/internal.js +2 -3
- package/lib/internal/template/toggle-button/internal.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/scss/toggle-button/test-classes/styles.scss +0 -9
- package/lib/internal/template/toggle-button/test-classes/styles.css.js +0 -7
- package/lib/internal/template/toggle-button/test-classes/styles.scoped.css +0 -8
- package/lib/internal/template/toggle-button/test-classes/styles.selectors.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-helper.d.ts","sourceRoot":"","sources":["../../../src/button/icon-helper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-helper.d.ts","sourceRoot":"","sources":["../../../src/button/icon-helper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA0BD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,eAAe,sBAO9C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,sBAK/C"}
|
|
@@ -6,7 +6,6 @@ import clsx from 'clsx';
|
|
|
6
6
|
import InternalIcon from '../icon/internal';
|
|
7
7
|
import InternalSpinner from '../spinner/internal';
|
|
8
8
|
import styles from './styles.css.js';
|
|
9
|
-
import testUtilStyles from './test-classes/styles.css.js';
|
|
10
9
|
function getIconAlign(props) {
|
|
11
10
|
const standalone = props.variant === 'icon' || props.variant === 'inline-icon';
|
|
12
11
|
return standalone ? 'left' : props.iconAlign;
|
|
@@ -20,7 +19,7 @@ function IconWrapper(_a) {
|
|
|
20
19
|
}
|
|
21
20
|
export function LeftIcon(props) {
|
|
22
21
|
if (props.loading) {
|
|
23
|
-
return React.createElement(InternalSpinner, { className: clsx(styles.icon, styles['icon-left']
|
|
22
|
+
return React.createElement(InternalSpinner, { className: clsx(styles.icon, styles['icon-left']) });
|
|
24
23
|
}
|
|
25
24
|
else if (getIconAlign(props) === 'left') {
|
|
26
25
|
return React.createElement(IconWrapper, Object.assign({}, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-helper.js","sourceRoot":"","sources":["../../../src/button/icon-helper.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAGlD,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-helper.js","sourceRoot":"","sources":["../../../src/button/icon-helper.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAGlD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAerC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C,KAAK,OAAO,EAAE;QACnC,OAAO,oBAAC,WAAW,oBAAK,KAAK,EAAI,CAAC;KACnC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport * as React from 'react';\nimport clsx from 'clsx';\n\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport InternalSpinner from '../spinner/internal';\nimport { ButtonProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface ButtonIconProps {\n loading?: boolean;\n iconName?: ButtonProps['iconName'];\n iconAlign?: ButtonProps['iconAlign'];\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n iconAlt?: string;\n iconSize?: IconProps.Size;\n variant?: string;\n iconClass?: string;\n badge?: boolean;\n}\n\nfunction getIconAlign(props: ButtonIconProps) {\n const standalone = props.variant === 'icon' || props.variant === 'inline-icon';\n\n return standalone ? 'left' : props.iconAlign;\n}\n\nfunction IconWrapper({ iconName, iconUrl, iconAlt, iconSvg, iconSize, badge, ...props }: ButtonIconProps) {\n if (!iconName && !iconUrl && !iconSvg) {\n return null;\n }\n\n return (\n <InternalIcon\n className={clsx(styles.icon, styles[`icon-${getIconAlign(props)}`], props.iconClass)}\n name={iconName}\n url={iconUrl}\n svg={iconSvg}\n alt={iconAlt}\n size={iconSize}\n badge={badge}\n />\n );\n}\n\nexport function LeftIcon(props: ButtonIconProps) {\n if (props.loading) {\n return <InternalSpinner className={clsx(styles.icon, styles['icon-left'])} />;\n } else if (getIconAlign(props) === 'left') {\n return <IconWrapper {...props} />;\n }\n return null;\n}\n\nexport function RightIcon(props: ButtonIconProps) {\n if (getIconAlign(props) === 'right') {\n return <IconWrapper {...props} />;\n }\n return null;\n}\n"]}
|
|
@@ -11,7 +11,6 @@ export type InternalButtonProps = Omit<ButtonProps, 'variant'> & {
|
|
|
11
11
|
__title?: string;
|
|
12
12
|
__emitPerformanceMarks?: boolean;
|
|
13
13
|
__skipNativeAttributesWarnings?: boolean;
|
|
14
|
-
__hideFromTestUtils?: boolean;
|
|
15
14
|
} & InternalBaseComponentProps;
|
|
16
15
|
export declare const InternalButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant"> & {
|
|
17
16
|
variant?: ButtonProps['variant'] | 'flashbar-icon' | 'breadcrumb-group' | 'menu-trigger' | 'modal-dismiss' | 'inline-icon-pointer-target';
|
|
@@ -23,7 +22,6 @@ export declare const InternalButton: React.ForwardRefExoticComponent<Omit<Button
|
|
|
23
22
|
__title?: string | undefined;
|
|
24
23
|
__emitPerformanceMarks?: boolean | undefined;
|
|
25
24
|
__skipNativeAttributesWarnings?: boolean | undefined;
|
|
26
|
-
__hideFromTestUtils?: boolean | undefined;
|
|
27
25
|
} & InternalBaseComponentProps & React.RefAttributes<ButtonProps.Ref>>;
|
|
28
26
|
export default InternalButton;
|
|
29
27
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO3C,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,CAAC,EACJ,WAAW,CAAC,SAAS,CAAC,GACtB,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,4BAA4B,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,8BAA8B,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO3C,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,CAAC,EACJ,WAAW,CAAC,SAAS,CAAC,GACtB,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,4BAA4B,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C,GAAG,0BAA0B,CAAC;AAE/B,eAAO,MAAM,cAAc;cAhBrB,WAAW,CAAC,SAAS,CAAC,GACtB,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,4BAA4B;;;;;;;;;sEAwTjC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -28,7 +28,7 @@ import styles from './styles.css.js';
|
|
|
28
28
|
import testUtilStyles from './test-classes/styles.css.js';
|
|
29
29
|
export const InternalButton = React.forwardRef((_a, ref) => {
|
|
30
30
|
var _b;
|
|
31
|
-
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, __internalRootRef, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true, __skipNativeAttributesWarnings,
|
|
31
|
+
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, __internalRootRef, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true, __skipNativeAttributesWarnings, analyticsAction = 'click' } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "external", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "i18nStrings", "style", "nativeButtonAttributes", "nativeAnchorAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title", "__emitPerformanceMarks", "__skipNativeAttributesWarnings", "analyticsAction"]);
|
|
32
32
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
33
33
|
checkSafeUrl('Button', href);
|
|
34
34
|
const isAnchor = Boolean(href);
|
|
@@ -86,7 +86,6 @@ export const InternalButton = React.forwardRef((_a, ref) => {
|
|
|
86
86
|
buttonContext.onClick({ variant });
|
|
87
87
|
};
|
|
88
88
|
const buttonClass = clsx(props.className, styles.button, styles[`variant-${variant}`], {
|
|
89
|
-
[testUtilStyles.button]: !__hideFromTestUtils,
|
|
90
89
|
[styles.disabled]: isNotInteractive,
|
|
91
90
|
[styles['disabled-with-reason']]: isDisabledWithReason,
|
|
92
91
|
[styles['button-no-wrap']]: !wrapText,
|
|
@@ -131,7 +130,7 @@ export const InternalButton = React.forwardRef((_a, ref) => {
|
|
|
131
130
|
const buttonContent = (React.createElement(React.Fragment, null,
|
|
132
131
|
React.createElement(LeftIcon, Object.assign({}, iconProps)),
|
|
133
132
|
shouldHaveContent && (React.createElement(React.Fragment, null,
|
|
134
|
-
React.createElement("span", { className: clsx(
|
|
133
|
+
React.createElement("span", { className: clsx(styles.content, analyticsSelectors.label) }, children),
|
|
135
134
|
external && (React.createElement(React.Fragment, null,
|
|
136
135
|
"\u00A0",
|
|
137
136
|
React.createElement(Icon, { name: "external", className: testUtilStyles['external-icon'], ariaLabel: i18n('i18nStrings.externalIconAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.externalIconAriaLabel) }))))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL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,CACzB;QACtB,OAAO,IAAI,WAAW,IAAI,CACzB,oBAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport Icon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport useHiddenDescription from '../internal/hooks/use-hidden-description';\nimport { useModalContextLoadingButtonComponent } from '../internal/hooks/use-modal-component-analytics';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\nimport { getButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type InternalButtonProps = Omit<ButtonProps, 'variant'> & {\n variant?:\n | ButtonProps['variant']\n | 'flashbar-icon'\n | 'breadcrumb-group'\n | 'menu-trigger'\n | 'modal-dismiss'\n | 'inline-icon-pointer-target';\n badge?: boolean;\n analyticsAction?: string;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n __emitPerformanceMarks?: boolean;\n __skipNativeAttributesWarnings?: boolean;\n __hideFromTestUtils?: boolean;\n} & InternalBaseComponentProps;\n\nexport const InternalButton = React.forwardRef(\n (\n {\n children,\n iconName,\n __iconClass,\n onClick,\n onFollow,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n external,\n target: targetOverride,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n i18nStrings,\n style,\n nativeButtonAttributes,\n nativeAnchorAttributes,\n __internalRootRef,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\n __emitPerformanceMarks = true,\n __skipNativeAttributesWarnings,\n __hideFromTestUtils = false,\n analyticsAction = 'click',\n ...props\n }: InternalButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n checkSafeUrl('Button', href);\n const isAnchor = Boolean(href);\n const target = targetOverride ?? (external ? '_blank' : undefined);\n const isNotInteractive = loading || disabled;\n const isDisabledWithReason =\n (variant === 'normal' || variant === 'primary' || variant === 'icon') && !!disabledReason && disabled;\n\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children &&\n ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss', 'inline-icon-pointer-target'].indexOf(variant) === -1;\n\n if ((iconName || iconUrl || iconSvg) && iconAlign === 'right' && external) {\n warnOnce('Button', 'A right-aligned icon should not be combined with an external icon.');\n }\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\n const i18n = useInternalI18n('button');\n\n const uniqueId = useUniqueId('button');\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'primaryButton',\n () => variant === 'primary' && __emitPerformanceMarks && !loading && !disabled,\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\n useModalContextLoadingButtonComponent(variant === 'primary', loading);\n\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n\n const handleClick = (event: React.MouseEvent) => {\n if (isNotInteractive) {\n return event.preventDefault();\n }\n\n if (isAnchor && isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, { href, target }, event);\n\n if ((iconName === 'external' || target === '_blank') && funnelInteractionId) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(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 { altKey, button, ctrlKey, metaKey, shiftKey } = event;\n fireCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey }, event);\n buttonContext.onClick({ variant });\n };\n\n const buttonClass = clsx(props.className, styles.button, styles[`variant-${variant}`], {\n [testUtilStyles.button]: !__hideFromTestUtils,\n [styles.disabled]: isNotInteractive,\n [styles['disabled-with-reason']]: isDisabledWithReason,\n [styles['button-no-wrap']]: !wrapText,\n [styles['button-no-text']]: !shouldHaveContent,\n [styles['full-width']]: shouldHaveContent && fullWidth,\n [styles.link]: isAnchor,\n });\n\n const explicitTabIndex = nativeButtonAttributes?.tabIndex ?? nativeAnchorAttributes?.tabIndex;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive && !isDisabledWithReason ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: analyticsAction,\n detail: { label: { root: 'self' } },\n };\n if (__injectAnalyticsComponentMetadata) {\n analyticsMetadata.component = {\n name: 'awsui.Button',\n label: { root: 'self' },\n properties: { variant, disabled: `${disabled}` },\n };\n }\n\n const buttonProps = {\n ...props,\n ...performanceMarkAttributes,\n tabIndex,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(buttonRef, __internalRootRef),\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls,\n // add ariaLabel as `title` as visible hint text\n title: __title ?? ariaLabel,\n className: buttonClass,\n onClick: handleClick,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n ...getAnalyticsMetadataAttribute(analyticsMetadata),\n ...getAnalyticsLabelAttribute(shouldHaveContent ? `.${analyticsSelectors.label}` : ''),\n } as const;\n\n const iconProps: ButtonIconProps = {\n loading,\n iconName,\n iconAlign,\n iconUrl,\n iconSvg,\n iconAlt,\n variant,\n badge,\n iconClass: __iconClass,\n iconSize: variant === 'modal-dismiss' ? 'medium' : 'normal',\n };\n const buttonContent = (\n <>\n <LeftIcon {...iconProps} />\n {shouldHaveContent && (\n <>\n <span className={clsx(testUtilStyles.content, analyticsSelectors.label)}>{children}</span>\n {external && (\n <>\n \n <Icon\n name=\"external\"\n className={testUtilStyles['external-icon']}\n ariaLabel={i18n('i18nStrings.externalIconAriaLabel', i18nStrings?.externalIconAriaLabel)}\n />\n </>\n )}\n </>\n )}\n <RightIcon {...iconProps} />\n </>\n );\n\n const { loadingButtonCount } = useFunnel();\n useEffect(() => {\n if (loading) {\n loadingButtonCount.current++;\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n loadingButtonCount.current--;\n };\n }\n }, [loading, loadingButtonCount]);\n\n const disabledReasonProps = {\n onFocus: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onBlur: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n onMouseEnter: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onMouseLeave: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n ...(isDisabledWithReason ? targetProps : {}),\n };\n const disabledReasonContent = (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n onDismiss={() => setShowTooltip(false)}\n />\n )}\n </>\n );\n\n const stylePropertiesAndVariables = getButtonStyles(style);\n\n if (isAnchor) {\n const getAnchorTabIndex = () => {\n if (isNotInteractive) {\n // If disabled with a reason, make it focusable so users can access the tooltip\n // Otherwise, resolve to the default button props tabIndex.\n return disabledReason ? 0 : buttonProps.tabIndex;\n }\n return buttonProps.tabIndex;\n };\n\n return (\n <>\n <WithNativeAttributes<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>\n {...buttonProps}\n {...disabledReasonProps}\n tag=\"a\"\n componentName=\"Button\"\n nativeAttributes={nativeAnchorAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n href={isNotInteractive ? undefined : href}\n role={isNotInteractive ? 'link' : undefined}\n tabIndex={getAnchorTabIndex()}\n target={target}\n // security recommendation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target\n rel={rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined)}\n aria-disabled={isNotInteractive ? true : undefined}\n download={download}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n\n return (\n <>\n <WithNativeAttributes<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>\n {...buttonProps}\n {...disabledReasonProps}\n tag=\"button\"\n componentName=\"Button\"\n nativeAttributes={nativeButtonAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n);\n\nexport default InternalButton;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,E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BAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAC5C,WAAW,CACO,CACtB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport Icon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { fireCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport useHiddenDescription from '../internal/hooks/use-hidden-description';\nimport { useModalContextLoadingButtonComponent } from '../internal/hooks/use-modal-component-analytics';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalLiveRegion from '../live-region/internal';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\nimport { getButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type InternalButtonProps = Omit<ButtonProps, 'variant'> & {\n variant?:\n | ButtonProps['variant']\n | 'flashbar-icon'\n | 'breadcrumb-group'\n | 'menu-trigger'\n | 'modal-dismiss'\n | 'inline-icon-pointer-target';\n badge?: boolean;\n analyticsAction?: string;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n __emitPerformanceMarks?: boolean;\n __skipNativeAttributesWarnings?: boolean;\n} & InternalBaseComponentProps;\n\nexport const InternalButton = React.forwardRef(\n (\n {\n children,\n iconName,\n __iconClass,\n onClick,\n onFollow,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n external,\n target: targetOverride,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n i18nStrings,\n style,\n nativeButtonAttributes,\n nativeAnchorAttributes,\n __internalRootRef,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\n __emitPerformanceMarks = true,\n __skipNativeAttributesWarnings,\n analyticsAction = 'click',\n ...props\n }: InternalButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n checkSafeUrl('Button', href);\n const isAnchor = Boolean(href);\n const target = targetOverride ?? (external ? '_blank' : undefined);\n const isNotInteractive = loading || disabled;\n const isDisabledWithReason =\n (variant === 'normal' || variant === 'primary' || variant === 'icon') && !!disabledReason && disabled;\n\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children &&\n ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss', 'inline-icon-pointer-target'].indexOf(variant) === -1;\n\n if ((iconName || iconUrl || iconSvg) && iconAlign === 'right' && external) {\n warnOnce('Button', 'A right-aligned icon should not be combined with an external icon.');\n }\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\n const i18n = useInternalI18n('button');\n\n const uniqueId = useUniqueId('button');\n const { funnelInteractionId } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const performanceMarkAttributes = usePerformanceMarks(\n 'primaryButton',\n () => variant === 'primary' && __emitPerformanceMarks && !loading && !disabled,\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\n useModalContextLoadingButtonComponent(variant === 'primary', loading);\n\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n\n const handleClick = (event: React.MouseEvent) => {\n if (isNotInteractive) {\n return event.preventDefault();\n }\n\n if (isAnchor && isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, { href, target }, event);\n\n if ((iconName === 'external' || target === '_blank') && funnelInteractionId) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(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 { altKey, button, ctrlKey, metaKey, shiftKey } = event;\n fireCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey }, event);\n buttonContext.onClick({ variant });\n };\n\n const buttonClass = clsx(props.className, styles.button, styles[`variant-${variant}`], {\n [styles.disabled]: isNotInteractive,\n [styles['disabled-with-reason']]: isDisabledWithReason,\n [styles['button-no-wrap']]: !wrapText,\n [styles['button-no-text']]: !shouldHaveContent,\n [styles['full-width']]: shouldHaveContent && fullWidth,\n [styles.link]: isAnchor,\n });\n\n const explicitTabIndex = nativeButtonAttributes?.tabIndex ?? nativeAnchorAttributes?.tabIndex;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive && !isDisabledWithReason ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: analyticsAction,\n detail: { label: { root: 'self' } },\n };\n if (__injectAnalyticsComponentMetadata) {\n analyticsMetadata.component = {\n name: 'awsui.Button',\n label: { root: 'self' },\n properties: { variant, disabled: `${disabled}` },\n };\n }\n\n const buttonProps = {\n ...props,\n ...performanceMarkAttributes,\n tabIndex,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(buttonRef, __internalRootRef),\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls,\n // add ariaLabel as `title` as visible hint text\n title: __title ?? ariaLabel,\n className: buttonClass,\n onClick: handleClick,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n ...getAnalyticsMetadataAttribute(analyticsMetadata),\n ...getAnalyticsLabelAttribute(shouldHaveContent ? `.${analyticsSelectors.label}` : ''),\n } as const;\n\n const iconProps: ButtonIconProps = {\n loading,\n iconName,\n iconAlign,\n iconUrl,\n iconSvg,\n iconAlt,\n variant,\n badge,\n iconClass: __iconClass,\n iconSize: variant === 'modal-dismiss' ? 'medium' : 'normal',\n };\n const buttonContent = (\n <>\n <LeftIcon {...iconProps} />\n {shouldHaveContent && (\n <>\n <span className={clsx(styles.content, analyticsSelectors.label)}>{children}</span>\n {external && (\n <>\n \n <Icon\n name=\"external\"\n className={testUtilStyles['external-icon']}\n ariaLabel={i18n('i18nStrings.externalIconAriaLabel', i18nStrings?.externalIconAriaLabel)}\n />\n </>\n )}\n </>\n )}\n <RightIcon {...iconProps} />\n </>\n );\n\n const { loadingButtonCount } = useFunnel();\n useEffect(() => {\n if (loading) {\n loadingButtonCount.current++;\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n loadingButtonCount.current--;\n };\n }\n }, [loading, loadingButtonCount]);\n\n const disabledReasonProps = {\n onFocus: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onBlur: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n onMouseEnter: isDisabledWithReason ? () => setShowTooltip(true) : undefined,\n onMouseLeave: isDisabledWithReason ? () => setShowTooltip(false) : undefined,\n ...(isDisabledWithReason ? targetProps : {}),\n };\n const disabledReasonContent = (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n onDismiss={() => setShowTooltip(false)}\n />\n )}\n </>\n );\n\n const stylePropertiesAndVariables = getButtonStyles(style);\n\n if (isAnchor) {\n const getAnchorTabIndex = () => {\n if (isNotInteractive) {\n // If disabled with a reason, make it focusable so users can access the tooltip\n // Otherwise, resolve to the default button props tabIndex.\n return disabledReason ? 0 : buttonProps.tabIndex;\n }\n return buttonProps.tabIndex;\n };\n\n return (\n <>\n <WithNativeAttributes<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>\n {...buttonProps}\n {...disabledReasonProps}\n tag=\"a\"\n componentName=\"Button\"\n nativeAttributes={nativeAnchorAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n href={isNotInteractive ? undefined : href}\n role={isNotInteractive ? 'link' : undefined}\n tabIndex={getAnchorTabIndex()}\n target={target}\n // security recommendation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target\n rel={rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined)}\n aria-disabled={isNotInteractive ? true : undefined}\n download={download}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n\n return (\n <>\n <WithNativeAttributes<HTMLButtonElement, React.ButtonHTMLAttributes<HTMLButtonElement>>\n {...buttonProps}\n {...disabledReasonProps}\n tag=\"button\"\n componentName=\"Button\"\n nativeAttributes={nativeButtonAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\n style={stylePropertiesAndVariables}\n >\n {buttonContent}\n {isDisabledWithReason && disabledReasonContent}\n </WithNativeAttributes>\n {loading && loadingText && (\n <InternalLiveRegion tagName=\"span\" hidden={true}>\n {loadingText}\n </InternalLiveRegion>\n )}\n </>\n );\n }\n);\n\nexport default InternalButton;\n"]}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"variant-
|
|
9
|
-
"variant-
|
|
10
|
-
"variant-
|
|
11
|
-
"variant-inline-icon
|
|
12
|
-
"variant-inline-
|
|
13
|
-
"variant-
|
|
14
|
-
"variant-
|
|
15
|
-
"variant-
|
|
16
|
-
"variant-
|
|
17
|
-
"
|
|
18
|
-
"button-no-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"icon-
|
|
22
|
-
"icon": "
|
|
23
|
-
"
|
|
24
|
-
"
|
|
4
|
+
"content": "awsui_content_vjswe_17hx0_153",
|
|
5
|
+
"button": "awsui_button_vjswe_17hx0_157",
|
|
6
|
+
"variant-normal": "awsui_variant-normal_vjswe_17hx0_206",
|
|
7
|
+
"disabled": "awsui_disabled_vjswe_17hx0_227",
|
|
8
|
+
"variant-primary": "awsui_variant-primary_vjswe_17hx0_235",
|
|
9
|
+
"variant-link": "awsui_variant-link_vjswe_17hx0_264",
|
|
10
|
+
"variant-icon": "awsui_variant-icon_vjswe_17hx0_293",
|
|
11
|
+
"variant-inline-icon": "awsui_variant-inline-icon_vjswe_17hx0_322",
|
|
12
|
+
"variant-inline-icon-pointer-target": "awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351",
|
|
13
|
+
"variant-inline-link": "awsui_variant-inline-link_vjswe_17hx0_380",
|
|
14
|
+
"variant-modal-dismiss": "awsui_variant-modal-dismiss_vjswe_17hx0_413",
|
|
15
|
+
"variant-flashbar-icon": "awsui_variant-flashbar-icon_vjswe_17hx0_442",
|
|
16
|
+
"variant-breadcrumb-group": "awsui_variant-breadcrumb-group_vjswe_17hx0_471",
|
|
17
|
+
"variant-menu-trigger": "awsui_variant-menu-trigger_vjswe_17hx0_505",
|
|
18
|
+
"button-no-text": "awsui_button-no-text_vjswe_17hx0_601",
|
|
19
|
+
"button-no-wrap": "awsui_button-no-wrap_vjswe_17hx0_605",
|
|
20
|
+
"full-width": "awsui_full-width_vjswe_17hx0_608",
|
|
21
|
+
"icon-left": "awsui_icon-left_vjswe_17hx0_630",
|
|
22
|
+
"icon-right": "awsui_icon-right_vjswe_17hx0_635",
|
|
23
|
+
"icon": "awsui_icon_vjswe_17hx0_630",
|
|
24
|
+
"link": "awsui_link_vjswe_17hx0_654",
|
|
25
|
+
"disabled-with-reason": "awsui_disabled-with-reason_vjswe_17hx0_654"
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -150,7 +150,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.
|
|
153
|
+
.awsui_content_vjswe_17hx0_153:not(#\9) {
|
|
154
|
+
/* used in test-utils */
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.awsui_button_vjswe_17hx0_157:not(#\9) {
|
|
154
158
|
border-collapse: separate;
|
|
155
159
|
border-spacing: 0;
|
|
156
160
|
box-sizing: border-box;
|
|
@@ -199,7 +203,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
199
203
|
cursor: pointer;
|
|
200
204
|
--awsui-style-focus-ring-box-shadow-y15yd5: 0 0 0 var(--awsui-style-focus-ring-border-width-y15yd5, 2px) var(--awsui-style-focus-ring-border-color-y15yd5, var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
201
205
|
}
|
|
202
|
-
.
|
|
206
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-normal_vjswe_17hx0_206:not(#\9) {
|
|
203
207
|
background: var(--awsui-style-background-default-y15yd5, var(--color-background-button-normal-default-dtyxp3, #ffffff));
|
|
204
208
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-normal-default-u1ylq9, #545b64));
|
|
205
209
|
border-color: var(--awsui-style-border-color-default-y15yd5, var(--color-border-button-normal-default-5cyqxe, #545b64));
|
|
@@ -207,20 +211,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
207
211
|
position: relative;
|
|
208
212
|
text-decoration: none;
|
|
209
213
|
}
|
|
210
|
-
.
|
|
214
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-normal_vjswe_17hx0_206:not(#\9):hover {
|
|
211
215
|
background: var(--awsui-style-background-hover-y15yd5, var(--color-background-button-normal-hover-ljmwt8, #fafafa));
|
|
212
216
|
border-color: var(--awsui-style-border-color-hover-y15yd5, var(--color-border-button-normal-hover-hv11nu, #16191f));
|
|
213
217
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-normal-hover-p4pvoi, #16191f));
|
|
214
218
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
215
219
|
text-decoration: none;
|
|
216
220
|
}
|
|
217
|
-
.
|
|
221
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-normal_vjswe_17hx0_206:not(#\9):active {
|
|
218
222
|
background: var(--awsui-style-background-active-y15yd5, var(--color-background-button-normal-active-1mvgjj, #eaeded));
|
|
219
223
|
border-color: var(--awsui-style-border-color-active-y15yd5, var(--color-border-button-normal-active-up8asc, #545b64));
|
|
220
224
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-normal-active-oypp2s, #16191f));
|
|
221
225
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
222
226
|
}
|
|
223
|
-
.
|
|
227
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-normal_vjswe_17hx0_206.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
224
228
|
background: var(--awsui-style-background-disabled-y15yd5, var(--color-background-button-normal-disabled-rd09ns, #ffffff));
|
|
225
229
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, var(--color-border-button-normal-disabled-iu8edd, #d5dbdb));
|
|
226
230
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-button-normal-disabled-sr2mjc, #879596));
|
|
@@ -228,7 +232,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
228
232
|
text-decoration: none;
|
|
229
233
|
cursor: auto;
|
|
230
234
|
}
|
|
231
|
-
.
|
|
235
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-primary_vjswe_17hx0_235:not(#\9) {
|
|
232
236
|
background: var(--awsui-style-background-default-y15yd5, var(--color-background-button-primary-default-3w82vy, #0073bb));
|
|
233
237
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-primary-default-p4hpbt, #ffffff));
|
|
234
238
|
border-color: var(--awsui-style-border-color-default-y15yd5, var(--color-background-button-primary-default-3w82vy, #0073bb));
|
|
@@ -236,20 +240,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
240
|
position: relative;
|
|
237
241
|
text-decoration: none;
|
|
238
242
|
}
|
|
239
|
-
.
|
|
243
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-primary_vjswe_17hx0_235:not(#\9):hover {
|
|
240
244
|
background: var(--awsui-style-background-hover-y15yd5, var(--color-background-button-primary-hover-o7mzaq, #0a4a74));
|
|
241
245
|
border-color: var(--awsui-style-border-color-hover-y15yd5, var(--color-background-button-primary-hover-o7mzaq, #0a4a74));
|
|
242
246
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-primary-hover-aa75h0, #ffffff));
|
|
243
247
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
244
248
|
text-decoration: none;
|
|
245
249
|
}
|
|
246
|
-
.
|
|
250
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-primary_vjswe_17hx0_235:not(#\9):active {
|
|
247
251
|
background: var(--awsui-style-background-active-y15yd5, var(--color-background-button-primary-active-78nndc, #12293b));
|
|
248
252
|
border-color: var(--awsui-style-border-color-active-y15yd5, var(--color-background-button-primary-active-78nndc, #12293b));
|
|
249
253
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-primary-active-mc67wn, #ffffff));
|
|
250
254
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
251
255
|
}
|
|
252
|
-
.
|
|
256
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-primary_vjswe_17hx0_235.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
253
257
|
background: var(--awsui-style-background-disabled-y15yd5, var(--color-background-button-primary-disabled-1tc1nl, #ffffff));
|
|
254
258
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, var(--color-border-button-primary-disabled-xk738n, #d5dbdb));
|
|
255
259
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-button-primary-disabled-xs2e2t, #879596));
|
|
@@ -257,7 +261,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
261
|
text-decoration: none;
|
|
258
262
|
cursor: auto;
|
|
259
263
|
}
|
|
260
|
-
.
|
|
264
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-link_vjswe_17hx0_264:not(#\9) {
|
|
261
265
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
262
266
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-normal-default-u1ylq9, #545b64));
|
|
263
267
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -265,20 +269,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
265
269
|
position: relative;
|
|
266
270
|
text-decoration: none;
|
|
267
271
|
}
|
|
268
|
-
.
|
|
272
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-link_vjswe_17hx0_264:not(#\9):hover {
|
|
269
273
|
background: var(--awsui-style-background-hover-y15yd5, var(--color-background-button-link-hover-0o9e67, #fafafa));
|
|
270
274
|
border-color: var(--awsui-style-border-color-hover-y15yd5, var(--color-background-button-link-hover-0o9e67, #fafafa));
|
|
271
275
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-normal-hover-p4pvoi, #16191f));
|
|
272
276
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
273
277
|
text-decoration: none;
|
|
274
278
|
}
|
|
275
|
-
.
|
|
279
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-link_vjswe_17hx0_264:not(#\9):active {
|
|
276
280
|
background: var(--awsui-style-background-active-y15yd5, var(--color-background-button-link-active-twcnhp, #eaeded));
|
|
277
281
|
border-color: var(--awsui-style-border-color-active-y15yd5, var(--color-background-button-link-active-twcnhp, #eaeded));
|
|
278
282
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-normal-active-oypp2s, #16191f));
|
|
279
283
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
280
284
|
}
|
|
281
|
-
.
|
|
285
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-link_vjswe_17hx0_264.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
282
286
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
283
287
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
284
288
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -286,7 +290,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
286
290
|
text-decoration: none;
|
|
287
291
|
cursor: auto;
|
|
288
292
|
}
|
|
289
|
-
.
|
|
293
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-icon_vjswe_17hx0_293:not(#\9) {
|
|
290
294
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
291
295
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-interactive-default-qwoe3g, #545b64));
|
|
292
296
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -294,20 +298,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
294
298
|
position: relative;
|
|
295
299
|
text-decoration: none;
|
|
296
300
|
}
|
|
297
|
-
.
|
|
301
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-icon_vjswe_17hx0_293:not(#\9):hover {
|
|
298
302
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
299
303
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
300
304
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-interactive-hover-bu4gls, #16191f));
|
|
301
305
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
302
306
|
text-decoration: none;
|
|
303
307
|
}
|
|
304
|
-
.
|
|
308
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-icon_vjswe_17hx0_293:not(#\9):active {
|
|
305
309
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
306
310
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
307
311
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-interactive-default-qwoe3g, #545b64));
|
|
308
312
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
309
313
|
}
|
|
310
|
-
.
|
|
314
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-icon_vjswe_17hx0_293.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
311
315
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
312
316
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
313
317
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-button-icon-disabled-xkerbo, #879596));
|
|
@@ -315,7 +319,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
315
319
|
text-decoration: none;
|
|
316
320
|
cursor: auto;
|
|
317
321
|
}
|
|
318
|
-
.
|
|
322
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322:not(#\9) {
|
|
319
323
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
320
324
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-inline-icon-default-1vy0j1, #545b64));
|
|
321
325
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -323,20 +327,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
323
327
|
position: relative;
|
|
324
328
|
text-decoration: none;
|
|
325
329
|
}
|
|
326
|
-
.
|
|
330
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322:not(#\9):hover {
|
|
327
331
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
328
332
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
329
333
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-inline-icon-hover-9zejqi, #16191f));
|
|
330
334
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
331
335
|
text-decoration: none;
|
|
332
336
|
}
|
|
333
|
-
.
|
|
337
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322:not(#\9):active {
|
|
334
338
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
335
339
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
336
340
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-inline-icon-default-1vy0j1, #545b64));
|
|
337
341
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
338
342
|
}
|
|
339
|
-
.
|
|
343
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
340
344
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
341
345
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
342
346
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-button-inline-icon-disabled-o6nywg, #aab7b8));
|
|
@@ -344,7 +348,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
344
348
|
text-decoration: none;
|
|
345
349
|
cursor: auto;
|
|
346
350
|
}
|
|
347
|
-
.
|
|
351
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351:not(#\9) {
|
|
348
352
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
349
353
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-inline-icon-default-1vy0j1, #545b64));
|
|
350
354
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -352,20 +356,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
352
356
|
position: relative;
|
|
353
357
|
text-decoration: none;
|
|
354
358
|
}
|
|
355
|
-
.
|
|
359
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351:not(#\9):hover {
|
|
356
360
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
357
361
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
358
362
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-inline-icon-hover-9zejqi, #16191f));
|
|
359
363
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
360
364
|
text-decoration: none;
|
|
361
365
|
}
|
|
362
|
-
.
|
|
366
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351:not(#\9):active {
|
|
363
367
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
364
368
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
365
369
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-inline-icon-default-1vy0j1, #545b64));
|
|
366
370
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
367
371
|
}
|
|
368
|
-
.
|
|
372
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
369
373
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
370
374
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
371
375
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-button-inline-icon-disabled-o6nywg, #aab7b8));
|
|
@@ -373,7 +377,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
373
377
|
text-decoration: none;
|
|
374
378
|
cursor: auto;
|
|
375
379
|
}
|
|
376
|
-
.
|
|
380
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380:not(#\9) {
|
|
377
381
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
378
382
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-normal-default-u1ylq9, #545b64));
|
|
379
383
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -385,20 +389,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
385
389
|
padding-block: 0;
|
|
386
390
|
padding-inline: 0;
|
|
387
391
|
}
|
|
388
|
-
.
|
|
392
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380:not(#\9):hover {
|
|
389
393
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
390
394
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
391
395
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-normal-hover-p4pvoi, #16191f));
|
|
392
396
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
393
397
|
text-decoration: none;
|
|
394
398
|
}
|
|
395
|
-
.
|
|
399
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380:not(#\9):active {
|
|
396
400
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
397
401
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
398
402
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-normal-active-oypp2s, #16191f));
|
|
399
403
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
400
404
|
}
|
|
401
|
-
.
|
|
405
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
402
406
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
403
407
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
404
408
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -406,7 +410,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
406
410
|
text-decoration: none;
|
|
407
411
|
cursor: auto;
|
|
408
412
|
}
|
|
409
|
-
.
|
|
413
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-modal-dismiss_vjswe_17hx0_413:not(#\9) {
|
|
410
414
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
411
415
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-interactive-default-qwoe3g, #545b64));
|
|
412
416
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -414,20 +418,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
414
418
|
position: relative;
|
|
415
419
|
text-decoration: none;
|
|
416
420
|
}
|
|
417
|
-
.
|
|
421
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-modal-dismiss_vjswe_17hx0_413:not(#\9):hover {
|
|
418
422
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
419
423
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
420
424
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-interactive-hover-bu4gls, #16191f));
|
|
421
425
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
422
426
|
text-decoration: none;
|
|
423
427
|
}
|
|
424
|
-
.
|
|
428
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-modal-dismiss_vjswe_17hx0_413:not(#\9):active {
|
|
425
429
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
426
430
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
427
431
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-interactive-default-qwoe3g, #545b64));
|
|
428
432
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
429
433
|
}
|
|
430
|
-
.
|
|
434
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-modal-dismiss_vjswe_17hx0_413.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
431
435
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
432
436
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
433
437
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -435,7 +439,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
435
439
|
text-decoration: none;
|
|
436
440
|
cursor: auto;
|
|
437
441
|
}
|
|
438
|
-
.
|
|
442
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-flashbar-icon_vjswe_17hx0_442:not(#\9) {
|
|
439
443
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
440
444
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-interactive-inverted-default-hyioba, #d5dbdb));
|
|
441
445
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -443,20 +447,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
443
447
|
position: relative;
|
|
444
448
|
text-decoration: none;
|
|
445
449
|
}
|
|
446
|
-
.
|
|
450
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-flashbar-icon_vjswe_17hx0_442:not(#\9):hover {
|
|
447
451
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
448
452
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
449
453
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-interactive-inverted-hover-p0x69h, #fafafa));
|
|
450
454
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
451
455
|
text-decoration: none;
|
|
452
456
|
}
|
|
453
|
-
.
|
|
457
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-flashbar-icon_vjswe_17hx0_442:not(#\9):active {
|
|
454
458
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
455
459
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
456
460
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-interactive-inverted-default-hyioba, #d5dbdb));
|
|
457
461
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
458
462
|
}
|
|
459
|
-
.
|
|
463
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-flashbar-icon_vjswe_17hx0_442.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
460
464
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
461
465
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
462
466
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -464,7 +468,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
464
468
|
text-decoration: none;
|
|
465
469
|
cursor: auto;
|
|
466
470
|
}
|
|
467
|
-
.
|
|
471
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-breadcrumb-group_vjswe_17hx0_471:not(#\9) {
|
|
468
472
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
469
473
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-link-default-x6cnv5, #0073bb));
|
|
470
474
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -477,20 +481,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
477
481
|
padding-inline: 0;
|
|
478
482
|
font-weight: normal;
|
|
479
483
|
}
|
|
480
|
-
.
|
|
484
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-breadcrumb-group_vjswe_17hx0_471:not(#\9):hover {
|
|
481
485
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
482
486
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
483
487
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
484
488
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
485
489
|
text-decoration: none;
|
|
486
490
|
}
|
|
487
|
-
.
|
|
491
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-breadcrumb-group_vjswe_17hx0_471:not(#\9):active {
|
|
488
492
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
489
493
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
490
494
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-link-default-x6cnv5, #0073bb));
|
|
491
495
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
492
496
|
}
|
|
493
|
-
.
|
|
497
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-breadcrumb-group_vjswe_17hx0_471.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
494
498
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
495
499
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
496
500
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -498,7 +502,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
498
502
|
text-decoration: none;
|
|
499
503
|
cursor: auto;
|
|
500
504
|
}
|
|
501
|
-
.
|
|
505
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-menu-trigger_vjswe_17hx0_505:not(#\9) {
|
|
502
506
|
background: var(--awsui-style-background-default-y15yd5, transparent);
|
|
503
507
|
color: var(--awsui-style-color-default-y15yd5, var(--color-text-button-normal-default-u1ylq9, #545b64));
|
|
504
508
|
border-color: var(--awsui-style-border-color-default-y15yd5, transparent);
|
|
@@ -506,20 +510,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
506
510
|
position: relative;
|
|
507
511
|
text-decoration: none;
|
|
508
512
|
}
|
|
509
|
-
.
|
|
513
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-menu-trigger_vjswe_17hx0_505:not(#\9):hover {
|
|
510
514
|
background: var(--awsui-style-background-hover-y15yd5, transparent);
|
|
511
515
|
border-color: var(--awsui-style-border-color-hover-y15yd5, transparent);
|
|
512
516
|
color: var(--awsui-style-color-hover-y15yd5, var(--color-text-button-normal-hover-p4pvoi, #16191f));
|
|
513
517
|
box-shadow: var(--awsui-style-box-shadow-hover-y15yd5);
|
|
514
518
|
text-decoration: none;
|
|
515
519
|
}
|
|
516
|
-
.
|
|
520
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-menu-trigger_vjswe_17hx0_505:not(#\9):active {
|
|
517
521
|
background: var(--awsui-style-background-active-y15yd5, transparent);
|
|
518
522
|
border-color: var(--awsui-style-border-color-active-y15yd5, transparent);
|
|
519
523
|
color: var(--awsui-style-color-active-y15yd5, var(--color-text-button-normal-active-oypp2s, #16191f));
|
|
520
524
|
box-shadow: var(--awsui-style-box-shadow-active-y15yd5);
|
|
521
525
|
}
|
|
522
|
-
.
|
|
526
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-menu-trigger_vjswe_17hx0_505.awsui_disabled_vjswe_17hx0_227:not(#\9) {
|
|
523
527
|
background: var(--awsui-style-background-disabled-y15yd5, transparent);
|
|
524
528
|
border-color: var(--awsui-style-border-color-disabled-y15yd5, transparent);
|
|
525
529
|
color: var(--awsui-style-color-disabled-y15yd5, var(--color-text-interactive-disabled-xwt2jl, #aab7b8));
|
|
@@ -527,18 +531,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
527
531
|
text-decoration: none;
|
|
528
532
|
cursor: auto;
|
|
529
533
|
}
|
|
530
|
-
.
|
|
534
|
+
.awsui_button_vjswe_17hx0_157:not(#\9):focus {
|
|
531
535
|
outline: none;
|
|
532
536
|
text-decoration: none;
|
|
533
537
|
}
|
|
534
|
-
body[data-awsui-focus-visible=true] .
|
|
538
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus {
|
|
535
539
|
position: relative;
|
|
536
540
|
}
|
|
537
|
-
body[data-awsui-focus-visible=true] .
|
|
541
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus {
|
|
538
542
|
outline: 2px dotted transparent;
|
|
539
543
|
outline-offset: calc(var(--space-button-focus-outline-gutter-vsdlzg, 3px) - 1px);
|
|
540
544
|
}
|
|
541
|
-
body[data-awsui-focus-visible=true] .
|
|
545
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus::before {
|
|
542
546
|
content: " ";
|
|
543
547
|
display: block;
|
|
544
548
|
position: absolute;
|
|
@@ -552,14 +556,14 @@ body[data-awsui-focus-visible=true] .awsui_button_vjswe_16ugg_153:not(#\9):focus
|
|
|
552
556
|
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-y15yd5, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
553
557
|
box-shadow: var(--awsui-style-focus-ring-box-shadow-y15yd5);
|
|
554
558
|
}
|
|
555
|
-
body[data-awsui-focus-visible=true] .
|
|
559
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-icon_vjswe_17hx0_293, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-modal-dismiss_vjswe_17hx0_413, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-flashbar-icon_vjswe_17hx0_442 {
|
|
556
560
|
position: relative;
|
|
557
561
|
}
|
|
558
|
-
body[data-awsui-focus-visible=true] .
|
|
562
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-icon_vjswe_17hx0_293, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-modal-dismiss_vjswe_17hx0_413, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-flashbar-icon_vjswe_17hx0_442 {
|
|
559
563
|
outline: 2px dotted transparent;
|
|
560
564
|
outline-offset: calc(var(--space-button-focus-outline-gutter-vsdlzg, 3px) - 1px);
|
|
561
565
|
}
|
|
562
|
-
body[data-awsui-focus-visible=true] .
|
|
566
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-icon_vjswe_17hx0_293::before, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-modal-dismiss_vjswe_17hx0_413::before, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-flashbar-icon_vjswe_17hx0_442::before {
|
|
563
567
|
content: " ";
|
|
564
568
|
display: block;
|
|
565
569
|
position: absolute;
|
|
@@ -573,14 +577,14 @@ body[data-awsui-focus-visible=true] .awsui_button_vjswe_16ugg_153:not(#\9):focus
|
|
|
573
577
|
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-y15yd5, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
574
578
|
box-shadow: var(--awsui-style-focus-ring-box-shadow-y15yd5);
|
|
575
579
|
}
|
|
576
|
-
body[data-awsui-focus-visible=true] .
|
|
580
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon_vjswe_17hx0_322, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351 {
|
|
577
581
|
position: relative;
|
|
578
582
|
}
|
|
579
|
-
body[data-awsui-focus-visible=true] .
|
|
583
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon_vjswe_17hx0_322, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351 {
|
|
580
584
|
outline: 2px dotted transparent;
|
|
581
585
|
outline-offset: calc(var(--space-button-inline-icon-focus-outline-gutter-cecatq, 3px) - 1px);
|
|
582
586
|
}
|
|
583
|
-
body[data-awsui-focus-visible=true] .
|
|
587
|
+
body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon_vjswe_17hx0_322::before, body[data-awsui-focus-visible=true] .awsui_button_vjswe_17hx0_157:not(#\9):focus.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351::before {
|
|
584
588
|
content: " ";
|
|
585
589
|
display: block;
|
|
586
590
|
position: absolute;
|
|
@@ -594,59 +598,59 @@ body[data-awsui-focus-visible=true] .awsui_button_vjswe_16ugg_153:not(#\9):focus
|
|
|
594
598
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
595
599
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-r5f6xl, #0073bb);
|
|
596
600
|
}
|
|
597
|
-
.
|
|
601
|
+
.awsui_button_vjswe_17hx0_157.awsui_button-no-text_vjswe_17hx0_601:not(#\9) {
|
|
598
602
|
padding-inline-start: var(--space-button-icon-only-horizontal-67q6rd, 16px);
|
|
599
603
|
padding-inline-end: var(--space-button-icon-only-horizontal-67q6rd, 16px);
|
|
600
604
|
}
|
|
601
|
-
.
|
|
605
|
+
.awsui_button_vjswe_17hx0_157.awsui_button-no-wrap_vjswe_17hx0_605:not(#\9) {
|
|
602
606
|
white-space: nowrap;
|
|
603
607
|
}
|
|
604
|
-
.
|
|
608
|
+
.awsui_button_vjswe_17hx0_157.awsui_full-width_vjswe_17hx0_608:not(#\9) {
|
|
605
609
|
inline-size: 100%;
|
|
606
610
|
text-align: center;
|
|
607
611
|
}
|
|
608
|
-
.
|
|
612
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-icon_vjswe_17hx0_293:not(#\9), .awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322:not(#\9), .awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351:not(#\9), .awsui_button_vjswe_17hx0_157.awsui_variant-flashbar-icon_vjswe_17hx0_442:not(#\9) {
|
|
609
613
|
padding-inline: var(--space-xxs-jnczic, 4px);
|
|
610
614
|
}
|
|
611
|
-
.
|
|
615
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-modal-dismiss_vjswe_17hx0_413:not(#\9) {
|
|
612
616
|
padding-block: var(--space-button-modal-dismiss-vertical-yopl9m, 4px);
|
|
613
617
|
padding-inline: var(--space-xxs-jnczic, 4px);
|
|
614
618
|
margin-inline-end: calc(-1 * var(--space-xxs-jnczic, 4px));
|
|
615
619
|
}
|
|
616
|
-
.
|
|
620
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon_vjswe_17hx0_322:not(#\9) {
|
|
617
621
|
padding-block: 0;
|
|
618
622
|
border-block-width: 0;
|
|
619
623
|
border-inline-width: 0;
|
|
620
624
|
}
|
|
621
|
-
.
|
|
625
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351:not(#\9) {
|
|
622
626
|
padding-block: var(--space-xxxs-3w1kr2, 2px);
|
|
623
627
|
border-block-width: 0;
|
|
624
628
|
border-inline-width: 0;
|
|
625
629
|
}
|
|
626
|
-
.
|
|
630
|
+
.awsui_button_vjswe_17hx0_157 > .awsui_icon-left_vjswe_17hx0_630:not(#\9) {
|
|
627
631
|
position: relative;
|
|
628
632
|
inset-inline-start: calc(-1 * var(--space-xxs-jnczic, 4px));
|
|
629
633
|
margin-inline-end: var(--space-xxs-jnczic, 4px);
|
|
630
634
|
}
|
|
631
|
-
.
|
|
635
|
+
.awsui_button_vjswe_17hx0_157 > .awsui_icon-right_vjswe_17hx0_635:not(#\9) {
|
|
632
636
|
position: relative;
|
|
633
637
|
inset-inline-end: calc(-1 * var(--space-xxs-jnczic, 4px));
|
|
634
638
|
margin-inline-start: var(--space-xxs-jnczic, 4px);
|
|
635
639
|
}
|
|
636
|
-
.
|
|
640
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380 > .awsui_icon-left_vjswe_17hx0_630:not(#\9) {
|
|
637
641
|
inset-inline-start: 0;
|
|
638
642
|
margin-inline-end: var(--space-xs-kw7k3v, 8px);
|
|
639
643
|
}
|
|
640
|
-
.
|
|
644
|
+
.awsui_button_vjswe_17hx0_157.awsui_variant-inline-link_vjswe_17hx0_380 > .awsui_icon-right_vjswe_17hx0_635:not(#\9) {
|
|
641
645
|
inset-inline-end: 0;
|
|
642
646
|
margin-inline-start: var(--space-xs-kw7k3v, 8px);
|
|
643
647
|
}
|
|
644
|
-
.
|
|
648
|
+
.awsui_button_vjswe_17hx0_157.awsui_button-no-text_vjswe_17hx0_601 > .awsui_icon_vjswe_17hx0_630:not(#\9) {
|
|
645
649
|
margin-inline-start: auto;
|
|
646
650
|
margin-inline-end: auto;
|
|
647
651
|
inset-inline: 0;
|
|
648
652
|
}
|
|
649
653
|
|
|
650
|
-
.
|
|
654
|
+
.awsui_link_vjswe_17hx0_654.awsui_disabled_vjswe_17hx0_227:not(#\9):not(.awsui_disabled-with-reason_vjswe_17hx0_654) {
|
|
651
655
|
pointer-events: none;
|
|
652
656
|
}
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"variant-
|
|
10
|
-
"variant-
|
|
11
|
-
"variant-
|
|
12
|
-
"variant-inline-icon
|
|
13
|
-
"variant-inline-
|
|
14
|
-
"variant-
|
|
15
|
-
"variant-
|
|
16
|
-
"variant-
|
|
17
|
-
"variant-
|
|
18
|
-
"
|
|
19
|
-
"button-no-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"icon-
|
|
23
|
-
"icon": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
5
|
+
"content": "awsui_content_vjswe_17hx0_153",
|
|
6
|
+
"button": "awsui_button_vjswe_17hx0_157",
|
|
7
|
+
"variant-normal": "awsui_variant-normal_vjswe_17hx0_206",
|
|
8
|
+
"disabled": "awsui_disabled_vjswe_17hx0_227",
|
|
9
|
+
"variant-primary": "awsui_variant-primary_vjswe_17hx0_235",
|
|
10
|
+
"variant-link": "awsui_variant-link_vjswe_17hx0_264",
|
|
11
|
+
"variant-icon": "awsui_variant-icon_vjswe_17hx0_293",
|
|
12
|
+
"variant-inline-icon": "awsui_variant-inline-icon_vjswe_17hx0_322",
|
|
13
|
+
"variant-inline-icon-pointer-target": "awsui_variant-inline-icon-pointer-target_vjswe_17hx0_351",
|
|
14
|
+
"variant-inline-link": "awsui_variant-inline-link_vjswe_17hx0_380",
|
|
15
|
+
"variant-modal-dismiss": "awsui_variant-modal-dismiss_vjswe_17hx0_413",
|
|
16
|
+
"variant-flashbar-icon": "awsui_variant-flashbar-icon_vjswe_17hx0_442",
|
|
17
|
+
"variant-breadcrumb-group": "awsui_variant-breadcrumb-group_vjswe_17hx0_471",
|
|
18
|
+
"variant-menu-trigger": "awsui_variant-menu-trigger_vjswe_17hx0_505",
|
|
19
|
+
"button-no-text": "awsui_button-no-text_vjswe_17hx0_601",
|
|
20
|
+
"button-no-wrap": "awsui_button-no-wrap_vjswe_17hx0_605",
|
|
21
|
+
"full-width": "awsui_full-width_vjswe_17hx0_608",
|
|
22
|
+
"icon-left": "awsui_icon-left_vjswe_17hx0_630",
|
|
23
|
+
"icon-right": "awsui_icon-right_vjswe_17hx0_635",
|
|
24
|
+
"icon": "awsui_icon_vjswe_17hx0_630",
|
|
25
|
+
"link": "awsui_link_vjswe_17hx0_654",
|
|
26
|
+
"disabled-with-reason": "awsui_disabled-with-reason_vjswe_17hx0_654"
|
|
26
27
|
};
|
|
27
28
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"icon-left": "awsui_icon-left_1ueyk_1xee3_7",
|
|
7
|
-
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_1ueyk_1xee3_8",
|
|
8
|
-
"external-icon": "awsui_external-icon_1ueyk_1xee3_9"
|
|
4
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_1ueyk_ca6yt_5",
|
|
5
|
+
"external-icon": "awsui_external-icon_1ueyk_ca6yt_9"
|
|
9
6
|
};
|
|
10
7
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.awsui_external-
|
|
5
|
+
.awsui_disabled-reason-tooltip_1ueyk_ca6yt_5:not(#\9) {
|
|
6
|
+
/* used in test-utils or tests */
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.awsui_external-icon_1ueyk_ca6yt_9:not(#\9) {
|
|
10
10
|
/* used in test-utils or tests */
|
|
11
11
|
}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"icon-left": "awsui_icon-left_1ueyk_1xee3_7",
|
|
8
|
-
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_1ueyk_1xee3_8",
|
|
9
|
-
"external-icon": "awsui_external-icon_1ueyk_1xee3_9"
|
|
5
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_1ueyk_ca6yt_5",
|
|
6
|
+
"external-icon": "awsui_external-icon_1ueyk_ca6yt_9"
|
|
10
7
|
};
|
|
11
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (ce7b93a9)";
|
|
3
|
+
export var GIT_SHA = "ce7b93a9";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -9,11 +9,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
10
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
12
|
-
const styles_selectors_js_1 = require("../../../button/
|
|
13
|
-
const styles_selectors_js_2 = require("../../../
|
|
12
|
+
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
13
|
+
const styles_selectors_js_2 = require("../../../button/test-classes/styles.selectors.js");
|
|
14
|
+
const styles_selectors_js_3 = require("../../../spinner/styles.selectors.js");
|
|
14
15
|
class ButtonWrapper extends dom_1.ComponentWrapper {
|
|
15
16
|
findLoadingIndicator() {
|
|
16
|
-
return this.find(`.${styles_selectors_js_1.default['icon-left']}.${
|
|
17
|
+
return this.find(`.${styles_selectors_js_1.default['icon-left']}.${styles_selectors_js_3.default.root}`);
|
|
17
18
|
}
|
|
18
19
|
findTextRegion() {
|
|
19
20
|
return this.find(`.${styles_selectors_js_1.default.content}`);
|
|
@@ -22,7 +23,7 @@ class ButtonWrapper extends dom_1.ComponentWrapper {
|
|
|
22
23
|
return this.element.disabled || this.element.getAttribute('aria-disabled') === 'true';
|
|
23
24
|
}
|
|
24
25
|
findDisabledReason() {
|
|
25
|
-
return (0, dom_1.createWrapper)().find(`.${
|
|
26
|
+
return (0, dom_1.createWrapper)().find(`.${styles_selectors_js_2.default['disabled-reason-tooltip']}`);
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
ButtonWrapper.rootSelector = styles_selectors_js_1.default.button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAElH,0FAAqF;AACrF,8EAAiE;AAEjE,MAAqB,aAAc,SAAQ,sBAAmC;IAG5E,oBAAoB;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAElH,6EAAyD;AACzD,0FAAqF;AACrF,8EAAiE;AAEjE,MAAqB,aAAc,SAAQ,sBAAmC;IAG5E,oBAAoB;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,WAAW,CAAC,IAAI,6BAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IAGD,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC;IACxF,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,IAAI,6BAAqB,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;;AAjBM,0BAAY,GAAW,6BAAM,CAAC,MAAM,CAAC;AAW5C;IADC,aAAO;+CAGP;AAdH,gCAmBC"}
|
|
@@ -10,13 +10,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
12
12
|
const button_1 = require("../button");
|
|
13
|
-
const styles_selectors_js_1 = require("../../../
|
|
13
|
+
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
14
|
+
const styles_selectors_js_2 = require("../../../toggle-button/styles.selectors.js");
|
|
14
15
|
class ToggleButtonWrapper extends button_1.default {
|
|
15
16
|
isPressed() {
|
|
16
|
-
return this.element.classList.contains(
|
|
17
|
+
return this.element.classList.contains(styles_selectors_js_2.default.pressed);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
ToggleButtonWrapper.rootSelector = styles_selectors_js_1.default.
|
|
20
|
+
ToggleButtonWrapper.rootSelector = styles_selectors_js_1.default.button;
|
|
20
21
|
__decorate([
|
|
21
22
|
dom_1.usesDom
|
|
22
23
|
], ToggleButtonWrapper.prototype, "isPressed", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/toggle-button/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAiE;AAEjE,sCAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/toggle-button/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAiE;AAEjE,sCAAsC;AAEtC,6EAA+D;AAC/D,oFAAgE;AAEhE,MAAqB,mBAAoB,SAAQ,gBAAa;IAI5D,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAAM,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;;AALM,gCAAY,GAAW,6BAAY,CAAC,MAAM,CAAC;AAGlD;IADC,aAAO;oDAGP;AANH,sCAOC"}
|
|
@@ -3,17 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
|
-
const styles_selectors_js_1 = require("../../../button/
|
|
7
|
-
const styles_selectors_js_2 = require("../../../
|
|
6
|
+
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
7
|
+
const styles_selectors_js_2 = require("../../../button/test-classes/styles.selectors.js");
|
|
8
|
+
const styles_selectors_js_3 = require("../../../spinner/styles.selectors.js");
|
|
8
9
|
class ButtonWrapper extends selectors_1.ComponentWrapper {
|
|
9
10
|
findLoadingIndicator() {
|
|
10
|
-
return this.find(`.${styles_selectors_js_1.default['icon-left']}.${
|
|
11
|
+
return this.find(`.${styles_selectors_js_1.default['icon-left']}.${styles_selectors_js_3.default.root}`);
|
|
11
12
|
}
|
|
12
13
|
findTextRegion() {
|
|
13
14
|
return this.find(`.${styles_selectors_js_1.default.content}`);
|
|
14
15
|
}
|
|
15
16
|
findDisabledReason() {
|
|
16
|
-
return (0, selectors_1.createWrapper)().find(`.${
|
|
17
|
+
return (0, selectors_1.createWrapper)().find(`.${styles_selectors_js_2.default['disabled-reason-tooltip']}`);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
exports.default = ButtonWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/button/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,0FAAqF;AACrF,8EAAiE;AACjE,MAAqB,aAAc,SAAQ,4BAAgB;IAEzD,oBAAoB;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/button/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,6EAAyD;AACzD,0FAAqF;AACrF,8EAAiE;AACjE,MAAqB,aAAc,SAAQ,4BAAgB;IAEzD,oBAAoB;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,WAAW,CAAC,IAAI,6BAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,kBAAkB;QAChB,OAAO,IAAA,yBAAa,GAAE,CAAC,IAAI,CAAC,IAAI,6BAAqB,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;;AAVH,gCAWC;AAVQ,0BAAY,GAAW,6BAAM,CAAC,MAAM,CAAC"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
require("@cloudscape-design/test-utils-core/selectors");
|
|
6
6
|
const button_1 = require("../button");
|
|
7
|
-
const styles_selectors_js_1 = require("../../../
|
|
7
|
+
const styles_selectors_js_1 = require("../../../button/styles.selectors.js");
|
|
8
8
|
class ToggleButtonWrapper extends button_1.default {
|
|
9
9
|
}
|
|
10
10
|
exports.default = ToggleButtonWrapper;
|
|
11
|
-
ToggleButtonWrapper.rootSelector = styles_selectors_js_1.default.
|
|
11
|
+
ToggleButtonWrapper.rootSelector = styles_selectors_js_1.default.button;
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/toggle-button/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,wDAAsD;AACtD,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/toggle-button/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,wDAAsD;AACtD,sCAAsC;AACtC,6EAA+D;AAE/D,MAAqB,mBAAoB,SAAQ,gBAAa;;AAA9D,sCAEC;AADQ,gCAAY,GAAW,6BAAY,CAAC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/toggle-button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/toggle-button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,eAAO,MAAM,oBAAoB;;+CAkDhC,CAAC"}
|
|
@@ -9,7 +9,6 @@ import { fireNonCancelableEvent } from '../internal/events';
|
|
|
9
9
|
import { isDevelopment } from '../internal/is-development';
|
|
10
10
|
import { getToggleIcon } from './util';
|
|
11
11
|
import styles from './styles.css.js';
|
|
12
|
-
import testStyles from './test-classes/styles.css.js';
|
|
13
12
|
export const InternalToggleButton = React.forwardRef((_a, ref) => {
|
|
14
13
|
var { pressed, iconName: defaultIconName, pressedIconName, iconSvg: defaultIconSvg, pressedIconSvg, iconUrl: defaultIconUrl, pressedIconUrl, variant, onChange, className } = _a, rest = __rest(_a, ["pressed", "iconName", "pressedIconName", "iconSvg", "pressedIconSvg", "iconUrl", "pressedIconUrl", "variant", "onChange", "className"]);
|
|
15
14
|
if (isDevelopment) {
|
|
@@ -23,9 +22,9 @@ export const InternalToggleButton = React.forwardRef((_a, ref) => {
|
|
|
23
22
|
warnOnce('ToggleButton', '`pressedIconUrl` must be provided for `pressed` state.');
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
return (React.createElement(InternalButton, Object.assign({ className: clsx(className,
|
|
25
|
+
return (React.createElement(InternalButton, Object.assign({ className: clsx(className, styles[`variant-${variant}`], { [styles.pressed]: pressed }), variant: variant, formAction: "none", iconName: getToggleIcon(pressed, defaultIconName, pressedIconName), iconUrl: getToggleIcon(pressed, defaultIconUrl, pressedIconUrl), iconSvg: getToggleIcon(pressed, defaultIconSvg, pressedIconSvg), "aria-pressed": pressed, onClick: event => {
|
|
27
26
|
event.preventDefault();
|
|
28
27
|
fireNonCancelableEvent(onChange, { pressed: !pressed });
|
|
29
|
-
} }, rest, { ref: ref
|
|
28
|
+
} }, rest, { ref: ref })));
|
|
30
29
|
});
|
|
31
30
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/toggle-button/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/toggle-button/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,cAAc,MAAM,oBAAoB,CAAC;A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CAAC,kBACjD,OAAO,EACrB,OAAO,EAAE,KAAK,CAAC,EAAE;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,sBAAsB,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1D,CAAC,IACG,IAAI,IACR,GAAG,EAAE,GAAG,IACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalButton from '../button/internal';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { isDevelopment } from '../internal/is-development';\nimport { ToggleButtonProps } from './interfaces';\nimport { getToggleIcon } from './util';\n\nimport styles from './styles.css.js';\n\nexport const InternalToggleButton = React.forwardRef(\n (\n {\n pressed,\n iconName: defaultIconName,\n pressedIconName,\n iconSvg: defaultIconSvg,\n pressedIconSvg,\n iconUrl: defaultIconUrl,\n pressedIconUrl,\n variant,\n onChange,\n className,\n ...rest\n }: ToggleButtonProps & { __title?: string },\n ref: React.Ref<ToggleButtonProps.Ref>\n ) => {\n if (isDevelopment) {\n if (defaultIconName && !pressedIconName) {\n warnOnce('ToggleButton', '`pressedIconName` must be provided for `pressed` state.');\n }\n\n if (defaultIconSvg && !pressedIconSvg) {\n warnOnce('ToggleButton', '`pressedIconSvg` must be provided for `pressed` state.');\n }\n\n if (defaultIconUrl && !pressedIconUrl) {\n warnOnce('ToggleButton', '`pressedIconUrl` must be provided for `pressed` state.');\n }\n }\n\n return (\n <InternalButton\n className={clsx(className, styles[`variant-${variant}`], { [styles.pressed]: pressed })}\n variant={variant}\n formAction=\"none\"\n iconName={getToggleIcon(pressed, defaultIconName, pressedIconName)}\n iconUrl={getToggleIcon(pressed, defaultIconUrl, pressedIconUrl)}\n iconSvg={getToggleIcon(pressed, defaultIconSvg, pressedIconSvg)}\n aria-pressed={pressed}\n onClick={event => {\n event.preventDefault();\n\n fireNonCancelableEvent(onChange, { pressed: !pressed });\n }}\n {...rest}\n ref={ref}\n />\n );\n }\n);\n"]}
|
package/package.json
CHANGED