@cloudscape-design/components 3.0.1098 → 3.0.1100
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/alert/interfaces.d.ts +3 -0
- package/alert/interfaces.d.ts.map +1 -1
- package/alert/interfaces.js.map +1 -1
- package/alert/internal.js +2 -2
- package/alert/internal.js.map +1 -1
- package/alert/style.d.ts +3 -0
- package/alert/style.d.ts.map +1 -1
- package/alert/style.js +9 -0
- package/alert/style.js.map +1 -1
- package/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +50 -50
- package/alert/styles.selectors.js +27 -27
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +32 -32
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/classic.js +11 -11
- package/app-layout/classic.js.map +1 -1
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/utils/use-focus-control.d.ts +4 -1
- package/app-layout/utils/use-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-focus-control.js +7 -4
- package/app-layout/utils/use-focus-control.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +10 -12
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +25 -25
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +73 -73
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +25 -25
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +25 -25
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +50 -50
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +25 -25
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +10 -10
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +28 -28
- package/attribute-editor/styles.selectors.js +15 -15
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +28 -28
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +256 -256
- package/button/styles.selectors.js +22 -22
- package/button-dropdown/item-element/styles.css.js +16 -16
- package/button-dropdown/item-element/styles.scoped.css +27 -27
- package/button-dropdown/item-element/styles.selectors.js +16 -16
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +11 -11
- package/checkbox/styles.selectors.js +3 -3
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +187 -187
- package/flashbar/styles.selectors.js +50 -50
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +73 -73
- package/help-panel/styles.selectors.js +6 -6
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/drag-handle-wrapper/styles.css.js +21 -21
- package/internal/components/drag-handle-wrapper/styles.scoped.css +44 -44
- package/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +38 -38
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/expand-toggle-button/index.d.ts +5 -1
- package/internal/components/expand-toggle-button/index.d.ts.map +1 -1
- package/internal/components/expand-toggle-button/index.js +2 -2
- package/internal/components/expand-toggle-button/index.js.map +1 -1
- package/internal/components/expand-toggle-button/styles.css.js +4 -3
- package/internal/components/expand-toggle-button/styles.scoped.css +13 -13
- package/internal/components/expand-toggle-button/styles.selectors.js +4 -3
- package/internal/components/structured-item/index.d.ts +5 -2
- package/internal/components/structured-item/index.d.ts.map +1 -1
- package/internal/components/structured-item/index.js +2 -2
- package/internal/components/structured-item/index.js.map +1 -1
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/custom-css-properties/index.d.ts +1 -0
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +85 -84
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +103 -103
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/radio-group/styles.css.js +10 -10
- package/radio-group/styles.scoped.css +22 -22
- package/radio-group/styles.selectors.js +10 -10
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +86 -86
- package/slider/styles.selectors.js +26 -26
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +39 -39
- package/spinner/styles.selectors.js +13 -13
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +13 -13
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +66 -66
- package/text-content/styles.selectors.js +1 -1
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +23 -23
- package/toggle/styles.selectors.js +10 -10
- package/tree-view/internal.d.ts.map +1 -1
- package/tree-view/internal.js +10 -4
- package/tree-view/internal.js.map +1 -1
- package/tree-view/keyboard-navigation/index.d.ts +33 -0
- package/tree-view/keyboard-navigation/index.d.ts.map +1 -0
- package/tree-view/keyboard-navigation/index.js +224 -0
- package/tree-view/keyboard-navigation/index.js.map +1 -0
- package/tree-view/keyboard-navigation/utils.d.ts +6 -0
- package/tree-view/keyboard-navigation/utils.d.ts.map +1 -0
- package/tree-view/keyboard-navigation/utils.js +40 -0
- package/tree-view/keyboard-navigation/utils.js.map +1 -0
- package/tree-view/styles.css.js +2 -2
- package/tree-view/styles.scoped.css +3 -2
- package/tree-view/styles.selectors.js +2 -2
- package/tree-view/tree-item/focus-target.d.ts +6 -0
- package/tree-view/tree-item/focus-target.d.ts.map +1 -0
- package/tree-view/tree-item/focus-target.js +11 -0
- package/tree-view/tree-item/focus-target.js.map +1 -0
- package/tree-view/tree-item/index.d.ts +5 -1
- package/tree-view/tree-item/index.d.ts.map +1 -1
- package/tree-view/tree-item/index.js +11 -9
- package/tree-view/tree-item/index.js.map +1 -1
- package/tree-view/tree-item/styles.css.js +9 -5
- package/tree-view/tree-item/styles.scoped.css +46 -11
- package/tree-view/tree-item/styles.selectors.js +9 -5
- package/tree-view/utils.d.ts +15 -0
- package/tree-view/utils.d.ts.map +1 -0
- package/tree-view/utils.js +20 -0
- package/tree-view/utils.js.map +1 -0
package/alert/interfaces.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/alert/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,yBAAiB,UAAU,CAAC;IAC1B,KAAY,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAE5D,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;IAED,UAAiB,WAAW;QAK1B,oBAAoB,CAAC,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AC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C;;;;OAIG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC;IACrC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC;CAC1B"}
|
package/alert/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/alert/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 { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace AlertProps {\n export type Type = 'success' | 'error' | 'warning' | 'info';\n\n export interface Ref {\n /**\n * Sets focus on the alert content.\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /*\n * Specifies the ARIA label for the alert icon for type `success`.\n * @property {string} [successIconAriaLabel] - optional\n */\n successIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `error`.\n * @property {string} [errorIconAriaLabel] - optional\n */\n errorIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `warning`.\n * @property {string} [warningIconAriaLabel] - optional\n */\n warningIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `info`.\n * @property {string} [infoIconAriaLabel] - optional\n */\n infoIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the dismiss button.\n * @property {string} [dismissAriaLabel] - optional\n */\n dismissAriaLabel?: string;\n }\n\n export interface AnalyticsMetadata {\n errorContext?: ErrorContext;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n color?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n\nexport interface AlertProps extends BaseComponentProps {\n /**\n * Specifies the type of message you want to display.\n */\n type?: AlertProps.Type;\n\n /**\n * Provides a text alternative for the icon.\n *\n * @deprecated Use the label properties inside `i18nStrings` instead.\n * If the label is assigned via the `i18nStrings` property, this label will be ignored.\n */\n statusIconAriaLabel?: string;\n\n /**\n * Determines whether the alert is displayed.\n * @deprecated Use conditional rendering in your code instead of this prop.\n */\n visible?: boolean;\n /**\n * Adds a close button to the alert when set to `true`.\n * An `onDismiss` event is fired when a user clicks the button.\n */\n dismissible?: boolean;\n /**\n * Adds an aria-label to the dismiss button.\n * @i18n\n *\n * @deprecated Use `i18nStrings.dismissAriaLabel` instead.\n * If the label is assigned via the `i18nStrings` property, this label will be ignored.\n */\n dismissAriaLabel?: string;\n /**\n * Primary text displayed in the element.\n */\n children?: React.ReactNode;\n /**\n * Heading text.\n */\n header?: React.ReactNode;\n /**\n * Displays an action button next to the message area when set.\n * An `onButtonClick` event is fired when the user clicks it.\n * @deprecated Replaced by `action`.\n */\n buttonText?: React.ReactNode;\n /**\n * Specifies an action for the alert message.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add a button.\n */\n action?: React.ReactNode;\n /**\n * Fired when the user clicks the close icon that is displayed\n * when the `dismissible` property is set to `true`.\n */\n onDismiss?: NonCancelableEventHandler;\n /**\n * Fired when the user clicks the action button.\n * **Deprecated** Replaced by `action`.\n */\n onButtonClick?: NonCancelableEventHandler;\n /**\n * An object containing all the necessary localized strings required by the component.\n * @property {AlertProps.I18nStrings} [i18nStrings] - optional\n * @i18n\n */\n i18nStrings?: AlertProps.I18nStrings;\n /**\n * Specifies additional analytics-related metadata.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: AlertProps.AnalyticsMetadata;\n /**\n * @awsuiSystem core\n */\n style?: AlertProps.Style;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/alert/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 { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace AlertProps {\n export type Type = 'success' | 'error' | 'warning' | 'info';\n\n export interface Ref {\n /**\n * Sets focus on the alert content.\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /*\n * Specifies the ARIA label for the alert icon for type `success`.\n * @property {string} [successIconAriaLabel] - optional\n */\n successIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `error`.\n * @property {string} [errorIconAriaLabel] - optional\n */\n errorIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `warning`.\n * @property {string} [warningIconAriaLabel] - optional\n */\n warningIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the alert icon for type `info`.\n * @property {string} [infoIconAriaLabel] - optional\n */\n infoIconAriaLabel?: string;\n /*\n * Specifies the ARIA label for the dismiss button.\n * @property {string} [dismissAriaLabel] - optional\n */\n dismissAriaLabel?: string;\n }\n\n export interface AnalyticsMetadata {\n errorContext?: ErrorContext;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n color?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n icon?: {\n color?: string;\n };\n dismissButton?: {\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n\nexport interface AlertProps extends BaseComponentProps {\n /**\n * Specifies the type of message you want to display.\n */\n type?: AlertProps.Type;\n\n /**\n * Provides a text alternative for the icon.\n *\n * @deprecated Use the label properties inside `i18nStrings` instead.\n * If the label is assigned via the `i18nStrings` property, this label will be ignored.\n */\n statusIconAriaLabel?: string;\n\n /**\n * Determines whether the alert is displayed.\n * @deprecated Use conditional rendering in your code instead of this prop.\n */\n visible?: boolean;\n /**\n * Adds a close button to the alert when set to `true`.\n * An `onDismiss` event is fired when a user clicks the button.\n */\n dismissible?: boolean;\n /**\n * Adds an aria-label to the dismiss button.\n * @i18n\n *\n * @deprecated Use `i18nStrings.dismissAriaLabel` instead.\n * If the label is assigned via the `i18nStrings` property, this label will be ignored.\n */\n dismissAriaLabel?: string;\n /**\n * Primary text displayed in the element.\n */\n children?: React.ReactNode;\n /**\n * Heading text.\n */\n header?: React.ReactNode;\n /**\n * Displays an action button next to the message area when set.\n * An `onButtonClick` event is fired when the user clicks it.\n * @deprecated Replaced by `action`.\n */\n buttonText?: React.ReactNode;\n /**\n * Specifies an action for the alert message.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add a button.\n */\n action?: React.ReactNode;\n /**\n * Fired when the user clicks the close icon that is displayed\n * when the `dismissible` property is set to `true`.\n */\n onDismiss?: NonCancelableEventHandler;\n /**\n * Fired when the user clicks the action button.\n * **Deprecated** Replaced by `action`.\n */\n onButtonClick?: NonCancelableEventHandler;\n /**\n * An object containing all the necessary localized strings required by the component.\n * @property {AlertProps.I18nStrings} [i18nStrings] - optional\n * @i18n\n */\n i18nStrings?: AlertProps.I18nStrings;\n /**\n * Specifies additional analytics-related metadata.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: AlertProps.AnalyticsMetadata;\n /**\n * @awsuiSystem core\n */\n style?: AlertProps.Style;\n}\n"]}
|
package/alert/internal.js
CHANGED
|
@@ -19,7 +19,7 @@ import { awsuiPluginsInternal } from '../internal/plugins/api';
|
|
|
19
19
|
import { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';
|
|
20
20
|
import useContainerWidth from '../internal/utils/use-container-width';
|
|
21
21
|
import { ActionsWrapper } from './actions-wrapper';
|
|
22
|
-
import { getAlertStyles, getDismissButtonStyles } from './style';
|
|
22
|
+
import { getAlertStyles, getDismissButtonStyles, getIconStyles } from './style';
|
|
23
23
|
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
24
24
|
import styles from './styles.css.js';
|
|
25
25
|
const typeToIcon = {
|
|
@@ -61,7 +61,7 @@ const InternalAlert = React.forwardRef((_a, ref) => {
|
|
|
61
61
|
React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss']), style: getAlertStyles(style) },
|
|
62
62
|
React.createElement("div", { className: styles['alert-wrapper'] },
|
|
63
63
|
React.createElement("div", { className: styles['alert-focus-wrapper'], tabIndex: -1, ref: focusRef, role: "group" },
|
|
64
|
-
React.createElement("div", { className: clsx(styles.icon, styles.text) },
|
|
64
|
+
React.createElement("div", { className: clsx(styles.icon, styles.text), style: getIconStyles(style) },
|
|
65
65
|
React.createElement(InternalIcon, { name: typeToIcon[type], size: size, ariaLabel: statusIconAriaLabel })),
|
|
66
66
|
React.createElement("div", { className: clsx(styles.message, styles.text), id: messageSlotId },
|
|
67
67
|
React.createElement("div", { className: clsx(header && styles.header, headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header), ref: headerRef }, header),
|
package/alert/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRo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cesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport { getAlertStyles, getDismissButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps & {\n messageSlotId?: string;\n style?: AlertProps['style'];\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n style,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n style={getAlertStyles(style)}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef} role=\"group\">\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n style={getDismissButtonStyles(style)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhF,OAAO,kBAAkB,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BAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAChD,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GACpC,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport { getAlertStyles, getDismissButtonStyles, getIconStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps & {\n messageSlotId?: string;\n style?: AlertProps['style'];\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n style,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n style={getAlertStyles(style)}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef} role=\"group\">\n <div className={clsx(styles.icon, styles.text)} style={getIconStyles(style)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n style={getDismissButtonStyles(style)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
|
package/alert/style.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export declare function getAlertStyles(style: AlertProps['style']): {
|
|
|
6
6
|
borderWidth: string | undefined;
|
|
7
7
|
color: string | undefined;
|
|
8
8
|
} | undefined;
|
|
9
|
+
export declare function getIconStyles(style: AlertProps['style']): {
|
|
10
|
+
[x: string]: string;
|
|
11
|
+
} | undefined;
|
|
9
12
|
export declare function getDismissButtonStyles(style: AlertProps['style']): {
|
|
10
13
|
root: {
|
|
11
14
|
color: {
|
package/alert/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;;;;;;cAiBxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;;;;;;;;;;;;;cAmBhE"}
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;;;;;;cAiBxD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;;cAQvD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;;;;;;;;;;;;;cAmBhE"}
|
package/alert/style.js
CHANGED
|
@@ -13,6 +13,15 @@ export function getAlertStyles(style) {
|
|
|
13
13
|
[customCssProps.alertFocusRingBorderWidth]: (_j = style.root.focusRing) === null || _j === void 0 ? void 0 : _j.borderWidth,
|
|
14
14
|
}));
|
|
15
15
|
}
|
|
16
|
+
export function getIconStyles(style) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (SYSTEM !== 'core' || !((_a = style === null || style === void 0 ? void 0 : style.icon) === null || _a === void 0 ? void 0 : _a.color)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
[customCssProps.alertIconColor]: style.icon.color,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
16
25
|
export function getDismissButtonStyles(style) {
|
|
17
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
18
27
|
if (SYSTEM !== 'core' || !(style === null || style === void 0 ? void 0 : style.dismissButton)) {
|
package/alert/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,cAAc,CAAC,KAA0B;;IACvD,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,uBACE,UAAU,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,UAAU,EAClC,WAAW,EAAE,MAAA,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AK,CAAC,aAAa,0CAAE,SAAS,0CAAE,WAAW;aACzD;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { AlertProps } from './interfaces';\n\nexport function getAlertStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.root) {\n return undefined;\n }\n\n return {\n background: style.root?.background,\n borderColor: style.root?.borderColor,\n borderRadius: style.root?.borderRadius,\n borderWidth: style.root?.borderWidth,\n color: style.root?.color,\n ...(style.root?.focusRing && {\n [customCssProps.alertFocusRingBorderColor]: style.root.focusRing?.borderColor,\n [customCssProps.alertFocusRingBorderRadius]: style.root.focusRing?.borderRadius,\n [customCssProps.alertFocusRingBorderWidth]: style.root.focusRing?.borderWidth,\n }),\n };\n}\n\nexport function getDismissButtonStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.dismissButton) {\n return undefined;\n }\n\n return {\n root: {\n color: {\n active: style.dismissButton?.color?.active,\n default: style.dismissButton?.color?.default,\n hover: style.dismissButton?.color?.hover,\n },\n focusRing: {\n borderColor: style.dismissButton?.focusRing?.borderColor,\n borderRadius: style.dismissButton?.focusRing?.borderRadius,\n borderWidth: style.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,cAAc,CAAC,KAA0B;;IACvD,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACrC,OAAO,SA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C,aAAa,0CAAE,KAAK,0CAAE,MAAM;gBAC1C,OAAO,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,KAAK,0CAAE,OAAO;gBAC5C,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,KAAK,0CAAE,KAAK;aACzC;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,WAAW;gBACxD,YAAY,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,YAAY;gBAC1D,WAAW,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,WAAW;aACzD;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { AlertProps } from './interfaces';\n\nexport function getAlertStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.root) {\n return undefined;\n }\n\n return {\n background: style.root?.background,\n borderColor: style.root?.borderColor,\n borderRadius: style.root?.borderRadius,\n borderWidth: style.root?.borderWidth,\n color: style.root?.color,\n ...(style.root?.focusRing && {\n [customCssProps.alertFocusRingBorderColor]: style.root.focusRing?.borderColor,\n [customCssProps.alertFocusRingBorderRadius]: style.root.focusRing?.borderRadius,\n [customCssProps.alertFocusRingBorderWidth]: style.root.focusRing?.borderWidth,\n }),\n };\n}\n\nexport function getIconStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.icon?.color) {\n return undefined;\n }\n\n return {\n [customCssProps.alertIconColor]: style.icon.color,\n };\n}\n\nexport function getDismissButtonStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.dismissButton) {\n return undefined;\n }\n\n return {\n root: {\n color: {\n active: style.dismissButton?.color?.active,\n default: style.dismissButton?.color?.default,\n hover: style.dismissButton?.color?.hover,\n },\n focusRing: {\n borderColor: style.dismissButton?.focusRing?.borderColor,\n borderRadius: style.dismissButton?.focusRing?.borderRadius,\n borderWidth: style.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n"]}
|
package/alert/styles.css.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"alert": "
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"root": "
|
|
7
|
-
"hidden": "
|
|
8
|
-
"alert-wrapper": "awsui_alert-
|
|
9
|
-
"initial-hidden": "awsui_initial-
|
|
10
|
-
"header": "
|
|
11
|
-
"header-replacement": "awsui_header-
|
|
12
|
-
"action": "
|
|
13
|
-
"action-slot": "awsui_action-
|
|
14
|
-
"action-button": "awsui_action-
|
|
15
|
-
"alert-focus-wrapper": "awsui_alert-focus-
|
|
16
|
-
"text": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"message": "
|
|
19
|
-
"action-wrapped": "awsui_action-
|
|
20
|
-
"icon-size-medium": "awsui_icon-size-
|
|
21
|
-
"icon-size-big": "awsui_icon-size-
|
|
22
|
-
"icon-size-normal": "awsui_icon-size-
|
|
23
|
-
"content": "
|
|
24
|
-
"content-replacement": "awsui_content-
|
|
25
|
-
"dismiss": "
|
|
26
|
-
"dismiss-button": "awsui_dismiss-
|
|
27
|
-
"type-error": "awsui_type-
|
|
28
|
-
"type-warning": "awsui_type-
|
|
29
|
-
"type-success": "awsui_type-
|
|
30
|
-
"type-info": "awsui_type-
|
|
4
|
+
"alert": "awsui_alert_mx3cw_14o2k_193",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_14o2k_1",
|
|
6
|
+
"root": "awsui_root_mx3cw_14o2k_215",
|
|
7
|
+
"hidden": "awsui_hidden_mx3cw_14o2k_250",
|
|
8
|
+
"alert-wrapper": "awsui_alert-wrapper_mx3cw_14o2k_299",
|
|
9
|
+
"initial-hidden": "awsui_initial-hidden_mx3cw_14o2k_311",
|
|
10
|
+
"header": "awsui_header_mx3cw_14o2k_316",
|
|
11
|
+
"header-replacement": "awsui_header-replacement_mx3cw_14o2k_317",
|
|
12
|
+
"action": "awsui_action_mx3cw_14o2k_321",
|
|
13
|
+
"action-slot": "awsui_action-slot_mx3cw_14o2k_325",
|
|
14
|
+
"action-button": "awsui_action-button_mx3cw_14o2k_326",
|
|
15
|
+
"alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_14o2k_330",
|
|
16
|
+
"text": "awsui_text_mx3cw_14o2k_361",
|
|
17
|
+
"icon": "awsui_icon_mx3cw_14o2k_368",
|
|
18
|
+
"message": "awsui_message_mx3cw_14o2k_371",
|
|
19
|
+
"action-wrapped": "awsui_action-wrapped_mx3cw_14o2k_375",
|
|
20
|
+
"icon-size-medium": "awsui_icon-size-medium_mx3cw_14o2k_379",
|
|
21
|
+
"icon-size-big": "awsui_icon-size-big_mx3cw_14o2k_383",
|
|
22
|
+
"icon-size-normal": "awsui_icon-size-normal_mx3cw_14o2k_387",
|
|
23
|
+
"content": "awsui_content_mx3cw_14o2k_391",
|
|
24
|
+
"content-replacement": "awsui_content-replacement_mx3cw_14o2k_392",
|
|
25
|
+
"dismiss": "awsui_dismiss_mx3cw_14o2k_396",
|
|
26
|
+
"dismiss-button": "awsui_dismiss-button_mx3cw_14o2k_401",
|
|
27
|
+
"type-error": "awsui_type-error_mx3cw_14o2k_405",
|
|
28
|
+
"type-warning": "awsui_type-warning_mx3cw_14o2k_413",
|
|
29
|
+
"type-success": "awsui_type-success_mx3cw_14o2k_421",
|
|
30
|
+
"type-info": "awsui_type-info_mx3cw_14o2k_429"
|
|
31
31
|
};
|
|
32
32
|
|
package/alert/styles.scoped.css
CHANGED
|
@@ -190,10 +190,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
190
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
191
191
|
SPDX-License-Identifier: Apache-2.0
|
|
192
192
|
*/
|
|
193
|
-
.
|
|
194
|
-
animation: awsui_awsui-motion-fade-
|
|
193
|
+
.awsui_alert_mx3cw_14o2k_193:not(#\9) {
|
|
194
|
+
animation: awsui_awsui-motion-fade-in_mx3cw_14o2k_1 var(--motion-duration-show-paced-otsjh8, 180ms) var(--motion-easing-show-paced-ym6eyn, ease-out);
|
|
195
195
|
}
|
|
196
|
-
@keyframes awsui_awsui-motion-fade-
|
|
196
|
+
@keyframes awsui_awsui-motion-fade-in_mx3cw_14o2k_1 {
|
|
197
197
|
from {
|
|
198
198
|
opacity: 0.2;
|
|
199
199
|
}
|
|
@@ -202,17 +202,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
@media (prefers-reduced-motion: reduce) {
|
|
205
|
-
.
|
|
205
|
+
.awsui_alert_mx3cw_14o2k_193:not(#\9) {
|
|
206
206
|
animation: none;
|
|
207
207
|
transition: none;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
.awsui-motion-disabled .
|
|
210
|
+
.awsui-motion-disabled .awsui_alert_mx3cw_14o2k_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_14o2k_193:not(#\9) {
|
|
211
211
|
animation: none;
|
|
212
212
|
transition: none;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
.
|
|
215
|
+
.awsui_root_mx3cw_14o2k_215:not(#\9) {
|
|
216
216
|
border-collapse: separate;
|
|
217
217
|
border-spacing: 0;
|
|
218
218
|
box-sizing: border-box;
|
|
@@ -247,11 +247,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
247
247
|
overflow: hidden;
|
|
248
248
|
display: block;
|
|
249
249
|
}
|
|
250
|
-
.
|
|
250
|
+
.awsui_root_mx3cw_14o2k_215.awsui_hidden_mx3cw_14o2k_250:not(#\9) {
|
|
251
251
|
display: none;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
.
|
|
254
|
+
.awsui_alert_mx3cw_14o2k_193:not(#\9) {
|
|
255
255
|
border-collapse: separate;
|
|
256
256
|
border-spacing: 0;
|
|
257
257
|
box-sizing: border-box;
|
|
@@ -293,10 +293,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
293
293
|
padding-block: var(--space-alert-vertical-dlp5wr, 8px);
|
|
294
294
|
padding-inline: var(--space-alert-horizontal-ul364s, 16px);
|
|
295
295
|
background-color: var(--color-background-container-content-6u8rvp, #ffffff);
|
|
296
|
-
--awsui-alert-focus-ring-box-shadow-
|
|
296
|
+
--awsui-alert-focus-ring-box-shadow-vl73au: 0 0 0 var(--awsui-alert-focus-ring-border-width-vl73au, 2px) var(--awsui-alert-focus-ring-border-color-vl73au, var(--color-border-item-focused-uk47pl, #006ce0));
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_alert-
|
|
299
|
+
.awsui_alert-wrapper_mx3cw_14o2k_299:not(#\9) {
|
|
300
300
|
flex: 1;
|
|
301
301
|
display: flex;
|
|
302
302
|
flex-direction: row;
|
|
@@ -304,46 +304,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
304
304
|
column-gap: var(--space-alert-action-left-4s8zo5, 12px);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
.
|
|
307
|
+
.awsui_hidden_mx3cw_14o2k_250:not(#\9) {
|
|
308
308
|
display: none;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.awsui_initial-
|
|
311
|
+
.awsui_initial-hidden_mx3cw_14o2k_311:not(#\9) {
|
|
312
312
|
overflow: hidden;
|
|
313
313
|
block-size: 0;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.
|
|
317
|
-
.awsui_header-
|
|
316
|
+
.awsui_header_mx3cw_14o2k_316:not(#\9),
|
|
317
|
+
.awsui_header-replacement_mx3cw_14o2k_317:not(#\9) {
|
|
318
318
|
font-weight: 700;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
.
|
|
321
|
+
.awsui_action_mx3cw_14o2k_321:not(#\9) {
|
|
322
322
|
white-space: nowrap;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
.awsui_action-
|
|
326
|
-
.awsui_action-
|
|
325
|
+
.awsui_action-slot_mx3cw_14o2k_325:not(#\9),
|
|
326
|
+
.awsui_action-button_mx3cw_14o2k_326:not(#\9) {
|
|
327
327
|
/* used in test-utils */
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
.awsui_alert-focus-
|
|
330
|
+
.awsui_alert-focus-wrapper_mx3cw_14o2k_330:not(#\9) {
|
|
331
331
|
flex: 1;
|
|
332
332
|
min-inline-size: 70%;
|
|
333
333
|
display: grid;
|
|
334
334
|
grid-template-columns: min-content auto;
|
|
335
335
|
}
|
|
336
|
-
.awsui_alert-focus-
|
|
336
|
+
.awsui_alert-focus-wrapper_mx3cw_14o2k_330:not(#\9):focus {
|
|
337
337
|
outline: none;
|
|
338
338
|
}
|
|
339
|
-
body[data-awsui-focus-visible=true] .awsui_alert-focus-
|
|
339
|
+
body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_14o2k_330:not(#\9):focus {
|
|
340
340
|
position: relative;
|
|
341
341
|
}
|
|
342
|
-
body[data-awsui-focus-visible=true] .awsui_alert-focus-
|
|
342
|
+
body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_14o2k_330:not(#\9):focus {
|
|
343
343
|
outline: 2px dotted transparent;
|
|
344
344
|
outline-offset: calc(var(--space-button-focus-outline-gutter-jj138g, 4px) - 1px);
|
|
345
345
|
}
|
|
346
|
-
body[data-awsui-focus-visible=true] .awsui_alert-focus-
|
|
346
|
+
body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_14o2k_330:not(#\9):focus::before {
|
|
347
347
|
content: " ";
|
|
348
348
|
display: block;
|
|
349
349
|
position: absolute;
|
|
@@ -351,85 +351,85 @@ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_kootp_330:n
|
|
|
351
351
|
inset-block-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
352
352
|
inline-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
353
353
|
block-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
354
|
-
border-start-start-radius: var(--awsui-alert-focus-ring-border-radius-
|
|
355
|
-
border-start-end-radius: var(--awsui-alert-focus-ring-border-radius-
|
|
356
|
-
border-end-start-radius: var(--awsui-alert-focus-ring-border-radius-
|
|
357
|
-
border-end-end-radius: var(--awsui-alert-focus-ring-border-radius-
|
|
358
|
-
box-shadow: var(--awsui-alert-focus-ring-box-shadow-
|
|
354
|
+
border-start-start-radius: var(--awsui-alert-focus-ring-border-radius-vl73au, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
355
|
+
border-start-end-radius: var(--awsui-alert-focus-ring-border-radius-vl73au, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
356
|
+
border-end-start-radius: var(--awsui-alert-focus-ring-border-radius-vl73au, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
357
|
+
border-end-end-radius: var(--awsui-alert-focus-ring-border-radius-vl73au, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
358
|
+
box-shadow: var(--awsui-alert-focus-ring-box-shadow-vl73au);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
.
|
|
361
|
+
.awsui_text_mx3cw_14o2k_361:not(#\9) {
|
|
362
362
|
min-inline-size: 0;
|
|
363
363
|
padding-block: var(--border-width-button-jm0qg7, 2px);
|
|
364
364
|
padding-inline: 0;
|
|
365
365
|
margin-block: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
366
366
|
margin-inline: var(--space-xxs-hwfkai, 4px);
|
|
367
367
|
}
|
|
368
|
-
.
|
|
368
|
+
.awsui_text_mx3cw_14o2k_361.awsui_icon_mx3cw_14o2k_368:not(#\9) {
|
|
369
369
|
margin-inline-start: 0;
|
|
370
370
|
}
|
|
371
|
-
.
|
|
371
|
+
.awsui_text_mx3cw_14o2k_361.awsui_message_mx3cw_14o2k_371:not(#\9) {
|
|
372
372
|
margin-inline-end: var(--space-alert-message-right-mrjbnn, 4px);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
.awsui_action-
|
|
375
|
+
.awsui_action-wrapped_mx3cw_14o2k_375:not(#\9) {
|
|
376
376
|
margin-block-end: var(--space-xxs-hwfkai, 4px);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
.awsui_icon-size-
|
|
379
|
+
.awsui_icon-size-medium_mx3cw_14o2k_379 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_action-wrapped_mx3cw_14o2k_375:not(#\9) {
|
|
380
380
|
margin-inline-start: calc(var(--size-icon-medium-uv8xcz, 20px) + var(--space-xs-ymlm0b, 8px));
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
.awsui_icon-size-
|
|
383
|
+
.awsui_icon-size-big_mx3cw_14o2k_383 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_action-wrapped_mx3cw_14o2k_375:not(#\9) {
|
|
384
384
|
margin-inline-start: calc(var(--size-icon-big-7pq9l3, 32px) + var(--space-xs-ymlm0b, 8px));
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
.awsui_icon-size-
|
|
387
|
+
.awsui_icon-size-normal_mx3cw_14o2k_387 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_action-wrapped_mx3cw_14o2k_375:not(#\9) {
|
|
388
388
|
margin-inline-start: calc(var(--size-icon-normal-levt08, 16px) + var(--space-xs-ymlm0b, 8px));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
.
|
|
392
|
-
.awsui_content-
|
|
391
|
+
.awsui_content_mx3cw_14o2k_391:not(#\9),
|
|
392
|
+
.awsui_content-replacement_mx3cw_14o2k_392:not(#\9) {
|
|
393
393
|
/* used in test-utils */
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
.
|
|
396
|
+
.awsui_dismiss_mx3cw_14o2k_396:not(#\9) {
|
|
397
397
|
margin-inline-end: calc(-1 * var(--space-xxs-hwfkai, 4px));
|
|
398
398
|
margin-inline-start: var(--space-s-tvghoh, 12px);
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
.awsui_dismiss-
|
|
401
|
+
.awsui_dismiss-button_mx3cw_14o2k_401:not(#\9) {
|
|
402
402
|
/* used in test-utils */
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
.awsui_type-
|
|
405
|
+
.awsui_type-error_mx3cw_14o2k_405:not(#\9) {
|
|
406
406
|
border-color: var(--color-border-status-error-j8acpp, #db0000);
|
|
407
407
|
background-color: var(--color-background-status-error-mu3lcw, #fff5f5);
|
|
408
408
|
}
|
|
409
|
-
.awsui_type-
|
|
410
|
-
color: var(--color-text-status-error-ksqavh, #db0000);
|
|
409
|
+
.awsui_type-error_mx3cw_14o2k_405 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_alert-focus-wrapper_mx3cw_14o2k_330 > .awsui_icon_mx3cw_14o2k_368:not(#\9) {
|
|
410
|
+
color: var(--awsui-alert-icon-color-vl73au, var(--color-text-status-error-ksqavh, #db0000));
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
.awsui_type-
|
|
413
|
+
.awsui_type-warning_mx3cw_14o2k_413:not(#\9) {
|
|
414
414
|
border-color: var(--color-border-status-warning-j40pg7, #855900);
|
|
415
415
|
background-color: var(--color-background-status-warning-cv83up, #fffef0);
|
|
416
416
|
}
|
|
417
|
-
.awsui_type-
|
|
418
|
-
color: var(--color-text-status-warning-6meo06, #855900);
|
|
417
|
+
.awsui_type-warning_mx3cw_14o2k_413 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_alert-focus-wrapper_mx3cw_14o2k_330 > .awsui_icon_mx3cw_14o2k_368:not(#\9) {
|
|
418
|
+
color: var(--awsui-alert-icon-color-vl73au, var(--color-text-status-warning-6meo06, #855900));
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
-
.awsui_type-
|
|
421
|
+
.awsui_type-success_mx3cw_14o2k_421:not(#\9) {
|
|
422
422
|
border-color: var(--color-border-status-success-8z5f8u, #00802f);
|
|
423
423
|
background-color: var(--color-background-status-success-h6b8bh, #effff1);
|
|
424
424
|
}
|
|
425
|
-
.awsui_type-
|
|
426
|
-
color: var(--color-text-status-success-ybmii8, #00802f);
|
|
425
|
+
.awsui_type-success_mx3cw_14o2k_421 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_alert-focus-wrapper_mx3cw_14o2k_330 > .awsui_icon_mx3cw_14o2k_368:not(#\9) {
|
|
426
|
+
color: var(--awsui-alert-icon-color-vl73au, var(--color-text-status-success-ybmii8, #00802f));
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
.awsui_type-
|
|
429
|
+
.awsui_type-info_mx3cw_14o2k_429:not(#\9) {
|
|
430
430
|
border-color: var(--color-border-status-info-qf6jok, #006ce0);
|
|
431
431
|
background-color: var(--color-background-status-info-sfobba, #f0fbff);
|
|
432
432
|
}
|
|
433
|
-
.awsui_type-
|
|
434
|
-
color: var(--color-text-status-info-ue8bd2, #006ce0);
|
|
433
|
+
.awsui_type-info_mx3cw_14o2k_429 > .awsui_alert-wrapper_mx3cw_14o2k_299 > .awsui_alert-focus-wrapper_mx3cw_14o2k_330 > .awsui_icon_mx3cw_14o2k_368:not(#\9) {
|
|
434
|
+
color: var(--awsui-alert-icon-color-vl73au, var(--color-text-status-info-ue8bd2, #006ce0));
|
|
435
435
|
}
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"alert": "
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"hidden": "
|
|
9
|
-
"alert-wrapper": "awsui_alert-
|
|
10
|
-
"initial-hidden": "awsui_initial-
|
|
11
|
-
"header": "
|
|
12
|
-
"header-replacement": "awsui_header-
|
|
13
|
-
"action": "
|
|
14
|
-
"action-slot": "awsui_action-
|
|
15
|
-
"action-button": "awsui_action-
|
|
16
|
-
"alert-focus-wrapper": "awsui_alert-focus-
|
|
17
|
-
"text": "
|
|
18
|
-
"icon": "
|
|
19
|
-
"message": "
|
|
20
|
-
"action-wrapped": "awsui_action-
|
|
21
|
-
"icon-size-medium": "awsui_icon-size-
|
|
22
|
-
"icon-size-big": "awsui_icon-size-
|
|
23
|
-
"icon-size-normal": "awsui_icon-size-
|
|
24
|
-
"content": "
|
|
25
|
-
"content-replacement": "awsui_content-
|
|
26
|
-
"dismiss": "
|
|
27
|
-
"dismiss-button": "awsui_dismiss-
|
|
28
|
-
"type-error": "awsui_type-
|
|
29
|
-
"type-warning": "awsui_type-
|
|
30
|
-
"type-success": "awsui_type-
|
|
31
|
-
"type-info": "awsui_type-
|
|
5
|
+
"alert": "awsui_alert_mx3cw_14o2k_193",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_14o2k_1",
|
|
7
|
+
"root": "awsui_root_mx3cw_14o2k_215",
|
|
8
|
+
"hidden": "awsui_hidden_mx3cw_14o2k_250",
|
|
9
|
+
"alert-wrapper": "awsui_alert-wrapper_mx3cw_14o2k_299",
|
|
10
|
+
"initial-hidden": "awsui_initial-hidden_mx3cw_14o2k_311",
|
|
11
|
+
"header": "awsui_header_mx3cw_14o2k_316",
|
|
12
|
+
"header-replacement": "awsui_header-replacement_mx3cw_14o2k_317",
|
|
13
|
+
"action": "awsui_action_mx3cw_14o2k_321",
|
|
14
|
+
"action-slot": "awsui_action-slot_mx3cw_14o2k_325",
|
|
15
|
+
"action-button": "awsui_action-button_mx3cw_14o2k_326",
|
|
16
|
+
"alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_14o2k_330",
|
|
17
|
+
"text": "awsui_text_mx3cw_14o2k_361",
|
|
18
|
+
"icon": "awsui_icon_mx3cw_14o2k_368",
|
|
19
|
+
"message": "awsui_message_mx3cw_14o2k_371",
|
|
20
|
+
"action-wrapped": "awsui_action-wrapped_mx3cw_14o2k_375",
|
|
21
|
+
"icon-size-medium": "awsui_icon-size-medium_mx3cw_14o2k_379",
|
|
22
|
+
"icon-size-big": "awsui_icon-size-big_mx3cw_14o2k_383",
|
|
23
|
+
"icon-size-normal": "awsui_icon-size-normal_mx3cw_14o2k_387",
|
|
24
|
+
"content": "awsui_content_mx3cw_14o2k_391",
|
|
25
|
+
"content-replacement": "awsui_content-replacement_mx3cw_14o2k_392",
|
|
26
|
+
"dismiss": "awsui_dismiss_mx3cw_14o2k_396",
|
|
27
|
+
"dismiss-button": "awsui_dismiss-button_mx3cw_14o2k_401",
|
|
28
|
+
"type-error": "awsui_type-error_mx3cw_14o2k_405",
|
|
29
|
+
"type-warning": "awsui_type-warning_mx3cw_14o2k_413",
|
|
30
|
+
"type-success": "awsui_type-success_mx3cw_14o2k_421",
|
|
31
|
+
"type-info": "awsui_type-info_mx3cw_14o2k_429"
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
14
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
15
|
-
"annotation": "
|
|
16
|
-
"next-button": "awsui_next-
|
|
17
|
-
"previous-button": "awsui_previous-
|
|
18
|
-
"finish-button": "awsui_finish-
|
|
19
|
-
"header": "
|
|
20
|
-
"step-counter-content": "awsui_step-counter-
|
|
21
|
-
"content": "
|
|
22
|
-
"description": "
|
|
23
|
-
"actionBar": "
|
|
24
|
-
"stepCounter": "
|
|
25
|
-
"divider": "
|
|
26
|
-
"hotspot": "
|
|
27
|
-
"icon": "
|
|
4
|
+
"arrow": "awsui_arrow_1hpp3_1fiqc_193",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_1hpp3_1fiqc_197",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_1hpp3_1fiqc_197",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1fiqc_239",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1fiqc_239",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1fiqc_242",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1fiqc_242",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1fiqc_245",
|
|
12
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1fiqc_245",
|
|
13
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1fiqc_248",
|
|
14
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1fiqc_248",
|
|
15
|
+
"annotation": "awsui_annotation_1hpp3_1fiqc_252",
|
|
16
|
+
"next-button": "awsui_next-button_1hpp3_1fiqc_253",
|
|
17
|
+
"previous-button": "awsui_previous-button_1hpp3_1fiqc_254",
|
|
18
|
+
"finish-button": "awsui_finish-button_1hpp3_1fiqc_255",
|
|
19
|
+
"header": "awsui_header_1hpp3_1fiqc_256",
|
|
20
|
+
"step-counter-content": "awsui_step-counter-content_1hpp3_1fiqc_257",
|
|
21
|
+
"content": "awsui_content_1hpp3_1fiqc_258",
|
|
22
|
+
"description": "awsui_description_1hpp3_1fiqc_262",
|
|
23
|
+
"actionBar": "awsui_actionBar_1hpp3_1fiqc_267",
|
|
24
|
+
"stepCounter": "awsui_stepCounter_1hpp3_1fiqc_274",
|
|
25
|
+
"divider": "awsui_divider_1hpp3_1fiqc_278",
|
|
26
|
+
"hotspot": "awsui_hotspot_1hpp3_1fiqc_282",
|
|
27
|
+
"icon": "awsui_icon_1hpp3_1fiqc_352"
|
|
28
28
|
};
|
|
29
29
|
|