@cloudscape-design/components 3.0.1382 → 3.0.1384
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/app-layout/visual-refresh-toolbar/contexts.d.ts +5 -3
- package/app-layout/visual-refresh-toolbar/contexts.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/contexts.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts +4 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js +8 -5
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts +5 -0
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +3 -3
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +27 -3
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts +6 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts.map +1 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js +16 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js.map +1 -0
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +5 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -2
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +15 -14
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +35 -31
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +15 -14
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
- package/breadcrumb-group/implementation.d.ts.map +1 -1
- package/breadcrumb-group/implementation.js +30 -1
- package/breadcrumb-group/implementation.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +5 -0
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal-interfaces.d.ts +1 -1
- package/button-dropdown/internal-interfaces.d.ts.map +1 -1
- package/button-dropdown/internal-interfaces.js.map +1 -1
- package/button-dropdown/internal.js +2 -2
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/items-list.d.ts +1 -1
- package/button-dropdown/items-list.d.ts.map +1 -1
- package/button-dropdown/items-list.js +2 -2
- package/button-dropdown/items-list.js.map +1 -1
- package/button-dropdown/utils/move-highlight.d.ts +4 -2
- package/button-dropdown/utils/move-highlight.d.ts.map +1 -1
- package/button-dropdown/utils/move-highlight.js +13 -21
- package/button-dropdown/utils/move-highlight.js.map +1 -1
- package/button-dropdown/utils/use-button-dropdown.d.ts +1 -1
- package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
- package/button-dropdown/utils/use-button-dropdown.js +8 -6
- package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/button-dropdown/utils/use-highlighted-menu.d.ts +2 -2
- package/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
- package/button-dropdown/utils/use-highlighted-menu.js +14 -4
- package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
- package/button-dropdown/utils/utils.d.ts +1 -0
- package/button-dropdown/utils/utils.d.ts.map +1 -1
- package/button-dropdown/utils/utils.js +1 -0
- package/button-dropdown/utils/utils.js.map +1 -1
- package/calendar/interfaces.d.ts +2 -1
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/calendar/internal.d.ts.map +1 -1
- package/calendar/internal.js +3 -1
- package/calendar/internal.js.map +1 -1
- package/checkbox/internal.d.ts +6 -0
- package/checkbox/internal.d.ts.map +1 -1
- package/checkbox/internal.js +2 -2
- package/checkbox/internal.js.map +1 -1
- package/checkbox/styles.css.js +7 -3
- package/checkbox/styles.scoped.css +72 -16
- package/checkbox/styles.selectors.js +7 -3
- package/container/index.d.ts +3 -7
- package/container/index.d.ts.map +1 -1
- package/container/index.js +4 -3
- package/container/index.js.map +1 -1
- package/container/interfaces.d.ts +7 -0
- package/container/interfaces.d.ts.map +1 -1
- package/container/interfaces.js.map +1 -1
- package/container/internal.d.ts +3 -26
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +37 -8
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +34 -33
- package/container/styles.scoped.css +77 -56
- package/container/styles.selectors.js +34 -33
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +3 -1
- package/copy-to-clipboard/internal.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +3 -2
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +2 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/dialog/index.d.ts +3 -0
- package/dialog/index.d.ts.map +1 -0
- package/dialog/index.js +21 -0
- package/dialog/index.js.map +1 -0
- package/dialog/interfaces.d.ts +40 -0
- package/dialog/interfaces.d.ts.map +1 -0
- package/dialog/interfaces.js +2 -0
- package/dialog/interfaces.js.map +1 -0
- package/dialog/internal.d.ts +13 -0
- package/dialog/internal.d.ts.map +1 -0
- package/dialog/internal.js +39 -0
- package/dialog/internal.js.map +1 -0
- package/dialog/styles.css.js +13 -0
- package/dialog/styles.scoped.css +126 -0
- package/dialog/styles.selectors.js +14 -0
- package/dialog/test-classes/styles.css.js +11 -0
- package/dialog/test-classes/styles.scoped.css +12 -0
- package/dialog/test-classes/styles.selectors.js +12 -0
- package/dialog/use-focus-restore.d.ts +5 -0
- package/dialog/use-focus-restore.d.ts.map +1 -0
- package/dialog/use-focus-restore.js +34 -0
- package/dialog/use-focus-restore.js.map +1 -0
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +9 -2
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/styles.css.js +44 -43
- package/expandable-section/styles.scoped.css +92 -88
- package/expandable-section/styles.selectors.js +44 -43
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +160 -200
- package/flashbar/styles.selectors.js +50 -50
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +3 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/icon/generated/icons.d.ts +1 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +3 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon/internal.d.ts +3 -0
- package/icon/internal.d.ts.map +1 -1
- package/icon/internal.js +10 -2
- package/icon/internal.js.map +1 -1
- package/icon/styles.css.js +43 -42
- package/icon/styles.scoped.css +126 -98
- package/icon/styles.selectors.js +43 -42
- package/icon-provider/context.d.ts +3 -1
- package/icon-provider/context.d.ts.map +1 -1
- package/icon-provider/context.js +2 -0
- package/icon-provider/context.js.map +1 -1
- package/icon-provider/interfaces.d.ts +40 -2
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/icon-provider/internal.d.ts +2 -1
- package/icon-provider/internal.d.ts.map +1 -1
- package/icon-provider/internal.js +17 -3
- package/icon-provider/internal.js.map +1 -1
- package/icon-provider/use-component-icons.d.ts +3 -0
- package/icon-provider/use-component-icons.d.ts.map +1 -0
- package/icon-provider/use-component-icons.js +9 -0
- package/icon-provider/use-component-icons.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/base-theme/styles.scoped.css +27 -0
- package/internal/components/abstract-switch/index.d.ts +4 -0
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +5 -3
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/checkbox-icon/styles.css.js +9 -9
- package/internal/components/checkbox-icon/styles.scoped.css +18 -18
- package/internal/components/checkbox-icon/styles.selectors.js +9 -9
- package/internal/components/customizable-icon/index.d.ts +22 -0
- package/internal/components/customizable-icon/index.d.ts.map +1 -0
- package/internal/components/customizable-icon/index.js +12 -0
- package/internal/components/customizable-icon/index.js.map +1 -0
- package/internal/components/expand-toggle-button/index.d.ts +4 -0
- package/internal/components/expand-toggle-button/index.d.ts.map +1 -1
- package/internal/components/expand-toggle-button/index.js +6 -3
- package/internal/components/expand-toggle-button/index.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +14 -0
- package/internal/generated/styles/tokens.js +14 -0
- package/internal/generated/theming/index.cjs +222 -1
- package/internal/generated/theming/{index.cjs.d.ts → index.d.cts} +113 -13
- package/internal/generated/theming/index.d.ts +99 -0
- package/internal/generated/theming/index.js +222 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/widget/index.d.ts +5 -1
- package/internal/plugins/widget/index.d.ts.map +1 -1
- package/internal/plugins/widget/index.js +26 -1
- package/internal/plugins/widget/index.js.map +1 -1
- package/internal/plugins/widget/interfaces.d.ts +12 -2
- package/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/internal/plugins/widget/interfaces.js.map +1 -1
- package/internal/plugins/widget.d.ts +1 -1
- package/internal/plugins/widget.d.ts.map +1 -1
- package/internal/plugins/widget.js +1 -1
- package/internal/plugins/widget.js.map +1 -1
- package/internal/utils/locale/normalize-locale.js +8 -5
- package/internal/utils/locale/normalize-locale.js.map +1 -1
- package/manifest.json +2 -2
- package/package.json +4 -1
- package/plugins/index.d.ts +2 -1
- package/plugins/index.d.ts.map +1 -1
- package/plugins/index.js +2 -1
- package/plugins/index.js.map +1 -1
- package/split-panel/bottom.d.ts +2 -1
- package/split-panel/bottom.d.ts.map +1 -1
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/content-props.d.ts +16 -0
- package/split-panel/content-props.d.ts.map +1 -0
- package/split-panel/content-props.js +2 -0
- package/split-panel/content-props.js.map +1 -0
- package/split-panel/interfaces.d.ts +0 -13
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
- package/split-panel/side.d.ts +2 -1
- package/split-panel/side.d.ts.map +1 -1
- package/split-panel/side.js.map +1 -1
- package/table/body-cell/td-element.d.ts.map +1 -1
- package/table/body-cell/td-element.js +3 -1
- package/table/body-cell/td-element.js.map +1 -1
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +8 -2
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +38 -38
- package/table/header-cell/styles.scoped.css +80 -81
- package/table/header-cell/styles.selectors.js +38 -38
- package/table/internal.js +1 -1
- package/table/internal.js.map +1 -1
- package/table/sticky-columns/interfaces.d.ts +2 -0
- package/table/sticky-columns/interfaces.d.ts.map +1 -1
- package/table/sticky-columns/interfaces.js.map +1 -1
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
- package/table/sticky-columns/use-sticky-columns.js +11 -5
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/sticky-columns/utils.d.ts.map +1 -1
- package/table/sticky-columns/utils.js +2 -0
- package/table/sticky-columns/utils.js.map +1 -1
- package/table/utils.d.ts +1 -3
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +12 -5
- package/table/utils.js.map +1 -1
- package/test-utils/dom/dialog/index.d.ts +25 -0
- package/test-utils/dom/dialog/index.js +43 -0
- package/test-utils/dom/dialog/index.js.map +1 -0
- package/test-utils/dom/index.d.ts +28 -0
- package/test-utils/dom/index.js +21 -2
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/dialog/index.d.ts +25 -0
- package/test-utils/selectors/dialog/index.js +43 -0
- package/test-utils/selectors/dialog/index.js.map +1 -0
- package/test-utils/selectors/index.d.ts +18 -0
- package/test-utils/selectors/index.js +16 -2
- package/test-utils/selectors/index.js.map +1 -1
- package/tree-view/interfaces.d.ts +3 -0
- package/tree-view/interfaces.d.ts.map +1 -1
- package/tree-view/interfaces.js.map +1 -1
- package/tree-view/tree-item/index.d.ts.map +1 -1
- package/tree-view/tree-item/index.js +3 -1
- package/tree-view/tree-item/index.js.map +1 -1
package/icon/internal.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React, { useContext, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
6
|
+
import generatedIcons from '../icon/generated/icons';
|
|
6
7
|
import { InternalIconContext } from '../icon-provider/context';
|
|
7
8
|
import { getBaseProps } from '../internal/base-component';
|
|
8
9
|
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
@@ -31,7 +32,7 @@ function iconSizeMap(height, fontSize) {
|
|
|
31
32
|
return 'normal';
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
const InternalIcon = ({ name, size = 'normal', variant = 'normal', url, alt, ariaLabel, svg, badge, nativeAttributes, __internalRootRef, ...props }) => {
|
|
35
|
+
const InternalIcon = ({ name, override, size = 'normal', variant = 'normal', url, alt, ariaLabel, svg, badge, nativeAttributes, __internalRootRef, ...props }) => {
|
|
35
36
|
const icons = useContext(InternalIconContext);
|
|
36
37
|
const iconRef = useRef(null);
|
|
37
38
|
// To ensure a re-render is triggered on visual mode changes
|
|
@@ -84,7 +85,14 @@ const InternalIcon = ({ name, size = 'normal', variant = 'normal', url, alt, ari
|
|
|
84
85
|
return icon;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
let content = override !== null && override !== void 0 ? override : (validIcon ? iconMap(name) : undefined);
|
|
89
|
+
const isOverridden = override !== null && override !== void 0 ? override : (validIcon ? icons[name] !== generatedIcons[name] : false);
|
|
90
|
+
if (content !== undefined && isOverridden) {
|
|
91
|
+
// The boxless span provides text metrics so a nested `<Icon size="inherit" />` resolves to the
|
|
92
|
+
// wrapper's size, without affecting the wrapper's own placement.
|
|
93
|
+
content = React.createElement("span", { className: clsx(styles.icon, styles['custom-icon'], styles[`size-${iconSize}`]) }, content);
|
|
94
|
+
}
|
|
95
|
+
return (React.createElement(WithNativeAttributes, { ...baseProps, ...labelAttributes, tag: "span", componentName: "Icon", nativeAttributes: nativeAttributes, ref: mergedRef, style: inlineStyles }, content));
|
|
88
96
|
};
|
|
89
97
|
export default InternalIcon;
|
|
90
98
|
//# sourceMappingURL=internal.js.map
|
package/icon/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/icon/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,SAAS,WAAW,CAAC,MAAqB,EAAE,QAAwB;IAClE,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,2EAA2E;QAC3E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,oFAAoF;IACpF,gEAAgE;IAChE,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;QACjB,OAAO,OAAO,CAAC;IACjB,CAAC;SAAM,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;SAAM,IAAI,MAAM,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,IAAI,QAA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CAAC;YACJ,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,CACL,oBAAC,oBAAoB,OACf,SAAS,KACT,eAAe,EACnB,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,YAAY,IAElB,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CACjB,CACxB,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { InternalIconContext } from '../icon-provider/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport { IconProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n };\n\nfunction iconSizeMap(height: number | null, fontSize?: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n // Only display medium size icon when both line-height >= 24px AND font-size >= 20px\n // This prevents icons from becoming medium size inappropriately\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24 && !!fontSize && fontSize >= 20) {\n return 'medium';\n } else if (height <= 16) {\n return !!fontSize && fontSize <= 12 ? 'x-small' : 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n ariaLabel,\n svg,\n badge,\n nativeAttributes,\n __internalRootRef,\n ...props\n}: InternalIconProps) => {\n const icons = useContext(InternalIconContext);\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const [parentFontSize, setParentFontSize] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight, parentFontSize) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`],\n styles[`name-${name}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const computedStyle = getComputedStyle(iconRef.current);\n const { lineHeight, fontSize } = computedStyle;\n const newParentHeight = parseInt(lineHeight, 10);\n const newParentFontSize = parseInt(fontSize, 10);\n setParentHeight(newParentHeight);\n setParentFontSize(newParentFontSize);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n const hasAriaLabel = typeof ariaLabel === 'string';\n const labelAttributes = hasAriaLabel ? { role: 'img', 'aria-label': ariaLabel } : {};\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <WithNativeAttributes\n {...baseProps}\n {...labelAttributes}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n aria-hidden={!hasAriaLabel}\n style={inlineStyles}\n >\n {svg}\n </WithNativeAttributes>\n );\n }\n\n if (url) {\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n style={inlineStyles}\n >\n <img src={url} alt={ariaLabel ?? alt} />\n </WithNativeAttributes>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n function iconMap(name: IconProps.Name) {\n if (name === 'gen-ai' && (iconSize === 'small' || iconSize === 'x-small')) {\n return (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n aria-hidden=\"true\"\n data-testid=\"gen-ai-filled\"\n >\n <path\n d=\"m8 4.4 1.018 2.582L11.6 8 9.018 9.018 8 11.6 6.982 9.018 4.4 8l2.582-1.018L8 4.4ZM2.405 2.41l.002-.003.003-.002-.003-.002-.002-.003-.002.003-.003.002.003.002.002.003Z\"\n className=\"filled\"\n />\n </svg>\n );\n } else {\n const icon = icons[name];\n if (!icon) {\n warnOnce(\n 'Icon',\n `You have specified \\`name=\"${name}\"\\` but no icon with that name was found in the current IconProvider context. If this is a custom icon, ensure your app is wrapped in an \\`IconProvider\\` with the icon defined via \\`defineIcons\\`.`\n );\n }\n return icon;\n }\n }\n\n return (\n <WithNativeAttributes\n {...baseProps}\n {...labelAttributes}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n style={inlineStyles}\n >\n {validIcon ? iconMap(name) : undefined}\n </WithNativeAttributes>\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/icon/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE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AAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE,CAAC,CAAC,IAAG,OAAO,CAAQ,CAAC;IACpH,CAAC;IAED,OAAO,CACL,oBAAC,oBAAoB,OACf,SAAS,KACT,eAAe,EACnB,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,YAAY,IAElB,OAAO,CACa,CACxB,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport generatedIcons from '../icon/generated/icons';\nimport { InternalIconContext } from '../icon-provider/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport { IconProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n override?: React.ReactNode;\n };\n\nfunction iconSizeMap(height: number | null, fontSize?: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n // Only display medium size icon when both line-height >= 24px AND font-size >= 20px\n // This prevents icons from becoming medium size inappropriately\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24 && !!fontSize && fontSize >= 20) {\n return 'medium';\n } else if (height <= 16) {\n return !!fontSize && fontSize <= 12 ? 'x-small' : 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n override,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n ariaLabel,\n svg,\n badge,\n nativeAttributes,\n __internalRootRef,\n ...props\n}: InternalIconProps) => {\n const icons = useContext(InternalIconContext);\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const [parentFontSize, setParentFontSize] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight, parentFontSize) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`],\n styles[`name-${name}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const computedStyle = getComputedStyle(iconRef.current);\n const { lineHeight, fontSize } = computedStyle;\n const newParentHeight = parseInt(lineHeight, 10);\n const newParentFontSize = parseInt(fontSize, 10);\n setParentHeight(newParentHeight);\n setParentFontSize(newParentFontSize);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n const hasAriaLabel = typeof ariaLabel === 'string';\n const labelAttributes = hasAriaLabel ? { role: 'img', 'aria-label': ariaLabel } : {};\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <WithNativeAttributes\n {...baseProps}\n {...labelAttributes}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n aria-hidden={!hasAriaLabel}\n style={inlineStyles}\n >\n {svg}\n </WithNativeAttributes>\n );\n }\n\n if (url) {\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n style={inlineStyles}\n >\n <img src={url} alt={ariaLabel ?? alt} />\n </WithNativeAttributes>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n function iconMap(name: IconProps.Name) {\n if (name === 'gen-ai' && (iconSize === 'small' || iconSize === 'x-small')) {\n return (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n aria-hidden=\"true\"\n data-testid=\"gen-ai-filled\"\n >\n <path\n d=\"m8 4.4 1.018 2.582L11.6 8 9.018 9.018 8 11.6 6.982 9.018 4.4 8l2.582-1.018L8 4.4ZM2.405 2.41l.002-.003.003-.002-.003-.002-.002-.003-.002.003-.003.002.003.002.002.003Z\"\n className=\"filled\"\n />\n </svg>\n );\n } else {\n const icon = icons[name];\n if (!icon) {\n warnOnce(\n 'Icon',\n `You have specified \\`name=\"${name}\"\\` but no icon with that name was found in the current IconProvider context. If this is a custom icon, ensure your app is wrapped in an \\`IconProvider\\` with the icon defined via \\`defineIcons\\`.`\n );\n }\n return icon;\n }\n }\n\n let content = override ?? (validIcon ? iconMap(name) : undefined);\n const isOverridden = override ?? (validIcon ? icons[name] !== generatedIcons[name] : false);\n if (content !== undefined && isOverridden) {\n // The boxless span provides text metrics so a nested `<Icon size=\"inherit\" />` resolves to the\n // wrapper's size, without affecting the wrapper's own placement.\n content = <span className={clsx(styles.icon, styles['custom-icon'], styles[`size-${iconSize}`])}>{content}</span>;\n }\n\n return (\n <WithNativeAttributes\n {...baseProps}\n {...labelAttributes}\n tag=\"span\"\n componentName=\"Icon\"\n nativeAttributes={nativeAttributes}\n ref={mergedRef}\n style={inlineStyles}\n >\n {content}\n </WithNativeAttributes>\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
|
package/icon/styles.css.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"icon": "
|
|
5
|
-
"icon-flex-height": "awsui_icon-flex-
|
|
6
|
-
"size-x-small": "awsui_size-x-
|
|
7
|
-
"size-x-small-mapped-height": "awsui_size-x-small-mapped-
|
|
8
|
-
"size-small": "awsui_size-
|
|
9
|
-
"size-small-mapped-height": "awsui_size-small-mapped-
|
|
10
|
-
"size-normal": "awsui_size-
|
|
11
|
-
"size-normal-mapped-height": "awsui_size-normal-mapped-
|
|
12
|
-
"size-medium": "awsui_size-
|
|
13
|
-
"size-medium-mapped-height": "awsui_size-medium-mapped-
|
|
14
|
-
"size-big": "awsui_size-
|
|
15
|
-
"size-big-mapped-height": "awsui_size-big-mapped-
|
|
16
|
-
"size-large": "awsui_size-
|
|
17
|
-
"size-large-mapped-height": "awsui_size-large-mapped-
|
|
18
|
-
"variant-normal": "awsui_variant-
|
|
19
|
-
"variant-disabled": "awsui_variant-
|
|
20
|
-
"variant-inverted": "awsui_variant-
|
|
21
|
-
"variant-subtle": "awsui_variant-
|
|
22
|
-
"variant-warning": "awsui_variant-
|
|
23
|
-
"variant-error": "awsui_variant-
|
|
24
|
-
"variant-success": "awsui_variant-
|
|
25
|
-
"variant-link": "awsui_variant-
|
|
26
|
-
"variant-info": "awsui_variant-
|
|
27
|
-
"name-angle-left-double": "awsui_name-angle-left-
|
|
28
|
-
"name-angle-left": "awsui_name-angle-
|
|
29
|
-
"name-angle-right-double": "awsui_name-angle-right-
|
|
30
|
-
"name-angle-right": "awsui_name-angle-
|
|
31
|
-
"name-arrow-left": "awsui_name-arrow-
|
|
32
|
-
"name-arrow-right": "awsui_name-arrow-
|
|
33
|
-
"name-caret-left-filled": "awsui_name-caret-left-
|
|
34
|
-
"name-caret-right-filled": "awsui_name-caret-right-
|
|
35
|
-
"name-audio-full": "awsui_name-audio-
|
|
36
|
-
"name-audio-half": "awsui_name-audio-
|
|
37
|
-
"name-audio-off": "awsui_name-audio-
|
|
38
|
-
"name-external": "awsui_name-
|
|
39
|
-
"name-redo": "awsui_name-
|
|
40
|
-
"name-resize-area": "awsui_name-resize-
|
|
41
|
-
"name-send": "awsui_name-
|
|
42
|
-
"name-shrink": "awsui_name-
|
|
43
|
-
"name-undo": "awsui_name-
|
|
44
|
-
"name-view-vertical": "awsui_name-view-
|
|
45
|
-
"badge": "
|
|
4
|
+
"icon": "awsui_icon_h11ix_1ohfn_13",
|
|
5
|
+
"icon-flex-height": "awsui_icon-flex-height_h11ix_1ohfn_21",
|
|
6
|
+
"size-x-small": "awsui_size-x-small_h11ix_1ohfn_49",
|
|
7
|
+
"size-x-small-mapped-height": "awsui_size-x-small-mapped-height_h11ix_1ohfn_53",
|
|
8
|
+
"size-small": "awsui_size-small_h11ix_1ohfn_71",
|
|
9
|
+
"size-small-mapped-height": "awsui_size-small-mapped-height_h11ix_1ohfn_75",
|
|
10
|
+
"size-normal": "awsui_size-normal_h11ix_1ohfn_93",
|
|
11
|
+
"size-normal-mapped-height": "awsui_size-normal-mapped-height_h11ix_1ohfn_97",
|
|
12
|
+
"size-medium": "awsui_size-medium_h11ix_1ohfn_115",
|
|
13
|
+
"size-medium-mapped-height": "awsui_size-medium-mapped-height_h11ix_1ohfn_119",
|
|
14
|
+
"size-big": "awsui_size-big_h11ix_1ohfn_137",
|
|
15
|
+
"size-big-mapped-height": "awsui_size-big-mapped-height_h11ix_1ohfn_141",
|
|
16
|
+
"size-large": "awsui_size-large_h11ix_1ohfn_159",
|
|
17
|
+
"size-large-mapped-height": "awsui_size-large-mapped-height_h11ix_1ohfn_163",
|
|
18
|
+
"variant-normal": "awsui_variant-normal_h11ix_1ohfn_181",
|
|
19
|
+
"variant-disabled": "awsui_variant-disabled_h11ix_1ohfn_184",
|
|
20
|
+
"variant-inverted": "awsui_variant-inverted_h11ix_1ohfn_187",
|
|
21
|
+
"variant-subtle": "awsui_variant-subtle_h11ix_1ohfn_190",
|
|
22
|
+
"variant-warning": "awsui_variant-warning_h11ix_1ohfn_193",
|
|
23
|
+
"variant-error": "awsui_variant-error_h11ix_1ohfn_196",
|
|
24
|
+
"variant-success": "awsui_variant-success_h11ix_1ohfn_199",
|
|
25
|
+
"variant-link": "awsui_variant-link_h11ix_1ohfn_202",
|
|
26
|
+
"variant-info": "awsui_variant-info_h11ix_1ohfn_205",
|
|
27
|
+
"name-angle-left-double": "awsui_name-angle-left-double_h11ix_1ohfn_208",
|
|
28
|
+
"name-angle-left": "awsui_name-angle-left_h11ix_1ohfn_208",
|
|
29
|
+
"name-angle-right-double": "awsui_name-angle-right-double_h11ix_1ohfn_210",
|
|
30
|
+
"name-angle-right": "awsui_name-angle-right_h11ix_1ohfn_210",
|
|
31
|
+
"name-arrow-left": "awsui_name-arrow-left_h11ix_1ohfn_212",
|
|
32
|
+
"name-arrow-right": "awsui_name-arrow-right_h11ix_1ohfn_213",
|
|
33
|
+
"name-caret-left-filled": "awsui_name-caret-left-filled_h11ix_1ohfn_214",
|
|
34
|
+
"name-caret-right-filled": "awsui_name-caret-right-filled_h11ix_1ohfn_215",
|
|
35
|
+
"name-audio-full": "awsui_name-audio-full_h11ix_1ohfn_216",
|
|
36
|
+
"name-audio-half": "awsui_name-audio-half_h11ix_1ohfn_217",
|
|
37
|
+
"name-audio-off": "awsui_name-audio-off_h11ix_1ohfn_218",
|
|
38
|
+
"name-external": "awsui_name-external_h11ix_1ohfn_219",
|
|
39
|
+
"name-redo": "awsui_name-redo_h11ix_1ohfn_220",
|
|
40
|
+
"name-resize-area": "awsui_name-resize-area_h11ix_1ohfn_221",
|
|
41
|
+
"name-send": "awsui_name-send_h11ix_1ohfn_222",
|
|
42
|
+
"name-shrink": "awsui_name-shrink_h11ix_1ohfn_223",
|
|
43
|
+
"name-undo": "awsui_name-undo_h11ix_1ohfn_224",
|
|
44
|
+
"name-view-vertical": "awsui_name-view-vertical_h11ix_1ohfn_225",
|
|
45
|
+
"badge": "awsui_badge_h11ix_1ohfn_249",
|
|
46
|
+
"custom-icon": "awsui_custom-icon_h11ix_1ohfn_263"
|
|
46
47
|
};
|
|
47
48
|
|
package/icon/styles.scoped.css
CHANGED
|
@@ -10,7 +10,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
10
10
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
11
|
SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
*/
|
|
13
|
-
.
|
|
13
|
+
.awsui_icon_h11ix_1ohfn_13:not(#\9) {
|
|
14
14
|
position: relative;
|
|
15
15
|
display: inline-block;
|
|
16
16
|
vertical-align: top;
|
|
@@ -18,235 +18,235 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
18
18
|
/* stylelint-disable selector-max-type, selector-max-universal */
|
|
19
19
|
/* stylelint-enable selector-max-type, selector-max-universal */
|
|
20
20
|
}
|
|
21
|
-
.awsui_icon-flex-
|
|
21
|
+
.awsui_icon-flex-height_h11ix_1ohfn_21:not(#\9) {
|
|
22
22
|
display: inline-flex;
|
|
23
23
|
align-items: center;
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
.awsui_icon_h11ix_1ohfn_13 > svg:not(#\9) {
|
|
26
26
|
pointer-events: none;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.awsui_icon_h11ix_1ohfn_13 > svg:not(#\9) {
|
|
29
29
|
fill: none;
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.awsui_icon_h11ix_1ohfn_13 > svg *:not(#\9) {
|
|
32
32
|
stroke: currentColor;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.awsui_icon_h11ix_1ohfn_13 > svg .stroke-linejoin-round:not(#\9) {
|
|
35
35
|
stroke-linejoin: round;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.awsui_icon_h11ix_1ohfn_13 > svg .stroke-linecap-square:not(#\9) {
|
|
38
38
|
stroke-linecap: square;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.awsui_icon_h11ix_1ohfn_13 > svg .stroke-linecap-round:not(#\9) {
|
|
41
41
|
stroke-linecap: round;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.awsui_icon_h11ix_1ohfn_13 > svg .filled:not(#\9) {
|
|
44
44
|
fill: currentColor;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.awsui_icon_h11ix_1ohfn_13 > svg .no-stroke:not(#\9) {
|
|
47
47
|
stroke: none;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49:not(#\9) {
|
|
50
50
|
inline-size: 12px;
|
|
51
51
|
box-sizing: border-box;
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small-mapped-height_h11ix_1ohfn_53:not(#\9) {
|
|
54
54
|
block-size: var(--line-height-body-s-gako33, 16px);
|
|
55
55
|
padding-block: calc((var(--line-height-body-s-gako33, 16px) - 12px) / 2);
|
|
56
56
|
padding-inline: 0;
|
|
57
57
|
}
|
|
58
|
-
.
|
|
59
|
-
.
|
|
58
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49 > svg:not(#\9),
|
|
59
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49 > img:not(#\9) {
|
|
60
60
|
inline-size: 12px;
|
|
61
61
|
block-size: 12px;
|
|
62
62
|
vertical-align: top;
|
|
63
63
|
}
|
|
64
|
-
.
|
|
64
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49 > svg:not(#\9) {
|
|
65
65
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-x-small-3m5wt5, 1.5px) / 0.75);
|
|
66
66
|
}
|
|
67
|
-
.
|
|
68
|
-
.
|
|
67
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49 > svg:not(#\9),
|
|
68
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-x-small_h11ix_1ohfn_49 > svg *:not(#\9) {
|
|
69
69
|
stroke-width: calc(var(--border-width-icon-x-small-3m5wt5, 1.5px) / 0.75);
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71:not(#\9) {
|
|
72
72
|
inline-size: var(--size-icon-normal-311gry, 16px);
|
|
73
73
|
box-sizing: border-box;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small-mapped-height_h11ix_1ohfn_75:not(#\9) {
|
|
76
76
|
block-size: var(--line-height-body-s-gako33, 16px);
|
|
77
77
|
padding-block: calc((var(--line-height-body-s-gako33, 16px) - var(--size-icon-normal-311gry, 16px)) / 2);
|
|
78
78
|
padding-inline: 0;
|
|
79
79
|
}
|
|
80
|
-
.
|
|
81
|
-
.
|
|
80
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71 > svg:not(#\9),
|
|
81
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71 > img:not(#\9) {
|
|
82
82
|
inline-size: var(--size-icon-normal-311gry, 16px);
|
|
83
83
|
block-size: var(--size-icon-normal-311gry, 16px);
|
|
84
84
|
vertical-align: top;
|
|
85
85
|
}
|
|
86
|
-
.
|
|
86
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71 > svg:not(#\9) {
|
|
87
87
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-small-m3z2f5, 2px) / 1);
|
|
88
88
|
}
|
|
89
|
-
.
|
|
90
|
-
.
|
|
89
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71 > svg:not(#\9),
|
|
90
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-small_h11ix_1ohfn_71 > svg *:not(#\9) {
|
|
91
91
|
stroke-width: calc(var(--border-width-icon-small-m3z2f5, 2px) / 1);
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93:not(#\9) {
|
|
94
94
|
inline-size: var(--size-icon-normal-311gry, 16px);
|
|
95
95
|
box-sizing: border-box;
|
|
96
96
|
}
|
|
97
|
-
.
|
|
97
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal-mapped-height_h11ix_1ohfn_97:not(#\9) {
|
|
98
98
|
block-size: var(--line-height-body-m-5xw6xo, 20px);
|
|
99
99
|
padding-block: calc((var(--line-height-body-m-5xw6xo, 20px) - var(--size-icon-normal-311gry, 16px)) / 2);
|
|
100
100
|
padding-inline: 0;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
103
|
-
.
|
|
102
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93 > svg:not(#\9),
|
|
103
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93 > img:not(#\9) {
|
|
104
104
|
inline-size: var(--size-icon-normal-311gry, 16px);
|
|
105
105
|
block-size: var(--size-icon-normal-311gry, 16px);
|
|
106
106
|
vertical-align: top;
|
|
107
107
|
}
|
|
108
|
-
.
|
|
108
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93 > svg:not(#\9) {
|
|
109
109
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-normal-swx9va, 2px) / 1);
|
|
110
110
|
}
|
|
111
|
-
.
|
|
112
|
-
.
|
|
111
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93 > svg:not(#\9),
|
|
112
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-normal_h11ix_1ohfn_93 > svg *:not(#\9) {
|
|
113
113
|
stroke-width: calc(var(--border-width-icon-normal-swx9va, 2px) / 1);
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115:not(#\9) {
|
|
116
116
|
inline-size: var(--size-icon-medium-0cbske, 20px);
|
|
117
117
|
box-sizing: border-box;
|
|
118
118
|
}
|
|
119
|
-
.
|
|
119
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium-mapped-height_h11ix_1ohfn_119:not(#\9) {
|
|
120
120
|
block-size: var(--line-height-heading-l-zmt48b, 24px);
|
|
121
121
|
padding-block: calc((var(--line-height-heading-l-zmt48b, 24px) - var(--size-icon-medium-0cbske, 20px)) / 2);
|
|
122
122
|
padding-inline: 0;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
125
|
-
.
|
|
124
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115 > svg:not(#\9),
|
|
125
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115 > img:not(#\9) {
|
|
126
126
|
inline-size: var(--size-icon-medium-0cbske, 20px);
|
|
127
127
|
block-size: var(--size-icon-medium-0cbske, 20px);
|
|
128
128
|
vertical-align: top;
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115 > svg:not(#\9) {
|
|
131
131
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-medium-4yajvt, 2px) / 1.25);
|
|
132
132
|
}
|
|
133
|
-
.
|
|
134
|
-
.
|
|
133
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115 > svg:not(#\9),
|
|
134
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-medium_h11ix_1ohfn_115 > svg *:not(#\9) {
|
|
135
135
|
stroke-width: calc(var(--border-width-icon-medium-4yajvt, 2px) / 1.25);
|
|
136
136
|
}
|
|
137
|
-
.
|
|
137
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137:not(#\9) {
|
|
138
138
|
inline-size: var(--size-icon-big-z6z1yl, 32px);
|
|
139
139
|
box-sizing: border-box;
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big-mapped-height_h11ix_1ohfn_141:not(#\9) {
|
|
142
142
|
block-size: var(--line-height-heading-xl-pi61pg, 30px);
|
|
143
143
|
padding-block: calc((var(--line-height-heading-xl-pi61pg, 30px) - var(--size-icon-big-z6z1yl, 32px)) / 2);
|
|
144
144
|
padding-inline: 0;
|
|
145
145
|
}
|
|
146
|
-
.
|
|
147
|
-
.
|
|
146
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137 > svg:not(#\9),
|
|
147
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137 > img:not(#\9) {
|
|
148
148
|
inline-size: var(--size-icon-big-z6z1yl, 32px);
|
|
149
149
|
block-size: var(--size-icon-big-z6z1yl, 32px);
|
|
150
150
|
vertical-align: top;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
152
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137 > svg:not(#\9) {
|
|
153
153
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-big-telu48, 3px) / 2);
|
|
154
154
|
}
|
|
155
|
-
.
|
|
156
|
-
.
|
|
155
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137 > svg:not(#\9),
|
|
156
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-big_h11ix_1ohfn_137 > svg *:not(#\9) {
|
|
157
157
|
stroke-width: calc(var(--border-width-icon-big-telu48, 3px) / 2);
|
|
158
158
|
}
|
|
159
|
-
.
|
|
159
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159:not(#\9) {
|
|
160
160
|
inline-size: var(--size-icon-large-uba15s, 48px);
|
|
161
161
|
box-sizing: border-box;
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large-mapped-height_h11ix_1ohfn_163:not(#\9) {
|
|
164
164
|
block-size: var(--line-height-display-l-tjudur, 48px);
|
|
165
165
|
padding-block: calc((var(--line-height-display-l-tjudur, 48px) - var(--size-icon-large-uba15s, 48px)) / 2);
|
|
166
166
|
padding-inline: 0;
|
|
167
167
|
}
|
|
168
|
-
.
|
|
169
|
-
.
|
|
168
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159 > svg:not(#\9),
|
|
169
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159 > img:not(#\9) {
|
|
170
170
|
inline-size: var(--size-icon-large-uba15s, 48px);
|
|
171
171
|
block-size: var(--size-icon-large-uba15s, 48px);
|
|
172
172
|
vertical-align: top;
|
|
173
173
|
}
|
|
174
|
-
.
|
|
174
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159 > svg:not(#\9) {
|
|
175
175
|
--awsui-internal-style-icon-stroke-width: calc(var(--border-width-icon-large-cvs2dx, 4px) / 3);
|
|
176
176
|
}
|
|
177
|
-
.
|
|
178
|
-
.
|
|
177
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159 > svg:not(#\9),
|
|
178
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_size-large_h11ix_1ohfn_159 > svg *:not(#\9) {
|
|
179
179
|
stroke-width: calc(var(--border-width-icon-large-cvs2dx, 4px) / 3);
|
|
180
180
|
}
|
|
181
|
-
.
|
|
181
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-normal_h11ix_1ohfn_181:not(#\9) {
|
|
182
182
|
color: currentColor;
|
|
183
183
|
}
|
|
184
|
-
.
|
|
184
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-disabled_h11ix_1ohfn_184:not(#\9) {
|
|
185
185
|
color: var(--color-text-interactive-disabled-tuxgxq, #b4b4bb);
|
|
186
186
|
}
|
|
187
|
-
.
|
|
187
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-inverted_h11ix_1ohfn_187:not(#\9) {
|
|
188
188
|
color: var(--color-text-inverted-fflnsl, #ffffff);
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-subtle_h11ix_1ohfn_190:not(#\9) {
|
|
191
191
|
color: var(--color-text-icon-subtle-83jiby, #656871);
|
|
192
192
|
}
|
|
193
|
-
.
|
|
193
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-warning_h11ix_1ohfn_193:not(#\9) {
|
|
194
194
|
color: var(--color-text-status-warning-fabq6h, #855900);
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-error_h11ix_1ohfn_196:not(#\9) {
|
|
197
197
|
color: var(--color-text-status-error-ri38gt, #db0000);
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-success_h11ix_1ohfn_199:not(#\9) {
|
|
200
200
|
color: var(--color-text-status-success-1i2jf8, #00802f);
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-link_h11ix_1ohfn_202:not(#\9) {
|
|
203
203
|
color: var(--color-text-link-default-qabnuk, #006ce0);
|
|
204
204
|
}
|
|
205
|
-
.
|
|
205
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_variant-info_h11ix_1ohfn_205:not(#\9) {
|
|
206
206
|
color: var(--color-text-status-info-su6k9n, #006ce0);
|
|
207
207
|
}
|
|
208
|
-
.
|
|
209
|
-
.awsui_name-angle-
|
|
210
|
-
.awsui_name-angle-right-
|
|
211
|
-
.awsui_name-angle-
|
|
212
|
-
.awsui_name-arrow-
|
|
213
|
-
.awsui_name-arrow-
|
|
214
|
-
.awsui_name-caret-left-
|
|
215
|
-
.awsui_name-caret-right-
|
|
216
|
-
.awsui_name-audio-
|
|
217
|
-
.awsui_name-audio-
|
|
218
|
-
.awsui_name-audio-
|
|
219
|
-
.awsui_name-
|
|
220
|
-
.awsui_name-
|
|
221
|
-
.awsui_name-resize-
|
|
222
|
-
.awsui_name-
|
|
223
|
-
.awsui_name-
|
|
224
|
-
.awsui_name-
|
|
225
|
-
.awsui_name-view-
|
|
208
|
+
.awsui_icon_h11ix_1ohfn_13:not(#\9):is(.awsui_name-angle-left-double_h11ix_1ohfn_208,
|
|
209
|
+
.awsui_name-angle-left_h11ix_1ohfn_208,
|
|
210
|
+
.awsui_name-angle-right-double_h11ix_1ohfn_210,
|
|
211
|
+
.awsui_name-angle-right_h11ix_1ohfn_210,
|
|
212
|
+
.awsui_name-arrow-left_h11ix_1ohfn_212,
|
|
213
|
+
.awsui_name-arrow-right_h11ix_1ohfn_213,
|
|
214
|
+
.awsui_name-caret-left-filled_h11ix_1ohfn_214,
|
|
215
|
+
.awsui_name-caret-right-filled_h11ix_1ohfn_215,
|
|
216
|
+
.awsui_name-audio-full_h11ix_1ohfn_216,
|
|
217
|
+
.awsui_name-audio-half_h11ix_1ohfn_217,
|
|
218
|
+
.awsui_name-audio-off_h11ix_1ohfn_218,
|
|
219
|
+
.awsui_name-external_h11ix_1ohfn_219,
|
|
220
|
+
.awsui_name-redo_h11ix_1ohfn_220,
|
|
221
|
+
.awsui_name-resize-area_h11ix_1ohfn_221,
|
|
222
|
+
.awsui_name-send_h11ix_1ohfn_222,
|
|
223
|
+
.awsui_name-shrink_h11ix_1ohfn_223,
|
|
224
|
+
.awsui_name-undo_h11ix_1ohfn_224,
|
|
225
|
+
.awsui_name-view-vertical_h11ix_1ohfn_225) {
|
|
226
226
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
227
227
|
}
|
|
228
|
-
.
|
|
229
|
-
.awsui_name-angle-
|
|
230
|
-
.awsui_name-angle-right-
|
|
231
|
-
.awsui_name-angle-
|
|
232
|
-
.awsui_name-arrow-
|
|
233
|
-
.awsui_name-arrow-
|
|
234
|
-
.awsui_name-caret-left-
|
|
235
|
-
.awsui_name-caret-right-
|
|
236
|
-
.awsui_name-audio-
|
|
237
|
-
.awsui_name-audio-
|
|
238
|
-
.awsui_name-audio-
|
|
239
|
-
.awsui_name-
|
|
240
|
-
.awsui_name-
|
|
241
|
-
.awsui_name-resize-
|
|
242
|
-
.awsui_name-
|
|
243
|
-
.awsui_name-
|
|
244
|
-
.awsui_name-
|
|
245
|
-
.awsui_name-view-
|
|
228
|
+
.awsui_icon_h11ix_1ohfn_13:not(#\9):is(.awsui_name-angle-left-double_h11ix_1ohfn_208,
|
|
229
|
+
.awsui_name-angle-left_h11ix_1ohfn_208,
|
|
230
|
+
.awsui_name-angle-right-double_h11ix_1ohfn_210,
|
|
231
|
+
.awsui_name-angle-right_h11ix_1ohfn_210,
|
|
232
|
+
.awsui_name-arrow-left_h11ix_1ohfn_212,
|
|
233
|
+
.awsui_name-arrow-right_h11ix_1ohfn_213,
|
|
234
|
+
.awsui_name-caret-left-filled_h11ix_1ohfn_214,
|
|
235
|
+
.awsui_name-caret-right-filled_h11ix_1ohfn_215,
|
|
236
|
+
.awsui_name-audio-full_h11ix_1ohfn_216,
|
|
237
|
+
.awsui_name-audio-half_h11ix_1ohfn_217,
|
|
238
|
+
.awsui_name-audio-off_h11ix_1ohfn_218,
|
|
239
|
+
.awsui_name-external_h11ix_1ohfn_219,
|
|
240
|
+
.awsui_name-redo_h11ix_1ohfn_220,
|
|
241
|
+
.awsui_name-resize-area_h11ix_1ohfn_221,
|
|
242
|
+
.awsui_name-send_h11ix_1ohfn_222,
|
|
243
|
+
.awsui_name-shrink_h11ix_1ohfn_223,
|
|
244
|
+
.awsui_name-undo_h11ix_1ohfn_224,
|
|
245
|
+
.awsui_name-view-vertical_h11ix_1ohfn_225):dir(rtl) {
|
|
246
246
|
transform: scaleX(-1);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
.
|
|
249
|
+
.awsui_badge_h11ix_1ohfn_249:not(#\9)::after {
|
|
250
250
|
content: "";
|
|
251
251
|
position: absolute;
|
|
252
252
|
inline-size: 6px;
|
|
@@ -258,4 +258,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
258
258
|
background-color: var(--color-background-badge-icon-7pcuv1, #db0000);
|
|
259
259
|
inset-block-start: 0px;
|
|
260
260
|
inset-inline-end: -3px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263:not(#\9) {
|
|
264
|
+
display: contents;
|
|
265
|
+
}
|
|
266
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-x-small_h11ix_1ohfn_49:not(#\9) {
|
|
267
|
+
font-size: var(--font-size-body-s-89y7qg, 12px);
|
|
268
|
+
line-height: 12px;
|
|
269
|
+
}
|
|
270
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-small_h11ix_1ohfn_71:not(#\9) {
|
|
271
|
+
font-size: var(--font-size-body-m-tq5a14, 14px);
|
|
272
|
+
line-height: var(--size-icon-normal-311gry, 16px);
|
|
273
|
+
}
|
|
274
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-normal_h11ix_1ohfn_93:not(#\9) {
|
|
275
|
+
font-size: var(--font-size-body-m-tq5a14, 14px);
|
|
276
|
+
line-height: var(--size-icon-normal-311gry, 16px);
|
|
277
|
+
}
|
|
278
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-medium_h11ix_1ohfn_115:not(#\9) {
|
|
279
|
+
font-size: var(--font-size-heading-l-cax9xk, 20px);
|
|
280
|
+
line-height: var(--size-icon-medium-0cbske, 20px);
|
|
281
|
+
}
|
|
282
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-big_h11ix_1ohfn_137:not(#\9) {
|
|
283
|
+
font-size: var(--font-size-heading-xl-0tgqx0, 24px);
|
|
284
|
+
line-height: var(--size-icon-big-z6z1yl, 32px);
|
|
285
|
+
}
|
|
286
|
+
.awsui_icon_h11ix_1ohfn_13.awsui_custom-icon_h11ix_1ohfn_263.awsui_size-large_h11ix_1ohfn_159:not(#\9) {
|
|
287
|
+
font-size: var(--font-size-display-l-pdduqq, 42px);
|
|
288
|
+
line-height: var(--size-icon-large-uba15s, 48px);
|
|
261
289
|
}
|