@cloudscape-design/components 3.0.162 → 3.0.163

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 (137) hide show
  1. package/app-layout/visual-refresh/styles.css.js +60 -60
  2. package/app-layout/visual-refresh/styles.scoped.css +147 -147
  3. package/app-layout/visual-refresh/styles.selectors.js +60 -60
  4. package/button/internal.d.ts +1 -0
  5. package/button/internal.d.ts.map +1 -1
  6. package/button/internal.js +2 -2
  7. package/button/internal.js.map +1 -1
  8. package/code-editor/index.d.ts.map +1 -1
  9. package/code-editor/index.js +5 -8
  10. package/code-editor/index.js.map +1 -1
  11. package/code-editor/pane.d.ts.map +1 -1
  12. package/code-editor/pane.js +4 -4
  13. package/code-editor/pane.js.map +1 -1
  14. package/code-editor/resizable-box/index.d.ts +9 -0
  15. package/code-editor/resizable-box/index.d.ts.map +1 -0
  16. package/code-editor/resizable-box/index.js +44 -0
  17. package/code-editor/resizable-box/index.js.map +1 -0
  18. package/code-editor/resizable-box/styles.css.js +8 -0
  19. package/code-editor/resizable-box/styles.scoped.css +50 -0
  20. package/code-editor/resizable-box/styles.selectors.js +9 -0
  21. package/code-editor/styles.css.js +32 -33
  22. package/code-editor/styles.scoped.css +109 -139
  23. package/code-editor/styles.selectors.js +32 -33
  24. package/flashbar/styles.css.js +33 -33
  25. package/flashbar/styles.scoped.css +115 -115
  26. package/flashbar/styles.selectors.js +33 -33
  27. package/form-field/interfaces.d.ts +10 -0
  28. package/form-field/interfaces.d.ts.map +1 -1
  29. package/form-field/interfaces.js.map +1 -1
  30. package/form-field/internal.d.ts +1 -1
  31. package/form-field/internal.d.ts.map +1 -1
  32. package/form-field/internal.js +5 -4
  33. package/form-field/internal.js.map +1 -1
  34. package/input/internal.d.ts.map +1 -1
  35. package/input/internal.js +16 -4
  36. package/input/internal.js.map +1 -1
  37. package/internal/components/live-region/index.d.ts +1 -1
  38. package/internal/components/live-region/index.d.ts.map +1 -1
  39. package/internal/components/live-region/index.js +29 -6
  40. package/internal/components/live-region/index.js.map +1 -1
  41. package/internal/context/form-field-context.d.ts +6 -2
  42. package/internal/context/form-field-context.d.ts.map +1 -1
  43. package/internal/context/form-field-context.js +7 -1
  44. package/internal/context/form-field-context.js.map +1 -1
  45. package/internal/environment.js +1 -1
  46. package/internal/manifest.json +1 -1
  47. package/internal/types.d.ts +9 -0
  48. package/internal/types.d.ts.map +1 -1
  49. package/internal/types.js +0 -2
  50. package/internal/types.js.map +1 -1
  51. package/mixed-line-bar-chart/styles.css.js +19 -19
  52. package/mixed-line-bar-chart/styles.scoped.css +26 -26
  53. package/mixed-line-bar-chart/styles.selectors.js +19 -19
  54. package/package.json +30 -34
  55. package/progress-bar/index.d.ts.map +1 -1
  56. package/progress-bar/index.js +14 -3
  57. package/progress-bar/index.js.map +1 -1
  58. package/select/parts/styles.css.js +9 -9
  59. package/select/parts/styles.scoped.css +27 -9
  60. package/select/parts/styles.selectors.js +9 -9
  61. package/table/body-cell/click-away.d.ts +9 -0
  62. package/table/body-cell/click-away.d.ts.map +1 -0
  63. package/table/body-cell/click-away.js +38 -0
  64. package/table/body-cell/click-away.js.map +1 -0
  65. package/table/body-cell/index.d.ts +10 -19
  66. package/table/body-cell/index.d.ts.map +1 -1
  67. package/table/body-cell/index.js +49 -9
  68. package/table/body-cell/index.js.map +1 -1
  69. package/table/body-cell/inline-editor.d.ts +12 -0
  70. package/table/body-cell/inline-editor.d.ts.map +1 -0
  71. package/table/body-cell/inline-editor.js +88 -0
  72. package/table/body-cell/inline-editor.js.map +1 -0
  73. package/table/body-cell/styles.css.js +18 -12
  74. package/table/body-cell/styles.scoped.css +229 -46
  75. package/table/body-cell/styles.selectors.js +18 -12
  76. package/table/body-cell/td-element.d.ts +21 -0
  77. package/table/body-cell/td-element.d.ts.map +1 -0
  78. package/table/body-cell/td-element.js +11 -0
  79. package/table/body-cell/td-element.js.map +1 -0
  80. package/table/body-cell/use-stable-scroll-position.d.ts +17 -0
  81. package/table/body-cell/use-stable-scroll-position.d.ts.map +1 -0
  82. package/table/body-cell/use-stable-scroll-position.js +48 -0
  83. package/table/body-cell/use-stable-scroll-position.js.map +1 -0
  84. package/table/header-cell/index.d.ts +8 -7
  85. package/table/header-cell/index.d.ts.map +1 -1
  86. package/table/header-cell/index.js +6 -2
  87. package/table/header-cell/index.js.map +1 -1
  88. package/table/header-cell/styles.css.js +19 -18
  89. package/table/header-cell/styles.scoped.css +40 -35
  90. package/table/header-cell/styles.selectors.js +19 -18
  91. package/table/interfaces.d.ts +73 -6
  92. package/table/interfaces.d.ts.map +1 -1
  93. package/table/interfaces.js.map +1 -1
  94. package/table/internal.d.ts.map +1 -1
  95. package/table/internal.js +68 -18
  96. package/table/internal.js.map +1 -1
  97. package/table/thead.d.ts.map +1 -1
  98. package/table/thead.js +1 -1
  99. package/table/thead.js.map +1 -1
  100. package/table/use-table-focus-navigation.d.ts +16 -0
  101. package/table/use-table-focus-navigation.d.ts.map +1 -0
  102. package/table/use-table-focus-navigation.js +131 -0
  103. package/table/use-table-focus-navigation.js.map +1 -0
  104. package/tabs/index.d.ts +1 -1
  105. package/tabs/index.d.ts.map +1 -1
  106. package/tabs/index.js +2 -2
  107. package/tabs/index.js.map +1 -1
  108. package/tabs/interfaces.d.ts +14 -0
  109. package/tabs/interfaces.d.ts.map +1 -1
  110. package/tabs/interfaces.js.map +1 -1
  111. package/tabs/tab-header-bar.d.ts +2 -1
  112. package/tabs/tab-header-bar.d.ts.map +1 -1
  113. package/tabs/tab-header-bar.js +3 -7
  114. package/tabs/tab-header-bar.js.map +1 -1
  115. package/test-utils/dom/table/index.d.ts +4 -0
  116. package/test-utils/dom/table/index.js +21 -5
  117. package/test-utils/dom/table/index.js.map +1 -1
  118. package/test-utils/selectors/table/index.d.ts +4 -0
  119. package/test-utils/selectors/table/index.js +21 -5
  120. package/test-utils/selectors/table/index.js.map +1 -1
  121. package/test-utils/tsconfig.tsbuildinfo +1 -1
  122. package/code-editor/resize-handler.d.ts +0 -3
  123. package/code-editor/resize-handler.d.ts.map +0 -1
  124. package/code-editor/resize-handler.js +0 -7
  125. package/code-editor/resize-handler.js.map +0 -1
  126. package/internal/components/dynamic-aria-live/index.d.ts +0 -28
  127. package/internal/components/dynamic-aria-live/index.d.ts.map +0 -1
  128. package/internal/components/dynamic-aria-live/index.js +0 -38
  129. package/internal/components/dynamic-aria-live/index.js.map +0 -1
  130. package/internal/components/live-region/aria-liva-tag.d.ts +0 -13
  131. package/internal/components/live-region/aria-liva-tag.d.ts.map +0 -1
  132. package/internal/components/live-region/aria-liva-tag.js +0 -18
  133. package/internal/components/live-region/aria-liva-tag.js.map +0 -1
  134. package/internal/components/live-region/utils.d.ts +0 -8
  135. package/internal/components/live-region/utils.d.ts.map +0 -1
  136. package/internal/components/live-region/utils.js +0 -24
  137. package/internal/components/live-region/utils.js.map +0 -1
@@ -2,17 +2,23 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "body-cell": "awsui_body-cell_c6tup_9o7yk_9",
6
- "body-cell-wrap": "awsui_body-cell-wrap_c6tup_9o7yk_18",
7
- "body-cell-first-row": "awsui_body-cell-first-row_c6tup_9o7yk_30",
8
- "body-cell-last-row": "awsui_body-cell-last-row_c6tup_9o7yk_33",
9
- "body-cell-selected": "awsui_body-cell-selected_c6tup_9o7yk_33",
10
- "has-footer": "awsui_has-footer_c6tup_9o7yk_33",
11
- "body-cell-shaded": "awsui_body-cell-shaded_c6tup_9o7yk_43",
12
- "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_9o7yk_65",
13
- "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_9o7yk_69",
14
- "is-visual-refresh": "awsui_is-visual-refresh_c6tup_9o7yk_98",
15
- "has-selection": "awsui_has-selection_c6tup_9o7yk_114",
16
- "has-striped-rows": "awsui_has-striped-rows_c6tup_9o7yk_117"
5
+ "body-cell": "awsui_body-cell_c6tup_17cg6_93",
6
+ "body-cell-wrap": "awsui_body-cell-wrap_c6tup_17cg6_102",
7
+ "is-visual-refresh": "awsui_is-visual-refresh_c6tup_17cg6_114",
8
+ "has-striped-rows": "awsui_has-striped-rows_c6tup_17cg6_126",
9
+ "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_17cg6_129",
10
+ "body-cell-editable": "awsui_body-cell-editable_c6tup_17cg6_129",
11
+ "has-selection": "awsui_has-selection_c6tup_17cg6_135",
12
+ "body-cell-first-row": "awsui_body-cell-first-row_c6tup_17cg6_141",
13
+ "body-cell-last-row": "awsui_body-cell-last-row_c6tup_17cg6_144",
14
+ "body-cell-selected": "awsui_body-cell-selected_c6tup_17cg6_144",
15
+ "has-footer": "awsui_has-footer_c6tup_17cg6_144",
16
+ "body-cell-shaded": "awsui_body-cell-shaded_c6tup_17cg6_154",
17
+ "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_17cg6_176",
18
+ "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_17cg6_180",
19
+ "body-cell-editor": "awsui_body-cell-editor_c6tup_17cg6_204",
20
+ "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_17cg6_214",
21
+ "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_17cg6_223",
22
+ "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_17cg6_233"
17
23
  };
18
24
 
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface TableTdElementProps {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ wrapLines: boolean | undefined;
6
+ isFirstRow: boolean;
7
+ isLastRow: boolean;
8
+ isSelected: boolean;
9
+ isNextSelected: boolean;
10
+ isPrevSelected: boolean;
11
+ nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;
12
+ onClick?: () => void;
13
+ children?: React.ReactNode;
14
+ isEvenRow?: boolean;
15
+ stripedRows?: boolean;
16
+ hasSelection?: boolean;
17
+ hasFooter?: boolean;
18
+ isVisualRefresh?: boolean;
19
+ }
20
+ export declare const TableTdElement: React.ForwardRefExoticComponent<TableTdElementProps & React.RefAttributes<HTMLTableCellElement>>;
21
+ //# sourceMappingURL=td-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"td-element.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;IACvG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,kGAgD1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { __assign } from "tslib";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import clsx from 'clsx';
5
+ import React from 'react';
6
+ import styles from './styles.css.js';
7
+ export var TableTdElement = React.forwardRef(function (_a, ref) {
8
+ var className = _a.className, style = _a.style, children = _a.children, wrapLines = _a.wrapLines, isFirstRow = _a.isFirstRow, isLastRow = _a.isLastRow, isSelected = _a.isSelected, isNextSelected = _a.isNextSelected, isPrevSelected = _a.isPrevSelected, nativeAttributes = _a.nativeAttributes, onClick = _a.onClick, isEvenRow = _a.isEvenRow, stripedRows = _a.stripedRows, isVisualRefresh = _a.isVisualRefresh, hasSelection = _a.hasSelection, hasFooter = _a.hasFooter;
9
+ return (React.createElement("td", __assign({ style: style, className: clsx(className, styles['body-cell'], wrapLines && styles['body-cell-wrap'], isFirstRow && styles['body-cell-first-row'], isLastRow && styles['body-cell-last-row'], isSelected && styles['body-cell-selected'], isNextSelected && styles['body-cell-next-selected'], isPrevSelected && styles['body-cell-prev-selected'], !isEvenRow && stripedRows && styles['body-cell-shaded'], stripedRows && styles['has-striped-rows'], isVisualRefresh && styles['is-visual-refresh'], hasSelection && styles['has-selection'], hasFooter && styles['has-footer']), onClick: onClick, ref: ref }, nativeAttributes), children));
10
+ });
11
+ //# sourceMappingURL=td-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"td-element.js","sourceRoot":"","sources":["../../../../src/table/body-cell/td-element.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,CAAC,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,UACE,EAiBC,EACD,GAAG;QAjBD,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,OAAO,aAAA,EACP,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,eAAe,qBAAA,EACf,YAAY,kBAAA,EACZ,SAAS,eAAA;IAIX,OAAO,CACL,qCACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,WAAW,CAAC,EACnB,SAAS,IAAI,MAAM,CAAC,gBAAgB,CAAC,EACrC,UAAU,IAAI,MAAM,CAAC,qBAAqB,CAAC,EAC3C,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,UAAU,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC1C,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,cAAc,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACnD,CAAC,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACvD,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,EACzC,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,EAC9C,YAAY,IAAI,MAAM,CAAC,eAAe,CAAC,EACvC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAClC,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,IACJ,gBAAgB,GAEnB,QAAQ,CACN,CACN,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport styles from './styles.css.js';\n\nexport interface TableTdElementProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isFirstRow: boolean;\n isLastRow: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n nativeAttributes?: Omit<React.HTMLAttributes<HTMLTableCellElement>, 'style' | 'className' | 'onClick'>;\n onClick?: () => void;\n children?: React.ReactNode;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n hasSelection?: boolean;\n hasFooter?: boolean;\n isVisualRefresh?: boolean;\n}\n\nexport const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElementProps>(\n (\n {\n className,\n style,\n children,\n wrapLines,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n nativeAttributes,\n onClick,\n isEvenRow,\n stripedRows,\n isVisualRefresh,\n hasSelection,\n hasFooter,\n },\n ref\n ) => {\n return (\n <td\n style={style}\n className={clsx(\n className,\n styles['body-cell'],\n wrapLines && styles['body-cell-wrap'],\n isFirstRow && styles['body-cell-first-row'],\n isLastRow && styles['body-cell-last-row'],\n isSelected && styles['body-cell-selected'],\n isNextSelected && styles['body-cell-next-selected'],\n isPrevSelected && styles['body-cell-prev-selected'],\n !isEvenRow && stripedRows && styles['body-cell-shaded'],\n stripedRows && styles['has-striped-rows'],\n isVisualRefresh && styles['is-visual-refresh'],\n hasSelection && styles['has-selection'],\n hasFooter && styles['has-footer']\n )}\n onClick={onClick}\n ref={ref}\n {...nativeAttributes}\n >\n {children}\n </td>\n );\n }\n);\n"]}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export declare function isScrollable(ele: HTMLElement): boolean;
3
+ export declare function getScrollableParent(ele: HTMLElement | null): HTMLElement;
4
+ export interface UseStableScrollPositionResult {
5
+ /** Stores the current scroll position of the nearest scrollable container. */
6
+ storeScrollPosition: () => void;
7
+ /** Restores the scroll position of the nearest scrollable container to the last stored position. */
8
+ restoreScrollPosition: () => void;
9
+ }
10
+ /**
11
+ * This hook stores the scroll position of the nearest scrollable parent of the
12
+ * `activeElementRef` when `storeScrollPosition` is called, and restores it when
13
+ * `restoreScrollPosition` is called.
14
+ * @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
15
+ */
16
+ export declare function useStableScrollPosition<T extends HTMLElement>(activeElementRef: React.RefObject<T>): UseStableScrollPositionResult;
17
+ //# sourceMappingURL=use-stable-scroll-position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-stable-scroll-position.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,WAK5C;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAMxE;AAED,MAAM,WAAW,6BAA6B;IAC5C,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,WAAW,EAC3D,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GACnC,6BAA6B,CAsB/B"}
@@ -0,0 +1,48 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { useCallback, useRef } from 'react';
4
+ export function isScrollable(ele) {
5
+ var overflowXStyle = window.getComputedStyle(ele).overflowX;
6
+ var isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;
7
+ return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;
8
+ }
9
+ export function getScrollableParent(ele) {
10
+ return !ele || ele === document.body
11
+ ? document.body
12
+ : isScrollable(ele)
13
+ ? ele
14
+ : getScrollableParent(ele.parentElement);
15
+ }
16
+ var shouldScroll = function (_a, _b) {
17
+ var cx = _a[0], cy = _a[1];
18
+ var px = _b[0], py = _b[1];
19
+ return cx - px > 5 || cy - py > 5;
20
+ };
21
+ /**
22
+ * This hook stores the scroll position of the nearest scrollable parent of the
23
+ * `activeElementRef` when `storeScrollPosition` is called, and restores it when
24
+ * `restoreScrollPosition` is called.
25
+ * @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.
26
+ */
27
+ export function useStableScrollPosition(activeElementRef) {
28
+ var scrollRef = useRef();
29
+ var storeScrollPosition = useCallback(function () {
30
+ var _a;
31
+ var scrollableParent = getScrollableParent((_a = activeElementRef.current) !== null && _a !== void 0 ? _a : document.body);
32
+ if (scrollableParent) {
33
+ scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];
34
+ }
35
+ }, [activeElementRef]);
36
+ var restoreScrollPosition = useCallback(function () {
37
+ var _a;
38
+ var _b;
39
+ var scrollableParent = getScrollableParent((_b = activeElementRef.current) !== null && _b !== void 0 ? _b : document.body);
40
+ if (scrollRef.current &&
41
+ scrollRef.current.toString() !== '0,0' &&
42
+ shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])) {
43
+ _a = scrollRef.current, scrollableParent.scrollLeft = _a[0], scrollableParent.scrollTop = _a[1];
44
+ }
45
+ }, [activeElementRef]);
46
+ return { storeScrollPosition: storeScrollPosition, restoreScrollPosition: restoreScrollPosition };
47
+ }
48
+ //# sourceMappingURL=use-stable-scroll-position.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-stable-scroll-position.js","sourceRoot":"","sources":["../../../../src/table/body-cell/use-stable-scroll-position.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,UAAU,YAAY,CAAC,GAAgB;IAC3C,IAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9D,IAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjE,OAAO,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,CAAC,gBAAgB,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAuB;IACzD,OAAO,CAAC,GAAG,IAAI,GAAG,KAAK,QAAQ,CAAC,IAAI;QAClC,CAAC,CAAC,QAAQ,CAAC,IAAI;QACf,CAAC,CAAC,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H,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,mBAAmB,qBAAA,EAAE,qBAAqB,uBAAA,EAAE,CAAC;AACxD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useRef } from 'react';\n\nexport function isScrollable(ele: HTMLElement) {\n const overflowXStyle = window.getComputedStyle(ele).overflowX;\n const isOverflowHidden = overflowXStyle.indexOf('hidden') !== -1;\n\n return ele.scrollWidth > ele.clientWidth && !isOverflowHidden;\n}\n\nexport function getScrollableParent(ele: HTMLElement | null): HTMLElement {\n return !ele || ele === document.body\n ? document.body\n : isScrollable(ele)\n ? ele\n : getScrollableParent(ele.parentElement);\n}\n\nexport interface UseStableScrollPositionResult {\n /** Stores the current scroll position of the nearest scrollable container. */\n storeScrollPosition: () => void;\n /** Restores the scroll position of the nearest scrollable container to the last stored position. */\n restoreScrollPosition: () => void;\n}\n\nconst shouldScroll = ([cx, cy]: [number, number], [px, py]: [number, number]) => {\n return cx - px > 5 || cy - py > 5;\n};\n\n/**\n * This hook stores the scroll position of the nearest scrollable parent of the\n * `activeElementRef` when `storeScrollPosition` is called, and restores it when\n * `restoreScrollPosition` is called.\n * @param activeElementRef Ref to an active element in the table. This is used to find the nearest scrollable parent.\n */\nexport function useStableScrollPosition<T extends HTMLElement>(\n activeElementRef: React.RefObject<T>\n): UseStableScrollPositionResult {\n const scrollRef = useRef<Parameters<HTMLBodyElement['scroll']>>();\n\n const storeScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (scrollableParent) {\n scrollRef.current = [scrollableParent.scrollLeft, scrollableParent.scrollTop];\n }\n }, [activeElementRef]);\n\n const restoreScrollPosition = useCallback(() => {\n const scrollableParent = getScrollableParent(activeElementRef.current ?? document.body);\n if (\n scrollRef.current &&\n scrollRef.current.toString() !== '0,0' &&\n shouldScroll(scrollRef.current, [scrollableParent.scrollLeft, scrollableParent.scrollTop])\n ) {\n [scrollableParent.scrollLeft, scrollableParent.scrollTop] = scrollRef.current;\n }\n }, [activeElementRef]);\n\n return { storeScrollPosition, restoreScrollPosition };\n}\n"]}
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import { TableProps } from '../interfaces';
3
- interface TableHeaderCellProps {
3
+ interface TableHeaderCellProps<ItemType> {
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
6
  tabIndex: number;
7
- column: TableProps.ColumnDefinition<any>;
8
- activeSortingColumn: TableProps.SortingColumn<any> | undefined;
9
- sortingDescending: boolean | undefined;
10
- sortingDisabled: boolean | undefined;
11
- wrapLines: boolean | undefined;
7
+ column: TableProps.ColumnDefinition<ItemType>;
8
+ activeSortingColumn?: TableProps.SortingColumn<ItemType>;
9
+ sortingDescending?: boolean;
10
+ sortingDisabled?: boolean;
11
+ wrapLines?: boolean;
12
12
  showFocusRing: boolean;
13
13
  hidden?: boolean;
14
14
  onClick(detail: TableProps.SortingState<any>): void;
@@ -18,7 +18,8 @@ interface TableHeaderCellProps {
18
18
  onFocus?: () => void;
19
19
  onBlur?: () => void;
20
20
  resizableColumns?: boolean;
21
+ isEditable?: boolean;
21
22
  }
22
- export declare function TableHeaderCell({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, }: TableHeaderCellProps): JSX.Element;
23
+ export declare function TableHeaderCell<ItemType>({ className, style, tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, showFocusRing, hidden, onClick, colIndex, onFocus, onBlur, updateColumn, resizableColumns, onResizeFinish, isEditable, }: TableHeaderCellProps<ItemType>): JSX.Element;
23
24
  export {};
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"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AChB,cAAc,EACd,UAAU,GACX,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eA0FhC"}
@@ -12,7 +12,8 @@ import { Resizer } from '../resizer';
12
12
  import { useUniqueId } from '../../internal/hooks/use-unique-id';
13
13
  export function TableHeaderCell(_a) {
14
14
  var _b, _c, _d;
15
- var className = _a.className, style = _a.style, tabIndex = _a.tabIndex, column = _a.column, activeSortingColumn = _a.activeSortingColumn, sortingDescending = _a.sortingDescending, sortingDisabled = _a.sortingDisabled, wrapLines = _a.wrapLines, showFocusRing = _a.showFocusRing, hidden = _a.hidden, onClick = _a.onClick, colIndex = _a.colIndex, onFocus = _a.onFocus, onBlur = _a.onBlur, updateColumn = _a.updateColumn, resizableColumns = _a.resizableColumns, onResizeFinish = _a.onResizeFinish;
15
+ var _e;
16
+ var className = _a.className, style = _a.style, tabIndex = _a.tabIndex, column = _a.column, activeSortingColumn = _a.activeSortingColumn, sortingDescending = _a.sortingDescending, sortingDisabled = _a.sortingDisabled, wrapLines = _a.wrapLines, showFocusRing = _a.showFocusRing, hidden = _a.hidden, onClick = _a.onClick, colIndex = _a.colIndex, onFocus = _a.onFocus, onBlur = _a.onBlur, updateColumn = _a.updateColumn, resizableColumns = _a.resizableColumns, onResizeFinish = _a.onResizeFinish, isEditable = _a.isEditable;
16
17
  var focusVisible = useFocusVisible();
17
18
  var sortable = !!column.sortingComparator || !!column.sortingField;
18
19
  var sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);
@@ -54,7 +55,10 @@ export function TableHeaderCell(_a) {
54
55
  })
55
56
  : undefined }, (sortingDisabled || !sortingStatus
56
57
  ? (_d = {}, _d['aria-disabled'] = 'true', _d) : __assign(__assign({ onKeyPress: handleKeyPress, tabIndex: tabIndex, role: 'button' }, focusVisible), { onClick: handleClick, onFocus: onFocus, onBlur: onBlur }))),
57
- React.createElement("div", { className: clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap']), id: headerId }, column.header),
58
+ React.createElement("div", { className: clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap']), id: headerId },
59
+ column.header,
60
+ isEditable ? (React.createElement("span", { className: styles['edit-icon'], role: "img", "aria-label": (_e = column.editConfig) === null || _e === void 0 ? void 0 : _e.editIconAriaLabel },
61
+ React.createElement(InternalIcon, { name: "edit" }))) : null),
58
62
  sortingStatus && (React.createElement("span", { className: styles['sorting-icon'] },
59
63
  React.createElement(InternalIcon, { name: getSortingIconName(sortingStatus) })))),
60
64
  resizableColumns && (React.createElement(React.Fragment, null,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAsBjE,MAAM,UAAU,eAAe,CAAC,EAkBT;;QAjBrB,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,mBAAmB,yBAAA,EACnB,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,MAAM,YAAA,EACN,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,MAAM,YAAA,EACN,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,cAAc,oBAAA;IAEd,IA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AO,IACN,UAAU,EAAE,UAAA,QAAQ,IAAI,OAAA,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAhC,CAAgC,EACxD,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,QAAQ,EACxB,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAC3F,CACD,CACJ,CACE,CACN,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport InternalIcon from '../../icon/internal';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { KeyCode } from '../../internal/keycode';\nimport { TableProps } from '../interfaces';\nimport { getAriaSort, getSortingIconName, getSortingStatus, isSorted } from './utils';\nimport styles from './styles.css.js';\nimport { Resizer } from '../resizer';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\n\ninterface TableHeaderCellProps {\n className?: string;\n style?: React.CSSProperties;\n tabIndex: number;\n column: TableProps.ColumnDefinition<any>;\n activeSortingColumn: TableProps.SortingColumn<any> | undefined;\n sortingDescending: boolean | undefined;\n sortingDisabled: boolean | undefined;\n wrapLines: boolean | undefined;\n showFocusRing: boolean;\n hidden?: boolean;\n onClick(detail: TableProps.SortingState<any>): void;\n onResizeFinish: () => void;\n colIndex: number;\n updateColumn: (colIndex: number, newWidth: number) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n resizableColumns?: boolean;\n}\n\nexport function TableHeaderCell({\n className,\n style,\n tabIndex,\n column,\n activeSortingColumn,\n sortingDescending,\n sortingDisabled,\n wrapLines,\n showFocusRing,\n hidden,\n onClick,\n colIndex,\n onFocus,\n onBlur,\n updateColumn,\n resizableColumns,\n onResizeFinish,\n}: TableHeaderCellProps) {\n const focusVisible = useFocusVisible();\n const sortable = !!column.sortingComparator || !!column.sortingField;\n const sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);\n const sortingStatus = getSortingStatus(sortable, sorted, !!sortingDescending, !!sortingDisabled);\n const handleClick = () =>\n onClick({\n sortingColumn: column,\n isDescending: sorted ? !sortingDescending : false,\n });\n\n // Elements with role=\"button\" do not have the default behavior of <button>, where pressing\n // Enter or Space will trigger a click event. Therefore we need to add this ourselves.\n // The native <button> element cannot be used due to a misaligned implementation in Firefox:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=843003\n const handleKeyPress = ({ nativeEvent: e }: React.KeyboardEvent) => {\n if (e.keyCode === KeyCode.enter || e.keyCode === KeyCode.space) {\n e.preventDefault();\n handleClick();\n }\n };\n\n const headerId = useUniqueId('table-header-');\n\n return (\n <th\n className={clsx(className, {\n [styles['header-cell-resizable']]: !!resizableColumns,\n [styles['header-cell-sortable']]: sortingStatus,\n [styles['header-cell-sorted']]: sortingStatus === 'ascending' || sortingStatus === 'descending',\n [styles['header-cell-disabled']]: sortingDisabled,\n [styles['header-cell-ascending']]: sortingStatus === 'ascending',\n [styles['header-cell-descending']]: sortingStatus === 'descending',\n [styles['header-cell-hidden']]: hidden,\n })}\n aria-sort={sortingStatus && getAriaSort(sortingStatus)}\n style={style}\n scope=\"col\"\n >\n <div\n className={clsx(styles['header-cell-content'], {\n [styles['header-cell-fake-focus']]: showFocusRing && focusVisible['data-awsui-focus-visible'],\n })}\n aria-label={\n column.ariaLabel\n ? column.ariaLabel({\n sorted: sorted,\n descending: sorted && !!sortingDescending,\n disabled: !!sortingDisabled,\n })\n : undefined\n }\n {...(sortingDisabled || !sortingStatus\n ? { ['aria-disabled']: 'true' }\n : {\n onKeyPress: handleKeyPress,\n tabIndex: tabIndex,\n role: 'button',\n ...focusVisible,\n onClick: handleClick,\n onFocus,\n onBlur,\n })}\n >\n <div className={clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap'])} id={headerId}>\n {column.header}\n </div>\n {sortingStatus && (\n <span className={styles['sorting-icon']}>\n <InternalIcon name={getSortingIconName(sortingStatus)} />\n </span>\n )}\n </div>\n {resizableColumns && (\n <>\n <Resizer\n onDragMove={newWidth => updateColumn(colIndex, newWidth)}\n onFinish={onResizeFinish}\n ariaLabelledby={headerId}\n minWidth={typeof column.minWidth === 'string' ? parseInt(column.minWidth) : column.minWidth}\n />\n </>\n )}\n </th>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAuBjE,MAAM,UAAU,eAAe,CAAW,EAmBT;;;QAlB/B,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,mBAAmB,yBAAA,EACnB,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,MAAM,YAAA,EACN,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,MAAM,YAAA,EACN,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,cAAc,oBAAA,EACd,UAAU,gBAAA;IAEV,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,QAAQ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,aAAa,IAAI,CAChB,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;gBACrC,oBAAC,YAAY,IAAC,IAAI,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAI,CACpD,CACR,CACG;QACL,gBAAgB,IAAI,CACnB;YACE,oBAAC,OAAO,IACN,UAAU,EAAE,UAAA,QAAQ,IAAI,OAAA,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAhC,CAAgC,EACxD,QAAQ,EAAE,cAAc,EACxB,cAAc,EAAE,QAAQ,EACxB,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAC3F,CACD,CACJ,CACE,CACN,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport InternalIcon from '../../icon/internal';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { KeyCode } from '../../internal/keycode';\nimport { TableProps } from '../interfaces';\nimport { getAriaSort, getSortingIconName, getSortingStatus, isSorted } from './utils';\nimport styles from './styles.css.js';\nimport { Resizer } from '../resizer';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\n\ninterface TableHeaderCellProps<ItemType> {\n className?: string;\n style?: React.CSSProperties;\n tabIndex: number;\n column: TableProps.ColumnDefinition<ItemType>;\n activeSortingColumn?: TableProps.SortingColumn<ItemType>;\n sortingDescending?: boolean;\n sortingDisabled?: boolean;\n wrapLines?: boolean;\n showFocusRing: boolean;\n hidden?: boolean;\n onClick(detail: TableProps.SortingState<any>): void;\n onResizeFinish: () => void;\n colIndex: number;\n updateColumn: (colIndex: number, newWidth: number) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n resizableColumns?: boolean;\n isEditable?: boolean;\n}\n\nexport function TableHeaderCell<ItemType>({\n className,\n style,\n tabIndex,\n column,\n activeSortingColumn,\n sortingDescending,\n sortingDisabled,\n wrapLines,\n showFocusRing,\n hidden,\n onClick,\n colIndex,\n onFocus,\n onBlur,\n updateColumn,\n resizableColumns,\n onResizeFinish,\n isEditable,\n}: TableHeaderCellProps<ItemType>) {\n const focusVisible = useFocusVisible();\n const sortable = !!column.sortingComparator || !!column.sortingField;\n const sorted = !!activeSortingColumn && isSorted(column, activeSortingColumn);\n const sortingStatus = getSortingStatus(sortable, sorted, !!sortingDescending, !!sortingDisabled);\n const handleClick = () =>\n onClick({\n sortingColumn: column,\n isDescending: sorted ? !sortingDescending : false,\n });\n\n // Elements with role=\"button\" do not have the default behavior of <button>, where pressing\n // Enter or Space will trigger a click event. Therefore we need to add this ourselves.\n // The native <button> element cannot be used due to a misaligned implementation in Firefox:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=843003\n const handleKeyPress = ({ nativeEvent: e }: React.KeyboardEvent) => {\n if (e.keyCode === KeyCode.enter || e.keyCode === KeyCode.space) {\n e.preventDefault();\n handleClick();\n }\n };\n\n const headerId = useUniqueId('table-header-');\n\n return (\n <th\n className={clsx(className, {\n [styles['header-cell-resizable']]: !!resizableColumns,\n [styles['header-cell-sortable']]: sortingStatus,\n [styles['header-cell-sorted']]: sortingStatus === 'ascending' || sortingStatus === 'descending',\n [styles['header-cell-disabled']]: sortingDisabled,\n [styles['header-cell-ascending']]: sortingStatus === 'ascending',\n [styles['header-cell-descending']]: sortingStatus === 'descending',\n [styles['header-cell-hidden']]: hidden,\n })}\n aria-sort={sortingStatus && getAriaSort(sortingStatus)}\n style={style}\n scope=\"col\"\n >\n <div\n className={clsx(styles['header-cell-content'], {\n [styles['header-cell-fake-focus']]: showFocusRing && focusVisible['data-awsui-focus-visible'],\n })}\n aria-label={\n column.ariaLabel\n ? column.ariaLabel({\n sorted: sorted,\n descending: sorted && !!sortingDescending,\n disabled: !!sortingDisabled,\n })\n : undefined\n }\n {...(sortingDisabled || !sortingStatus\n ? { ['aria-disabled']: 'true' }\n : {\n onKeyPress: handleKeyPress,\n tabIndex: tabIndex,\n role: 'button',\n ...focusVisible,\n onClick: handleClick,\n onFocus,\n onBlur,\n })}\n >\n <div className={clsx(styles['header-cell-text'], wrapLines && styles['header-cell-text-wrap'])} id={headerId}>\n {column.header}\n {isEditable ? (\n <span className={styles['edit-icon']} role=\"img\" aria-label={column.editConfig?.editIconAriaLabel}>\n <InternalIcon name=\"edit\" />\n </span>\n ) : null}\n </div>\n {sortingStatus && (\n <span className={styles['sorting-icon']}>\n <InternalIcon name={getSortingIconName(sortingStatus)} />\n </span>\n )}\n </div>\n {resizableColumns && (\n <>\n <Resizer\n onDragMove={newWidth => updateColumn(colIndex, newWidth)}\n onFinish={onResizeFinish}\n ariaLabelledby={headerId}\n minWidth={typeof column.minWidth === 'string' ? parseInt(column.minWidth) : column.minWidth}\n />\n </>\n )}\n </th>\n );\n}\n"]}
@@ -1,23 +1,24 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "header-cell": "awsui_header-cell_1spae_1d6sg_93",
5
- "header-cell-sticky": "awsui_header-cell-sticky_1spae_1d6sg_105",
6
- "header-cell-stuck": "awsui_header-cell-stuck_1spae_1d6sg_108",
7
- "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1d6sg_108",
8
- "header-cell-hidden": "awsui_header-cell-hidden_1spae_1d6sg_111",
9
- "header-cell-sortable": "awsui_header-cell-sortable_1spae_1d6sg_114",
10
- "header-cell-resizable": "awsui_header-cell-resizable_1spae_1d6sg_126",
11
- "sorting-icon": "awsui_sorting-icon_1spae_1d6sg_130",
12
- "header-cell-disabled": "awsui_header-cell-disabled_1spae_1d6sg_137",
13
- "header-cell-sorted": "awsui_header-cell-sorted_1spae_1d6sg_137",
14
- "header-cell-content": "awsui_header-cell-content_1spae_1d6sg_137",
15
- "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1d6sg_170",
16
- "header-cell-text": "awsui_header-cell-text_1spae_1d6sg_199",
17
- "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1d6sg_199",
18
- "header-cell-ascending": "awsui_header-cell-ascending_1spae_1d6sg_205",
19
- "header-cell-descending": "awsui_header-cell-descending_1spae_1d6sg_206",
20
- "is-visual-refresh": "awsui_is-visual-refresh_1spae_1d6sg_216",
21
- "has-striped-rows": "awsui_has-striped-rows_1spae_1d6sg_227"
4
+ "header-cell": "awsui_header-cell_1spae_lzlsa_93",
5
+ "header-cell-sticky": "awsui_header-cell-sticky_1spae_lzlsa_105",
6
+ "header-cell-stuck": "awsui_header-cell-stuck_1spae_lzlsa_108",
7
+ "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_lzlsa_108",
8
+ "header-cell-hidden": "awsui_header-cell-hidden_1spae_lzlsa_111",
9
+ "header-cell-sortable": "awsui_header-cell-sortable_1spae_lzlsa_114",
10
+ "header-cell-resizable": "awsui_header-cell-resizable_1spae_lzlsa_126",
11
+ "sorting-icon": "awsui_sorting-icon_1spae_lzlsa_130",
12
+ "edit-icon": "awsui_edit-icon_1spae_lzlsa_137",
13
+ "header-cell-content": "awsui_header-cell-content_1spae_lzlsa_143",
14
+ "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_lzlsa_172",
15
+ "header-cell-disabled": "awsui_header-cell-disabled_1spae_lzlsa_190",
16
+ "header-cell-sorted": "awsui_header-cell-sorted_1spae_lzlsa_190",
17
+ "header-cell-text": "awsui_header-cell-text_1spae_lzlsa_204",
18
+ "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_lzlsa_204",
19
+ "header-cell-ascending": "awsui_header-cell-ascending_1spae_lzlsa_210",
20
+ "header-cell-descending": "awsui_header-cell-descending_1spae_lzlsa_211",
21
+ "is-visual-refresh": "awsui_is-visual-refresh_1spae_lzlsa_221",
22
+ "has-striped-rows": "awsui_has-striped-rows_1spae_lzlsa_232"
22
23
  };
23
24
 
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_header-cell_1spae_1d6sg_93:not(#\9) {
93
+ .awsui_header-cell_1spae_lzlsa_93:not(#\9) {
94
94
  position: relative;
95
95
  text-align: left;
96
96
  box-sizing: border-box;
@@ -102,19 +102,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
102
102
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-nkh1jb, grayscale);
103
103
  padding: var(--space-scaled-xxs-95dhkm, 4px) var(--space-scaled-xs-6859qs, 8px);
104
104
  }
105
- .awsui_header-cell-sticky_1spae_1d6sg_105:not(#\9) {
105
+ .awsui_header-cell-sticky_1spae_lzlsa_105:not(#\9) {
106
106
  border-bottom: var(--border-table-sticky-width-h1tlxy, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
107
107
  }
108
- .awsui_header-cell-stuck_1spae_1d6sg_108:not(#\9):not(.awsui_header-cell-variant-full-page_1spae_1d6sg_108) {
108
+ .awsui_header-cell-stuck_1spae_lzlsa_108:not(#\9):not(.awsui_header-cell-variant-full-page_1spae_lzlsa_108) {
109
109
  border-bottom-color: transparent;
110
110
  }
111
- .awsui_header-cell-variant-full-page_1spae_1d6sg_108.awsui_header-cell-hidden_1spae_1d6sg_111:not(#\9) {
111
+ .awsui_header-cell-variant-full-page_1spae_lzlsa_108.awsui_header-cell-hidden_1spae_lzlsa_111:not(#\9) {
112
112
  border-bottom-color: transparent;
113
113
  }
114
- .awsui_header-cell_1spae_1d6sg_93:not(#\9):last-child, .awsui_header-cell_1spae_1d6sg_93.awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9) {
114
+ .awsui_header-cell_1spae_lzlsa_93:not(#\9):last-child, .awsui_header-cell_1spae_lzlsa_93.awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9) {
115
115
  padding-right: var(--space-xs-rsr2qu, 8px);
116
116
  }
117
- .awsui_header-cell_1spae_1d6sg_93:not(#\9):not(:last-child):before {
117
+ .awsui_header-cell_1spae_lzlsa_93:not(#\9):not(:last-child):before {
118
118
  content: "";
119
119
  position: absolute;
120
120
  right: 0;
@@ -123,40 +123,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
123
123
  border-left: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
124
124
  box-sizing: border-box;
125
125
  }
126
- .awsui_header-cell-resizable_1spae_1d6sg_126:not(#\9):not(:last-child):before {
126
+ .awsui_header-cell-resizable_1spae_lzlsa_126:not(#\9):not(:last-child):before {
127
127
  border-left-color: var(--color-border-divider-interactive-default-rcasvw, #e9ebed);
128
128
  }
129
129
 
130
- .awsui_sorting-icon_1spae_1d6sg_130:not(#\9) {
130
+ .awsui_sorting-icon_1spae_lzlsa_130:not(#\9) {
131
131
  position: absolute;
132
132
  top: var(--space-scaled-xxs-95dhkm, 4px);
133
133
  right: var(--space-xxs-ynfts5, 4px);
134
134
  color: var(--color-text-column-sorting-icon-q5sr09, #414d5c);
135
135
  }
136
136
 
137
- .awsui_header-cell-disabled_1spae_1d6sg_137.awsui_header-cell-sorted_1spae_1d6sg_137 > .awsui_header-cell-content_1spae_1d6sg_137 > .awsui_sorting-icon_1spae_1d6sg_130:not(#\9) {
138
- color: var(--color-text-interactive-disabled-3pbb07, #9ba7b6);
137
+ .awsui_edit-icon_1spae_lzlsa_137:not(#\9) {
138
+ margin-left: var(--space-xxs-ynfts5, 4px);
139
+ margin-top: var(--space-scaled-xxs-95dhkm, 4px);
140
+ color: inherit;
139
141
  }
140
142
 
141
- .awsui_header-cell-content_1spae_1d6sg_137:not(#\9) {
143
+ .awsui_header-cell-content_1spae_lzlsa_143:not(#\9) {
142
144
  position: relative;
143
145
  padding: var(--space-scaled-xxs-95dhkm, 4px) var(--space-s-hv8c1d, 12px);
144
146
  }
145
- .awsui_header-cell-sortable_1spae_1d6sg_114 > .awsui_header-cell-content_1spae_1d6sg_137:not(#\9) {
147
+ .awsui_header-cell-sortable_1spae_lzlsa_114 > .awsui_header-cell-content_1spae_lzlsa_143:not(#\9) {
146
148
  padding-right: calc(var(--space-xl-a39hup, 24px) + var(--space-xxs-ynfts5, 4px));
147
149
  }
148
- .awsui_header-cell-content_1spae_1d6sg_137:not(#\9):focus {
150
+ .awsui_header-cell-content_1spae_lzlsa_143:not(#\9):focus {
149
151
  outline: none;
150
152
  text-decoration: none;
151
153
  }
152
- .awsui_header-cell-content_1spae_1d6sg_137[data-awsui-focus-visible=true]:not(#\9):focus {
154
+ .awsui_header-cell-content_1spae_lzlsa_143[data-awsui-focus-visible=true]:not(#\9):focus {
153
155
  position: relative;
154
156
  }
155
- .awsui_header-cell-content_1spae_1d6sg_137[data-awsui-focus-visible=true]:not(#\9):focus {
157
+ .awsui_header-cell-content_1spae_lzlsa_143[data-awsui-focus-visible=true]:not(#\9):focus {
156
158
  outline: 2px dotted transparent;
157
159
  outline-offset: calc(var(--space-table-header-focus-outline-gutter-rbx7m7, 0px) - 1px);
158
160
  }
159
- .awsui_header-cell-content_1spae_1d6sg_137[data-awsui-focus-visible=true]:not(#\9):focus::before {
161
+ .awsui_header-cell-content_1spae_lzlsa_143[data-awsui-focus-visible=true]:not(#\9):focus::before {
160
162
  content: " ";
161
163
  display: block;
162
164
  position: absolute;
@@ -167,14 +169,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
167
169
  border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
168
170
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
169
171
  }
170
- .awsui_header-cell-content_1spae_1d6sg_137.awsui_header-cell-fake-focus_1spae_1d6sg_170:not(#\9) {
172
+ .awsui_header-cell-content_1spae_lzlsa_143.awsui_header-cell-fake-focus_1spae_lzlsa_172:not(#\9) {
171
173
  position: relative;
172
174
  }
173
- .awsui_header-cell-content_1spae_1d6sg_137.awsui_header-cell-fake-focus_1spae_1d6sg_170:not(#\9) {
175
+ .awsui_header-cell-content_1spae_lzlsa_143.awsui_header-cell-fake-focus_1spae_lzlsa_172:not(#\9) {
174
176
  outline: 2px dotted transparent;
175
177
  outline-offset: calc(var(--space-table-header-focus-outline-gutter-rbx7m7, 0px) - 1px);
176
178
  }
177
- .awsui_header-cell-content_1spae_1d6sg_137.awsui_header-cell-fake-focus_1spae_1d6sg_170:not(#\9)::before {
179
+ .awsui_header-cell-content_1spae_lzlsa_143.awsui_header-cell-fake-focus_1spae_lzlsa_172:not(#\9)::before {
178
180
  content: " ";
179
181
  display: block;
180
182
  position: absolute;
@@ -185,54 +187,57 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
185
187
  border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
186
188
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
187
189
  }
190
+ .awsui_header-cell-disabled_1spae_lzlsa_190.awsui_header-cell-sorted_1spae_lzlsa_190 > .awsui_header-cell-content_1spae_lzlsa_143 > .awsui_sorting-icon_1spae_lzlsa_130:not(#\9) {
191
+ color: var(--color-text-interactive-disabled-3pbb07, #9ba7b6);
192
+ }
188
193
 
189
- .awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9):not(.awsui_header-cell-disabled_1spae_1d6sg_137) > .awsui_header-cell-content_1spae_1d6sg_137 {
194
+ .awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9):not(.awsui_header-cell-disabled_1spae_lzlsa_190) > .awsui_header-cell-content_1spae_lzlsa_143 {
190
195
  cursor: pointer;
191
196
  }
192
- .awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9):not(.awsui_header-cell-disabled_1spae_1d6sg_137) > .awsui_header-cell-content_1spae_1d6sg_137:hover, .awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9):not(.awsui_header-cell-disabled_1spae_1d6sg_137).awsui_header-cell-sorted_1spae_1d6sg_137 > .awsui_header-cell-content_1spae_1d6sg_137 {
197
+ .awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9):not(.awsui_header-cell-disabled_1spae_lzlsa_190) > .awsui_header-cell-content_1spae_lzlsa_143:hover, .awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9):not(.awsui_header-cell-disabled_1spae_lzlsa_190).awsui_header-cell-sorted_1spae_lzlsa_190 > .awsui_header-cell-content_1spae_lzlsa_143 {
193
198
  color: var(--color-text-interactive-active-vol84d, #000716);
194
199
  }
195
- .awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9):not(.awsui_header-cell-disabled_1spae_1d6sg_137) > .awsui_header-cell-content_1spae_1d6sg_137:hover > .awsui_sorting-icon_1spae_1d6sg_130, .awsui_header-cell-sortable_1spae_1d6sg_114:not(#\9):not(.awsui_header-cell-disabled_1spae_1d6sg_137).awsui_header-cell-sorted_1spae_1d6sg_137 > .awsui_header-cell-content_1spae_1d6sg_137 > .awsui_sorting-icon_1spae_1d6sg_130 {
200
+ .awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9):not(.awsui_header-cell-disabled_1spae_lzlsa_190) > .awsui_header-cell-content_1spae_lzlsa_143:hover > .awsui_sorting-icon_1spae_lzlsa_130, .awsui_header-cell-sortable_1spae_lzlsa_114:not(#\9):not(.awsui_header-cell-disabled_1spae_lzlsa_190).awsui_header-cell-sorted_1spae_lzlsa_190 > .awsui_header-cell-content_1spae_lzlsa_143 > .awsui_sorting-icon_1spae_lzlsa_130 {
196
201
  color: var(--color-text-interactive-active-vol84d, #000716);
197
202
  }
198
203
 
199
- .awsui_header-cell-text_1spae_1d6sg_199:not(#\9):not(.awsui_header-cell-text-wrap_1spae_1d6sg_199) {
204
+ .awsui_header-cell-text_1spae_lzlsa_204:not(#\9):not(.awsui_header-cell-text-wrap_1spae_lzlsa_204) {
200
205
  white-space: nowrap;
201
206
  overflow: hidden;
202
207
  text-overflow: ellipsis;
203
208
  }
204
209
 
205
- .awsui_header-cell-ascending_1spae_1d6sg_205:not(#\9),
206
- .awsui_header-cell-descending_1spae_1d6sg_206:not(#\9) {
210
+ .awsui_header-cell-ascending_1spae_lzlsa_210:not(#\9),
211
+ .awsui_header-cell-descending_1spae_lzlsa_211:not(#\9) {
207
212
  /* used in test-utils */
208
213
  }
209
214
 
210
215
  /*
211
216
  In Visual Refresh the first cell in the header should align
212
- with the left edge of the table as closely as possible. If the
213
- last header cell is sortable the sort icon should align with the
217
+ with the left edge of the table as closely as possible. If the
218
+ last header cell is sortable the sort icon should align with the
214
219
  settings icon in the pagination slot.
215
220
  */
216
- .awsui_header-cell_1spae_1d6sg_93:not(#\9):not(.awsui_is-visual-refresh_1spae_1d6sg_216):first-child {
221
+ .awsui_header-cell_1spae_lzlsa_93:not(#\9):not(.awsui_is-visual-refresh_1spae_lzlsa_221):first-child {
217
222
  padding-left: var(--space-xs-rsr2qu, 8px);
218
223
  }
219
224
 
220
- .awsui_header-cell_1spae_1d6sg_93.awsui_is-visual-refresh_1spae_1d6sg_216:not(#\9) {
225
+ .awsui_header-cell_1spae_lzlsa_93.awsui_is-visual-refresh_1spae_lzlsa_221:not(#\9) {
221
226
  /*
222
- Striped rows requires additional left padding because the
223
- shaded background makes the child content appear too close
227
+ Striped rows requires additional left padding because the
228
+ shaded background makes the child content appear too close
224
229
  to the table edge.
225
230
  */
226
231
  }
227
- .awsui_header-cell_1spae_1d6sg_93.awsui_is-visual-refresh_1spae_1d6sg_216:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_1d6sg_227) {
232
+ .awsui_header-cell_1spae_lzlsa_93.awsui_is-visual-refresh_1spae_lzlsa_221:not(#\9):first-child:not(.awsui_has-striped-rows_1spae_lzlsa_232) {
228
233
  padding-left: var(--space-xxxs-k2w98v, 2px);
229
234
  }
230
- .awsui_header-cell_1spae_1d6sg_93.awsui_is-visual-refresh_1spae_1d6sg_216:not(#\9):first-child.awsui_has-striped-rows_1spae_1d6sg_227 {
235
+ .awsui_header-cell_1spae_lzlsa_93.awsui_is-visual-refresh_1spae_lzlsa_221:not(#\9):first-child.awsui_has-striped-rows_1spae_lzlsa_232 {
231
236
  padding-left: var(--space-xxs-ynfts5, 4px);
232
237
  }
233
- .awsui_header-cell_1spae_1d6sg_93.awsui_is-visual-refresh_1spae_1d6sg_216:not(#\9):first-child > .awsui_header-cell-content_1spae_1d6sg_137 {
238
+ .awsui_header-cell_1spae_lzlsa_93.awsui_is-visual-refresh_1spae_lzlsa_221:not(#\9):first-child > .awsui_header-cell-content_1spae_lzlsa_143 {
234
239
  padding-left: 0;
235
240
  }
236
- .awsui_header-cell_1spae_1d6sg_93.awsui_is-visual-refresh_1spae_1d6sg_216:not(#\9):last-child.awsui_header-cell-sortable_1spae_1d6sg_114 {
241
+ .awsui_header-cell_1spae_lzlsa_93.awsui_is-visual-refresh_1spae_lzlsa_221:not(#\9):last-child.awsui_header-cell-sortable_1spae_lzlsa_114 {
237
242
  padding-right: var(--space-xxxs-k2w98v, 2px);
238
243
  }
@@ -2,23 +2,24 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "header-cell": "awsui_header-cell_1spae_1d6sg_93",
6
- "header-cell-sticky": "awsui_header-cell-sticky_1spae_1d6sg_105",
7
- "header-cell-stuck": "awsui_header-cell-stuck_1spae_1d6sg_108",
8
- "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1d6sg_108",
9
- "header-cell-hidden": "awsui_header-cell-hidden_1spae_1d6sg_111",
10
- "header-cell-sortable": "awsui_header-cell-sortable_1spae_1d6sg_114",
11
- "header-cell-resizable": "awsui_header-cell-resizable_1spae_1d6sg_126",
12
- "sorting-icon": "awsui_sorting-icon_1spae_1d6sg_130",
13
- "header-cell-disabled": "awsui_header-cell-disabled_1spae_1d6sg_137",
14
- "header-cell-sorted": "awsui_header-cell-sorted_1spae_1d6sg_137",
15
- "header-cell-content": "awsui_header-cell-content_1spae_1d6sg_137",
16
- "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1d6sg_170",
17
- "header-cell-text": "awsui_header-cell-text_1spae_1d6sg_199",
18
- "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1d6sg_199",
19
- "header-cell-ascending": "awsui_header-cell-ascending_1spae_1d6sg_205",
20
- "header-cell-descending": "awsui_header-cell-descending_1spae_1d6sg_206",
21
- "is-visual-refresh": "awsui_is-visual-refresh_1spae_1d6sg_216",
22
- "has-striped-rows": "awsui_has-striped-rows_1spae_1d6sg_227"
5
+ "header-cell": "awsui_header-cell_1spae_lzlsa_93",
6
+ "header-cell-sticky": "awsui_header-cell-sticky_1spae_lzlsa_105",
7
+ "header-cell-stuck": "awsui_header-cell-stuck_1spae_lzlsa_108",
8
+ "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_lzlsa_108",
9
+ "header-cell-hidden": "awsui_header-cell-hidden_1spae_lzlsa_111",
10
+ "header-cell-sortable": "awsui_header-cell-sortable_1spae_lzlsa_114",
11
+ "header-cell-resizable": "awsui_header-cell-resizable_1spae_lzlsa_126",
12
+ "sorting-icon": "awsui_sorting-icon_1spae_lzlsa_130",
13
+ "edit-icon": "awsui_edit-icon_1spae_lzlsa_137",
14
+ "header-cell-content": "awsui_header-cell-content_1spae_lzlsa_143",
15
+ "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_lzlsa_172",
16
+ "header-cell-disabled": "awsui_header-cell-disabled_1spae_lzlsa_190",
17
+ "header-cell-sorted": "awsui_header-cell-sorted_1spae_lzlsa_190",
18
+ "header-cell-text": "awsui_header-cell-text_1spae_lzlsa_204",
19
+ "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_lzlsa_204",
20
+ "header-cell-ascending": "awsui_header-cell-ascending_1spae_lzlsa_210",
21
+ "header-cell-descending": "awsui_header-cell-descending_1spae_lzlsa_211",
22
+ "is-visual-refresh": "awsui_is-visual-refresh_1spae_lzlsa_221",
23
+ "has-striped-rows": "awsui_has-striped-rows_1spae_lzlsa_232"
23
24
  };
24
25