@cloudscape-design/components-themeable 3.0.1313 → 3.0.1314

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.
Files changed (77) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/action-card/styles.scss +4 -0
  3. package/lib/internal/scss/app-layout/visual-refresh/drawers.scss +4 -3
  4. package/lib/internal/scss/app-layout/visual-refresh/tools.scss +2 -1
  5. package/lib/internal/scss/breadcrumb-group/item/styles.scss +7 -0
  6. package/lib/internal/scss/breadcrumb-group/styles.scss +7 -0
  7. package/lib/internal/scss/button-dropdown/category-elements/styles.scss +2 -1
  8. package/lib/internal/scss/button-dropdown/styles.scss +16 -15
  9. package/lib/internal/scss/expandable-section/styles.scss +3 -2
  10. package/lib/internal/scss/internal/components/button-trigger/styles.scss +3 -2
  11. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  12. package/lib/internal/scss/status-indicator/styles.scss +13 -4
  13. package/lib/internal/scss/tree-view/tree-item/styles.scss +2 -1
  14. package/lib/internal/template/action-card/styles.css.js +17 -17
  15. package/lib/internal/template/action-card/styles.scoped.css +94 -91
  16. package/lib/internal/template/action-card/styles.selectors.js +17 -17
  17. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  18. package/lib/internal/template/app-layout/visual-refresh/drawers.js +0 -3
  19. package/lib/internal/template/app-layout/visual-refresh/drawers.js.map +1 -1
  20. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -87
  21. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +167 -167
  22. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -87
  23. package/lib/internal/template/app-layout/visual-refresh/tools.d.ts.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh/tools.js +0 -2
  25. package/lib/internal/template/app-layout/visual-refresh/tools.js.map +1 -1
  26. package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
  27. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +29 -25
  28. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
  29. package/lib/internal/template/breadcrumb-group/styles.css.js +14 -14
  30. package/lib/internal/template/breadcrumb-group/styles.scoped.css +27 -24
  31. package/lib/internal/template/breadcrumb-group/styles.selectors.js +14 -14
  32. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +1 -1
  33. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  34. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
  35. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  36. package/lib/internal/template/button-dropdown/category-elements/styles.css.js +18 -19
  37. package/lib/internal/template/button-dropdown/category-elements/styles.scoped.css +29 -29
  38. package/lib/internal/template/button-dropdown/category-elements/styles.selectors.js +18 -19
  39. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  40. package/lib/internal/template/button-dropdown/internal.js +2 -2
  41. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  42. package/lib/internal/template/button-dropdown/styles.css.js +22 -23
  43. package/lib/internal/template/button-dropdown/styles.scoped.css +36 -36
  44. package/lib/internal/template/button-dropdown/styles.selectors.js +22 -23
  45. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  46. package/lib/internal/template/expandable-section/expandable-section-header.js +3 -3
  47. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  48. package/lib/internal/template/expandable-section/styles.css.js +35 -36
  49. package/lib/internal/template/expandable-section/styles.scoped.css +70 -70
  50. package/lib/internal/template/expandable-section/styles.selectors.js +35 -36
  51. package/lib/internal/template/internal/base-component/styles.scoped.css +6 -1
  52. package/lib/internal/template/internal/components/button-trigger/index.js +1 -1
  53. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  54. package/lib/internal/template/internal/components/button-trigger/styles.css.js +14 -15
  55. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +31 -31
  56. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +14 -15
  57. package/lib/internal/template/internal/environment.js +2 -2
  58. package/lib/internal/template/internal/environment.json +2 -2
  59. package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
  60. package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
  61. package/lib/internal/template/internal/generated/theming/index.cjs +33 -0
  62. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +9 -0
  63. package/lib/internal/template/internal/generated/theming/index.d.ts +9 -0
  64. package/lib/internal/template/internal/generated/theming/index.js +33 -0
  65. package/lib/internal/template/status-indicator/internal.d.ts.map +1 -1
  66. package/lib/internal/template/status-indicator/internal.js +2 -2
  67. package/lib/internal/template/status-indicator/internal.js.map +1 -1
  68. package/lib/internal/template/status-indicator/styles.css.js +24 -25
  69. package/lib/internal/template/status-indicator/styles.scoped.css +55 -50
  70. package/lib/internal/template/status-indicator/styles.selectors.js +24 -25
  71. package/lib/internal/template/tree-view/tree-item/index.d.ts.map +1 -1
  72. package/lib/internal/template/tree-view/tree-item/index.js +1 -2
  73. package/lib/internal/template/tree-view/tree-item/index.js.map +1 -1
  74. package/lib/internal/template/tree-view/tree-item/styles.css.js +9 -10
  75. package/lib/internal/template/tree-view/tree-item/styles.scoped.css +18 -14
  76. package/lib/internal/template/tree-view/tree-item/styles.selectors.js +9 -10
  77. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,WAAW,4BACf,SAAQ,YAAY,CAAC,oBAAoB,EAAE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M,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC;CACvC;AAcD,UAAU,uBAAwB,SAAQ,IAAI,CAAC,4BAA4B,EAAE,MAAM,GAAG,eAAe,CAAC;IACpG,OAAO,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IACpD,IAAI,CAAC,EAAE,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;CACrD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,OAAO,EACP,OAAO,EACP,IAAe,GAChB,EAAE,uBAAuB,eAWzB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAe,EACf,gBAAgB,EAChB,SAAiB,EACjB,iBAAiB,EACjB,MAA6D,EAC7D,SAA0B,EAC1B,GAAG,IAAI,EACR,EAAE,4BAA4B,eAqC9B"}
@@ -23,7 +23,7 @@ const typeToIcon = size => ({
23
23
  'not-started': React.createElement(InternalIcon, { name: "status-not-started", size: size }),
24
24
  });
25
25
  export function InternalStatusIcon({ type, iconAriaLabel, animate, display, size = 'normal', }) {
26
- return (React.createElement("span", { className: clsx(styles.icon, animate && styles['icon-shake'], isThemeActive(Theme.OneTheme) && styles['one-theme']), "aria-label": iconAriaLabel, role: iconAriaLabel ? 'img' : undefined },
26
+ return (React.createElement("span", { className: clsx(styles.icon, animate && styles['icon-shake']), "aria-label": iconAriaLabel, role: iconAriaLabel ? 'img' : undefined },
27
27
  typeToIcon(size)[type],
28
28
  display === 'inline' && React.createElement(React.Fragment, null, "\u00A0")));
29
29
  }
@@ -32,7 +32,7 @@ export default function StatusIndicator({ type, children, iconAriaLabel, colorOv
32
32
  return (React.createElement(WithNativeAttributes, { ...baseProps, tag: "span", componentName: "StatusIndicator", nativeAttributes: nativeAttributes, className: clsx(styles.root, styles[`status-${type}`], {
33
33
  [styles[`color-override-${colorOverride}`]]: colorOverride,
34
34
  }, baseProps.className), ref: __internalRootRef },
35
- React.createElement("span", { className: clsx(styles.container, styles[`display-${__display}`], isThemeActive(Theme.OneTheme) && styles['one-theme'], wrapText === false && styles['overflow-ellipsis'], __animate && styles['container-fade-in']) },
35
+ React.createElement("span", { className: clsx(styles.container, styles[`display-${__display}`], wrapText === false && styles['overflow-ellipsis'], __animate && styles['container-fade-in']) },
36
36
  React.createElement(InternalStatusIcon, { type: type, iconAriaLabel: iconAriaLabel, animate: __animate, display: __display, size: __size }),
37
37
  React.createElement("span", null, children))));
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AAGrF,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D;;GAEG;AACH,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAC5E,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAGlD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,UAAU,GAA6E,IAAI,CAAC,EAAE,CAAC,CAAC;IACpG,KAAK,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC1D,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC3D,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAE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AC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC7D,SAAS,GAAG,cAAc,EAC1B,GAAG,IAAI,EACsB;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CACL,oBAAC,oBAAoB,OACf,SAAS,EACb,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,iBAAiB,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,EACxB;YACE,CAAC,MAAM,CAAC,kBAAkB,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa;SAC3D,EACD,SAAS,CAAC,SAAS,CACpB,EACD,GAAG,EAAE,iBAAiB;QAEtB,8BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,WAAW,SAAS,EAAE,CAAC,EAC9B,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,EACpD,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,EACjD,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC,CACzC;YAED,oBAAC,kBAAkB,IACjB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,MAAM,GACZ;YACF,kCAAO,QAAQ,CAAQ,CAClB,CACc,CACxB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\n\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\n/**\n * @awsuiSystem core\n */\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalSpinner from '../spinner/internal';\nimport { StatusIndicatorProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalStatusIndicatorProps\n extends SomeRequired<StatusIndicatorProps, 'type'>,\n InternalBaseComponentProps {\n /**\n * Play an animation on the error icon when first rendered\n */\n __animate?: boolean;\n\n /**\n * Size of icon.\n */\n __size?: IconProps.Size;\n\n /**\n * The CSS behavior of the status indicator container element.\n */\n __display?: 'inline' | 'inline-block';\n}\n\nconst typeToIcon: (size: IconProps.Size) => Record<StatusIndicatorProps.Type, JSX.Element> = size => ({\n error: <InternalIcon name=\"status-negative\" size={size} />,\n warning: <InternalIcon name=\"status-warning\" size={size} />,\n success: <InternalIcon name=\"status-positive\" size={size} />,\n info: <InternalIcon name=\"status-info\" size={size} />,\n stopped: <InternalIcon name=\"status-stopped\" size={size} />,\n pending: <InternalIcon name=\"status-pending\" size={size} />,\n 'in-progress': <InternalIcon name=\"status-in-progress\" size={size} />,\n loading: <InternalSpinner />,\n 'not-started': <InternalIcon name=\"status-not-started\" size={size} />,\n});\n\ninterface InternalStatusIconProps extends Pick<InternalStatusIndicatorProps, 'type' | 'iconAriaLabel'> {\n animate?: InternalStatusIndicatorProps['__animate'];\n size?: InternalStatusIndicatorProps['__size'];\n display?: InternalStatusIndicatorProps['__display'];\n}\n\nexport function InternalStatusIcon({\n type,\n iconAriaLabel,\n animate,\n display,\n size = 'normal',\n}: InternalStatusIconProps) {\n return (\n <span\n className={clsx(\n styles.icon,\n animate && styles['icon-shake'],\n isThemeActive(Theme.OneTheme) && styles['one-theme']\n )}\n aria-label={iconAriaLabel}\n role={iconAriaLabel ? 'img' : undefined}\n >\n {typeToIcon(size)[type]}\n {display === 'inline' && <>&nbsp;</>}\n </span>\n );\n}\n\nexport default function StatusIndicator({\n type,\n children,\n iconAriaLabel,\n colorOverride,\n wrapText = true,\n nativeAttributes,\n __animate = false,\n __internalRootRef,\n __size = isThemeActive(Theme.OneTheme) ? 'x-small' : 'normal',\n __display = 'inline-block',\n ...rest\n}: InternalStatusIndicatorProps) {\n const baseProps = getBaseProps(rest);\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"StatusIndicator\"\n nativeAttributes={nativeAttributes}\n className={clsx(\n styles.root,\n styles[`status-${type}`],\n {\n [styles[`color-override-${colorOverride}`]]: colorOverride,\n },\n baseProps.className\n )}\n ref={__internalRootRef}\n >\n <span\n className={clsx(\n styles.container,\n styles[`display-${__display}`],\n isThemeActive(Theme.OneTheme) && styles['one-theme'],\n wrapText === false && styles['overflow-ellipsis'],\n __animate && styles['container-fade-in']\n )}\n >\n <InternalStatusIcon\n type={type}\n iconAriaLabel={iconAriaLabel}\n animate={__animate}\n display={__display}\n size={__size}\n />\n <span>{children}</span>\n </span>\n </WithNativeAttributes>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AAGrF,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D;;GAEG;AACH,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAC5E,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAGlD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,UAAU,GAA6E,IAAI,CAAC,EAAE,CAAC,CAAC;IACpG,KAAK,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC1D,OAAO,EAA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ACjB,iBAAiB,EACjB,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC7D,SAAS,GAAG,cAAc,EAC1B,GAAG,IAAI,EACsB;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CACL,oBAAC,oBAAoB,OACf,SAAS,EACb,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,iBAAiB,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,EACxB;YACE,CAAC,MAAM,CAAC,kBAAkB,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa;SAC3D,EACD,SAAS,CAAC,SAAS,CACpB,EACD,GAAG,EAAE,iBAAiB;QAEtB,8BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,WAAW,SAAS,EAAE,CAAC,EAC9B,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,EACjD,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC,CACzC;YAED,oBAAC,kBAAkB,IACjB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,MAAM,GACZ;YACF,kCAAO,QAAQ,CAAQ,CAClB,CACc,CACxB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\n\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\n/**\n * @awsuiSystem core\n */\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalSpinner from '../spinner/internal';\nimport { StatusIndicatorProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalStatusIndicatorProps\n extends SomeRequired<StatusIndicatorProps, 'type'>,\n InternalBaseComponentProps {\n /**\n * Play an animation on the error icon when first rendered\n */\n __animate?: boolean;\n\n /**\n * Size of icon.\n */\n __size?: IconProps.Size;\n\n /**\n * The CSS behavior of the status indicator container element.\n */\n __display?: 'inline' | 'inline-block';\n}\n\nconst typeToIcon: (size: IconProps.Size) => Record<StatusIndicatorProps.Type, JSX.Element> = size => ({\n error: <InternalIcon name=\"status-negative\" size={size} />,\n warning: <InternalIcon name=\"status-warning\" size={size} />,\n success: <InternalIcon name=\"status-positive\" size={size} />,\n info: <InternalIcon name=\"status-info\" size={size} />,\n stopped: <InternalIcon name=\"status-stopped\" size={size} />,\n pending: <InternalIcon name=\"status-pending\" size={size} />,\n 'in-progress': <InternalIcon name=\"status-in-progress\" size={size} />,\n loading: <InternalSpinner />,\n 'not-started': <InternalIcon name=\"status-not-started\" size={size} />,\n});\n\ninterface InternalStatusIconProps extends Pick<InternalStatusIndicatorProps, 'type' | 'iconAriaLabel'> {\n animate?: InternalStatusIndicatorProps['__animate'];\n size?: InternalStatusIndicatorProps['__size'];\n display?: InternalStatusIndicatorProps['__display'];\n}\n\nexport function InternalStatusIcon({\n type,\n iconAriaLabel,\n animate,\n display,\n size = 'normal',\n}: InternalStatusIconProps) {\n return (\n <span\n className={clsx(styles.icon, animate && styles['icon-shake'])}\n aria-label={iconAriaLabel}\n role={iconAriaLabel ? 'img' : undefined}\n >\n {typeToIcon(size)[type]}\n {display === 'inline' && <>&nbsp;</>}\n </span>\n );\n}\n\nexport default function StatusIndicator({\n type,\n children,\n iconAriaLabel,\n colorOverride,\n wrapText = true,\n nativeAttributes,\n __animate = false,\n __internalRootRef,\n __size = isThemeActive(Theme.OneTheme) ? 'x-small' : 'normal',\n __display = 'inline-block',\n ...rest\n}: InternalStatusIndicatorProps) {\n const baseProps = getBaseProps(rest);\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"StatusIndicator\"\n nativeAttributes={nativeAttributes}\n className={clsx(\n styles.root,\n styles[`status-${type}`],\n {\n [styles[`color-override-${colorOverride}`]]: colorOverride,\n },\n baseProps.className\n )}\n ref={__internalRootRef}\n >\n <span\n className={clsx(\n styles.container,\n styles[`display-${__display}`],\n wrapText === false && styles['overflow-ellipsis'],\n __animate && styles['container-fade-in']\n )}\n >\n <InternalStatusIcon\n type={type}\n iconAriaLabel={iconAriaLabel}\n animate={__animate}\n display={__display}\n size={__size}\n />\n <span>{children}</span>\n </span>\n </WithNativeAttributes>\n );\n}\n"]}
@@ -1,30 +1,29 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "icon-shake": "awsui_icon-shake_1cbgc_13oha_153",
5
- "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_13oha_1",
6
- "container-fade-in": "awsui_container-fade-in_1cbgc_13oha_181",
7
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_13oha_1",
8
- "root": "awsui_root_1cbgc_13oha_203",
9
- "status-error": "awsui_status-error_1cbgc_13oha_212",
10
- "status-warning": "awsui_status-warning_1cbgc_13oha_215",
11
- "status-success": "awsui_status-success_1cbgc_13oha_218",
12
- "status-info": "awsui_status-info_1cbgc_13oha_221",
13
- "status-stopped": "awsui_status-stopped_1cbgc_13oha_224",
14
- "status-pending": "awsui_status-pending_1cbgc_13oha_227",
15
- "status-in-progress": "awsui_status-in-progress_1cbgc_13oha_230",
16
- "status-loading": "awsui_status-loading_1cbgc_13oha_233",
17
- "status-not-started": "awsui_status-not-started_1cbgc_13oha_236",
18
- "color-override-red": "awsui_color-override-red_1cbgc_13oha_239",
19
- "color-override-grey": "awsui_color-override-grey_1cbgc_13oha_242",
20
- "color-override-blue": "awsui_color-override-blue_1cbgc_13oha_245",
21
- "color-override-green": "awsui_color-override-green_1cbgc_13oha_248",
22
- "color-override-yellow": "awsui_color-override-yellow_1cbgc_13oha_251",
23
- "container": "awsui_container_1cbgc_13oha_181",
24
- "display-inline": "awsui_display-inline_1cbgc_13oha_304",
25
- "icon": "awsui_icon_1cbgc_13oha_153",
26
- "one-theme": "awsui_one-theme_1cbgc_13oha_312",
27
- "display-inline-block": "awsui_display-inline-block_1cbgc_13oha_315",
28
- "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_13oha_333"
4
+ "icon-shake": "awsui_icon-shake_1cbgc_1r1c9_153",
5
+ "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_1r1c9_1",
6
+ "container-fade-in": "awsui_container-fade-in_1cbgc_1r1c9_181",
7
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_1r1c9_1",
8
+ "root": "awsui_root_1cbgc_1r1c9_203",
9
+ "status-error": "awsui_status-error_1cbgc_1r1c9_212",
10
+ "status-warning": "awsui_status-warning_1cbgc_1r1c9_215",
11
+ "status-success": "awsui_status-success_1cbgc_1r1c9_218",
12
+ "status-info": "awsui_status-info_1cbgc_1r1c9_221",
13
+ "status-stopped": "awsui_status-stopped_1cbgc_1r1c9_224",
14
+ "status-pending": "awsui_status-pending_1cbgc_1r1c9_227",
15
+ "status-in-progress": "awsui_status-in-progress_1cbgc_1r1c9_230",
16
+ "status-loading": "awsui_status-loading_1cbgc_1r1c9_233",
17
+ "status-not-started": "awsui_status-not-started_1cbgc_1r1c9_236",
18
+ "color-override-red": "awsui_color-override-red_1cbgc_1r1c9_239",
19
+ "color-override-grey": "awsui_color-override-grey_1cbgc_1r1c9_242",
20
+ "color-override-blue": "awsui_color-override-blue_1cbgc_1r1c9_245",
21
+ "color-override-green": "awsui_color-override-green_1cbgc_1r1c9_248",
22
+ "color-override-yellow": "awsui_color-override-yellow_1cbgc_1r1c9_251",
23
+ "container": "awsui_container_1cbgc_1r1c9_181",
24
+ "display-inline": "awsui_display-inline_1cbgc_1r1c9_309",
25
+ "icon": "awsui_icon_1cbgc_1r1c9_153",
26
+ "display-inline-block": "awsui_display-inline-block_1cbgc_1r1c9_320",
27
+ "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_1r1c9_338"
29
28
  };
30
29
 
@@ -150,11 +150,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
151
  SPDX-License-Identifier: Apache-2.0
152
152
  */
153
- .awsui_icon-shake_1cbgc_13oha_153:not(#\9) {
153
+ .awsui_icon-shake_1cbgc_1r1c9_153:not(#\9) {
154
154
  display: inline-block;
155
- animation: awsui_awsui-motion-shake-horizontally_1cbgc_13oha_1 var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
155
+ animation: awsui_awsui-motion-shake-horizontally_1cbgc_1r1c9_1 var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
156
156
  }
157
- @keyframes awsui_awsui-motion-shake-horizontally_1cbgc_13oha_1 {
157
+ @keyframes awsui_awsui-motion-shake-horizontally_1cbgc_1r1c9_1 {
158
158
  0% {
159
159
  transform: translateX(-5px);
160
160
  animation-timing-function: linear;
@@ -168,20 +168,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
168
168
  }
169
169
  }
170
170
  @media (prefers-reduced-motion: reduce) {
171
- .awsui_icon-shake_1cbgc_13oha_153:not(#\9) {
171
+ .awsui_icon-shake_1cbgc_1r1c9_153:not(#\9) {
172
172
  animation: none;
173
173
  transition: none;
174
174
  }
175
175
  }
176
- .awsui-motion-disabled .awsui_icon-shake_1cbgc_13oha_153:not(#\9), .awsui-mode-entering .awsui_icon-shake_1cbgc_13oha_153:not(#\9) {
176
+ .awsui-motion-disabled .awsui_icon-shake_1cbgc_1r1c9_153:not(#\9), .awsui-mode-entering .awsui_icon-shake_1cbgc_1r1c9_153:not(#\9) {
177
177
  animation: none;
178
178
  transition: none;
179
179
  }
180
180
 
181
- .awsui_container-fade-in_1cbgc_13oha_181:not(#\9) {
182
- animation: awsui_awsui-motion-fade-in-0_1cbgc_13oha_1 var(--motion-duration-refresh-only-medium-h3wrr6, 0ms) var(--motion-easing-refresh-only-a-8gio5w, cubic-bezier(0, 0, 0, 1));
181
+ .awsui_container-fade-in_1cbgc_1r1c9_181:not(#\9) {
182
+ animation: awsui_awsui-motion-fade-in-0_1cbgc_1r1c9_1 var(--motion-duration-refresh-only-medium-h3wrr6, 0ms) var(--motion-easing-refresh-only-a-8gio5w, cubic-bezier(0, 0, 0, 1));
183
183
  }
184
- @keyframes awsui_awsui-motion-fade-in-0_1cbgc_13oha_1 {
184
+ @keyframes awsui_awsui-motion-fade-in-0_1cbgc_1r1c9_1 {
185
185
  from {
186
186
  opacity: 0;
187
187
  }
@@ -190,17 +190,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  }
191
191
  }
192
192
  @media (prefers-reduced-motion: reduce) {
193
- .awsui_container-fade-in_1cbgc_13oha_181:not(#\9) {
193
+ .awsui_container-fade-in_1cbgc_1r1c9_181:not(#\9) {
194
194
  animation: none;
195
195
  transition: none;
196
196
  }
197
197
  }
198
- .awsui-motion-disabled .awsui_container-fade-in_1cbgc_13oha_181:not(#\9), .awsui-mode-entering .awsui_container-fade-in_1cbgc_13oha_181:not(#\9) {
198
+ .awsui-motion-disabled .awsui_container-fade-in_1cbgc_1r1c9_181:not(#\9), .awsui-mode-entering .awsui_container-fade-in_1cbgc_1r1c9_181:not(#\9) {
199
199
  animation: none;
200
200
  transition: none;
201
201
  }
202
202
 
203
- .awsui_root_1cbgc_13oha_203:not(#\9) {
203
+ .awsui_root_1cbgc_1r1c9_203:not(#\9) {
204
204
  font-size: var(--font-size-body-m-vv54cm, 14px);
205
205
  line-height: var(--line-height-body-m-bedeoh, 22px);
206
206
  color: var(--color-text-body-default-5qid0u, #16191f);
@@ -209,138 +209,143 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
209
209
  -webkit-font-smoothing: auto;
210
210
  -moz-osx-font-smoothing: auto;
211
211
  }
212
- .awsui_root_1cbgc_13oha_203.awsui_status-error_1cbgc_13oha_212:not(#\9) {
212
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-error_1cbgc_1r1c9_212:not(#\9) {
213
213
  color: var(--color-text-status-error-aknuvu, #d13212);
214
214
  }
215
- .awsui_root_1cbgc_13oha_203.awsui_status-warning_1cbgc_13oha_215:not(#\9) {
215
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-warning_1cbgc_1r1c9_215:not(#\9) {
216
216
  color: var(--color-text-status-warning-9b45qh, #906806);
217
217
  }
218
- .awsui_root_1cbgc_13oha_203.awsui_status-success_1cbgc_13oha_218:not(#\9) {
218
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-success_1cbgc_1r1c9_218:not(#\9) {
219
219
  color: var(--color-text-status-success-yodf3z, #1d8102);
220
220
  }
221
- .awsui_root_1cbgc_13oha_203.awsui_status-info_1cbgc_13oha_221:not(#\9) {
221
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-info_1cbgc_1r1c9_221:not(#\9) {
222
222
  color: var(--color-text-status-info-xt2ka7, #0073bb);
223
223
  }
224
- .awsui_root_1cbgc_13oha_203.awsui_status-stopped_1cbgc_13oha_224:not(#\9) {
224
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-stopped_1cbgc_1r1c9_224:not(#\9) {
225
225
  color: var(--color-text-status-inactive-n7p1uq, #687078);
226
226
  }
227
- .awsui_root_1cbgc_13oha_203.awsui_status-pending_1cbgc_13oha_227:not(#\9) {
227
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-pending_1cbgc_1r1c9_227:not(#\9) {
228
228
  color: var(--color-text-status-inactive-n7p1uq, #687078);
229
229
  }
230
- .awsui_root_1cbgc_13oha_203.awsui_status-in-progress_1cbgc_13oha_230:not(#\9) {
230
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-in-progress_1cbgc_1r1c9_230:not(#\9) {
231
231
  color: var(--color-text-status-inactive-n7p1uq, #687078);
232
232
  }
233
- .awsui_root_1cbgc_13oha_203.awsui_status-loading_1cbgc_13oha_233:not(#\9) {
233
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-loading_1cbgc_1r1c9_233:not(#\9) {
234
234
  color: var(--color-text-status-inactive-n7p1uq, #687078);
235
235
  }
236
- .awsui_root_1cbgc_13oha_203.awsui_status-not-started_1cbgc_13oha_236:not(#\9) {
236
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-not-started_1cbgc_1r1c9_236:not(#\9) {
237
237
  color: var(--color-text-status-inactive-n7p1uq, #687078);
238
238
  }
239
- .awsui_root_1cbgc_13oha_203.awsui_color-override-red_1cbgc_13oha_239:not(#\9) {
239
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-red_1cbgc_1r1c9_239:not(#\9) {
240
240
  color: var(--color-text-status-error-aknuvu, #d13212);
241
241
  }
242
- .awsui_root_1cbgc_13oha_203.awsui_color-override-grey_1cbgc_13oha_242:not(#\9) {
242
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-grey_1cbgc_1r1c9_242:not(#\9) {
243
243
  color: var(--color-text-status-inactive-n7p1uq, #687078);
244
244
  }
245
- .awsui_root_1cbgc_13oha_203.awsui_color-override-blue_1cbgc_13oha_245:not(#\9) {
245
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-blue_1cbgc_1r1c9_245:not(#\9) {
246
246
  color: var(--color-text-status-info-xt2ka7, #0073bb);
247
247
  }
248
- .awsui_root_1cbgc_13oha_203.awsui_color-override-green_1cbgc_13oha_248:not(#\9) {
248
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-green_1cbgc_1r1c9_248:not(#\9) {
249
249
  color: var(--color-text-status-success-yodf3z, #1d8102);
250
250
  }
251
- .awsui_root_1cbgc_13oha_203.awsui_color-override-yellow_1cbgc_13oha_251:not(#\9) {
251
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-yellow_1cbgc_1r1c9_251:not(#\9) {
252
252
  color: var(--color-text-status-warning-9b45qh, #906806);
253
253
  }
254
- .awsui_root_1cbgc_13oha_203.awsui_status-error_1cbgc_13oha_212 > .awsui_container_1cbgc_13oha_181:not(#\9) {
254
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-error_1cbgc_1r1c9_212 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
255
255
  background: var(--color-background-status-indicator-error-621sf8, transparent);
256
256
  }
257
- .awsui_root_1cbgc_13oha_203.awsui_status-warning_1cbgc_13oha_215 > .awsui_container_1cbgc_13oha_181:not(#\9) {
257
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-warning_1cbgc_1r1c9_215 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
258
258
  background: var(--color-background-status-indicator-warning-3kccdi, transparent);
259
259
  }
260
- .awsui_root_1cbgc_13oha_203.awsui_status-success_1cbgc_13oha_218 > .awsui_container_1cbgc_13oha_181:not(#\9) {
260
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-success_1cbgc_1r1c9_218 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
261
261
  background: var(--color-background-status-indicator-success-9mizpw, transparent);
262
262
  }
263
- .awsui_root_1cbgc_13oha_203.awsui_status-info_1cbgc_13oha_221 > .awsui_container_1cbgc_13oha_181:not(#\9) {
263
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-info_1cbgc_1r1c9_221 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
264
264
  background: var(--color-background-status-indicator-info-zw9ljm, transparent);
265
265
  }
266
- .awsui_root_1cbgc_13oha_203.awsui_status-stopped_1cbgc_13oha_224 > .awsui_container_1cbgc_13oha_181:not(#\9) {
266
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-stopped_1cbgc_1r1c9_224 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
267
267
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
268
268
  }
269
- .awsui_root_1cbgc_13oha_203.awsui_status-pending_1cbgc_13oha_227 > .awsui_container_1cbgc_13oha_181:not(#\9) {
269
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-pending_1cbgc_1r1c9_227 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
270
270
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
271
271
  }
272
- .awsui_root_1cbgc_13oha_203.awsui_status-in-progress_1cbgc_13oha_230 > .awsui_container_1cbgc_13oha_181:not(#\9) {
272
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-in-progress_1cbgc_1r1c9_230 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
273
273
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
274
274
  }
275
- .awsui_root_1cbgc_13oha_203.awsui_status-loading_1cbgc_13oha_233 > .awsui_container_1cbgc_13oha_181:not(#\9) {
275
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-loading_1cbgc_1r1c9_233 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
276
276
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
277
277
  }
278
- .awsui_root_1cbgc_13oha_203.awsui_status-not-started_1cbgc_13oha_236 > .awsui_container_1cbgc_13oha_181:not(#\9) {
278
+ .awsui_root_1cbgc_1r1c9_203.awsui_status-not-started_1cbgc_1r1c9_236 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
279
279
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
280
280
  }
281
- .awsui_root_1cbgc_13oha_203.awsui_color-override-red_1cbgc_13oha_239 > .awsui_container_1cbgc_13oha_181:not(#\9) {
281
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-red_1cbgc_1r1c9_239 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
282
282
  background: var(--color-background-status-indicator-error-621sf8, transparent);
283
283
  }
284
- .awsui_root_1cbgc_13oha_203.awsui_color-override-grey_1cbgc_13oha_242 > .awsui_container_1cbgc_13oha_181:not(#\9) {
284
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-grey_1cbgc_1r1c9_242 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
285
285
  background: var(--color-background-status-indicator-neutral-50dvgi, transparent);
286
286
  }
287
- .awsui_root_1cbgc_13oha_203.awsui_color-override-blue_1cbgc_13oha_245 > .awsui_container_1cbgc_13oha_181:not(#\9) {
287
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-blue_1cbgc_1r1c9_245 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
288
288
  background: var(--color-background-status-indicator-info-zw9ljm, transparent);
289
289
  }
290
- .awsui_root_1cbgc_13oha_203.awsui_color-override-green_1cbgc_13oha_248 > .awsui_container_1cbgc_13oha_181:not(#\9) {
290
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-green_1cbgc_1r1c9_248 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
291
291
  background: var(--color-background-status-indicator-success-9mizpw, transparent);
292
292
  }
293
- .awsui_root_1cbgc_13oha_203.awsui_color-override-yellow_1cbgc_13oha_251 > .awsui_container_1cbgc_13oha_181:not(#\9) {
293
+ .awsui_root_1cbgc_1r1c9_203.awsui_color-override-yellow_1cbgc_1r1c9_251 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
294
294
  background: var(--color-background-status-indicator-warning-3kccdi, transparent);
295
295
  }
296
296
 
297
- .awsui_container_1cbgc_13oha_181:not(#\9) {
297
+ .awsui_container_1cbgc_1r1c9_181:not(#\9) {
298
298
  padding-inline: var(--space-status-indicator-padding-horizontal-hzqgcr, 0px);
299
299
  border-start-start-radius: var(--border-radius-status-indicator-42rwc5, 16px);
300
300
  border-start-end-radius: var(--border-radius-status-indicator-42rwc5, 16px);
301
301
  border-end-start-radius: var(--border-radius-status-indicator-42rwc5, 16px);
302
302
  border-end-end-radius: var(--border-radius-status-indicator-42rwc5, 16px);
303
303
  }
304
- .awsui_container_1cbgc_13oha_181.awsui_display-inline_1cbgc_13oha_304:not(#\9) {
304
+ .awsui-one-theme .awsui_root_1cbgc_1r1c9_203.awsui_status-loading_1cbgc_1r1c9_233 > .awsui_container_1cbgc_1r1c9_181:not(#\9) {
305
+ background: transparent;
306
+ align-items: center;
307
+ color: var(--color-text-body-secondary-gaft81, #545b64);
308
+ }
309
+ .awsui_container_1cbgc_1r1c9_181.awsui_display-inline_1cbgc_1r1c9_309:not(#\9) {
305
310
  min-inline-size: 0;
306
311
  word-break: break-word;
307
312
  display: inline;
308
313
  }
309
- .awsui_container_1cbgc_13oha_181.awsui_display-inline_1cbgc_13oha_304 > .awsui_icon_1cbgc_13oha_153:not(#\9) {
314
+ .awsui_container_1cbgc_1r1c9_181.awsui_display-inline_1cbgc_1r1c9_309 > .awsui_icon_1cbgc_1r1c9_153:not(#\9) {
310
315
  white-space: nowrap;
311
316
  }
312
- .awsui_container_1cbgc_13oha_181.awsui_display-inline_1cbgc_13oha_304 > .awsui_icon_1cbgc_13oha_153.awsui_one-theme_1cbgc_13oha_312:not(#\9) {
317
+ .awsui-one-theme .awsui_container_1cbgc_1r1c9_181.awsui_display-inline_1cbgc_1r1c9_309 > .awsui_icon_1cbgc_1r1c9_153:not(#\9) {
313
318
  vertical-align: middle;
314
319
  }
315
- .awsui_container_1cbgc_13oha_181.awsui_display-inline-block_1cbgc_13oha_315:not(#\9) {
320
+ .awsui_container_1cbgc_1r1c9_181.awsui_display-inline-block_1cbgc_1r1c9_320:not(#\9) {
316
321
  display: inline-block;
317
322
  word-wrap: break-word;
318
323
  word-break: break-all;
319
324
  }
320
- .awsui_container_1cbgc_13oha_181.awsui_display-inline-block_1cbgc_13oha_315.awsui_one-theme_1cbgc_13oha_312:not(#\9) {
325
+ .awsui-one-theme .awsui_container_1cbgc_1r1c9_181.awsui_display-inline-block_1cbgc_1r1c9_320:not(#\9) {
321
326
  display: inline-flex;
322
327
  align-items: flex-start;
323
328
  }
324
- .awsui_container_1cbgc_13oha_181.awsui_display-inline-block_1cbgc_13oha_315 > .awsui_icon_1cbgc_13oha_153:not(#\9) {
329
+ .awsui_container_1cbgc_1r1c9_181.awsui_display-inline-block_1cbgc_1r1c9_320 > .awsui_icon_1cbgc_1r1c9_153:not(#\9) {
325
330
  padding-inline-end: var(--space-xxs-jnczic, 4px);
326
331
  }
327
- .awsui_container_1cbgc_13oha_181.awsui_display-inline-block_1cbgc_13oha_315 > .awsui_icon_1cbgc_13oha_153.awsui_one-theme_1cbgc_13oha_312:not(#\9) {
332
+ .awsui-one-theme .awsui_container_1cbgc_1r1c9_181.awsui_display-inline-block_1cbgc_1r1c9_320 > .awsui_icon_1cbgc_1r1c9_153:not(#\9) {
328
333
  display: inline-flex;
329
334
  align-items: center;
330
335
  margin-block-start: var(--space-xxxs-3w1kr2, 2px);
331
336
  }
332
337
 
333
- .awsui_overflow-ellipsis_1cbgc_13oha_333:not(#\9) {
338
+ .awsui_overflow-ellipsis_1cbgc_1r1c9_338:not(#\9) {
334
339
  max-inline-size: 100%;
335
340
  overflow: hidden;
336
341
  text-overflow: ellipsis;
337
342
  white-space: nowrap;
338
343
  vertical-align: text-bottom;
339
344
  }
340
- .awsui_overflow-ellipsis_1cbgc_13oha_333.awsui_one-theme_1cbgc_13oha_312:not(#\9) {
345
+ .awsui-one-theme .awsui_overflow-ellipsis_1cbgc_1r1c9_338:not(#\9) {
341
346
  text-overflow: unset;
342
347
  }
343
- .awsui_overflow-ellipsis_1cbgc_13oha_333.awsui_one-theme_1cbgc_13oha_312 > span:not(#\9):last-child {
348
+ .awsui-one-theme .awsui_overflow-ellipsis_1cbgc_1r1c9_338 > span:not(#\9):last-child {
344
349
  overflow: hidden;
345
350
  text-overflow: ellipsis;
346
351
  white-space: nowrap;
@@ -2,30 +2,29 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "icon-shake": "awsui_icon-shake_1cbgc_13oha_153",
6
- "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_13oha_1",
7
- "container-fade-in": "awsui_container-fade-in_1cbgc_13oha_181",
8
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_13oha_1",
9
- "root": "awsui_root_1cbgc_13oha_203",
10
- "status-error": "awsui_status-error_1cbgc_13oha_212",
11
- "status-warning": "awsui_status-warning_1cbgc_13oha_215",
12
- "status-success": "awsui_status-success_1cbgc_13oha_218",
13
- "status-info": "awsui_status-info_1cbgc_13oha_221",
14
- "status-stopped": "awsui_status-stopped_1cbgc_13oha_224",
15
- "status-pending": "awsui_status-pending_1cbgc_13oha_227",
16
- "status-in-progress": "awsui_status-in-progress_1cbgc_13oha_230",
17
- "status-loading": "awsui_status-loading_1cbgc_13oha_233",
18
- "status-not-started": "awsui_status-not-started_1cbgc_13oha_236",
19
- "color-override-red": "awsui_color-override-red_1cbgc_13oha_239",
20
- "color-override-grey": "awsui_color-override-grey_1cbgc_13oha_242",
21
- "color-override-blue": "awsui_color-override-blue_1cbgc_13oha_245",
22
- "color-override-green": "awsui_color-override-green_1cbgc_13oha_248",
23
- "color-override-yellow": "awsui_color-override-yellow_1cbgc_13oha_251",
24
- "container": "awsui_container_1cbgc_13oha_181",
25
- "display-inline": "awsui_display-inline_1cbgc_13oha_304",
26
- "icon": "awsui_icon_1cbgc_13oha_153",
27
- "one-theme": "awsui_one-theme_1cbgc_13oha_312",
28
- "display-inline-block": "awsui_display-inline-block_1cbgc_13oha_315",
29
- "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_13oha_333"
5
+ "icon-shake": "awsui_icon-shake_1cbgc_1r1c9_153",
6
+ "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_1r1c9_1",
7
+ "container-fade-in": "awsui_container-fade-in_1cbgc_1r1c9_181",
8
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_1r1c9_1",
9
+ "root": "awsui_root_1cbgc_1r1c9_203",
10
+ "status-error": "awsui_status-error_1cbgc_1r1c9_212",
11
+ "status-warning": "awsui_status-warning_1cbgc_1r1c9_215",
12
+ "status-success": "awsui_status-success_1cbgc_1r1c9_218",
13
+ "status-info": "awsui_status-info_1cbgc_1r1c9_221",
14
+ "status-stopped": "awsui_status-stopped_1cbgc_1r1c9_224",
15
+ "status-pending": "awsui_status-pending_1cbgc_1r1c9_227",
16
+ "status-in-progress": "awsui_status-in-progress_1cbgc_1r1c9_230",
17
+ "status-loading": "awsui_status-loading_1cbgc_1r1c9_233",
18
+ "status-not-started": "awsui_status-not-started_1cbgc_1r1c9_236",
19
+ "color-override-red": "awsui_color-override-red_1cbgc_1r1c9_239",
20
+ "color-override-grey": "awsui_color-override-grey_1cbgc_1r1c9_242",
21
+ "color-override-blue": "awsui_color-override-blue_1cbgc_1r1c9_245",
22
+ "color-override-green": "awsui_color-override-green_1cbgc_1r1c9_248",
23
+ "color-override-yellow": "awsui_color-override-yellow_1cbgc_1r1c9_251",
24
+ "container": "awsui_container_1cbgc_1r1c9_181",
25
+ "display-inline": "awsui_display-inline_1cbgc_1r1c9_309",
26
+ "icon": "awsui_icon_1cbgc_1r1c9_153",
27
+ "display-inline-block": "awsui_display-inline-block_1cbgc_1r1c9_320",
28
+ "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_1r1c9_338"
30
29
  };
31
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tree-view/tree-item/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAO9C,UAAU,qBAAqB,CAAC,CAAC,CAC/B,SAAQ,IAAI,CACV,aAAa,EACX,eAAe,GACf,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,sBAAsB,GACtB,aAAa,GACb,gBAAgB,CACnB;IACD,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAClE,sBAAsB,EAAE;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH;AAED,QAAA,MAAM,gBAAgB,GAAI,CAAC,EAAG,yKAa3B,qBAAqB,CAAC,CAAC,CAAC,gBA0G1B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tree-view/tree-item/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAO9C,UAAU,qBAAqB,CAAC,CAAC,CAC/B,SAAQ,IAAI,CACV,aAAa,EACX,eAAe,GACf,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,sBAAsB,GACtB,aAAa,GACb,gBAAgB,CACnB;IACD,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAClE,sBAAsB,EAAE;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH;AAED,QAAA,MAAM,gBAAgB,GAAI,CAAC,EAAG,yKAa3B,qBAAqB,CAAC,CAAC,CAAC,gBA0G1B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -2,7 +2,6 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React from 'react';
4
4
  import clsx from 'clsx';
5
- import { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';
6
5
  import { useInternalI18n } from '../../i18n/context';
7
6
  import { ExpandToggleButton } from '../../internal/components/expand-toggle-button';
8
7
  import InternalStructuredItem from '../../internal/components/structured-item';
@@ -31,7 +30,7 @@ const InternalTreeItem = ({ item, index, level, i18nStrings, expandedItems = [],
31
30
  ? content
32
31
  : '';
33
32
  return (React.createElement("li", { role: "treeitem", id: id, className: clsx(styles.treeitem, testUtilStyles.treeitem, level > 1 && styles.offset, isExpandable && [testUtilStyles.expandable], isExpanded && [testUtilStyles.expanded]), "aria-expanded": isExpandable ? isExpanded : undefined, "aria-level": level, "data-testid": `awsui-treeitem-${id}`, "data-awsui-tree-item-index": allVisibleItemsIndices[id] },
34
- React.createElement("div", { className: clsx(styles['treeitem-content-wrapper'], isThemeActive(Theme.OneTheme) && styles['one-theme']) },
33
+ React.createElement("div", { className: clsx(styles['treeitem-content-wrapper']) },
35
34
  React.createElement("div", { className: styles['expand-toggle-wrapper'] },
36
35
  React.createElement("div", { className: styles.toggle }, isExpandable ? (React.createElement(ExpandToggleButton, { isExpanded: isExpanded, customIcon: customIcon, expandButtonLabel: joinStrings(i18n('i18nStrings.expandButtonLabel', (_a = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.expandButtonLabel) === null || _a === void 0 ? void 0 : _a.call(i18nStrings, item)), itemLabelToAnnounce), collapseButtonLabel: joinStrings(i18n('i18nStrings.collapseButtonLabel', (_b = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.collapseButtonLabel) === null || _b === void 0 ? void 0 : _b.call(i18nStrings, item)), itemLabelToAnnounce), onExpandableItemToggle: () => onItemToggle({ id, item, expanded: !isExpanded }), className: styles['tree-item-focus-target'], disableFocusHighlight: true })) : (React.createElement(FocusTarget, { ariaLabel: itemLabelToAnnounce })))),
37
36
  showVerticalConnectorLines && React.createElement(VerticalConnector, { variant: "grid" }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tree-view/tree-item/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACt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,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,sBAAsB,EAAE,sBAAsB,EAC9C,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;YACJ,CAAC,CAAC;YAED,0BAA0B,IAAI,oBAAC,iBAAiB,IAAC,OAAO,EAAC,UAAU,GAAG,CACpE,CACN,CACE,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../../i18n/context';\nimport { ExpandToggleButton } from '../../internal/components/expand-toggle-button';\nimport InternalStructuredItem from '../../internal/components/structured-item';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { TreeViewProps } from '../interfaces';\nimport VerticalConnector from '../vertical-connector';\nimport FocusTarget from './focus-target';\n\nimport testUtilStyles from '../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface InternalTreeItemProps<T>\n extends Pick<\n TreeViewProps,\n | 'expandedItems'\n | 'renderItem'\n | 'getItemId'\n | 'getItemChildren'\n | 'renderItemToggleIcon'\n | 'i18nStrings'\n | 'connectorLines'\n > {\n item: T;\n index: number;\n level: number;\n onItemToggle: (detail: TreeViewProps.ItemToggleDetail<T>) => void;\n allVisibleItemsIndices: {\n [key: string]: number;\n };\n}\n\nconst InternalTreeItem = <T,>({\n item,\n index,\n level,\n i18nStrings,\n expandedItems = [],\n connectorLines,\n renderItemToggleIcon,\n renderItem,\n getItemId,\n getItemChildren,\n onItemToggle,\n allVisibleItemsIndices,\n}: InternalTreeItemProps<T>) => {\n const i18n = useInternalI18n('tree-view');\n\n const { icon, content, secondaryContent, actions, announcementLabel } = renderItem(item, index);\n const id = getItemId(item, index);\n const children = getItemChildren(item, index) || [];\n const isExpandable = children.length > 0;\n const isExpanded = isExpandable && expandedItems.includes(id);\n const nextLevel = level + 1;\n\n const showVerticalConnectorLines = connectorLines === 'vertical' && isExpanded;\n\n let customIcon: React.ReactNode | undefined = undefined;\n if (isExpandable && renderItemToggleIcon) {\n customIcon = renderItemToggleIcon({ expanded: isExpanded });\n }\n\n const itemLabelToAnnounce = announcementLabel\n ? announcementLabel\n : typeof content === 'string'\n ? (content as string)\n : '';\n\n return (\n <li\n role=\"treeitem\"\n id={id}\n className={clsx(\n styles.treeitem,\n testUtilStyles.treeitem,\n level > 1 && styles.offset,\n isExpandable && [testUtilStyles.expandable],\n isExpanded && [testUtilStyles.expanded]\n )}\n aria-expanded={isExpandable ? isExpanded : undefined}\n aria-level={level}\n data-testid={`awsui-treeitem-${id}`}\n data-awsui-tree-item-index={allVisibleItemsIndices[id]}\n >\n <div className={clsx(styles['treeitem-content-wrapper'], isThemeActive(Theme.OneTheme) && styles['one-theme'])}>\n <div className={styles['expand-toggle-wrapper']}>\n <div className={styles.toggle}>\n {isExpandable ? (\n <ExpandToggleButton\n isExpanded={isExpanded}\n customIcon={customIcon}\n expandButtonLabel={joinStrings(\n i18n('i18nStrings.expandButtonLabel', i18nStrings?.expandButtonLabel?.(item)),\n itemLabelToAnnounce\n )}\n collapseButtonLabel={joinStrings(\n i18n('i18nStrings.collapseButtonLabel', i18nStrings?.collapseButtonLabel?.(item)),\n itemLabelToAnnounce\n )}\n onExpandableItemToggle={() => onItemToggle({ id, item, expanded: !isExpanded })}\n className={styles['tree-item-focus-target']}\n disableFocusHighlight={true}\n />\n ) : (\n <FocusTarget ariaLabel={itemLabelToAnnounce} />\n )}\n </div>\n </div>\n\n {showVerticalConnectorLines && <VerticalConnector variant=\"grid\" />}\n\n <div className={styles['structured-item-wrapper']}>\n <InternalStructuredItem\n icon={icon}\n content={content}\n secondaryContent={secondaryContent}\n actions={actions}\n wrapActions={false}\n className={styles['tree-item-structured-item']}\n />\n </div>\n </div>\n\n {isExpanded && children.length && (\n <ul role=\"group\" className={styles['treeitem-group']}>\n {children.map((child, index) => {\n const itemId = getItemId(child, index);\n return (\n <InternalTreeItem<T>\n item={child}\n index={index}\n key={itemId}\n level={nextLevel}\n expandedItems={expandedItems}\n i18nStrings={i18nStrings}\n onItemToggle={onItemToggle}\n renderItem={renderItem}\n getItemId={getItemId}\n getItemChildren={getItemChildren}\n renderItemToggleIcon={renderItemToggleIcon}\n allVisibleItemsIndices={allVisibleItemsIndices}\n connectorLines={connectorLines}\n />\n );\n })}\n\n {showVerticalConnectorLines && <VerticalConnector variant=\"absolute\" />}\n </ul>\n )}\n </li>\n );\n};\n\nexport default InternalTreeItem;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tree-view/tree-item/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,sBAAsB,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAsBrC,MAAM,gBAAgB,GAAG,CAAK,EAC5B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,aAAa,GAAG,EAAE,EAClB,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,SAAS,EACT,eAAe,EACf,YAAY,E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ClC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,MAAM,CAAC,2BAA2B,CAAC,GAC9C,CACE,CACF;QAEL,UAAU,IAAI,QAAQ,CAAC,MAAM,IAAI,CAChC,4BAAI,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC;YACjD,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACvC,OAAO,CACL,oBAAC,gBAAgB,IACf,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,sBAAsB,EAAE,sBAAsB,EAC9C,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;YACJ,CAAC,CAAC;YAED,0BAA0B,IAAI,oBAAC,iBAAiB,IAAC,OAAO,EAAC,UAAU,GAAG,CACpE,CACN,CACE,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../i18n/context';\nimport { ExpandToggleButton } from '../../internal/components/expand-toggle-button';\nimport InternalStructuredItem from '../../internal/components/structured-item';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { TreeViewProps } from '../interfaces';\nimport VerticalConnector from '../vertical-connector';\nimport FocusTarget from './focus-target';\n\nimport testUtilStyles from '../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface InternalTreeItemProps<T>\n extends Pick<\n TreeViewProps,\n | 'expandedItems'\n | 'renderItem'\n | 'getItemId'\n | 'getItemChildren'\n | 'renderItemToggleIcon'\n | 'i18nStrings'\n | 'connectorLines'\n > {\n item: T;\n index: number;\n level: number;\n onItemToggle: (detail: TreeViewProps.ItemToggleDetail<T>) => void;\n allVisibleItemsIndices: {\n [key: string]: number;\n };\n}\n\nconst InternalTreeItem = <T,>({\n item,\n index,\n level,\n i18nStrings,\n expandedItems = [],\n connectorLines,\n renderItemToggleIcon,\n renderItem,\n getItemId,\n getItemChildren,\n onItemToggle,\n allVisibleItemsIndices,\n}: InternalTreeItemProps<T>) => {\n const i18n = useInternalI18n('tree-view');\n\n const { icon, content, secondaryContent, actions, announcementLabel } = renderItem(item, index);\n const id = getItemId(item, index);\n const children = getItemChildren(item, index) || [];\n const isExpandable = children.length > 0;\n const isExpanded = isExpandable && expandedItems.includes(id);\n const nextLevel = level + 1;\n\n const showVerticalConnectorLines = connectorLines === 'vertical' && isExpanded;\n\n let customIcon: React.ReactNode | undefined = undefined;\n if (isExpandable && renderItemToggleIcon) {\n customIcon = renderItemToggleIcon({ expanded: isExpanded });\n }\n\n const itemLabelToAnnounce = announcementLabel\n ? announcementLabel\n : typeof content === 'string'\n ? (content as string)\n : '';\n\n return (\n <li\n role=\"treeitem\"\n id={id}\n className={clsx(\n styles.treeitem,\n testUtilStyles.treeitem,\n level > 1 && styles.offset,\n isExpandable && [testUtilStyles.expandable],\n isExpanded && [testUtilStyles.expanded]\n )}\n aria-expanded={isExpandable ? isExpanded : undefined}\n aria-level={level}\n data-testid={`awsui-treeitem-${id}`}\n data-awsui-tree-item-index={allVisibleItemsIndices[id]}\n >\n <div className={clsx(styles['treeitem-content-wrapper'])}>\n <div className={styles['expand-toggle-wrapper']}>\n <div className={styles.toggle}>\n {isExpandable ? (\n <ExpandToggleButton\n isExpanded={isExpanded}\n customIcon={customIcon}\n expandButtonLabel={joinStrings(\n i18n('i18nStrings.expandButtonLabel', i18nStrings?.expandButtonLabel?.(item)),\n itemLabelToAnnounce\n )}\n collapseButtonLabel={joinStrings(\n i18n('i18nStrings.collapseButtonLabel', i18nStrings?.collapseButtonLabel?.(item)),\n itemLabelToAnnounce\n )}\n onExpandableItemToggle={() => onItemToggle({ id, item, expanded: !isExpanded })}\n className={styles['tree-item-focus-target']}\n disableFocusHighlight={true}\n />\n ) : (\n <FocusTarget ariaLabel={itemLabelToAnnounce} />\n )}\n </div>\n </div>\n\n {showVerticalConnectorLines && <VerticalConnector variant=\"grid\" />}\n\n <div className={styles['structured-item-wrapper']}>\n <InternalStructuredItem\n icon={icon}\n content={content}\n secondaryContent={secondaryContent}\n actions={actions}\n wrapActions={false}\n className={styles['tree-item-structured-item']}\n />\n </div>\n </div>\n\n {isExpanded && children.length && (\n <ul role=\"group\" className={styles['treeitem-group']}>\n {children.map((child, index) => {\n const itemId = getItemId(child, index);\n return (\n <InternalTreeItem<T>\n item={child}\n index={index}\n key={itemId}\n level={nextLevel}\n expandedItems={expandedItems}\n i18nStrings={i18nStrings}\n onItemToggle={onItemToggle}\n renderItem={renderItem}\n getItemId={getItemId}\n getItemChildren={getItemChildren}\n renderItemToggleIcon={renderItemToggleIcon}\n allVisibleItemsIndices={allVisibleItemsIndices}\n connectorLines={connectorLines}\n />\n );\n })}\n\n {showVerticalConnectorLines && <VerticalConnector variant=\"absolute\" />}\n </ul>\n )}\n </li>\n );\n};\n\nexport default InternalTreeItem;\n"]}
@@ -1,15 +1,14 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "treeitem-group": "awsui_treeitem-group_1agpu_9ppth_185",
5
- "treeitem": "awsui_treeitem_1agpu_9ppth_185",
6
- "offset": "awsui_offset_1agpu_9ppth_202",
7
- "treeitem-content-wrapper": "awsui_treeitem-content-wrapper_1agpu_9ppth_205",
8
- "tree-item-focus-target": "awsui_tree-item-focus-target_1agpu_9ppth_210",
9
- "expand-toggle-wrapper": "awsui_expand-toggle-wrapper_1agpu_9ppth_231",
10
- "toggle": "awsui_toggle_1agpu_9ppth_236",
11
- "one-theme": "awsui_one-theme_1agpu_9ppth_242",
12
- "structured-item-wrapper": "awsui_structured-item-wrapper_1agpu_9ppth_249",
13
- "tree-item-structured-item": "awsui_tree-item-structured-item_1agpu_9ppth_256"
4
+ "treeitem-group": "awsui_treeitem-group_1agpu_1cr4z_189",
5
+ "treeitem": "awsui_treeitem_1agpu_1cr4z_189",
6
+ "offset": "awsui_offset_1agpu_1cr4z_206",
7
+ "treeitem-content-wrapper": "awsui_treeitem-content-wrapper_1agpu_1cr4z_209",
8
+ "tree-item-focus-target": "awsui_tree-item-focus-target_1agpu_1cr4z_214",
9
+ "expand-toggle-wrapper": "awsui_expand-toggle-wrapper_1agpu_1cr4z_235",
10
+ "toggle": "awsui_toggle_1agpu_1cr4z_240",
11
+ "structured-item-wrapper": "awsui_structured-item-wrapper_1agpu_1cr4z_253",
12
+ "tree-item-structured-item": "awsui_tree-item-structured-item_1agpu_1cr4z_260"
14
13
  };
15
14