@cloudscape-design/components 3.0.1307 → 3.0.1309
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/drawer/global-ai-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +4 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +4 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +3 -2
- package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +1 -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/state/use-app-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +12 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +29 -16
- package/badge/styles.selectors.js +10 -10
- package/collection-preferences/content-display/content-display-option.js +1 -1
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts +3 -7
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +63 -27
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/utils.d.ts +41 -2
- package/collection-preferences/content-display/utils.d.ts.map +1 -1
- package/collection-preferences/content-display/utils.js +107 -13
- package/collection-preferences/content-display/utils.js.map +1 -1
- package/collection-preferences/index.d.ts.map +1 -1
- package/collection-preferences/index.js +2 -2
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/interfaces.d.ts +30 -2
- package/collection-preferences/interfaces.d.ts.map +1 -1
- package/collection-preferences/interfaces.js.map +1 -1
- package/collection-preferences/styles.css.js +38 -36
- package/collection-preferences/styles.scoped.css +81 -37
- package/collection-preferences/styles.selectors.js +38 -36
- package/collection-preferences/utils.d.ts +1 -0
- package/collection-preferences/utils.d.ts.map +1 -1
- package/collection-preferences/utils.js +14 -0
- package/collection-preferences/utils.js.map +1 -1
- package/expandable-section/styles.css.js +35 -35
- package/expandable-section/styles.scoped.css +68 -68
- package/expandable-section/styles.selectors.js +35 -35
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages-types.d.ts +4 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/icon/internal.js +2 -2
- package/icon/internal.js.map +1 -1
- package/icon/styles.css.js +41 -39
- package/icon/styles.scoped.css +104 -85
- package/icon/styles.selectors.js +41 -39
- package/internal/base-component/styles.scoped.css +35 -3
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +23 -1
- package/internal/generated/styles/tokens.js +23 -1
- package/internal/generated/theming/index.cjs +476 -4
- package/internal/generated/theming/index.cjs.d.ts +216 -0
- package/internal/generated/theming/index.d.ts +216 -0
- package/internal/generated/theming/index.js +476 -4
- package/internal/hooks/use-width-change/index.d.ts +12 -0
- package/internal/hooks/use-width-change/index.d.ts.map +1 -0
- package/internal/hooks/use-width-change/index.js +33 -0
- package/internal/hooks/use-width-change/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +4 -1
- package/pagination/internal.js.map +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +9 -2
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/tokens/use-token-mode.d.ts.map +1 -1
- package/prompt-input/tokens/use-token-mode.js +0 -9
- package/prompt-input/tokens/use-token-mode.js.map +1 -1
- package/table/column-groups/col-group.d.ts +12 -0
- package/table/column-groups/col-group.d.ts.map +1 -0
- package/table/column-groups/col-group.js +24 -0
- package/table/column-groups/col-group.js.map +1 -0
- package/table/column-groups/split-utils.d.ts +31 -0
- package/table/column-groups/split-utils.d.ts.map +1 -0
- package/table/column-groups/split-utils.js +43 -0
- package/table/column-groups/split-utils.js.map +1 -0
- package/table/column-groups/use-column-groups.d.ts +7 -0
- package/table/column-groups/use-column-groups.d.ts.map +1 -0
- package/table/column-groups/use-column-groups.js +23 -0
- package/table/column-groups/use-column-groups.js.map +1 -0
- package/table/column-groups/utils.d.ts +54 -0
- package/table/column-groups/utils.d.ts.map +1 -0
- package/table/column-groups/utils.js +204 -0
- package/table/column-groups/utils.js.map +1 -0
- package/table/header-cell/common-props.d.ts +23 -0
- package/table/header-cell/common-props.d.ts.map +1 -0
- package/table/header-cell/common-props.js +4 -0
- package/table/header-cell/common-props.js.map +1 -0
- package/table/header-cell/group-header-cell.d.ts +45 -0
- package/table/header-cell/group-header-cell.d.ts.map +1 -0
- package/table/header-cell/group-header-cell.js +44 -0
- package/table/header-cell/group-header-cell.js.map +1 -0
- package/table/header-cell/index.d.ts +12 -22
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +3 -3
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/styles.css.js +33 -30
- package/table/header-cell/styles.scoped.css +92 -68
- package/table/header-cell/styles.selectors.js +33 -30
- package/table/header-cell/th-element.d.ts +16 -0
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js +6 -4
- package/table/header-cell/th-element.js.map +1 -1
- package/table/index.d.ts.map +1 -1
- package/table/index.js +5 -2
- package/table/index.js.map +1 -1
- package/table/interfaces.d.ts +37 -1
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +17 -5
- package/table/internal.js.map +1 -1
- package/table/resizer/index.d.ts +9 -2
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +5 -5
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/styles.css.js +16 -13
- package/table/resizer/styles.scoped.css +36 -26
- package/table/resizer/styles.selectors.js +16 -13
- package/table/sticky-header.d.ts +3 -0
- package/table/sticky-header.d.ts.map +1 -1
- package/table/sticky-header.js +7 -2
- package/table/sticky-header.js.map +1 -1
- package/table/sticky-scrolling.d.ts.map +1 -1
- package/table/sticky-scrolling.js +6 -1
- package/table/sticky-scrolling.js.map +1 -1
- package/table/styles.css.js +35 -34
- package/table/styles.scoped.css +47 -41
- package/table/styles.selectors.js +35 -34
- package/table/table-role/grid-navigation.d.ts.map +1 -1
- package/table/table-role/grid-navigation.js +5 -7
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/table-role/table-role-helper.d.ts +3 -0
- package/table/table-role/table-role-helper.d.ts.map +1 -1
- package/table/table-role/table-role-helper.js +9 -4
- package/table/table-role/table-role-helper.js.map +1 -1
- package/table/table-role/utils.d.ts +19 -0
- package/table/table-role/utils.d.ts.map +1 -1
- package/table/table-role/utils.js +86 -7
- package/table/table-role/utils.js.map +1 -1
- package/table/thead.d.ts +5 -0
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +145 -18
- package/table/thead.js.map +1 -1
- package/table/use-column-widths.d.ts +4 -0
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +68 -18
- package/table/use-column-widths.js.map +1 -1
- package/table/use-sticky-header.d.ts.map +1 -1
- package/table/use-sticky-header.js +4 -1
- package/table/use-sticky-header.js.map +1 -1
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +14 -4
- package/table/utils.js.map +1 -1
- package/test-utils/dom/collection-preferences/content-display-preference.d.ts +28 -2
- package/test-utils/dom/collection-preferences/content-display-preference.js +60 -2
- package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -1
- package/test-utils/dom/table/index.d.ts +18 -1
- package/test-utils/dom/table/index.js +22 -3
- package/test-utils/dom/table/index.js.map +1 -1
- package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +28 -2
- package/test-utils/selectors/collection-preferences/content-display-preference.js +52 -2
- package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -1
- package/test-utils/selectors/table/index.d.ts +18 -1
- package/test-utils/selectors/table/index.js +22 -3
- package/test-utils/selectors/table/index.js.map +1 -1
- package/wizard/wizard-step-list.js +4 -4
- package/wizard/wizard-step-list.js.map +1 -1
package/icon/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/icon/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 { BuiltInIconName, IconRegistryIconName } from '../icon-provider/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface IconProps extends BaseComponentProps {\n /**\n * Specifies the icon to be displayed.\n */\n name?: IconProps.Name;\n\n /**\n * Specifies the size of the icon.\n *\n * If you set size to `inherit`, an icon size will be assigned based on the icon's inherited line height.\n * For icons used alongside text, ensure the icon is placed inside the acompanying text tag.\n * The icon will be vertically centered based on the height.\n *\n * @visualrefresh `medium` size\n */\n size?: IconProps.Size;\n\n /**\n * Specifies the color variant of the icon. The `normal` variant picks up the current color of its context.\n */\n variant?: IconProps.Variant;\n\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available, and your custom icon cannot be an SVG.\n * For SVG icons, use the `svg` slot instead.\n *\n * If you set both `url` and `svg`, `svg` will take precedence.\n */\n url?: string;\n\n /**\n * Specifies alternate text for a custom icon (using the `url` attribute).\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `svg` slot.\n *\n * @deprecated Use `ariaLabel` instead.\n */\n alt?: string;\n\n /**\n * Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n */\n ariaLabel?: string;\n\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if the icon you want isn't available, and you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span` and ensure icon `size` is not set to `inherit`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `url` and `svg`, `svg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n svg?: React.ReactNode;\n\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;\n}\n\nexport namespace IconProps {\n export type Name = BuiltInIconName | IconRegistryIconName;\n\n export type Variant = 'normal' | 'disabled' | 'error' | 'inverted' | 'link' | 'subtle' | 'success' | 'warning';\n\n export type Size = 'small' | 'normal' | 'medium' | 'big' | 'large' | 'inherit';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/icon/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 { BuiltInIconName, IconRegistryIconName } from '../icon-provider/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface IconProps extends BaseComponentProps {\n /**\n * Specifies the icon to be displayed.\n */\n name?: IconProps.Name;\n\n /**\n * Specifies the size of the icon.\n *\n * If you set size to `inherit`, an icon size will be assigned based on the icon's inherited line height.\n * For icons used alongside text, ensure the icon is placed inside the acompanying text tag.\n * The icon will be vertically centered based on the height.\n *\n * @visualrefresh `medium` size\n */\n size?: IconProps.Size;\n\n /**\n * Specifies the color variant of the icon. The `normal` variant picks up the current color of its context.\n */\n variant?: IconProps.Variant;\n\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available, and your custom icon cannot be an SVG.\n * For SVG icons, use the `svg` slot instead.\n *\n * If you set both `url` and `svg`, `svg` will take precedence.\n */\n url?: string;\n\n /**\n * Specifies alternate text for a custom icon (using the `url` attribute).\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `svg` slot.\n *\n * @deprecated Use `ariaLabel` instead.\n */\n alt?: string;\n\n /**\n * Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n */\n ariaLabel?: string;\n\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if the icon you want isn't available, and you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span` and ensure icon `size` is not set to `inherit`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `url` and `svg`, `svg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n svg?: React.ReactNode;\n\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;\n}\n\nexport namespace IconProps {\n export type Name = BuiltInIconName | IconRegistryIconName;\n\n export type Variant = 'normal' | 'disabled' | 'error' | 'inverted' | 'link' | 'subtle' | 'success' | 'warning';\n\n export type Size = 'x-small' | 'small' | 'normal' | 'medium' | 'big' | 'large' | 'inherit';\n}\n"]}
|
package/icon/internal.js
CHANGED
|
@@ -25,7 +25,7 @@ function iconSizeMap(height, fontSize) {
|
|
|
25
25
|
return 'medium';
|
|
26
26
|
}
|
|
27
27
|
else if (height <= 16) {
|
|
28
|
-
return 'small';
|
|
28
|
+
return !!fontSize && fontSize <= 12 ? 'x-small' : 'small';
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
return 'normal';
|
|
@@ -72,7 +72,7 @@ const InternalIcon = ({ name, size = 'normal', variant = 'normal', url, alt, ari
|
|
|
72
72
|
}
|
|
73
73
|
const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);
|
|
74
74
|
function iconMap(name) {
|
|
75
|
-
if (name === 'gen-ai' && iconSize === 'small') {
|
|
75
|
+
if (name === 'gen-ai' && (iconSize === 'small' || iconSize === 'x-small')) {
|
|
76
76
|
return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true", "data-testid": "gen-ai-filled" },
|
|
77
77
|
React.createElement("path", { 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", className: "filled" })));
|
|
78
78
|
}
|
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;QAC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AAQ,CACN,MAAM,EACN,8BAA8B,IAAI,sMAAsM,CACzO,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 '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') {\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,E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AS,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,SAAS,OAAO,CAAC,IAAoB;QACnC,IAAI,IAAI,KAAK,QAAQ,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,SAAS,CAAC,EAAE,CAAC;YAC1E,OAAO,CACL,6BACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,iBACL,MAAM,iBACN,eAAe;gBAE3B,8BACE,CAAC,EAAC,wKAAwK,EAC1K,SAAS,EAAC,QAAQ,GAClB,CACE,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,QAAQ,CACN,MAAM,EACN,8BAA8B,IAAI,sMAAsM,CACzO,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"]}
|
package/icon/styles.css.js
CHANGED
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"icon": "
|
|
5
|
-
"icon-flex-height": "awsui_icon-flex-
|
|
6
|
-
"size-small": "awsui_size-
|
|
7
|
-
"size-small-mapped-height": "awsui_size-small-mapped-
|
|
8
|
-
"size-
|
|
9
|
-
"size-
|
|
10
|
-
"size-
|
|
11
|
-
"size-
|
|
12
|
-
"size-
|
|
13
|
-
"size-
|
|
14
|
-
"size-
|
|
15
|
-
"size-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"variant-
|
|
19
|
-
"variant-
|
|
20
|
-
"variant-
|
|
21
|
-
"variant-
|
|
22
|
-
"variant-
|
|
23
|
-
"variant-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"name-angle-
|
|
27
|
-
"name-angle-
|
|
28
|
-
"name-
|
|
29
|
-
"name-
|
|
30
|
-
"name-
|
|
31
|
-
"name-
|
|
32
|
-
"name-
|
|
33
|
-
"name-
|
|
34
|
-
"name-audio-
|
|
35
|
-
"name-
|
|
36
|
-
"name-
|
|
37
|
-
"name-
|
|
38
|
-
"name-
|
|
39
|
-
"name-
|
|
40
|
-
"name-
|
|
41
|
-
"name-
|
|
42
|
-
"
|
|
4
|
+
"icon": "awsui_icon_h11ix_18iyy_189",
|
|
5
|
+
"icon-flex-height": "awsui_icon-flex-height_h11ix_18iyy_197",
|
|
6
|
+
"size-x-small": "awsui_size-x-small_h11ix_18iyy_225",
|
|
7
|
+
"size-x-small-mapped-height": "awsui_size-x-small-mapped-height_h11ix_18iyy_229",
|
|
8
|
+
"size-small": "awsui_size-small_h11ix_18iyy_244",
|
|
9
|
+
"size-small-mapped-height": "awsui_size-small-mapped-height_h11ix_18iyy_248",
|
|
10
|
+
"size-normal": "awsui_size-normal_h11ix_18iyy_263",
|
|
11
|
+
"size-normal-mapped-height": "awsui_size-normal-mapped-height_h11ix_18iyy_267",
|
|
12
|
+
"size-medium": "awsui_size-medium_h11ix_18iyy_282",
|
|
13
|
+
"size-medium-mapped-height": "awsui_size-medium-mapped-height_h11ix_18iyy_286",
|
|
14
|
+
"size-big": "awsui_size-big_h11ix_18iyy_301",
|
|
15
|
+
"size-big-mapped-height": "awsui_size-big-mapped-height_h11ix_18iyy_305",
|
|
16
|
+
"size-large": "awsui_size-large_h11ix_18iyy_320",
|
|
17
|
+
"size-large-mapped-height": "awsui_size-large-mapped-height_h11ix_18iyy_324",
|
|
18
|
+
"variant-normal": "awsui_variant-normal_h11ix_18iyy_339",
|
|
19
|
+
"variant-disabled": "awsui_variant-disabled_h11ix_18iyy_342",
|
|
20
|
+
"variant-inverted": "awsui_variant-inverted_h11ix_18iyy_345",
|
|
21
|
+
"variant-subtle": "awsui_variant-subtle_h11ix_18iyy_348",
|
|
22
|
+
"variant-warning": "awsui_variant-warning_h11ix_18iyy_351",
|
|
23
|
+
"variant-error": "awsui_variant-error_h11ix_18iyy_354",
|
|
24
|
+
"variant-success": "awsui_variant-success_h11ix_18iyy_357",
|
|
25
|
+
"variant-link": "awsui_variant-link_h11ix_18iyy_360",
|
|
26
|
+
"name-angle-left-double": "awsui_name-angle-left-double_h11ix_18iyy_363",
|
|
27
|
+
"name-angle-left": "awsui_name-angle-left_h11ix_18iyy_363",
|
|
28
|
+
"name-angle-right-double": "awsui_name-angle-right-double_h11ix_18iyy_365",
|
|
29
|
+
"name-angle-right": "awsui_name-angle-right_h11ix_18iyy_365",
|
|
30
|
+
"name-arrow-left": "awsui_name-arrow-left_h11ix_18iyy_367",
|
|
31
|
+
"name-arrow-right": "awsui_name-arrow-right_h11ix_18iyy_368",
|
|
32
|
+
"name-caret-left-filled": "awsui_name-caret-left-filled_h11ix_18iyy_369",
|
|
33
|
+
"name-caret-right-filled": "awsui_name-caret-right-filled_h11ix_18iyy_370",
|
|
34
|
+
"name-audio-full": "awsui_name-audio-full_h11ix_18iyy_371",
|
|
35
|
+
"name-audio-half": "awsui_name-audio-half_h11ix_18iyy_372",
|
|
36
|
+
"name-audio-off": "awsui_name-audio-off_h11ix_18iyy_373",
|
|
37
|
+
"name-external": "awsui_name-external_h11ix_18iyy_374",
|
|
38
|
+
"name-redo": "awsui_name-redo_h11ix_18iyy_375",
|
|
39
|
+
"name-resize-area": "awsui_name-resize-area_h11ix_18iyy_376",
|
|
40
|
+
"name-send": "awsui_name-send_h11ix_18iyy_377",
|
|
41
|
+
"name-shrink": "awsui_name-shrink_h11ix_18iyy_378",
|
|
42
|
+
"name-undo": "awsui_name-undo_h11ix_18iyy_379",
|
|
43
|
+
"name-view-vertical": "awsui_name-view-vertical_h11ix_18iyy_380",
|
|
44
|
+
"badge": "awsui_badge_h11ix_18iyy_404"
|
|
43
45
|
};
|
|
44
46
|
|
package/icon/styles.scoped.css
CHANGED
|
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_icon_h11ix_18iyy_189:not(#\9) {
|
|
190
190
|
position: relative;
|
|
191
191
|
display: inline-block;
|
|
192
192
|
vertical-align: top;
|
|
@@ -194,195 +194,214 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
194
194
|
/* stylelint-disable selector-max-type, selector-max-universal */
|
|
195
195
|
/* stylelint-enable selector-max-type, selector-max-universal */
|
|
196
196
|
}
|
|
197
|
-
.awsui_icon-flex-
|
|
197
|
+
.awsui_icon-flex-height_h11ix_18iyy_197:not(#\9) {
|
|
198
198
|
display: inline-flex;
|
|
199
199
|
align-items: center;
|
|
200
200
|
}
|
|
201
|
-
.
|
|
201
|
+
.awsui_icon_h11ix_18iyy_189 > svg:not(#\9) {
|
|
202
202
|
pointer-events: none;
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
.awsui_icon_h11ix_18iyy_189 > svg:not(#\9) {
|
|
205
205
|
fill: none;
|
|
206
206
|
}
|
|
207
|
-
.
|
|
207
|
+
.awsui_icon_h11ix_18iyy_189 > svg *:not(#\9) {
|
|
208
208
|
stroke: currentColor;
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_icon_h11ix_18iyy_189 > svg .stroke-linejoin-round:not(#\9) {
|
|
211
211
|
stroke-linejoin: round;
|
|
212
212
|
}
|
|
213
|
-
.
|
|
213
|
+
.awsui_icon_h11ix_18iyy_189 > svg .stroke-linecap-square:not(#\9) {
|
|
214
214
|
stroke-linecap: square;
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
.awsui_icon_h11ix_18iyy_189 > svg .stroke-linecap-round:not(#\9) {
|
|
217
217
|
stroke-linecap: round;
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
.awsui_icon_h11ix_18iyy_189 > svg .filled:not(#\9) {
|
|
220
220
|
fill: currentColor;
|
|
221
221
|
}
|
|
222
|
-
.
|
|
222
|
+
.awsui_icon_h11ix_18iyy_189 > svg .no-stroke:not(#\9) {
|
|
223
223
|
stroke: none;
|
|
224
224
|
}
|
|
225
|
-
.
|
|
225
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small_h11ix_18iyy_225:not(#\9) {
|
|
226
|
+
inline-size: 12px;
|
|
227
|
+
box-sizing: border-box;
|
|
228
|
+
}
|
|
229
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small-mapped-height_h11ix_18iyy_229:not(#\9) {
|
|
230
|
+
block-size: var(--line-height-body-s-nu5hx1, 16px);
|
|
231
|
+
padding-block: calc((var(--line-height-body-s-nu5hx1, 16px) - 12px) / 2);
|
|
232
|
+
padding-inline: 0;
|
|
233
|
+
}
|
|
234
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small_h11ix_18iyy_225 > svg:not(#\9),
|
|
235
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small_h11ix_18iyy_225 > img:not(#\9) {
|
|
236
|
+
inline-size: 12px;
|
|
237
|
+
block-size: 12px;
|
|
238
|
+
vertical-align: top;
|
|
239
|
+
}
|
|
240
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small_h11ix_18iyy_225 > svg:not(#\9),
|
|
241
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-x-small_h11ix_18iyy_225 > svg *:not(#\9) {
|
|
242
|
+
stroke-width: calc(var(--border-width-icon-x-small-45lnog, 1.5px) / 0.75);
|
|
243
|
+
}
|
|
244
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small_h11ix_18iyy_244:not(#\9) {
|
|
226
245
|
inline-size: var(--size-icon-normal-levt08, 16px);
|
|
227
246
|
box-sizing: border-box;
|
|
228
247
|
}
|
|
229
|
-
.
|
|
248
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small-mapped-height_h11ix_18iyy_248:not(#\9) {
|
|
230
249
|
block-size: var(--line-height-body-s-nu5hx1, 16px);
|
|
231
250
|
padding-block: calc((var(--line-height-body-s-nu5hx1, 16px) - var(--size-icon-normal-levt08, 16px)) / 2);
|
|
232
251
|
padding-inline: 0;
|
|
233
252
|
}
|
|
234
|
-
.
|
|
235
|
-
.
|
|
253
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small_h11ix_18iyy_244 > svg:not(#\9),
|
|
254
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small_h11ix_18iyy_244 > img:not(#\9) {
|
|
236
255
|
inline-size: var(--size-icon-normal-levt08, 16px);
|
|
237
256
|
block-size: var(--size-icon-normal-levt08, 16px);
|
|
238
257
|
vertical-align: top;
|
|
239
258
|
}
|
|
240
|
-
.
|
|
241
|
-
.
|
|
259
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small_h11ix_18iyy_244 > svg:not(#\9),
|
|
260
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-small_h11ix_18iyy_244 > svg *:not(#\9) {
|
|
242
261
|
stroke-width: calc(var(--border-width-icon-small-z55i5t, 2px) / 1);
|
|
243
262
|
}
|
|
244
|
-
.
|
|
263
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal_h11ix_18iyy_263:not(#\9) {
|
|
245
264
|
inline-size: var(--size-icon-normal-levt08, 16px);
|
|
246
265
|
box-sizing: border-box;
|
|
247
266
|
}
|
|
248
|
-
.
|
|
267
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal-mapped-height_h11ix_18iyy_267:not(#\9) {
|
|
249
268
|
block-size: var(--line-height-body-m-2mh3ke, 20px);
|
|
250
269
|
padding-block: calc((var(--line-height-body-m-2mh3ke, 20px) - var(--size-icon-normal-levt08, 16px)) / 2);
|
|
251
270
|
padding-inline: 0;
|
|
252
271
|
}
|
|
253
|
-
.
|
|
254
|
-
.
|
|
272
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal_h11ix_18iyy_263 > svg:not(#\9),
|
|
273
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal_h11ix_18iyy_263 > img:not(#\9) {
|
|
255
274
|
inline-size: var(--size-icon-normal-levt08, 16px);
|
|
256
275
|
block-size: var(--size-icon-normal-levt08, 16px);
|
|
257
276
|
vertical-align: top;
|
|
258
277
|
}
|
|
259
|
-
.
|
|
260
|
-
.
|
|
278
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal_h11ix_18iyy_263 > svg:not(#\9),
|
|
279
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-normal_h11ix_18iyy_263 > svg *:not(#\9) {
|
|
261
280
|
stroke-width: calc(var(--border-width-icon-normal-9h7vj7, 2px) / 1);
|
|
262
281
|
}
|
|
263
|
-
.
|
|
282
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium_h11ix_18iyy_282:not(#\9) {
|
|
264
283
|
inline-size: var(--size-icon-medium-uv8xcz, 20px);
|
|
265
284
|
box-sizing: border-box;
|
|
266
285
|
}
|
|
267
|
-
.
|
|
286
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium-mapped-height_h11ix_18iyy_286:not(#\9) {
|
|
268
287
|
block-size: var(--line-height-heading-l-mg5bx6, 24px);
|
|
269
288
|
padding-block: calc((var(--line-height-heading-l-mg5bx6, 24px) - var(--size-icon-medium-uv8xcz, 20px)) / 2);
|
|
270
289
|
padding-inline: 0;
|
|
271
290
|
}
|
|
272
|
-
.
|
|
273
|
-
.
|
|
291
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium_h11ix_18iyy_282 > svg:not(#\9),
|
|
292
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium_h11ix_18iyy_282 > img:not(#\9) {
|
|
274
293
|
inline-size: var(--size-icon-medium-uv8xcz, 20px);
|
|
275
294
|
block-size: var(--size-icon-medium-uv8xcz, 20px);
|
|
276
295
|
vertical-align: top;
|
|
277
296
|
}
|
|
278
|
-
.
|
|
279
|
-
.
|
|
297
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium_h11ix_18iyy_282 > svg:not(#\9),
|
|
298
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-medium_h11ix_18iyy_282 > svg *:not(#\9) {
|
|
280
299
|
stroke-width: calc(var(--border-width-icon-medium-b7icqv, 2px) / 1.25);
|
|
281
300
|
}
|
|
282
|
-
.
|
|
301
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big_h11ix_18iyy_301:not(#\9) {
|
|
283
302
|
inline-size: var(--size-icon-big-7pq9l3, 32px);
|
|
284
303
|
box-sizing: border-box;
|
|
285
304
|
}
|
|
286
|
-
.
|
|
305
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big-mapped-height_h11ix_18iyy_305:not(#\9) {
|
|
287
306
|
block-size: var(--line-height-heading-xl-hko6p0, 30px);
|
|
288
307
|
padding-block: calc((var(--line-height-heading-xl-hko6p0, 30px) - var(--size-icon-big-7pq9l3, 32px)) / 2);
|
|
289
308
|
padding-inline: 0;
|
|
290
309
|
}
|
|
291
|
-
.
|
|
292
|
-
.
|
|
310
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big_h11ix_18iyy_301 > svg:not(#\9),
|
|
311
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big_h11ix_18iyy_301 > img:not(#\9) {
|
|
293
312
|
inline-size: var(--size-icon-big-7pq9l3, 32px);
|
|
294
313
|
block-size: var(--size-icon-big-7pq9l3, 32px);
|
|
295
314
|
vertical-align: top;
|
|
296
315
|
}
|
|
297
|
-
.
|
|
298
|
-
.
|
|
316
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big_h11ix_18iyy_301 > svg:not(#\9),
|
|
317
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-big_h11ix_18iyy_301 > svg *:not(#\9) {
|
|
299
318
|
stroke-width: calc(var(--border-width-icon-big-ymgy42, 3px) / 2);
|
|
300
319
|
}
|
|
301
|
-
.
|
|
320
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large_h11ix_18iyy_320:not(#\9) {
|
|
302
321
|
inline-size: var(--size-icon-large-mb6y6y, 48px);
|
|
303
322
|
box-sizing: border-box;
|
|
304
323
|
}
|
|
305
|
-
.
|
|
324
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large-mapped-height_h11ix_18iyy_324:not(#\9) {
|
|
306
325
|
block-size: var(--line-height-display-l-vwanzp, 48px);
|
|
307
326
|
padding-block: calc((var(--line-height-display-l-vwanzp, 48px) - var(--size-icon-large-mb6y6y, 48px)) / 2);
|
|
308
327
|
padding-inline: 0;
|
|
309
328
|
}
|
|
310
|
-
.
|
|
311
|
-
.
|
|
329
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large_h11ix_18iyy_320 > svg:not(#\9),
|
|
330
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large_h11ix_18iyy_320 > img:not(#\9) {
|
|
312
331
|
inline-size: var(--size-icon-large-mb6y6y, 48px);
|
|
313
332
|
block-size: var(--size-icon-large-mb6y6y, 48px);
|
|
314
333
|
vertical-align: top;
|
|
315
334
|
}
|
|
316
|
-
.
|
|
317
|
-
.
|
|
335
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large_h11ix_18iyy_320 > svg:not(#\9),
|
|
336
|
+
.awsui_icon_h11ix_18iyy_189.awsui_size-large_h11ix_18iyy_320 > svg *:not(#\9) {
|
|
318
337
|
stroke-width: calc(var(--border-width-icon-large-u645rg, 4px) / 3);
|
|
319
338
|
}
|
|
320
|
-
.
|
|
339
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-normal_h11ix_18iyy_339:not(#\9) {
|
|
321
340
|
color: currentColor;
|
|
322
341
|
}
|
|
323
|
-
.
|
|
342
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-disabled_h11ix_18iyy_342:not(#\9) {
|
|
324
343
|
color: var(--color-text-interactive-disabled-1bqmrl, #b4b4bb);
|
|
325
344
|
}
|
|
326
|
-
.
|
|
345
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-inverted_h11ix_18iyy_345:not(#\9) {
|
|
327
346
|
color: var(--color-text-inverted-4v4dmq, #ffffff);
|
|
328
347
|
}
|
|
329
|
-
.
|
|
348
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-subtle_h11ix_18iyy_348:not(#\9) {
|
|
330
349
|
color: var(--color-text-icon-subtle-3sgxlr, #656871);
|
|
331
350
|
}
|
|
332
|
-
.
|
|
351
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-warning_h11ix_18iyy_351:not(#\9) {
|
|
333
352
|
color: var(--color-text-status-warning-6meo06, #855900);
|
|
334
353
|
}
|
|
335
|
-
.
|
|
354
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-error_h11ix_18iyy_354:not(#\9) {
|
|
336
355
|
color: var(--color-text-status-error-ksqavh, #db0000);
|
|
337
356
|
}
|
|
338
|
-
.
|
|
357
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-success_h11ix_18iyy_357:not(#\9) {
|
|
339
358
|
color: var(--color-text-status-success-ybmii8, #00802f);
|
|
340
359
|
}
|
|
341
|
-
.
|
|
360
|
+
.awsui_icon_h11ix_18iyy_189.awsui_variant-link_h11ix_18iyy_360:not(#\9) {
|
|
342
361
|
color: var(--color-text-link-default-hude44, #006ce0);
|
|
343
362
|
}
|
|
344
|
-
.
|
|
345
|
-
.awsui_name-angle-
|
|
346
|
-
.awsui_name-angle-right-
|
|
347
|
-
.awsui_name-angle-
|
|
348
|
-
.awsui_name-arrow-
|
|
349
|
-
.awsui_name-arrow-
|
|
350
|
-
.awsui_name-caret-left-
|
|
351
|
-
.awsui_name-caret-right-
|
|
352
|
-
.awsui_name-audio-
|
|
353
|
-
.awsui_name-audio-
|
|
354
|
-
.awsui_name-audio-
|
|
355
|
-
.awsui_name-
|
|
356
|
-
.awsui_name-
|
|
357
|
-
.awsui_name-resize-
|
|
358
|
-
.awsui_name-
|
|
359
|
-
.awsui_name-
|
|
360
|
-
.awsui_name-
|
|
361
|
-
.awsui_name-view-
|
|
363
|
+
.awsui_icon_h11ix_18iyy_189:not(#\9):is(.awsui_name-angle-left-double_h11ix_18iyy_363,
|
|
364
|
+
.awsui_name-angle-left_h11ix_18iyy_363,
|
|
365
|
+
.awsui_name-angle-right-double_h11ix_18iyy_365,
|
|
366
|
+
.awsui_name-angle-right_h11ix_18iyy_365,
|
|
367
|
+
.awsui_name-arrow-left_h11ix_18iyy_367,
|
|
368
|
+
.awsui_name-arrow-right_h11ix_18iyy_368,
|
|
369
|
+
.awsui_name-caret-left-filled_h11ix_18iyy_369,
|
|
370
|
+
.awsui_name-caret-right-filled_h11ix_18iyy_370,
|
|
371
|
+
.awsui_name-audio-full_h11ix_18iyy_371,
|
|
372
|
+
.awsui_name-audio-half_h11ix_18iyy_372,
|
|
373
|
+
.awsui_name-audio-off_h11ix_18iyy_373,
|
|
374
|
+
.awsui_name-external_h11ix_18iyy_374,
|
|
375
|
+
.awsui_name-redo_h11ix_18iyy_375,
|
|
376
|
+
.awsui_name-resize-area_h11ix_18iyy_376,
|
|
377
|
+
.awsui_name-send_h11ix_18iyy_377,
|
|
378
|
+
.awsui_name-shrink_h11ix_18iyy_378,
|
|
379
|
+
.awsui_name-undo_h11ix_18iyy_379,
|
|
380
|
+
.awsui_name-view-vertical_h11ix_18iyy_380) {
|
|
362
381
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
363
382
|
}
|
|
364
|
-
.
|
|
365
|
-
.awsui_name-angle-
|
|
366
|
-
.awsui_name-angle-right-
|
|
367
|
-
.awsui_name-angle-
|
|
368
|
-
.awsui_name-arrow-
|
|
369
|
-
.awsui_name-arrow-
|
|
370
|
-
.awsui_name-caret-left-
|
|
371
|
-
.awsui_name-caret-right-
|
|
372
|
-
.awsui_name-audio-
|
|
373
|
-
.awsui_name-audio-
|
|
374
|
-
.awsui_name-audio-
|
|
375
|
-
.awsui_name-
|
|
376
|
-
.awsui_name-
|
|
377
|
-
.awsui_name-resize-
|
|
378
|
-
.awsui_name-
|
|
379
|
-
.awsui_name-
|
|
380
|
-
.awsui_name-
|
|
381
|
-
.awsui_name-view-
|
|
383
|
+
.awsui_icon_h11ix_18iyy_189:not(#\9):is(.awsui_name-angle-left-double_h11ix_18iyy_363,
|
|
384
|
+
.awsui_name-angle-left_h11ix_18iyy_363,
|
|
385
|
+
.awsui_name-angle-right-double_h11ix_18iyy_365,
|
|
386
|
+
.awsui_name-angle-right_h11ix_18iyy_365,
|
|
387
|
+
.awsui_name-arrow-left_h11ix_18iyy_367,
|
|
388
|
+
.awsui_name-arrow-right_h11ix_18iyy_368,
|
|
389
|
+
.awsui_name-caret-left-filled_h11ix_18iyy_369,
|
|
390
|
+
.awsui_name-caret-right-filled_h11ix_18iyy_370,
|
|
391
|
+
.awsui_name-audio-full_h11ix_18iyy_371,
|
|
392
|
+
.awsui_name-audio-half_h11ix_18iyy_372,
|
|
393
|
+
.awsui_name-audio-off_h11ix_18iyy_373,
|
|
394
|
+
.awsui_name-external_h11ix_18iyy_374,
|
|
395
|
+
.awsui_name-redo_h11ix_18iyy_375,
|
|
396
|
+
.awsui_name-resize-area_h11ix_18iyy_376,
|
|
397
|
+
.awsui_name-send_h11ix_18iyy_377,
|
|
398
|
+
.awsui_name-shrink_h11ix_18iyy_378,
|
|
399
|
+
.awsui_name-undo_h11ix_18iyy_379,
|
|
400
|
+
.awsui_name-view-vertical_h11ix_18iyy_380):dir(rtl) {
|
|
382
401
|
transform: scaleX(-1);
|
|
383
402
|
}
|
|
384
403
|
|
|
385
|
-
.
|
|
404
|
+
.awsui_badge_h11ix_18iyy_404:not(#\9)::after {
|
|
386
405
|
content: "";
|
|
387
406
|
position: absolute;
|
|
388
407
|
inline-size: 6px;
|
package/icon/styles.selectors.js
CHANGED
|
@@ -2,44 +2,46 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"icon": "
|
|
6
|
-
"icon-flex-height": "awsui_icon-flex-
|
|
7
|
-
"size-small": "awsui_size-
|
|
8
|
-
"size-small-mapped-height": "awsui_size-small-mapped-
|
|
9
|
-
"size-
|
|
10
|
-
"size-
|
|
11
|
-
"size-
|
|
12
|
-
"size-
|
|
13
|
-
"size-
|
|
14
|
-
"size-
|
|
15
|
-
"size-
|
|
16
|
-
"size-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"variant-
|
|
20
|
-
"variant-
|
|
21
|
-
"variant-
|
|
22
|
-
"variant-
|
|
23
|
-
"variant-
|
|
24
|
-
"variant-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"name-angle-
|
|
28
|
-
"name-angle-
|
|
29
|
-
"name-
|
|
30
|
-
"name-
|
|
31
|
-
"name-
|
|
32
|
-
"name-
|
|
33
|
-
"name-
|
|
34
|
-
"name-
|
|
35
|
-
"name-audio-
|
|
36
|
-
"name-
|
|
37
|
-
"name-
|
|
38
|
-
"name-
|
|
39
|
-
"name-
|
|
40
|
-
"name-
|
|
41
|
-
"name-
|
|
42
|
-
"name-
|
|
43
|
-
"
|
|
5
|
+
"icon": "awsui_icon_h11ix_18iyy_189",
|
|
6
|
+
"icon-flex-height": "awsui_icon-flex-height_h11ix_18iyy_197",
|
|
7
|
+
"size-x-small": "awsui_size-x-small_h11ix_18iyy_225",
|
|
8
|
+
"size-x-small-mapped-height": "awsui_size-x-small-mapped-height_h11ix_18iyy_229",
|
|
9
|
+
"size-small": "awsui_size-small_h11ix_18iyy_244",
|
|
10
|
+
"size-small-mapped-height": "awsui_size-small-mapped-height_h11ix_18iyy_248",
|
|
11
|
+
"size-normal": "awsui_size-normal_h11ix_18iyy_263",
|
|
12
|
+
"size-normal-mapped-height": "awsui_size-normal-mapped-height_h11ix_18iyy_267",
|
|
13
|
+
"size-medium": "awsui_size-medium_h11ix_18iyy_282",
|
|
14
|
+
"size-medium-mapped-height": "awsui_size-medium-mapped-height_h11ix_18iyy_286",
|
|
15
|
+
"size-big": "awsui_size-big_h11ix_18iyy_301",
|
|
16
|
+
"size-big-mapped-height": "awsui_size-big-mapped-height_h11ix_18iyy_305",
|
|
17
|
+
"size-large": "awsui_size-large_h11ix_18iyy_320",
|
|
18
|
+
"size-large-mapped-height": "awsui_size-large-mapped-height_h11ix_18iyy_324",
|
|
19
|
+
"variant-normal": "awsui_variant-normal_h11ix_18iyy_339",
|
|
20
|
+
"variant-disabled": "awsui_variant-disabled_h11ix_18iyy_342",
|
|
21
|
+
"variant-inverted": "awsui_variant-inverted_h11ix_18iyy_345",
|
|
22
|
+
"variant-subtle": "awsui_variant-subtle_h11ix_18iyy_348",
|
|
23
|
+
"variant-warning": "awsui_variant-warning_h11ix_18iyy_351",
|
|
24
|
+
"variant-error": "awsui_variant-error_h11ix_18iyy_354",
|
|
25
|
+
"variant-success": "awsui_variant-success_h11ix_18iyy_357",
|
|
26
|
+
"variant-link": "awsui_variant-link_h11ix_18iyy_360",
|
|
27
|
+
"name-angle-left-double": "awsui_name-angle-left-double_h11ix_18iyy_363",
|
|
28
|
+
"name-angle-left": "awsui_name-angle-left_h11ix_18iyy_363",
|
|
29
|
+
"name-angle-right-double": "awsui_name-angle-right-double_h11ix_18iyy_365",
|
|
30
|
+
"name-angle-right": "awsui_name-angle-right_h11ix_18iyy_365",
|
|
31
|
+
"name-arrow-left": "awsui_name-arrow-left_h11ix_18iyy_367",
|
|
32
|
+
"name-arrow-right": "awsui_name-arrow-right_h11ix_18iyy_368",
|
|
33
|
+
"name-caret-left-filled": "awsui_name-caret-left-filled_h11ix_18iyy_369",
|
|
34
|
+
"name-caret-right-filled": "awsui_name-caret-right-filled_h11ix_18iyy_370",
|
|
35
|
+
"name-audio-full": "awsui_name-audio-full_h11ix_18iyy_371",
|
|
36
|
+
"name-audio-half": "awsui_name-audio-half_h11ix_18iyy_372",
|
|
37
|
+
"name-audio-off": "awsui_name-audio-off_h11ix_18iyy_373",
|
|
38
|
+
"name-external": "awsui_name-external_h11ix_18iyy_374",
|
|
39
|
+
"name-redo": "awsui_name-redo_h11ix_18iyy_375",
|
|
40
|
+
"name-resize-area": "awsui_name-resize-area_h11ix_18iyy_376",
|
|
41
|
+
"name-send": "awsui_name-send_h11ix_18iyy_377",
|
|
42
|
+
"name-shrink": "awsui_name-shrink_h11ix_18iyy_378",
|
|
43
|
+
"name-undo": "awsui_name-undo_h11ix_18iyy_379",
|
|
44
|
+
"name-view-vertical": "awsui_name-view-vertical_h11ix_18iyy_380",
|
|
45
|
+
"badge": "awsui_badge_h11ix_18iyy_404"
|
|
44
46
|
};
|
|
45
47
|
|