@cloudscape-design/components 3.0.735 → 3.0.737
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/badge/interfaces.d.ts +1 -1
- package/badge/interfaces.d.ts.map +1 -1
- package/badge/interfaces.js.map +1 -1
- package/badge/styles.css.js +10 -5
- package/badge/styles.scoped.css +25 -5
- package/badge/styles.selectors.js +10 -5
- package/button/internal.d.ts +2 -0
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -2
- package/button/internal.js.map +1 -1
- package/button-dropdown/internal.js +1 -1
- package/button-dropdown/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +26 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +10 -0
- package/internal/generated/styles/tokens.js +10 -0
- package/internal/generated/theming/index.cjs +310 -0
- package/internal/generated/theming/index.js +310 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
package/badge/interfaces.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface BadgeProps extends BaseComponentProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Specifies the badge color.
|
|
6
6
|
*/
|
|
7
|
-
color?: 'blue' | 'grey' | 'green' | 'red';
|
|
7
|
+
color?: 'blue' | 'grey' | 'green' | 'red' | 'severity-critical' | 'severity-high' | 'severity-medium' | 'severity-low' | 'severity-neutral';
|
|
8
8
|
/**
|
|
9
9
|
* Text displayed inside the badge.
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/badge/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;OAEG;IACH,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/badge/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;OAEG;IACH,KAAK,CAAC,EACF,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,GACL,mBAAmB,GACnB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,kBAAkB,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B"}
|
package/badge/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/badge/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface BadgeProps extends BaseComponentProps {\n /**\n * Specifies the badge color.\n */\n color
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/badge/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface BadgeProps extends BaseComponentProps {\n /**\n * Specifies the badge color.\n */\n color?:\n | 'blue'\n | 'grey'\n | 'green'\n | 'red'\n | 'severity-critical'\n | 'severity-high'\n | 'severity-medium'\n | 'severity-low'\n | 'severity-neutral';\n\n /**\n * Text displayed inside the badge.\n */\n children?: React.ReactNode;\n}\n"]}
|
package/badge/styles.css.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"badge": "
|
|
5
|
-
"badge-color-grey": "awsui_badge-color-
|
|
6
|
-
"badge-color-green": "awsui_badge-color-
|
|
7
|
-
"badge-color-blue": "awsui_badge-color-
|
|
8
|
-
"badge-color-red": "awsui_badge-color-
|
|
4
|
+
"badge": "awsui_badge_1yjyg_sc0wk_141",
|
|
5
|
+
"badge-color-grey": "awsui_badge-color-grey_1yjyg_sc0wk_187",
|
|
6
|
+
"badge-color-green": "awsui_badge-color-green_1yjyg_sc0wk_190",
|
|
7
|
+
"badge-color-blue": "awsui_badge-color-blue_1yjyg_sc0wk_193",
|
|
8
|
+
"badge-color-red": "awsui_badge-color-red_1yjyg_sc0wk_196",
|
|
9
|
+
"badge-color-severity-critical": "awsui_badge-color-severity-critical_1yjyg_sc0wk_199",
|
|
10
|
+
"badge-color-severity-high": "awsui_badge-color-severity-high_1yjyg_sc0wk_203",
|
|
11
|
+
"badge-color-severity-medium": "awsui_badge-color-severity-medium_1yjyg_sc0wk_207",
|
|
12
|
+
"badge-color-severity-low": "awsui_badge-color-severity-low_1yjyg_sc0wk_211",
|
|
13
|
+
"badge-color-severity-neutral": "awsui_badge-color-severity-neutral_1yjyg_sc0wk_215"
|
|
9
14
|
};
|
|
10
15
|
|
package/badge/styles.scoped.css
CHANGED
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
*/
|
|
139
139
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
140
140
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
141
|
-
.
|
|
141
|
+
.awsui_badge_1yjyg_sc0wk_141:not(#\9) {
|
|
142
142
|
border-collapse: separate;
|
|
143
143
|
border-spacing: 0;
|
|
144
144
|
box-sizing: border-box;
|
|
@@ -185,15 +185,35 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
185
185
|
padding-inline: var(--space-xs-zb16t3, 8px);
|
|
186
186
|
color: var(--color-text-notification-default-rdawv9, #fbfbfb);
|
|
187
187
|
}
|
|
188
|
-
.
|
|
188
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-grey_1yjyg_sc0wk_187:not(#\9) {
|
|
189
189
|
background-color: var(--color-background-notification-grey-2odmfy, #414d5c);
|
|
190
190
|
}
|
|
191
|
-
.
|
|
191
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-green_1yjyg_sc0wk_190:not(#\9) {
|
|
192
192
|
background-color: var(--color-background-notification-green-1jtqmb, #037f0c);
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-blue_1yjyg_sc0wk_193:not(#\9) {
|
|
195
195
|
background-color: var(--color-background-notification-blue-g2q2z0, #0972d3);
|
|
196
196
|
}
|
|
197
|
-
.
|
|
197
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-red_1yjyg_sc0wk_196:not(#\9) {
|
|
198
198
|
background-color: var(--color-background-notification-red-ovptxu, #d91515);
|
|
199
|
+
}
|
|
200
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-severity-critical_1yjyg_sc0wk_199:not(#\9) {
|
|
201
|
+
background-color: var(--color-background-severity-critical-idosdq, #7d2105);
|
|
202
|
+
color: var(--color-text-severity-critical-85viri, #fbfbfb);
|
|
203
|
+
}
|
|
204
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-severity-high_1yjyg_sc0wk_203:not(#\9) {
|
|
205
|
+
background-color: var(--color-background-severity-high-434xpy, #ba2e0f);
|
|
206
|
+
color: var(--color-text-severity-high-uiwahw, #fbfbfb);
|
|
207
|
+
}
|
|
208
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-severity-medium_1yjyg_sc0wk_207:not(#\9) {
|
|
209
|
+
background-color: var(--color-background-severity-medium-n5069n, #cc5f21);
|
|
210
|
+
color: var(--color-text-severity-medium-t00q1o, #000716);
|
|
211
|
+
}
|
|
212
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-severity-low_1yjyg_sc0wk_211:not(#\9) {
|
|
213
|
+
background-color: var(--color-background-severity-low-5ab62f, #b2911c);
|
|
214
|
+
color: var(--color-text-severity-low-alfea6, #000716);
|
|
215
|
+
}
|
|
216
|
+
.awsui_badge_1yjyg_sc0wk_141.awsui_badge-color-severity-neutral_1yjyg_sc0wk_215:not(#\9) {
|
|
217
|
+
background-color: var(--color-background-severity-neutral-wfgvya, #414d5c);
|
|
218
|
+
color: var(--color-text-severity-neutral-2hvk9q, #fbfbfb);
|
|
199
219
|
}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"badge": "
|
|
6
|
-
"badge-color-grey": "awsui_badge-color-
|
|
7
|
-
"badge-color-green": "awsui_badge-color-
|
|
8
|
-
"badge-color-blue": "awsui_badge-color-
|
|
9
|
-
"badge-color-red": "awsui_badge-color-
|
|
5
|
+
"badge": "awsui_badge_1yjyg_sc0wk_141",
|
|
6
|
+
"badge-color-grey": "awsui_badge-color-grey_1yjyg_sc0wk_187",
|
|
7
|
+
"badge-color-green": "awsui_badge-color-green_1yjyg_sc0wk_190",
|
|
8
|
+
"badge-color-blue": "awsui_badge-color-blue_1yjyg_sc0wk_193",
|
|
9
|
+
"badge-color-red": "awsui_badge-color-red_1yjyg_sc0wk_196",
|
|
10
|
+
"badge-color-severity-critical": "awsui_badge-color-severity-critical_1yjyg_sc0wk_199",
|
|
11
|
+
"badge-color-severity-high": "awsui_badge-color-severity-high_1yjyg_sc0wk_203",
|
|
12
|
+
"badge-color-severity-medium": "awsui_badge-color-severity-medium_1yjyg_sc0wk_207",
|
|
13
|
+
"badge-color-severity-low": "awsui_badge-color-severity-low_1yjyg_sc0wk_211",
|
|
14
|
+
"badge-color-severity-neutral": "awsui_badge-color-severity-neutral_1yjyg_sc0wk_215"
|
|
10
15
|
};
|
|
11
16
|
|
package/button/internal.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type InternalButtonProps = Omit<ButtonProps, 'variant'> & {
|
|
|
9
9
|
__focusable?: boolean;
|
|
10
10
|
__injectAnalyticsComponentMetadata?: boolean;
|
|
11
11
|
__title?: string;
|
|
12
|
+
__emitPerformanceMarks?: boolean;
|
|
12
13
|
} & InternalBaseComponentProps<HTMLAnchorElement | HTMLButtonElement>;
|
|
13
14
|
export declare const InternalButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant"> & {
|
|
14
15
|
variant?: ButtonProps['variant'] | 'flashbar-icon' | 'breadcrumb-group' | 'menu-trigger' | 'modal-dismiss';
|
|
@@ -18,6 +19,7 @@ export declare const InternalButton: React.ForwardRefExoticComponent<Omit<Button
|
|
|
18
19
|
__focusable?: boolean | undefined;
|
|
19
20
|
__injectAnalyticsComponentMetadata?: boolean | undefined;
|
|
20
21
|
__title?: string | undefined;
|
|
22
|
+
__emitPerformanceMarks?: boolean | undefined;
|
|
21
23
|
} & InternalBaseComponentProps<HTMLAnchorElement | HTMLButtonElement> & React.RefAttributes<ButtonProps.Ref>>;
|
|
22
24
|
export default InternalButton;
|
|
23
25
|
//# sourceMappingURL=internal.d.ts.map
|
package/button/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAsB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,eAAe,GAAG,kBAAkB,GAAG,cAAc,GAAG,eAA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iB,CAAC,CAAC;AAEtE,eAAO,MAAM,cAAc;cAZf,WAAW,CAAC,SAAS,CAAC,GAAG,eAAe,GAAG,kBAAkB,GAAG,cAAc,GAAG,eAAe;;;;;;;;6GAuP3G,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/button/internal.js
CHANGED
|
@@ -23,7 +23,7 @@ import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
|
23
23
|
import styles from './styles.css.js';
|
|
24
24
|
import testUtilStyles from './test-classes/styles.css.js';
|
|
25
25
|
export const InternalButton = React.forwardRef((_a, ref) => {
|
|
26
|
-
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, __nativeAttributes, __internalRootRef = null, __focusable = false, __injectAnalyticsComponentMetadata = false, __title } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "__nativeAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title"]);
|
|
26
|
+
var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, __nativeAttributes, __internalRootRef = null, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "__nativeAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title", "__emitPerformanceMarks"]);
|
|
27
27
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
28
28
|
checkSafeUrl('Button', href);
|
|
29
29
|
const isAnchor = Boolean(href);
|
|
@@ -38,7 +38,7 @@ export const InternalButton = React.forwardRef((_a, ref) => {
|
|
|
38
38
|
const { funnelInteractionId } = useFunnel();
|
|
39
39
|
const { stepNumber, stepNameSelector } = useFunnelStep();
|
|
40
40
|
const { subStepSelector, subStepNameSelector } = useFunnelSubStep();
|
|
41
|
-
const performanceMarkAttributes = usePerformanceMarks('primaryButton', variant === 'primary', buttonRef, () => {
|
|
41
|
+
const performanceMarkAttributes = usePerformanceMarks('primaryButton', variant === 'primary' && __emitPerformanceMarks, buttonRef, () => {
|
|
42
42
|
var _a;
|
|
43
43
|
return ({
|
|
44
44
|
loading,
|
package/button/internal.js.map
CHANGED
|
@@ -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,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,UAAU,MAAM,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AC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,IACxE,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YAE5C,aAAa;YACb,oBAAoB,IAAI,CACvB;gBACG,aAAa;gBACb,WAAW,IAAI,CACd,oBAAC,OAAO,IACN,SAAS,EAAE,cAAc,CAAC,yBAAyB,CAAC,EACpD,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,cAAe,GACtB,CACH,CACA,CACJ,CACM;QACR,OAAO,IAAI,WAAW,IAAI,oBAAC,UAAU,QAAE,WAAW,CAAc,CAChE,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 {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getNameFromSelector,\n getSubStepAllSelector,\n} from '../internal/analytics/selectors';\nimport LiveRegion from '../internal/components/live-region';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-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 { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\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?: ButtonProps['variant'] | 'flashbar-icon' | 'breadcrumb-group' | 'menu-trigger' | 'modal-dismiss';\n badge?: boolean;\n __nativeAttributes?:\n | (React.HTMLAttributes<HTMLAnchorElement> & React.HTMLAttributes<HTMLButtonElement>)\n | Record<`data-${string}`, string>;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n} & InternalBaseComponentProps<HTMLAnchorElement | HTMLButtonElement>;\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 target,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n __nativeAttributes,\n __internalRootRef = null,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\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 isNotInteractive = loading || disabled;\n const isDisabledWithReason = (variant === 'normal' || variant === 'primary') && !!disabledReason && disabled;\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children && ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss'].indexOf(variant) === -1;\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\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',\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\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 = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n }\n\n const { 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['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 =\n __nativeAttributes && 'tabIndex' in __nativeAttributes ? __nativeAttributes.tabIndex : undefined;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: 'click',\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 ...__nativeAttributes,\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(children ? `.${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 && <span className={clsx(styles.content, analyticsSelectors.label)}>{children}</span>}\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 if (isAnchor) {\n return (\n // https://github.com/yannickcr/eslint-plugin-react/issues/2962\n // eslint-disable-next-line react/jsx-no-target-blank\n <>\n <a\n {...buttonProps}\n href={href}\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 >\n {buttonContent}\n </a>\n {loading && loadingText && <LiveRegion>{loadingText}</LiveRegion>}\n </>\n );\n }\n\n return (\n <>\n <button\n {...buttonProps}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\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 {buttonContent}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n />\n )}\n </>\n )}\n </button>\n {loading && loadingText && <LiveRegion>{loadingText}</LiveRegion>}\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,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,UAAU,MAAM,oCAAoC,CAA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CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,IACxE,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YAE5C,aAAa;YACb,oBAAoB,IAAI,CACvB;gBACG,aAAa;gBACb,WAAW,IAAI,CACd,oBAAC,OAAO,IACN,SAAS,EAAE,cAAc,CAAC,yBAAyB,CAAC,EACpD,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,cAAe,GACtB,CACH,CACA,CACJ,CACM;QACR,OAAO,IAAI,WAAW,IAAI,oBAAC,UAAU,QAAE,WAAW,CAAc,CAChE,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 {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getNameFromSelector,\n getSubStepAllSelector,\n} from '../internal/analytics/selectors';\nimport LiveRegion from '../internal/components/live-region';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { useButtonContext } from '../internal/context/button-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-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 { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePerformanceMarks } from '../internal/hooks/use-performance-marks';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataButtonFragment } from './analytics-metadata/interfaces';\nimport { ButtonIconProps, LeftIcon, RightIcon } from './icon-helper';\nimport { ButtonProps } from './interfaces';\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?: ButtonProps['variant'] | 'flashbar-icon' | 'breadcrumb-group' | 'menu-trigger' | 'modal-dismiss';\n badge?: boolean;\n __nativeAttributes?:\n | (React.HTMLAttributes<HTMLAnchorElement> & React.HTMLAttributes<HTMLButtonElement>)\n | Record<`data-${string}`, string>;\n __iconClass?: string;\n __focusable?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __title?: string;\n __emitPerformanceMarks?: boolean;\n} & InternalBaseComponentProps<HTMLAnchorElement | HTMLButtonElement>;\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 target,\n rel,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaControls,\n fullWidth,\n badge,\n __nativeAttributes,\n __internalRootRef = null,\n __focusable = false,\n __injectAnalyticsComponentMetadata = false,\n __title,\n __emitPerformanceMarks = true,\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 isNotInteractive = loading || disabled;\n const isDisabledWithReason = (variant === 'normal' || variant === 'primary') && !!disabledReason && disabled;\n const hasAriaDisabled = (loading && !disabled) || (disabled && __focusable) || isDisabledWithReason;\n const shouldHaveContent =\n children && ['icon', 'inline-icon', 'flashbar-icon', 'modal-dismiss'].indexOf(variant) === -1;\n\n const buttonRef = useRef<HTMLElement>(null);\n useForwardFocus(ref, buttonRef);\n\n const buttonContext = useButtonContext();\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,\n buttonRef,\n () => ({\n loading,\n disabled,\n text: buttonRef.current?.innerText,\n }),\n [loading, disabled]\n );\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 = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelInteractionId,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n }\n\n const { 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['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 =\n __nativeAttributes && 'tabIndex' in __nativeAttributes ? __nativeAttributes.tabIndex : undefined;\n const { tabIndex } = useSingleTabStopNavigation(buttonRef, {\n tabIndex: isAnchor && isNotInteractive ? -1 : explicitTabIndex,\n });\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonFragment = disabled\n ? {}\n : {\n action: 'click',\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 ...__nativeAttributes,\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(children ? `.${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 && <span className={clsx(styles.content, analyticsSelectors.label)}>{children}</span>}\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 if (isAnchor) {\n return (\n // https://github.com/yannickcr/eslint-plugin-react/issues/2962\n // eslint-disable-next-line react/jsx-no-target-blank\n <>\n <a\n {...buttonProps}\n href={href}\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 >\n {buttonContent}\n </a>\n {loading && loadingText && <LiveRegion>{loadingText}</LiveRegion>}\n </>\n );\n }\n\n return (\n <>\n <button\n {...buttonProps}\n type={formAction === 'none' ? 'button' : 'submit'}\n disabled={disabled && !__focusable && !isDisabledWithReason}\n aria-disabled={hasAriaDisabled ? true : undefined}\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 {buttonContent}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={testUtilStyles['disabled-reason-tooltip']}\n trackRef={buttonRef}\n value={disabledReason!}\n />\n )}\n </>\n )}\n </button>\n {loading && loadingText && <LiveRegion>{loadingText}</LiveRegion>}\n </>\n );\n }\n);\n\nexport default InternalButton;\n"]}
|
|
@@ -143,7 +143,7 @@ const InternalButtonDropdown = React.forwardRef((_a, ref) => {
|
|
|
143
143
|
})),
|
|
144
144
|
React.createElement(InternalButton, Object.assign({ ref: mainActionRef }, mainActionProps, mainActionIconProps, { className: clsx(styles['trigger-button']), variant: variant, ariaLabel: mainActionAriaLabel, formAction: "none" }), text)),
|
|
145
145
|
React.createElement("div", Object.assign({ className: clsx(styles['trigger-item'], styles['dropdown-trigger'], isVisualRefresh && styles['visual-refresh'], styles[`variant-${variant}`], baseTriggerProps.disabled && styles.disabled, baseTriggerProps.loading && styles.loading) }, getAnalyticsMetadataAttribute(analyticsMetadata)),
|
|
146
|
-
React.createElement(InternalButton, Object.assign({ ref: triggerRef }, baseTriggerProps)))));
|
|
146
|
+
React.createElement(InternalButton, Object.assign({ ref: triggerRef }, baseTriggerProps, { __emitPerformanceMarks: false })))));
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
149
|
trigger = (React.createElement("div", Object.assign({ className: styles['dropdown-trigger'] }, getAnalyticsMetadataAttribute(analyticsMetadata)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGhE,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAA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a,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,IAAI,EACpB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,EAChB,4BAA4B,EAAE,4BAA4B,GAC1D,CACU,CACL,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton, InternalButtonProps } from '../button/internal';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel.js';\nimport { getBaseProps } from '../internal/base-component';\nimport Dropdown from '../internal/components/dropdown';\nimport OptionsList from '../internal/components/options-list';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode/index.js';\nimport { isDevelopment } from '../internal/is-development';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataButtonDropdownExpand } from './analytics-metadata/interfaces.js';\nimport { ButtonDropdownProps, InternalButtonDropdownProps } from './interfaces';\nimport ItemsList from './items-list';\nimport { useButtonDropdown } from './utils/use-button-dropdown';\nimport { isLinkItem } from './utils/utils.js';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst InternalButtonDropdown = React.forwardRef(\n (\n {\n items,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n expandableGroups = false,\n children,\n onItemClick,\n onItemFollow,\n customTriggerBuilder,\n expandToViewport,\n ariaLabel,\n title,\n description,\n preferCenter,\n mainAction,\n __internalRootRef,\n analyticsMetadataTransformer,\n ...props\n }: InternalButtonDropdownProps,\n ref: React.Ref<ButtonDropdownProps.Ref>\n ) => {\n const isInRestrictedView = useMobile();\n const dropdownId = useUniqueId('dropdown');\n for (const item of items) {\n if (isLinkItem(item)) {\n checkSafeUrl('ButtonDropdown', item.href);\n }\n }\n if (mainAction) {\n checkSafeUrl('ButtonDropdown', mainAction.href);\n }\n\n if (isDevelopment) {\n if (mainAction && variant !== 'primary' && variant !== 'normal') {\n warnOnce('ButtonDropdown', 'Main action is only supported for \"primary\" and \"normal\" component variant.');\n }\n }\n const isMainAction = mainAction && (variant === 'primary' || variant === 'normal');\n const isVisualRefresh = useVisualRefresh();\n\n const {\n isOpen,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n onKeyDown,\n onKeyUp,\n onItemActivate,\n onGroupToggle,\n toggleDropdown,\n closeDropdown,\n setIsUsingMouse,\n } = useButtonDropdown({\n items,\n onItemClick,\n onItemFollow,\n // Scroll is unnecessary when moving focus back to the dropdown trigger.\n onReturnFocus: () => triggerRef.current?.focus({ preventScroll: true }),\n expandToViewport,\n hasExpandableGroups: expandableGroups,\n isInRestrictedView,\n });\n\n const handleMouseEvent = () => {\n setIsUsingMouse(true);\n };\n\n const baseProps = getBaseProps(props);\n\n const mainActionRef = useRef<HTMLElement>(null);\n const triggerRef = useRef<HTMLElement>(null);\n\n useForwardFocus(ref, isMainAction ? mainActionRef : triggerRef);\n\n const clickHandler = () => {\n if (!loading && !disabled) {\n // Prevent moving highlight on mobiles to avoid disabled state reason popup if defined.\n toggleDropdown({ moveHighlightOnOpen: !isInRestrictedView });\n }\n };\n\n const canBeOpened = !loading && !disabled;\n\n const triggerVariant = variant === 'navigation' ? undefined : variant === 'inline-icon' ? 'inline-icon' : variant;\n const iconProps: Partial<ButtonProps & { __iconClass?: string }> =\n variant === 'icon' || variant === 'inline-icon'\n ? {\n iconName: 'ellipsis',\n }\n : {\n iconName: 'caret-down-filled',\n iconAlign: 'right',\n __iconClass: canBeOpened && isOpen ? styles['rotate-up'] : styles['rotate-down'],\n };\n\n const baseTriggerProps: InternalButtonProps = {\n className: clsx(\n styles['trigger-button'],\n styles['test-utils-button-trigger'],\n analyticsSelectors['trigger-label']\n ),\n ...iconProps,\n variant: triggerVariant,\n loading,\n loadingText,\n disabled,\n disabledReason,\n onClick: (event: Event) => {\n event.preventDefault();\n clickHandler();\n },\n ariaLabel,\n ariaExpanded: canBeOpened && isOpen,\n formAction: 'none',\n __nativeAttributes: {\n 'aria-haspopup': true,\n },\n };\n\n const triggerId = useUniqueId('awsui-button-dropdown__trigger');\n\n const triggerHasBadge = () => {\n const flatItems = items.flatMap(item => {\n if ('items' in item) {\n return item.items;\n }\n return item;\n });\n\n return (\n variant === 'icon' &&\n !!flatItems?.find(item => {\n if ('badge' in item) {\n return item.badge;\n }\n })\n );\n };\n\n let trigger: React.ReactNode = null;\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonDropdownExpand | Record<string, never> = disabled\n ? {}\n : {\n action: 'expand',\n detail: {\n expanded: `${!isOpen}`,\n label: `.${analyticsSelectors['trigger-label']}`,\n },\n };\n\n if (customTriggerBuilder) {\n trigger = (\n <div className={styles['dropdown-trigger']} {...getAnalyticsMetadataAttribute(analyticsMetadata)}>\n {customTriggerBuilder({\n testUtilsClass: styles['test-utils-button-trigger'],\n ariaExpanded: canBeOpened && isOpen,\n onClick: clickHandler,\n triggerRef,\n ariaLabel,\n disabled,\n disabledReason,\n isOpen,\n })}\n </div>\n );\n } else if (isMainAction) {\n const { text, iconName, iconAlt, iconSvg, iconUrl, external, externalIconAriaLabel, ...mainActionProps } =\n mainAction;\n const mainActionIconProps = external\n ? ({ iconName: 'external', iconAlign: 'right' } as const)\n : ({ iconName, iconAlt, iconSvg, iconUrl } as const);\n const mainActionAriaLabel = externalIconAriaLabel\n ? `${mainAction.ariaLabel ?? mainAction.text} ${mainAction.externalIconAriaLabel}`\n : mainAction.ariaLabel;\n\n trigger = (\n <div role=\"group\" aria-label={ariaLabel} className={styles['split-trigger-wrapper']}>\n <div\n className={clsx(\n styles['trigger-item'],\n styles['split-trigger'],\n styles[`variant-${variant}`],\n mainActionProps.disabled && styles.disabled,\n mainActionProps.loading && styles.loading\n )}\n // Close dropdown upon main action click unless event is cancelled.\n onClick={closeDropdown}\n // Prevent keyboard events from propagation to the button dropdown handler.\n onKeyDown={e => e.stopPropagation()}\n onKeyUp={e => e.stopPropagation()}\n {...getAnalyticsMetadataAttribute({\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['main-action-label']}`,\n },\n })}\n >\n <InternalButton\n ref={mainActionRef}\n {...mainActionProps}\n {...mainActionIconProps}\n className={clsx(styles['trigger-button'])}\n variant={variant}\n ariaLabel={mainActionAriaLabel}\n formAction=\"none\"\n >\n {text}\n </InternalButton>\n </div>\n <div\n className={clsx(\n styles['trigger-item'],\n styles['dropdown-trigger'],\n isVisualRefresh && styles['visual-refresh'],\n styles[`variant-${variant}`],\n baseTriggerProps.disabled && styles.disabled,\n baseTriggerProps.loading && styles.loading\n )}\n {...getAnalyticsMetadataAttribute(analyticsMetadata)}\n >\n <InternalButton ref={triggerRef} {...baseTriggerProps} />\n </div>\n </div>\n );\n } else {\n trigger = (\n <div className={styles['dropdown-trigger']} {...getAnalyticsMetadataAttribute(analyticsMetadata)}>\n <InternalButton ref={triggerRef} id={triggerId} {...baseTriggerProps} badge={triggerHasBadge()}>\n {children}\n </InternalButton>\n </div>\n );\n }\n\n const hasHeader = title || description;\n const headerId = useUniqueId('awsui-button-dropdown__header');\n\n const shouldLabelWithTrigger = !ariaLabel && !mainAction && variant !== 'icon' && variant !== 'inline-icon';\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 return (\n <div\n {...baseProps}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={handleMouseEvent}\n onMouseMove={handleMouseEvent}\n className={clsx(styles['button-dropdown'], styles[`variant-${variant}`], baseProps.className)}\n aria-owns={expandToViewport && isOpen ? dropdownId : undefined}\n ref={__internalRootRef}\n >\n <Dropdown\n open={canBeOpened && isOpen}\n stretchWidth={false}\n stretchTriggerHeight={variant === 'navigation'}\n expandToViewport={expandToViewport}\n preferCenter={preferCenter}\n onDropdownClose={() => toggleDropdown()}\n trigger={trigger}\n dropdownId={dropdownId}\n >\n {hasHeader && (\n <div className={styles.header} id={headerId}>\n {title && (\n <div className={styles.title}>\n <InternalBox\n fontSize=\"heading-s\"\n fontWeight=\"bold\"\n color=\"inherit\"\n tagOverride=\"h2\"\n margin={{ vertical: 'n', horizontal: 'n' }}\n >\n {title}\n </InternalBox>\n </div>\n )}\n {description && (\n <InternalBox fontSize=\"body-s\">\n <span className={styles.description}>{description}</span>\n </InternalBox>\n )}\n </div>\n )}\n <OptionsList\n open={canBeOpened && isOpen}\n position=\"static\"\n role=\"menu\"\n decreaseBlockMargin={true}\n ariaLabel={ariaLabel}\n ariaLabelledby={hasHeader ? headerId : shouldLabelWithTrigger ? triggerId : undefined}\n statusType=\"finished\"\n >\n <ItemsList\n items={items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n hasExpandableGroups={expandableGroups}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={true}\n highlightItem={highlightItem}\n expandToViewport={expandToViewport}\n variant={variant}\n analyticsMetadataTransformer={analyticsMetadataTransformer}\n />\n </OptionsList>\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default InternalButtonDropdown;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button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C,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton, InternalButtonProps } from '../button/internal';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel.js';\nimport { getBaseProps } from '../internal/base-component';\nimport Dropdown from '../internal/components/dropdown';\nimport OptionsList from '../internal/components/options-list';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode/index.js';\nimport { isDevelopment } from '../internal/is-development';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { GeneratedAnalyticsMetadataButtonDropdownExpand } from './analytics-metadata/interfaces.js';\nimport { ButtonDropdownProps, InternalButtonDropdownProps } from './interfaces';\nimport ItemsList from './items-list';\nimport { useButtonDropdown } from './utils/use-button-dropdown';\nimport { isLinkItem } from './utils/utils.js';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst InternalButtonDropdown = React.forwardRef(\n (\n {\n items,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n expandableGroups = false,\n children,\n onItemClick,\n onItemFollow,\n customTriggerBuilder,\n expandToViewport,\n ariaLabel,\n title,\n description,\n preferCenter,\n mainAction,\n __internalRootRef,\n analyticsMetadataTransformer,\n ...props\n }: InternalButtonDropdownProps,\n ref: React.Ref<ButtonDropdownProps.Ref>\n ) => {\n const isInRestrictedView = useMobile();\n const dropdownId = useUniqueId('dropdown');\n for (const item of items) {\n if (isLinkItem(item)) {\n checkSafeUrl('ButtonDropdown', item.href);\n }\n }\n if (mainAction) {\n checkSafeUrl('ButtonDropdown', mainAction.href);\n }\n\n if (isDevelopment) {\n if (mainAction && variant !== 'primary' && variant !== 'normal') {\n warnOnce('ButtonDropdown', 'Main action is only supported for \"primary\" and \"normal\" component variant.');\n }\n }\n const isMainAction = mainAction && (variant === 'primary' || variant === 'normal');\n const isVisualRefresh = useVisualRefresh();\n\n const {\n isOpen,\n targetItem,\n isHighlighted,\n isKeyboardHighlight,\n isExpanded,\n highlightItem,\n onKeyDown,\n onKeyUp,\n onItemActivate,\n onGroupToggle,\n toggleDropdown,\n closeDropdown,\n setIsUsingMouse,\n } = useButtonDropdown({\n items,\n onItemClick,\n onItemFollow,\n // Scroll is unnecessary when moving focus back to the dropdown trigger.\n onReturnFocus: () => triggerRef.current?.focus({ preventScroll: true }),\n expandToViewport,\n hasExpandableGroups: expandableGroups,\n isInRestrictedView,\n });\n\n const handleMouseEvent = () => {\n setIsUsingMouse(true);\n };\n\n const baseProps = getBaseProps(props);\n\n const mainActionRef = useRef<HTMLElement>(null);\n const triggerRef = useRef<HTMLElement>(null);\n\n useForwardFocus(ref, isMainAction ? mainActionRef : triggerRef);\n\n const clickHandler = () => {\n if (!loading && !disabled) {\n // Prevent moving highlight on mobiles to avoid disabled state reason popup if defined.\n toggleDropdown({ moveHighlightOnOpen: !isInRestrictedView });\n }\n };\n\n const canBeOpened = !loading && !disabled;\n\n const triggerVariant = variant === 'navigation' ? undefined : variant === 'inline-icon' ? 'inline-icon' : variant;\n const iconProps: Partial<ButtonProps & { __iconClass?: string }> =\n variant === 'icon' || variant === 'inline-icon'\n ? {\n iconName: 'ellipsis',\n }\n : {\n iconName: 'caret-down-filled',\n iconAlign: 'right',\n __iconClass: canBeOpened && isOpen ? styles['rotate-up'] : styles['rotate-down'],\n };\n\n const baseTriggerProps: InternalButtonProps = {\n className: clsx(\n styles['trigger-button'],\n styles['test-utils-button-trigger'],\n analyticsSelectors['trigger-label']\n ),\n ...iconProps,\n variant: triggerVariant,\n loading,\n loadingText,\n disabled,\n disabledReason,\n onClick: (event: Event) => {\n event.preventDefault();\n clickHandler();\n },\n ariaLabel,\n ariaExpanded: canBeOpened && isOpen,\n formAction: 'none',\n __nativeAttributes: {\n 'aria-haspopup': true,\n },\n };\n\n const triggerId = useUniqueId('awsui-button-dropdown__trigger');\n\n const triggerHasBadge = () => {\n const flatItems = items.flatMap(item => {\n if ('items' in item) {\n return item.items;\n }\n return item;\n });\n\n return (\n variant === 'icon' &&\n !!flatItems?.find(item => {\n if ('badge' in item) {\n return item.badge;\n }\n })\n );\n };\n\n let trigger: React.ReactNode = null;\n\n const analyticsMetadata: GeneratedAnalyticsMetadataButtonDropdownExpand | Record<string, never> = disabled\n ? {}\n : {\n action: 'expand',\n detail: {\n expanded: `${!isOpen}`,\n label: `.${analyticsSelectors['trigger-label']}`,\n },\n };\n\n if (customTriggerBuilder) {\n trigger = (\n <div className={styles['dropdown-trigger']} {...getAnalyticsMetadataAttribute(analyticsMetadata)}>\n {customTriggerBuilder({\n testUtilsClass: styles['test-utils-button-trigger'],\n ariaExpanded: canBeOpened && isOpen,\n onClick: clickHandler,\n triggerRef,\n ariaLabel,\n disabled,\n disabledReason,\n isOpen,\n })}\n </div>\n );\n } else if (isMainAction) {\n const { text, iconName, iconAlt, iconSvg, iconUrl, external, externalIconAriaLabel, ...mainActionProps } =\n mainAction;\n const mainActionIconProps = external\n ? ({ iconName: 'external', iconAlign: 'right' } as const)\n : ({ iconName, iconAlt, iconSvg, iconUrl } as const);\n const mainActionAriaLabel = externalIconAriaLabel\n ? `${mainAction.ariaLabel ?? mainAction.text} ${mainAction.externalIconAriaLabel}`\n : mainAction.ariaLabel;\n\n trigger = (\n <div role=\"group\" aria-label={ariaLabel} className={styles['split-trigger-wrapper']}>\n <div\n className={clsx(\n styles['trigger-item'],\n styles['split-trigger'],\n styles[`variant-${variant}`],\n mainActionProps.disabled && styles.disabled,\n mainActionProps.loading && styles.loading\n )}\n // Close dropdown upon main action click unless event is cancelled.\n onClick={closeDropdown}\n // Prevent keyboard events from propagation to the button dropdown handler.\n onKeyDown={e => e.stopPropagation()}\n onKeyUp={e => e.stopPropagation()}\n {...getAnalyticsMetadataAttribute({\n action: 'click',\n detail: {\n label: `.${analyticsSelectors['main-action-label']}`,\n },\n })}\n >\n <InternalButton\n ref={mainActionRef}\n {...mainActionProps}\n {...mainActionIconProps}\n className={clsx(styles['trigger-button'])}\n variant={variant}\n ariaLabel={mainActionAriaLabel}\n formAction=\"none\"\n >\n {text}\n </InternalButton>\n </div>\n <div\n className={clsx(\n styles['trigger-item'],\n styles['dropdown-trigger'],\n isVisualRefresh && styles['visual-refresh'],\n styles[`variant-${variant}`],\n baseTriggerProps.disabled && styles.disabled,\n baseTriggerProps.loading && styles.loading\n )}\n {...getAnalyticsMetadataAttribute(analyticsMetadata)}\n >\n <InternalButton ref={triggerRef} {...baseTriggerProps} __emitPerformanceMarks={false} />\n </div>\n </div>\n );\n } else {\n trigger = (\n <div className={styles['dropdown-trigger']} {...getAnalyticsMetadataAttribute(analyticsMetadata)}>\n <InternalButton ref={triggerRef} id={triggerId} {...baseTriggerProps} badge={triggerHasBadge()}>\n {children}\n </InternalButton>\n </div>\n );\n }\n\n const hasHeader = title || description;\n const headerId = useUniqueId('awsui-button-dropdown__header');\n\n const shouldLabelWithTrigger = !ariaLabel && !mainAction && variant !== 'icon' && variant !== 'inline-icon';\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 return (\n <div\n {...baseProps}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={handleMouseEvent}\n onMouseMove={handleMouseEvent}\n className={clsx(styles['button-dropdown'], styles[`variant-${variant}`], baseProps.className)}\n aria-owns={expandToViewport && isOpen ? dropdownId : undefined}\n ref={__internalRootRef}\n >\n <Dropdown\n open={canBeOpened && isOpen}\n stretchWidth={false}\n stretchTriggerHeight={variant === 'navigation'}\n expandToViewport={expandToViewport}\n preferCenter={preferCenter}\n onDropdownClose={() => toggleDropdown()}\n trigger={trigger}\n dropdownId={dropdownId}\n >\n {hasHeader && (\n <div className={styles.header} id={headerId}>\n {title && (\n <div className={styles.title}>\n <InternalBox\n fontSize=\"heading-s\"\n fontWeight=\"bold\"\n color=\"inherit\"\n tagOverride=\"h2\"\n margin={{ vertical: 'n', horizontal: 'n' }}\n >\n {title}\n </InternalBox>\n </div>\n )}\n {description && (\n <InternalBox fontSize=\"body-s\">\n <span className={styles.description}>{description}</span>\n </InternalBox>\n )}\n </div>\n )}\n <OptionsList\n open={canBeOpened && isOpen}\n position=\"static\"\n role=\"menu\"\n decreaseBlockMargin={true}\n ariaLabel={ariaLabel}\n ariaLabelledby={hasHeader ? headerId : shouldLabelWithTrigger ? triggerId : undefined}\n statusType=\"finished\"\n >\n <ItemsList\n items={items}\n onItemActivate={onItemActivate}\n onGroupToggle={onGroupToggle}\n hasExpandableGroups={expandableGroups}\n targetItem={targetItem}\n isHighlighted={isHighlighted}\n isKeyboardHighlight={isKeyboardHighlight}\n isExpanded={isExpanded}\n lastInDropdown={true}\n highlightItem={highlightItem}\n expandToViewport={expandToViewport}\n variant={variant}\n analyticsMetadataTransformer={analyticsMetadataTransformer}\n />\n </OptionsList>\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default InternalButtonDropdown;\n"]}
|
|
@@ -401,6 +401,16 @@
|
|
|
401
401
|
--color-dropzone-background-hover-42q8nb:#d3e7f9;
|
|
402
402
|
--color-dropzone-text-active-8e1lcf:#5f6b7a;
|
|
403
403
|
--color-dropzone-text-hover-4qxymq:#033160;
|
|
404
|
+
--color-background-severity-critical-idosdq:#7d2105;
|
|
405
|
+
--color-text-severity-critical-85viri:#fbfbfb;
|
|
406
|
+
--color-background-severity-high-434xpy:#ba2e0f;
|
|
407
|
+
--color-text-severity-high-uiwahw:#fbfbfb;
|
|
408
|
+
--color-background-severity-medium-n5069n:#cc5f21;
|
|
409
|
+
--color-text-severity-medium-t00q1o:#000716;
|
|
410
|
+
--color-background-severity-low-5ab62f:#b2911c;
|
|
411
|
+
--color-text-severity-low-alfea6:#000716;
|
|
412
|
+
--color-background-severity-neutral-wfgvya:#414d5c;
|
|
413
|
+
--color-text-severity-neutral-2hvk9q:#fbfbfb;
|
|
404
414
|
--font-box-value-large-weight-onoq9k:700;
|
|
405
415
|
--font-button-letter-spacing-65ug0o:0.005em;
|
|
406
416
|
--font-button-weight-hv56tz:700;
|
|
@@ -995,6 +1005,13 @@
|
|
|
995
1005
|
--color-dropzone-background-hover-42q8nb:#0972d3;
|
|
996
1006
|
--color-dropzone-text-active-8e1lcf:#0f1b2a;
|
|
997
1007
|
--color-dropzone-text-hover-4qxymq:#ffffff;
|
|
1008
|
+
--color-background-severity-critical-idosdq:#d63f38;
|
|
1009
|
+
--color-text-severity-critical-85viri:#000000;
|
|
1010
|
+
--color-background-severity-high-434xpy:#fe6e73;
|
|
1011
|
+
--color-text-severity-high-uiwahw:#000716;
|
|
1012
|
+
--color-background-severity-medium-n5069n:#f89256;
|
|
1013
|
+
--color-background-severity-low-5ab62f:#dfb52c;
|
|
1014
|
+
--color-background-severity-neutral-wfgvya:#5f6b7a;
|
|
998
1015
|
--shadow-container-fxmdn3:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
|
|
999
1016
|
--shadow-container-active-kl29x9:0px 1px 1px 1px #192534, 0px 6px 36px #00040c;
|
|
1000
1017
|
--shadow-dropdown-e5guvm:0px 4px 20px 1px rgba(0, 4, 12, 1);
|
|
@@ -1297,6 +1314,9 @@
|
|
|
1297
1314
|
--color-dropzone-background-hover-42q8nb:#0972d3;
|
|
1298
1315
|
--color-dropzone-text-active-8e1lcf:#0f1b2a;
|
|
1299
1316
|
--color-dropzone-text-hover-4qxymq:#ffffff;
|
|
1317
|
+
--color-text-severity-critical-85viri:#000000;
|
|
1318
|
+
--color-text-severity-high-uiwahw:#000716;
|
|
1319
|
+
--color-background-severity-neutral-wfgvya:#5f6b7a;
|
|
1300
1320
|
}
|
|
1301
1321
|
|
|
1302
1322
|
.awsui-context-content-header:not(#\9) {
|
|
@@ -1497,6 +1517,9 @@
|
|
|
1497
1517
|
--color-dropzone-background-hover-42q8nb:#0972d3;
|
|
1498
1518
|
--color-dropzone-text-active-8e1lcf:#0f1b2a;
|
|
1499
1519
|
--color-dropzone-text-hover-4qxymq:#ffffff;
|
|
1520
|
+
--color-text-severity-critical-85viri:#000000;
|
|
1521
|
+
--color-text-severity-high-uiwahw:#000716;
|
|
1522
|
+
--color-background-severity-neutral-wfgvya:#5f6b7a;
|
|
1500
1523
|
--shadow-container-fxmdn3:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
|
|
1501
1524
|
--shadow-container-active-kl29x9:0px 1px 1px 1px #192534, 0px 6px 36px #00040c;
|
|
1502
1525
|
--shadow-dropdown-e5guvm:0px 4px 20px 1px rgba(0, 4, 12, 1);
|
|
@@ -1798,6 +1821,9 @@
|
|
|
1798
1821
|
--color-dropzone-background-hover-42q8nb:#0972d3;
|
|
1799
1822
|
--color-dropzone-text-active-8e1lcf:#0f1b2a;
|
|
1800
1823
|
--color-dropzone-text-hover-4qxymq:#ffffff;
|
|
1824
|
+
--color-text-severity-critical-85viri:#000000;
|
|
1825
|
+
--color-text-severity-high-uiwahw:#000716;
|
|
1826
|
+
--color-background-severity-neutral-wfgvya:#5f6b7a;
|
|
1801
1827
|
}
|
|
1802
1828
|
|
|
1803
1829
|
@media not print {
|
package/internal/environment.js
CHANGED
|
@@ -461,6 +461,16 @@ export const colorDropzoneBackgroundActive: string;
|
|
|
461
461
|
export const colorDropzoneBackgroundHover: string;
|
|
462
462
|
export const colorDropzoneTextActive: string;
|
|
463
463
|
export const colorDropzoneTextHover: string;
|
|
464
|
+
export const colorBackgroundSeverityCritical: string;
|
|
465
|
+
export const colorTextSeverityCritical: string;
|
|
466
|
+
export const colorBackgroundSeverityHigh: string;
|
|
467
|
+
export const colorTextSeverityHigh: string;
|
|
468
|
+
export const colorBackgroundSeverityMedium: string;
|
|
469
|
+
export const colorTextSeverityMedium: string;
|
|
470
|
+
export const colorBackgroundSeverityLow: string;
|
|
471
|
+
export const colorTextSeverityLow: string;
|
|
472
|
+
export const colorBackgroundSeverityNeutral: string;
|
|
473
|
+
export const colorTextSeverityNeutral: string;
|
|
464
474
|
export const fontBoxValueLargeWeight: string;
|
|
465
475
|
export const fontButtonLetterSpacing: string;
|
|
466
476
|
export const fontButtonWeight: string;
|
|
@@ -461,6 +461,16 @@ export var colorDropzoneBackgroundActive = "var(--color-dropzone-background-acti
|
|
|
461
461
|
export var colorDropzoneBackgroundHover = "var(--color-dropzone-background-hover-42q8nb, #d3e7f9)";
|
|
462
462
|
export var colorDropzoneTextActive = "var(--color-dropzone-text-active-8e1lcf, #5f6b7a)";
|
|
463
463
|
export var colorDropzoneTextHover = "var(--color-dropzone-text-hover-4qxymq, #033160)";
|
|
464
|
+
export var colorBackgroundSeverityCritical = "var(--color-background-severity-critical-idosdq, #7d2105)";
|
|
465
|
+
export var colorTextSeverityCritical = "var(--color-text-severity-critical-85viri, #fbfbfb)";
|
|
466
|
+
export var colorBackgroundSeverityHigh = "var(--color-background-severity-high-434xpy, #ba2e0f)";
|
|
467
|
+
export var colorTextSeverityHigh = "var(--color-text-severity-high-uiwahw, #fbfbfb)";
|
|
468
|
+
export var colorBackgroundSeverityMedium = "var(--color-background-severity-medium-n5069n, #cc5f21)";
|
|
469
|
+
export var colorTextSeverityMedium = "var(--color-text-severity-medium-t00q1o, #000716)";
|
|
470
|
+
export var colorBackgroundSeverityLow = "var(--color-background-severity-low-5ab62f, #b2911c)";
|
|
471
|
+
export var colorTextSeverityLow = "var(--color-text-severity-low-alfea6, #000716)";
|
|
472
|
+
export var colorBackgroundSeverityNeutral = "var(--color-background-severity-neutral-wfgvya, #414d5c)";
|
|
473
|
+
export var colorTextSeverityNeutral = "var(--color-text-severity-neutral-2hvk9q, #fbfbfb)";
|
|
464
474
|
export var fontBoxValueLargeWeight = "var(--font-box-value-large-weight-onoq9k, 700)";
|
|
465
475
|
export var fontButtonLetterSpacing = "var(--font-button-letter-spacing-65ug0o, 0.005em)";
|
|
466
476
|
export var fontButtonWeight = "var(--font-button-weight-hv56tz, 700)";
|
|
@@ -1729,6 +1729,46 @@ module.exports.preset = {
|
|
|
1729
1729
|
"light": "{colorBlue800}",
|
|
1730
1730
|
"dark": "{colorWhite}"
|
|
1731
1731
|
},
|
|
1732
|
+
"colorBackgroundSeverityCritical": {
|
|
1733
|
+
"light": "{colorChartsStatusCritical}",
|
|
1734
|
+
"dark": "{colorChartsStatusCritical}"
|
|
1735
|
+
},
|
|
1736
|
+
"colorTextSeverityCritical": {
|
|
1737
|
+
"light": "{colorGrey100}",
|
|
1738
|
+
"dark": "{colorBlack}"
|
|
1739
|
+
},
|
|
1740
|
+
"colorBackgroundSeverityHigh": {
|
|
1741
|
+
"light": "{colorChartsStatusHigh}",
|
|
1742
|
+
"dark": "{colorChartsStatusHigh}"
|
|
1743
|
+
},
|
|
1744
|
+
"colorTextSeverityHigh": {
|
|
1745
|
+
"light": "{colorGrey100}",
|
|
1746
|
+
"dark": "{colorGrey900}"
|
|
1747
|
+
},
|
|
1748
|
+
"colorBackgroundSeverityMedium": {
|
|
1749
|
+
"light": "{colorChartsStatusMedium}",
|
|
1750
|
+
"dark": "{colorChartsStatusMedium}"
|
|
1751
|
+
},
|
|
1752
|
+
"colorTextSeverityMedium": {
|
|
1753
|
+
"light": "{colorGrey900}",
|
|
1754
|
+
"dark": "{colorGrey900}"
|
|
1755
|
+
},
|
|
1756
|
+
"colorBackgroundSeverityLow": {
|
|
1757
|
+
"light": "{colorChartsStatusLow}",
|
|
1758
|
+
"dark": "{colorChartsStatusLow}"
|
|
1759
|
+
},
|
|
1760
|
+
"colorTextSeverityLow": {
|
|
1761
|
+
"light": "{colorGrey900}",
|
|
1762
|
+
"dark": "{colorGrey900}"
|
|
1763
|
+
},
|
|
1764
|
+
"colorBackgroundSeverityNeutral": {
|
|
1765
|
+
"light": "{colorGrey600}",
|
|
1766
|
+
"dark": "{colorGrey550}"
|
|
1767
|
+
},
|
|
1768
|
+
"colorTextSeverityNeutral": {
|
|
1769
|
+
"light": "{colorGrey100}",
|
|
1770
|
+
"dark": "{colorGrey100}"
|
|
1771
|
+
},
|
|
1732
1772
|
"fontBoxValueLargeWeight": "700",
|
|
1733
1773
|
"fontButtonLetterSpacing": "0.005em",
|
|
1734
1774
|
"fontButtonWeight": "700",
|
|
@@ -3902,6 +3942,46 @@ module.exports.preset = {
|
|
|
3902
3942
|
"colorDropzoneTextHover": {
|
|
3903
3943
|
"light": "{colorWhite}",
|
|
3904
3944
|
"dark": "{colorWhite}"
|
|
3945
|
+
},
|
|
3946
|
+
"colorBackgroundSeverityCritical": {
|
|
3947
|
+
"light": "{colorChartsStatusCritical}",
|
|
3948
|
+
"dark": "{colorChartsStatusCritical}"
|
|
3949
|
+
},
|
|
3950
|
+
"colorTextSeverityCritical": {
|
|
3951
|
+
"light": "{colorBlack}",
|
|
3952
|
+
"dark": "{colorBlack}"
|
|
3953
|
+
},
|
|
3954
|
+
"colorBackgroundSeverityHigh": {
|
|
3955
|
+
"light": "{colorChartsStatusHigh}",
|
|
3956
|
+
"dark": "{colorChartsStatusHigh}"
|
|
3957
|
+
},
|
|
3958
|
+
"colorTextSeverityHigh": {
|
|
3959
|
+
"light": "{colorGrey900}",
|
|
3960
|
+
"dark": "{colorGrey900}"
|
|
3961
|
+
},
|
|
3962
|
+
"colorBackgroundSeverityMedium": {
|
|
3963
|
+
"light": "{colorChartsStatusMedium}",
|
|
3964
|
+
"dark": "{colorChartsStatusMedium}"
|
|
3965
|
+
},
|
|
3966
|
+
"colorTextSeverityMedium": {
|
|
3967
|
+
"light": "{colorGrey900}",
|
|
3968
|
+
"dark": "{colorGrey900}"
|
|
3969
|
+
},
|
|
3970
|
+
"colorBackgroundSeverityLow": {
|
|
3971
|
+
"light": "{colorChartsStatusLow}",
|
|
3972
|
+
"dark": "{colorChartsStatusLow}"
|
|
3973
|
+
},
|
|
3974
|
+
"colorTextSeverityLow": {
|
|
3975
|
+
"light": "{colorGrey900}",
|
|
3976
|
+
"dark": "{colorGrey900}"
|
|
3977
|
+
},
|
|
3978
|
+
"colorBackgroundSeverityNeutral": {
|
|
3979
|
+
"light": "{colorGrey550}",
|
|
3980
|
+
"dark": "{colorGrey550}"
|
|
3981
|
+
},
|
|
3982
|
+
"colorTextSeverityNeutral": {
|
|
3983
|
+
"light": "{colorGrey100}",
|
|
3984
|
+
"dark": "{colorGrey100}"
|
|
3905
3985
|
}
|
|
3906
3986
|
}
|
|
3907
3987
|
},
|
|
@@ -4996,6 +5076,46 @@ module.exports.preset = {
|
|
|
4996
5076
|
"colorDropzoneTextHover": {
|
|
4997
5077
|
"light": "{colorWhite}",
|
|
4998
5078
|
"dark": "{colorWhite}"
|
|
5079
|
+
},
|
|
5080
|
+
"colorBackgroundSeverityCritical": {
|
|
5081
|
+
"light": "{colorChartsStatusCritical}",
|
|
5082
|
+
"dark": "{colorChartsStatusCritical}"
|
|
5083
|
+
},
|
|
5084
|
+
"colorTextSeverityCritical": {
|
|
5085
|
+
"light": "{colorBlack}",
|
|
5086
|
+
"dark": "{colorBlack}"
|
|
5087
|
+
},
|
|
5088
|
+
"colorBackgroundSeverityHigh": {
|
|
5089
|
+
"light": "{colorChartsStatusHigh}",
|
|
5090
|
+
"dark": "{colorChartsStatusHigh}"
|
|
5091
|
+
},
|
|
5092
|
+
"colorTextSeverityHigh": {
|
|
5093
|
+
"light": "{colorGrey900}",
|
|
5094
|
+
"dark": "{colorGrey900}"
|
|
5095
|
+
},
|
|
5096
|
+
"colorBackgroundSeverityMedium": {
|
|
5097
|
+
"light": "{colorChartsStatusMedium}",
|
|
5098
|
+
"dark": "{colorChartsStatusMedium}"
|
|
5099
|
+
},
|
|
5100
|
+
"colorTextSeverityMedium": {
|
|
5101
|
+
"light": "{colorGrey900}",
|
|
5102
|
+
"dark": "{colorGrey900}"
|
|
5103
|
+
},
|
|
5104
|
+
"colorBackgroundSeverityLow": {
|
|
5105
|
+
"light": "{colorChartsStatusLow}",
|
|
5106
|
+
"dark": "{colorChartsStatusLow}"
|
|
5107
|
+
},
|
|
5108
|
+
"colorTextSeverityLow": {
|
|
5109
|
+
"light": "{colorGrey900}",
|
|
5110
|
+
"dark": "{colorGrey900}"
|
|
5111
|
+
},
|
|
5112
|
+
"colorBackgroundSeverityNeutral": {
|
|
5113
|
+
"light": "{colorGrey550}",
|
|
5114
|
+
"dark": "{colorGrey550}"
|
|
5115
|
+
},
|
|
5116
|
+
"colorTextSeverityNeutral": {
|
|
5117
|
+
"light": "{colorGrey100}",
|
|
5118
|
+
"dark": "{colorGrey100}"
|
|
4999
5119
|
}
|
|
5000
5120
|
}
|
|
5001
5121
|
},
|
|
@@ -6022,6 +6142,46 @@ module.exports.preset = {
|
|
|
6022
6142
|
"colorDropzoneTextHover": {
|
|
6023
6143
|
"light": "{colorBlue800}",
|
|
6024
6144
|
"dark": "{colorWhite}"
|
|
6145
|
+
},
|
|
6146
|
+
"colorBackgroundSeverityCritical": {
|
|
6147
|
+
"light": "{colorChartsStatusCritical}",
|
|
6148
|
+
"dark": "{colorChartsStatusCritical}"
|
|
6149
|
+
},
|
|
6150
|
+
"colorTextSeverityCritical": {
|
|
6151
|
+
"light": "{colorGrey100}",
|
|
6152
|
+
"dark": "{colorBlack}"
|
|
6153
|
+
},
|
|
6154
|
+
"colorBackgroundSeverityHigh": {
|
|
6155
|
+
"light": "{colorChartsStatusHigh}",
|
|
6156
|
+
"dark": "{colorChartsStatusHigh}"
|
|
6157
|
+
},
|
|
6158
|
+
"colorTextSeverityHigh": {
|
|
6159
|
+
"light": "{colorGrey100}",
|
|
6160
|
+
"dark": "{colorGrey900}"
|
|
6161
|
+
},
|
|
6162
|
+
"colorBackgroundSeverityMedium": {
|
|
6163
|
+
"light": "{colorChartsStatusMedium}",
|
|
6164
|
+
"dark": "{colorChartsStatusMedium}"
|
|
6165
|
+
},
|
|
6166
|
+
"colorTextSeverityMedium": {
|
|
6167
|
+
"light": "{colorGrey900}",
|
|
6168
|
+
"dark": "{colorGrey900}"
|
|
6169
|
+
},
|
|
6170
|
+
"colorBackgroundSeverityLow": {
|
|
6171
|
+
"light": "{colorChartsStatusLow}",
|
|
6172
|
+
"dark": "{colorChartsStatusLow}"
|
|
6173
|
+
},
|
|
6174
|
+
"colorTextSeverityLow": {
|
|
6175
|
+
"light": "{colorGrey900}",
|
|
6176
|
+
"dark": "{colorGrey900}"
|
|
6177
|
+
},
|
|
6178
|
+
"colorBackgroundSeverityNeutral": {
|
|
6179
|
+
"light": "{colorGrey600}",
|
|
6180
|
+
"dark": "{colorGrey550}"
|
|
6181
|
+
},
|
|
6182
|
+
"colorTextSeverityNeutral": {
|
|
6183
|
+
"light": "{colorGrey100}",
|
|
6184
|
+
"dark": "{colorGrey100}"
|
|
6025
6185
|
}
|
|
6026
6186
|
}
|
|
6027
6187
|
},
|
|
@@ -7048,6 +7208,46 @@ module.exports.preset = {
|
|
|
7048
7208
|
"colorDropzoneTextHover": {
|
|
7049
7209
|
"light": "{colorBlue800}",
|
|
7050
7210
|
"dark": "{colorWhite}"
|
|
7211
|
+
},
|
|
7212
|
+
"colorBackgroundSeverityCritical": {
|
|
7213
|
+
"light": "{colorChartsStatusCritical}",
|
|
7214
|
+
"dark": "{colorChartsStatusCritical}"
|
|
7215
|
+
},
|
|
7216
|
+
"colorTextSeverityCritical": {
|
|
7217
|
+
"light": "{colorGrey100}",
|
|
7218
|
+
"dark": "{colorBlack}"
|
|
7219
|
+
},
|
|
7220
|
+
"colorBackgroundSeverityHigh": {
|
|
7221
|
+
"light": "{colorChartsStatusHigh}",
|
|
7222
|
+
"dark": "{colorChartsStatusHigh}"
|
|
7223
|
+
},
|
|
7224
|
+
"colorTextSeverityHigh": {
|
|
7225
|
+
"light": "{colorGrey100}",
|
|
7226
|
+
"dark": "{colorGrey900}"
|
|
7227
|
+
},
|
|
7228
|
+
"colorBackgroundSeverityMedium": {
|
|
7229
|
+
"light": "{colorChartsStatusMedium}",
|
|
7230
|
+
"dark": "{colorChartsStatusMedium}"
|
|
7231
|
+
},
|
|
7232
|
+
"colorTextSeverityMedium": {
|
|
7233
|
+
"light": "{colorGrey900}",
|
|
7234
|
+
"dark": "{colorGrey900}"
|
|
7235
|
+
},
|
|
7236
|
+
"colorBackgroundSeverityLow": {
|
|
7237
|
+
"light": "{colorChartsStatusLow}",
|
|
7238
|
+
"dark": "{colorChartsStatusLow}"
|
|
7239
|
+
},
|
|
7240
|
+
"colorTextSeverityLow": {
|
|
7241
|
+
"light": "{colorGrey900}",
|
|
7242
|
+
"dark": "{colorGrey900}"
|
|
7243
|
+
},
|
|
7244
|
+
"colorBackgroundSeverityNeutral": {
|
|
7245
|
+
"light": "{colorGrey600}",
|
|
7246
|
+
"dark": "{colorGrey550}"
|
|
7247
|
+
},
|
|
7248
|
+
"colorTextSeverityNeutral": {
|
|
7249
|
+
"light": "{colorGrey100}",
|
|
7250
|
+
"dark": "{colorGrey100}"
|
|
7051
7251
|
}
|
|
7052
7252
|
}
|
|
7053
7253
|
},
|
|
@@ -8075,6 +8275,46 @@ module.exports.preset = {
|
|
|
8075
8275
|
"light": "{colorBlue800}",
|
|
8076
8276
|
"dark": "{colorWhite}"
|
|
8077
8277
|
},
|
|
8278
|
+
"colorBackgroundSeverityCritical": {
|
|
8279
|
+
"light": "{colorChartsStatusCritical}",
|
|
8280
|
+
"dark": "{colorChartsStatusCritical}"
|
|
8281
|
+
},
|
|
8282
|
+
"colorTextSeverityCritical": {
|
|
8283
|
+
"light": "{colorGrey100}",
|
|
8284
|
+
"dark": "{colorBlack}"
|
|
8285
|
+
},
|
|
8286
|
+
"colorBackgroundSeverityHigh": {
|
|
8287
|
+
"light": "{colorChartsStatusHigh}",
|
|
8288
|
+
"dark": "{colorChartsStatusHigh}"
|
|
8289
|
+
},
|
|
8290
|
+
"colorTextSeverityHigh": {
|
|
8291
|
+
"light": "{colorGrey100}",
|
|
8292
|
+
"dark": "{colorGrey900}"
|
|
8293
|
+
},
|
|
8294
|
+
"colorBackgroundSeverityMedium": {
|
|
8295
|
+
"light": "{colorChartsStatusMedium}",
|
|
8296
|
+
"dark": "{colorChartsStatusMedium}"
|
|
8297
|
+
},
|
|
8298
|
+
"colorTextSeverityMedium": {
|
|
8299
|
+
"light": "{colorGrey900}",
|
|
8300
|
+
"dark": "{colorGrey900}"
|
|
8301
|
+
},
|
|
8302
|
+
"colorBackgroundSeverityLow": {
|
|
8303
|
+
"light": "{colorChartsStatusLow}",
|
|
8304
|
+
"dark": "{colorChartsStatusLow}"
|
|
8305
|
+
},
|
|
8306
|
+
"colorTextSeverityLow": {
|
|
8307
|
+
"light": "{colorGrey900}",
|
|
8308
|
+
"dark": "{colorGrey900}"
|
|
8309
|
+
},
|
|
8310
|
+
"colorBackgroundSeverityNeutral": {
|
|
8311
|
+
"light": "{colorGrey600}",
|
|
8312
|
+
"dark": "{colorGrey550}"
|
|
8313
|
+
},
|
|
8314
|
+
"colorTextSeverityNeutral": {
|
|
8315
|
+
"light": "{colorGrey100}",
|
|
8316
|
+
"dark": "{colorGrey100}"
|
|
8317
|
+
},
|
|
8078
8318
|
"fontExpandableHeadingSize": "14px",
|
|
8079
8319
|
"borderDividerSectionWidth": "1px"
|
|
8080
8320
|
}
|
|
@@ -9102,6 +9342,46 @@ module.exports.preset = {
|
|
|
9102
9342
|
"colorDropzoneTextHover": {
|
|
9103
9343
|
"light": "{colorWhite}",
|
|
9104
9344
|
"dark": "{colorWhite}"
|
|
9345
|
+
},
|
|
9346
|
+
"colorBackgroundSeverityCritical": {
|
|
9347
|
+
"light": "{colorChartsStatusCritical}",
|
|
9348
|
+
"dark": "{colorChartsStatusCritical}"
|
|
9349
|
+
},
|
|
9350
|
+
"colorTextSeverityCritical": {
|
|
9351
|
+
"light": "{colorBlack}",
|
|
9352
|
+
"dark": "{colorBlack}"
|
|
9353
|
+
},
|
|
9354
|
+
"colorBackgroundSeverityHigh": {
|
|
9355
|
+
"light": "{colorChartsStatusHigh}",
|
|
9356
|
+
"dark": "{colorChartsStatusHigh}"
|
|
9357
|
+
},
|
|
9358
|
+
"colorTextSeverityHigh": {
|
|
9359
|
+
"light": "{colorGrey900}",
|
|
9360
|
+
"dark": "{colorGrey900}"
|
|
9361
|
+
},
|
|
9362
|
+
"colorBackgroundSeverityMedium": {
|
|
9363
|
+
"light": "{colorChartsStatusMedium}",
|
|
9364
|
+
"dark": "{colorChartsStatusMedium}"
|
|
9365
|
+
},
|
|
9366
|
+
"colorTextSeverityMedium": {
|
|
9367
|
+
"light": "{colorGrey900}",
|
|
9368
|
+
"dark": "{colorGrey900}"
|
|
9369
|
+
},
|
|
9370
|
+
"colorBackgroundSeverityLow": {
|
|
9371
|
+
"light": "{colorChartsStatusLow}",
|
|
9372
|
+
"dark": "{colorChartsStatusLow}"
|
|
9373
|
+
},
|
|
9374
|
+
"colorTextSeverityLow": {
|
|
9375
|
+
"light": "{colorGrey900}",
|
|
9376
|
+
"dark": "{colorGrey900}"
|
|
9377
|
+
},
|
|
9378
|
+
"colorBackgroundSeverityNeutral": {
|
|
9379
|
+
"light": "{colorGrey550}",
|
|
9380
|
+
"dark": "{colorGrey550}"
|
|
9381
|
+
},
|
|
9382
|
+
"colorTextSeverityNeutral": {
|
|
9383
|
+
"light": "{colorGrey100}",
|
|
9384
|
+
"dark": "{colorGrey100}"
|
|
9105
9385
|
}
|
|
9106
9386
|
}
|
|
9107
9387
|
}
|
|
@@ -9516,6 +9796,16 @@ module.exports.preset = {
|
|
|
9516
9796
|
"colorDropzoneBackgroundHover": "color",
|
|
9517
9797
|
"colorDropzoneTextActive": "color",
|
|
9518
9798
|
"colorDropzoneTextHover": "color",
|
|
9799
|
+
"colorBackgroundSeverityCritical": "color",
|
|
9800
|
+
"colorTextSeverityCritical": "color",
|
|
9801
|
+
"colorBackgroundSeverityHigh": "color",
|
|
9802
|
+
"colorTextSeverityHigh": "color",
|
|
9803
|
+
"colorBackgroundSeverityMedium": "color",
|
|
9804
|
+
"colorTextSeverityMedium": "color",
|
|
9805
|
+
"colorBackgroundSeverityLow": "color",
|
|
9806
|
+
"colorTextSeverityLow": "color",
|
|
9807
|
+
"colorBackgroundSeverityNeutral": "color",
|
|
9808
|
+
"colorTextSeverityNeutral": "color",
|
|
9519
9809
|
"motionDurationExtraFast": "motion",
|
|
9520
9810
|
"motionDurationExtraSlow": "motion",
|
|
9521
9811
|
"motionDurationFast": "motion",
|
|
@@ -10739,6 +11029,16 @@ module.exports.preset = {
|
|
|
10739
11029
|
"colorDropzoneBackgroundHover": "color-dropzone-background-hover",
|
|
10740
11030
|
"colorDropzoneTextActive": "color-dropzone-text-active",
|
|
10741
11031
|
"colorDropzoneTextHover": "color-dropzone-text-hover",
|
|
11032
|
+
"colorBackgroundSeverityCritical": "color-background-severity-critical",
|
|
11033
|
+
"colorTextSeverityCritical": "color-text-severity-critical",
|
|
11034
|
+
"colorBackgroundSeverityHigh": "color-background-severity-high",
|
|
11035
|
+
"colorTextSeverityHigh": "color-text-severity-high",
|
|
11036
|
+
"colorBackgroundSeverityMedium": "color-background-severity-medium",
|
|
11037
|
+
"colorTextSeverityMedium": "color-text-severity-medium",
|
|
11038
|
+
"colorBackgroundSeverityLow": "color-background-severity-low",
|
|
11039
|
+
"colorTextSeverityLow": "color-text-severity-low",
|
|
11040
|
+
"colorBackgroundSeverityNeutral": "color-background-severity-neutral",
|
|
11041
|
+
"colorTextSeverityNeutral": "color-text-severity-neutral",
|
|
10742
11042
|
"fontBoxValueLargeWeight": "font-box-value-large-weight",
|
|
10743
11043
|
"fontButtonLetterSpacing": "font-button-letter-spacing",
|
|
10744
11044
|
"fontButtonWeight": "font-button-weight",
|
|
@@ -11455,6 +11755,16 @@ module.exports.preset = {
|
|
|
11455
11755
|
"colorDropzoneBackgroundHover": "--color-dropzone-background-hover-42q8nb",
|
|
11456
11756
|
"colorDropzoneTextActive": "--color-dropzone-text-active-8e1lcf",
|
|
11457
11757
|
"colorDropzoneTextHover": "--color-dropzone-text-hover-4qxymq",
|
|
11758
|
+
"colorBackgroundSeverityCritical": "--color-background-severity-critical-idosdq",
|
|
11759
|
+
"colorTextSeverityCritical": "--color-text-severity-critical-85viri",
|
|
11760
|
+
"colorBackgroundSeverityHigh": "--color-background-severity-high-434xpy",
|
|
11761
|
+
"colorTextSeverityHigh": "--color-text-severity-high-uiwahw",
|
|
11762
|
+
"colorBackgroundSeverityMedium": "--color-background-severity-medium-n5069n",
|
|
11763
|
+
"colorTextSeverityMedium": "--color-text-severity-medium-t00q1o",
|
|
11764
|
+
"colorBackgroundSeverityLow": "--color-background-severity-low-5ab62f",
|
|
11765
|
+
"colorTextSeverityLow": "--color-text-severity-low-alfea6",
|
|
11766
|
+
"colorBackgroundSeverityNeutral": "--color-background-severity-neutral-wfgvya",
|
|
11767
|
+
"colorTextSeverityNeutral": "--color-text-severity-neutral-2hvk9q",
|
|
11458
11768
|
"fontBoxValueLargeWeight": "--font-box-value-large-weight-onoq9k",
|
|
11459
11769
|
"fontButtonLetterSpacing": "--font-button-letter-spacing-65ug0o",
|
|
11460
11770
|
"fontButtonWeight": "--font-button-weight-hv56tz",
|
|
@@ -1729,6 +1729,46 @@ export var preset = {
|
|
|
1729
1729
|
"light": "{colorBlue800}",
|
|
1730
1730
|
"dark": "{colorWhite}"
|
|
1731
1731
|
},
|
|
1732
|
+
"colorBackgroundSeverityCritical": {
|
|
1733
|
+
"light": "{colorChartsStatusCritical}",
|
|
1734
|
+
"dark": "{colorChartsStatusCritical}"
|
|
1735
|
+
},
|
|
1736
|
+
"colorTextSeverityCritical": {
|
|
1737
|
+
"light": "{colorGrey100}",
|
|
1738
|
+
"dark": "{colorBlack}"
|
|
1739
|
+
},
|
|
1740
|
+
"colorBackgroundSeverityHigh": {
|
|
1741
|
+
"light": "{colorChartsStatusHigh}",
|
|
1742
|
+
"dark": "{colorChartsStatusHigh}"
|
|
1743
|
+
},
|
|
1744
|
+
"colorTextSeverityHigh": {
|
|
1745
|
+
"light": "{colorGrey100}",
|
|
1746
|
+
"dark": "{colorGrey900}"
|
|
1747
|
+
},
|
|
1748
|
+
"colorBackgroundSeverityMedium": {
|
|
1749
|
+
"light": "{colorChartsStatusMedium}",
|
|
1750
|
+
"dark": "{colorChartsStatusMedium}"
|
|
1751
|
+
},
|
|
1752
|
+
"colorTextSeverityMedium": {
|
|
1753
|
+
"light": "{colorGrey900}",
|
|
1754
|
+
"dark": "{colorGrey900}"
|
|
1755
|
+
},
|
|
1756
|
+
"colorBackgroundSeverityLow": {
|
|
1757
|
+
"light": "{colorChartsStatusLow}",
|
|
1758
|
+
"dark": "{colorChartsStatusLow}"
|
|
1759
|
+
},
|
|
1760
|
+
"colorTextSeverityLow": {
|
|
1761
|
+
"light": "{colorGrey900}",
|
|
1762
|
+
"dark": "{colorGrey900}"
|
|
1763
|
+
},
|
|
1764
|
+
"colorBackgroundSeverityNeutral": {
|
|
1765
|
+
"light": "{colorGrey600}",
|
|
1766
|
+
"dark": "{colorGrey550}"
|
|
1767
|
+
},
|
|
1768
|
+
"colorTextSeverityNeutral": {
|
|
1769
|
+
"light": "{colorGrey100}",
|
|
1770
|
+
"dark": "{colorGrey100}"
|
|
1771
|
+
},
|
|
1732
1772
|
"fontBoxValueLargeWeight": "700",
|
|
1733
1773
|
"fontButtonLetterSpacing": "0.005em",
|
|
1734
1774
|
"fontButtonWeight": "700",
|
|
@@ -3902,6 +3942,46 @@ export var preset = {
|
|
|
3902
3942
|
"colorDropzoneTextHover": {
|
|
3903
3943
|
"light": "{colorWhite}",
|
|
3904
3944
|
"dark": "{colorWhite}"
|
|
3945
|
+
},
|
|
3946
|
+
"colorBackgroundSeverityCritical": {
|
|
3947
|
+
"light": "{colorChartsStatusCritical}",
|
|
3948
|
+
"dark": "{colorChartsStatusCritical}"
|
|
3949
|
+
},
|
|
3950
|
+
"colorTextSeverityCritical": {
|
|
3951
|
+
"light": "{colorBlack}",
|
|
3952
|
+
"dark": "{colorBlack}"
|
|
3953
|
+
},
|
|
3954
|
+
"colorBackgroundSeverityHigh": {
|
|
3955
|
+
"light": "{colorChartsStatusHigh}",
|
|
3956
|
+
"dark": "{colorChartsStatusHigh}"
|
|
3957
|
+
},
|
|
3958
|
+
"colorTextSeverityHigh": {
|
|
3959
|
+
"light": "{colorGrey900}",
|
|
3960
|
+
"dark": "{colorGrey900}"
|
|
3961
|
+
},
|
|
3962
|
+
"colorBackgroundSeverityMedium": {
|
|
3963
|
+
"light": "{colorChartsStatusMedium}",
|
|
3964
|
+
"dark": "{colorChartsStatusMedium}"
|
|
3965
|
+
},
|
|
3966
|
+
"colorTextSeverityMedium": {
|
|
3967
|
+
"light": "{colorGrey900}",
|
|
3968
|
+
"dark": "{colorGrey900}"
|
|
3969
|
+
},
|
|
3970
|
+
"colorBackgroundSeverityLow": {
|
|
3971
|
+
"light": "{colorChartsStatusLow}",
|
|
3972
|
+
"dark": "{colorChartsStatusLow}"
|
|
3973
|
+
},
|
|
3974
|
+
"colorTextSeverityLow": {
|
|
3975
|
+
"light": "{colorGrey900}",
|
|
3976
|
+
"dark": "{colorGrey900}"
|
|
3977
|
+
},
|
|
3978
|
+
"colorBackgroundSeverityNeutral": {
|
|
3979
|
+
"light": "{colorGrey550}",
|
|
3980
|
+
"dark": "{colorGrey550}"
|
|
3981
|
+
},
|
|
3982
|
+
"colorTextSeverityNeutral": {
|
|
3983
|
+
"light": "{colorGrey100}",
|
|
3984
|
+
"dark": "{colorGrey100}"
|
|
3905
3985
|
}
|
|
3906
3986
|
}
|
|
3907
3987
|
},
|
|
@@ -4996,6 +5076,46 @@ export var preset = {
|
|
|
4996
5076
|
"colorDropzoneTextHover": {
|
|
4997
5077
|
"light": "{colorWhite}",
|
|
4998
5078
|
"dark": "{colorWhite}"
|
|
5079
|
+
},
|
|
5080
|
+
"colorBackgroundSeverityCritical": {
|
|
5081
|
+
"light": "{colorChartsStatusCritical}",
|
|
5082
|
+
"dark": "{colorChartsStatusCritical}"
|
|
5083
|
+
},
|
|
5084
|
+
"colorTextSeverityCritical": {
|
|
5085
|
+
"light": "{colorBlack}",
|
|
5086
|
+
"dark": "{colorBlack}"
|
|
5087
|
+
},
|
|
5088
|
+
"colorBackgroundSeverityHigh": {
|
|
5089
|
+
"light": "{colorChartsStatusHigh}",
|
|
5090
|
+
"dark": "{colorChartsStatusHigh}"
|
|
5091
|
+
},
|
|
5092
|
+
"colorTextSeverityHigh": {
|
|
5093
|
+
"light": "{colorGrey900}",
|
|
5094
|
+
"dark": "{colorGrey900}"
|
|
5095
|
+
},
|
|
5096
|
+
"colorBackgroundSeverityMedium": {
|
|
5097
|
+
"light": "{colorChartsStatusMedium}",
|
|
5098
|
+
"dark": "{colorChartsStatusMedium}"
|
|
5099
|
+
},
|
|
5100
|
+
"colorTextSeverityMedium": {
|
|
5101
|
+
"light": "{colorGrey900}",
|
|
5102
|
+
"dark": "{colorGrey900}"
|
|
5103
|
+
},
|
|
5104
|
+
"colorBackgroundSeverityLow": {
|
|
5105
|
+
"light": "{colorChartsStatusLow}",
|
|
5106
|
+
"dark": "{colorChartsStatusLow}"
|
|
5107
|
+
},
|
|
5108
|
+
"colorTextSeverityLow": {
|
|
5109
|
+
"light": "{colorGrey900}",
|
|
5110
|
+
"dark": "{colorGrey900}"
|
|
5111
|
+
},
|
|
5112
|
+
"colorBackgroundSeverityNeutral": {
|
|
5113
|
+
"light": "{colorGrey550}",
|
|
5114
|
+
"dark": "{colorGrey550}"
|
|
5115
|
+
},
|
|
5116
|
+
"colorTextSeverityNeutral": {
|
|
5117
|
+
"light": "{colorGrey100}",
|
|
5118
|
+
"dark": "{colorGrey100}"
|
|
4999
5119
|
}
|
|
5000
5120
|
}
|
|
5001
5121
|
},
|
|
@@ -6022,6 +6142,46 @@ export var preset = {
|
|
|
6022
6142
|
"colorDropzoneTextHover": {
|
|
6023
6143
|
"light": "{colorBlue800}",
|
|
6024
6144
|
"dark": "{colorWhite}"
|
|
6145
|
+
},
|
|
6146
|
+
"colorBackgroundSeverityCritical": {
|
|
6147
|
+
"light": "{colorChartsStatusCritical}",
|
|
6148
|
+
"dark": "{colorChartsStatusCritical}"
|
|
6149
|
+
},
|
|
6150
|
+
"colorTextSeverityCritical": {
|
|
6151
|
+
"light": "{colorGrey100}",
|
|
6152
|
+
"dark": "{colorBlack}"
|
|
6153
|
+
},
|
|
6154
|
+
"colorBackgroundSeverityHigh": {
|
|
6155
|
+
"light": "{colorChartsStatusHigh}",
|
|
6156
|
+
"dark": "{colorChartsStatusHigh}"
|
|
6157
|
+
},
|
|
6158
|
+
"colorTextSeverityHigh": {
|
|
6159
|
+
"light": "{colorGrey100}",
|
|
6160
|
+
"dark": "{colorGrey900}"
|
|
6161
|
+
},
|
|
6162
|
+
"colorBackgroundSeverityMedium": {
|
|
6163
|
+
"light": "{colorChartsStatusMedium}",
|
|
6164
|
+
"dark": "{colorChartsStatusMedium}"
|
|
6165
|
+
},
|
|
6166
|
+
"colorTextSeverityMedium": {
|
|
6167
|
+
"light": "{colorGrey900}",
|
|
6168
|
+
"dark": "{colorGrey900}"
|
|
6169
|
+
},
|
|
6170
|
+
"colorBackgroundSeverityLow": {
|
|
6171
|
+
"light": "{colorChartsStatusLow}",
|
|
6172
|
+
"dark": "{colorChartsStatusLow}"
|
|
6173
|
+
},
|
|
6174
|
+
"colorTextSeverityLow": {
|
|
6175
|
+
"light": "{colorGrey900}",
|
|
6176
|
+
"dark": "{colorGrey900}"
|
|
6177
|
+
},
|
|
6178
|
+
"colorBackgroundSeverityNeutral": {
|
|
6179
|
+
"light": "{colorGrey600}",
|
|
6180
|
+
"dark": "{colorGrey550}"
|
|
6181
|
+
},
|
|
6182
|
+
"colorTextSeverityNeutral": {
|
|
6183
|
+
"light": "{colorGrey100}",
|
|
6184
|
+
"dark": "{colorGrey100}"
|
|
6025
6185
|
}
|
|
6026
6186
|
}
|
|
6027
6187
|
},
|
|
@@ -7048,6 +7208,46 @@ export var preset = {
|
|
|
7048
7208
|
"colorDropzoneTextHover": {
|
|
7049
7209
|
"light": "{colorBlue800}",
|
|
7050
7210
|
"dark": "{colorWhite}"
|
|
7211
|
+
},
|
|
7212
|
+
"colorBackgroundSeverityCritical": {
|
|
7213
|
+
"light": "{colorChartsStatusCritical}",
|
|
7214
|
+
"dark": "{colorChartsStatusCritical}"
|
|
7215
|
+
},
|
|
7216
|
+
"colorTextSeverityCritical": {
|
|
7217
|
+
"light": "{colorGrey100}",
|
|
7218
|
+
"dark": "{colorBlack}"
|
|
7219
|
+
},
|
|
7220
|
+
"colorBackgroundSeverityHigh": {
|
|
7221
|
+
"light": "{colorChartsStatusHigh}",
|
|
7222
|
+
"dark": "{colorChartsStatusHigh}"
|
|
7223
|
+
},
|
|
7224
|
+
"colorTextSeverityHigh": {
|
|
7225
|
+
"light": "{colorGrey100}",
|
|
7226
|
+
"dark": "{colorGrey900}"
|
|
7227
|
+
},
|
|
7228
|
+
"colorBackgroundSeverityMedium": {
|
|
7229
|
+
"light": "{colorChartsStatusMedium}",
|
|
7230
|
+
"dark": "{colorChartsStatusMedium}"
|
|
7231
|
+
},
|
|
7232
|
+
"colorTextSeverityMedium": {
|
|
7233
|
+
"light": "{colorGrey900}",
|
|
7234
|
+
"dark": "{colorGrey900}"
|
|
7235
|
+
},
|
|
7236
|
+
"colorBackgroundSeverityLow": {
|
|
7237
|
+
"light": "{colorChartsStatusLow}",
|
|
7238
|
+
"dark": "{colorChartsStatusLow}"
|
|
7239
|
+
},
|
|
7240
|
+
"colorTextSeverityLow": {
|
|
7241
|
+
"light": "{colorGrey900}",
|
|
7242
|
+
"dark": "{colorGrey900}"
|
|
7243
|
+
},
|
|
7244
|
+
"colorBackgroundSeverityNeutral": {
|
|
7245
|
+
"light": "{colorGrey600}",
|
|
7246
|
+
"dark": "{colorGrey550}"
|
|
7247
|
+
},
|
|
7248
|
+
"colorTextSeverityNeutral": {
|
|
7249
|
+
"light": "{colorGrey100}",
|
|
7250
|
+
"dark": "{colorGrey100}"
|
|
7051
7251
|
}
|
|
7052
7252
|
}
|
|
7053
7253
|
},
|
|
@@ -8075,6 +8275,46 @@ export var preset = {
|
|
|
8075
8275
|
"light": "{colorBlue800}",
|
|
8076
8276
|
"dark": "{colorWhite}"
|
|
8077
8277
|
},
|
|
8278
|
+
"colorBackgroundSeverityCritical": {
|
|
8279
|
+
"light": "{colorChartsStatusCritical}",
|
|
8280
|
+
"dark": "{colorChartsStatusCritical}"
|
|
8281
|
+
},
|
|
8282
|
+
"colorTextSeverityCritical": {
|
|
8283
|
+
"light": "{colorGrey100}",
|
|
8284
|
+
"dark": "{colorBlack}"
|
|
8285
|
+
},
|
|
8286
|
+
"colorBackgroundSeverityHigh": {
|
|
8287
|
+
"light": "{colorChartsStatusHigh}",
|
|
8288
|
+
"dark": "{colorChartsStatusHigh}"
|
|
8289
|
+
},
|
|
8290
|
+
"colorTextSeverityHigh": {
|
|
8291
|
+
"light": "{colorGrey100}",
|
|
8292
|
+
"dark": "{colorGrey900}"
|
|
8293
|
+
},
|
|
8294
|
+
"colorBackgroundSeverityMedium": {
|
|
8295
|
+
"light": "{colorChartsStatusMedium}",
|
|
8296
|
+
"dark": "{colorChartsStatusMedium}"
|
|
8297
|
+
},
|
|
8298
|
+
"colorTextSeverityMedium": {
|
|
8299
|
+
"light": "{colorGrey900}",
|
|
8300
|
+
"dark": "{colorGrey900}"
|
|
8301
|
+
},
|
|
8302
|
+
"colorBackgroundSeverityLow": {
|
|
8303
|
+
"light": "{colorChartsStatusLow}",
|
|
8304
|
+
"dark": "{colorChartsStatusLow}"
|
|
8305
|
+
},
|
|
8306
|
+
"colorTextSeverityLow": {
|
|
8307
|
+
"light": "{colorGrey900}",
|
|
8308
|
+
"dark": "{colorGrey900}"
|
|
8309
|
+
},
|
|
8310
|
+
"colorBackgroundSeverityNeutral": {
|
|
8311
|
+
"light": "{colorGrey600}",
|
|
8312
|
+
"dark": "{colorGrey550}"
|
|
8313
|
+
},
|
|
8314
|
+
"colorTextSeverityNeutral": {
|
|
8315
|
+
"light": "{colorGrey100}",
|
|
8316
|
+
"dark": "{colorGrey100}"
|
|
8317
|
+
},
|
|
8078
8318
|
"fontExpandableHeadingSize": "14px",
|
|
8079
8319
|
"borderDividerSectionWidth": "1px"
|
|
8080
8320
|
}
|
|
@@ -9102,6 +9342,46 @@ export var preset = {
|
|
|
9102
9342
|
"colorDropzoneTextHover": {
|
|
9103
9343
|
"light": "{colorWhite}",
|
|
9104
9344
|
"dark": "{colorWhite}"
|
|
9345
|
+
},
|
|
9346
|
+
"colorBackgroundSeverityCritical": {
|
|
9347
|
+
"light": "{colorChartsStatusCritical}",
|
|
9348
|
+
"dark": "{colorChartsStatusCritical}"
|
|
9349
|
+
},
|
|
9350
|
+
"colorTextSeverityCritical": {
|
|
9351
|
+
"light": "{colorBlack}",
|
|
9352
|
+
"dark": "{colorBlack}"
|
|
9353
|
+
},
|
|
9354
|
+
"colorBackgroundSeverityHigh": {
|
|
9355
|
+
"light": "{colorChartsStatusHigh}",
|
|
9356
|
+
"dark": "{colorChartsStatusHigh}"
|
|
9357
|
+
},
|
|
9358
|
+
"colorTextSeverityHigh": {
|
|
9359
|
+
"light": "{colorGrey900}",
|
|
9360
|
+
"dark": "{colorGrey900}"
|
|
9361
|
+
},
|
|
9362
|
+
"colorBackgroundSeverityMedium": {
|
|
9363
|
+
"light": "{colorChartsStatusMedium}",
|
|
9364
|
+
"dark": "{colorChartsStatusMedium}"
|
|
9365
|
+
},
|
|
9366
|
+
"colorTextSeverityMedium": {
|
|
9367
|
+
"light": "{colorGrey900}",
|
|
9368
|
+
"dark": "{colorGrey900}"
|
|
9369
|
+
},
|
|
9370
|
+
"colorBackgroundSeverityLow": {
|
|
9371
|
+
"light": "{colorChartsStatusLow}",
|
|
9372
|
+
"dark": "{colorChartsStatusLow}"
|
|
9373
|
+
},
|
|
9374
|
+
"colorTextSeverityLow": {
|
|
9375
|
+
"light": "{colorGrey900}",
|
|
9376
|
+
"dark": "{colorGrey900}"
|
|
9377
|
+
},
|
|
9378
|
+
"colorBackgroundSeverityNeutral": {
|
|
9379
|
+
"light": "{colorGrey550}",
|
|
9380
|
+
"dark": "{colorGrey550}"
|
|
9381
|
+
},
|
|
9382
|
+
"colorTextSeverityNeutral": {
|
|
9383
|
+
"light": "{colorGrey100}",
|
|
9384
|
+
"dark": "{colorGrey100}"
|
|
9105
9385
|
}
|
|
9106
9386
|
}
|
|
9107
9387
|
}
|
|
@@ -9516,6 +9796,16 @@ export var preset = {
|
|
|
9516
9796
|
"colorDropzoneBackgroundHover": "color",
|
|
9517
9797
|
"colorDropzoneTextActive": "color",
|
|
9518
9798
|
"colorDropzoneTextHover": "color",
|
|
9799
|
+
"colorBackgroundSeverityCritical": "color",
|
|
9800
|
+
"colorTextSeverityCritical": "color",
|
|
9801
|
+
"colorBackgroundSeverityHigh": "color",
|
|
9802
|
+
"colorTextSeverityHigh": "color",
|
|
9803
|
+
"colorBackgroundSeverityMedium": "color",
|
|
9804
|
+
"colorTextSeverityMedium": "color",
|
|
9805
|
+
"colorBackgroundSeverityLow": "color",
|
|
9806
|
+
"colorTextSeverityLow": "color",
|
|
9807
|
+
"colorBackgroundSeverityNeutral": "color",
|
|
9808
|
+
"colorTextSeverityNeutral": "color",
|
|
9519
9809
|
"motionDurationExtraFast": "motion",
|
|
9520
9810
|
"motionDurationExtraSlow": "motion",
|
|
9521
9811
|
"motionDurationFast": "motion",
|
|
@@ -10739,6 +11029,16 @@ export var preset = {
|
|
|
10739
11029
|
"colorDropzoneBackgroundHover": "color-dropzone-background-hover",
|
|
10740
11030
|
"colorDropzoneTextActive": "color-dropzone-text-active",
|
|
10741
11031
|
"colorDropzoneTextHover": "color-dropzone-text-hover",
|
|
11032
|
+
"colorBackgroundSeverityCritical": "color-background-severity-critical",
|
|
11033
|
+
"colorTextSeverityCritical": "color-text-severity-critical",
|
|
11034
|
+
"colorBackgroundSeverityHigh": "color-background-severity-high",
|
|
11035
|
+
"colorTextSeverityHigh": "color-text-severity-high",
|
|
11036
|
+
"colorBackgroundSeverityMedium": "color-background-severity-medium",
|
|
11037
|
+
"colorTextSeverityMedium": "color-text-severity-medium",
|
|
11038
|
+
"colorBackgroundSeverityLow": "color-background-severity-low",
|
|
11039
|
+
"colorTextSeverityLow": "color-text-severity-low",
|
|
11040
|
+
"colorBackgroundSeverityNeutral": "color-background-severity-neutral",
|
|
11041
|
+
"colorTextSeverityNeutral": "color-text-severity-neutral",
|
|
10742
11042
|
"fontBoxValueLargeWeight": "font-box-value-large-weight",
|
|
10743
11043
|
"fontButtonLetterSpacing": "font-button-letter-spacing",
|
|
10744
11044
|
"fontButtonWeight": "font-button-weight",
|
|
@@ -11455,6 +11755,16 @@ export var preset = {
|
|
|
11455
11755
|
"colorDropzoneBackgroundHover": "--color-dropzone-background-hover-42q8nb",
|
|
11456
11756
|
"colorDropzoneTextActive": "--color-dropzone-text-active-8e1lcf",
|
|
11457
11757
|
"colorDropzoneTextHover": "--color-dropzone-text-hover-4qxymq",
|
|
11758
|
+
"colorBackgroundSeverityCritical": "--color-background-severity-critical-idosdq",
|
|
11759
|
+
"colorTextSeverityCritical": "--color-text-severity-critical-85viri",
|
|
11760
|
+
"colorBackgroundSeverityHigh": "--color-background-severity-high-434xpy",
|
|
11761
|
+
"colorTextSeverityHigh": "--color-text-severity-high-uiwahw",
|
|
11762
|
+
"colorBackgroundSeverityMedium": "--color-background-severity-medium-n5069n",
|
|
11763
|
+
"colorTextSeverityMedium": "--color-text-severity-medium-t00q1o",
|
|
11764
|
+
"colorBackgroundSeverityLow": "--color-background-severity-low-5ab62f",
|
|
11765
|
+
"colorTextSeverityLow": "--color-text-severity-low-alfea6",
|
|
11766
|
+
"colorBackgroundSeverityNeutral": "--color-background-severity-neutral-wfgvya",
|
|
11767
|
+
"colorTextSeverityNeutral": "--color-text-severity-neutral-2hvk9q",
|
|
11458
11768
|
"fontBoxValueLargeWeight": "--font-box-value-large-weight-onoq9k",
|
|
11459
11769
|
"fontButtonLetterSpacing": "--font-button-letter-spacing-65ug0o",
|
|
11460
11770
|
"fontButtonWeight": "--font-button-weight-hv56tz",
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED