@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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,UAAU,kBAAkB;IAC1B,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,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,SAAS,GACV,EAAE,kBAAkB,eAyBpB;AAED,UAAU,yBAAyB,CAAC,QAAQ,CAAE,SAAQ,kBAAkB;IACtE,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,yBAAyB,CAAC,QAAQ,CAAC,eAE5G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAkB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAenE,UAAU,kBAAkB,CAAC,QAAQ,CAAE,SAAQ,mBAAmB;IAChE,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrD,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACtC;AAsFD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,EACtC,UAAU,EACV,GAAG,IAAI,EACR,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,eAMxD"}
@@ -3,15 +3,55 @@ import { __assign, __rest } from "tslib";
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import clsx from 'clsx';
5
5
  import styles from './styles.css.js';
6
- import React from 'react';
7
- import { useVisualRefresh } from '../../internal/hooks/use-visual-mode';
8
- export function TableBodyCell(_a) {
9
- 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, isEvenRow = _a.isEvenRow, stripedRows = _a.stripedRows, hasSelection = _a.hasSelection, hasFooter = _a.hasFooter;
10
- var isVisualRefresh = useVisualRefresh();
11
- return (React.createElement("td", { 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']) }, children));
6
+ import React, { useCallback, useRef } from 'react';
7
+ import useFocusVisible from '../../internal/hooks/focus-visible';
8
+ import { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';
9
+ import Button from '../../button/internal';
10
+ import { TableTdElement } from './td-element';
11
+ import { InlineEditor } from './inline-editor';
12
+ import { useStableScrollPosition } from './use-stable-scroll-position';
13
+ var readonlyState = Object.freeze({
14
+ isEditing: false,
15
+ currentValue: undefined,
16
+ /* istanbul ignore next */
17
+ setValue: function () { }
18
+ });
19
+ var submitHandlerFallback = function () {
20
+ throw new Error('The function `handleSubmit` is required for editable columns');
21
+ };
22
+ function TableCellEditable(_a) {
23
+ var _b;
24
+ var className = _a.className, item = _a.item, column = _a.column, isEditing = _a.isEditing, onEditStart = _a.onEditStart, onEditEnd = _a.onEditEnd, submitEdit = _a.submitEdit, ariaLabels = _a.ariaLabels, isVisualRefresh = _a.isVisualRefresh, rest = __rest(_a, ["className", "item", "column", "isEditing", "onEditStart", "onEditEnd", "submitEdit", "ariaLabels", "isVisualRefresh"]);
25
+ var editActivateRef = useRef(null);
26
+ var cellRef = useRef(null);
27
+ var focusVisible = useFocusVisible();
28
+ var _c = useStableScrollPosition(cellRef), storeScrollPosition = _c.storeScrollPosition, restoreScrollPosition = _c.restoreScrollPosition;
29
+ var handleEditStart = function () {
30
+ storeScrollPosition();
31
+ if (!isEditing) {
32
+ onEditStart();
33
+ }
34
+ };
35
+ var scheduleRestoreScrollPosition = useCallback(function () { return setTimeout(restoreScrollPosition, 0); }, [restoreScrollPosition]);
36
+ var tdNativeAttributes = __assign(__assign({}, focusVisible), { onFocus: scheduleRestoreScrollPosition, 'data-inline-editing-active': isEditing.toString() });
37
+ useEffectOnUpdate(function () {
38
+ if (!isEditing && editActivateRef.current) {
39
+ editActivateRef.current.focus({ preventScroll: true });
40
+ }
41
+ var timer = scheduleRestoreScrollPosition();
42
+ return function () { return clearTimeout(timer); };
43
+ }, [isEditing, scheduleRestoreScrollPosition]);
44
+ return (React.createElement(TableTdElement, __assign({}, rest, { nativeAttributes: tdNativeAttributes, className: clsx(className, styles['body-cell-editable'], isEditing && styles['body-cell-edit-active'], isVisualRefresh && styles['is-visual-refresh']), onClick: handleEditStart, ref: cellRef }), isEditing ? (React.createElement(InlineEditor, { ariaLabels: ariaLabels, column: column, item: item, onEditEnd: onEditEnd, submitEdit: submitEdit !== null && submitEdit !== void 0 ? submitEdit : submitHandlerFallback, __onRender: restoreScrollPosition })) : (React.createElement(React.Fragment, null,
45
+ column.cell(item, readonlyState),
46
+ React.createElement("span", { className: styles['body-cell-editor'] },
47
+ React.createElement(Button, { __hideFocusOutline: true, __internalRootRef: editActivateRef, ariaLabel: (_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.activateEditLabel) === null || _b === void 0 ? void 0 : _b.call(ariaLabels, column), formAction: "none", iconName: "edit", variant: "inline-icon" }))))));
12
48
  }
13
- export function TableBodyCellContent(_a) {
14
- var item = _a.item, column = _a.column, rest = __rest(_a, ["item", "column"]);
15
- return React.createElement(TableBodyCell, __assign({}, rest), column.cell(item));
49
+ export function TableBodyCell(_a) {
50
+ var isEditable = _a.isEditable, rest = __rest(_a, ["isEditable"]);
51
+ if (isEditable || rest.isEditing) {
52
+ return React.createElement(TableCellEditable, __assign({}, rest));
53
+ }
54
+ var column = rest.column, item = rest.item;
55
+ return React.createElement(TableTdElement, __assign({}, rest), column.cell(item, readonlyState));
16
56
  }
17
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/body-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAkBxE,MAAM,UAAU,aAAa,CAAC,EAcT;QAbnB,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,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,SAAS,eAAA;IAET,IAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO,CACL,4BACE,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,IAEA,QAAQ,CACN,CACN,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,oBAAoB,CAAW,EAA8D;IAA5D,IAAA,IAAI,UAAA,EAAE,MAAM,YAAA,EAAK,IAAI,cAAvB,kBAAyB,CAAF;IACpE,OAAO,oBAAC,aAAa,eAAK,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAiB,CAAC;AACtE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport React from 'react';\nimport { TableProps } from '../interfaces';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\n\ninterface TableBodyCellProps {\n className?: string;\n style?: React.CSSProperties;\n wrapLines: boolean | undefined;\n isFirstRow: boolean;\n isLastRow: boolean;\n isEvenRow?: boolean;\n stripedRows?: boolean;\n isSelected: boolean;\n isNextSelected: boolean;\n isPrevSelected: boolean;\n children?: React.ReactNode;\n hasSelection?: boolean;\n hasFooter?: boolean;\n}\n\nexport function TableBodyCell({\n className,\n style,\n children,\n wrapLines,\n isFirstRow,\n isLastRow,\n isSelected,\n isNextSelected,\n isPrevSelected,\n isEvenRow,\n stripedRows,\n hasSelection,\n hasFooter,\n}: TableBodyCellProps) {\n const isVisualRefresh = useVisualRefresh();\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 >\n {children}\n </td>\n );\n}\n\ninterface TableBodyCellContentProps<ItemType> extends TableBodyCellProps {\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n}\n\nexport function TableBodyCellContent<ItemType>({ item, column, ...rest }: TableBodyCellContentProps<ItemType>) {\n return <TableBodyCell {...rest}>{column.cell(item)}</TableBodyCell>;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/body-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAG3C,OAAO,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,SAAS;IACvB,0BAA0B;IAC1B,QAAQ,EAAE,cAAO,CAAC;CACnB,CAAC,CAAC;AAEH,IA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OAAf,EAAE,IAAI,GAAK,IAAI,KAAT,CAAU;IAC9B,OAAO,oBAAC,cAAc,eAAK,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAkB,CAAC;AACvF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport React, { useCallback, useRef } from 'react';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport Button from '../../button/internal';\nimport { ButtonProps } from '../../button/interfaces';\nimport { TableProps } from '../interfaces';\nimport { TableTdElement, TableTdElementProps } from './td-element';\nimport { InlineEditor } from './inline-editor';\nimport { useStableScrollPosition } from './use-stable-scroll-position';\n\nconst readonlyState = Object.freeze({\n isEditing: false,\n currentValue: undefined,\n /* istanbul ignore next */\n setValue: () => {},\n});\n\nconst submitHandlerFallback = () => {\n throw new Error('The function `handleSubmit` is required for editable columns');\n};\n\ninterface TableBodyCellProps<ItemType> extends TableTdElementProps {\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n isEditing: boolean;\n onEditStart: () => void;\n onEditEnd: () => void;\n submitEdit?: TableProps.SubmitEditFunction<ItemType>;\n ariaLabels: TableProps['ariaLabels'];\n}\n\nfunction TableCellEditable<ItemType>({\n className,\n item,\n column,\n isEditing,\n onEditStart,\n onEditEnd,\n submitEdit,\n ariaLabels,\n isVisualRefresh,\n ...rest\n}: TableBodyCellProps<ItemType>) {\n const editActivateRef = useRef<ButtonProps.Ref>(null);\n const cellRef = useRef<HTMLTableCellElement>(null);\n const focusVisible = useFocusVisible();\n const { storeScrollPosition, restoreScrollPosition } = useStableScrollPosition(cellRef);\n\n const handleEditStart = () => {\n storeScrollPosition();\n if (!isEditing) {\n onEditStart();\n }\n };\n\n const scheduleRestoreScrollPosition = useCallback(\n () => setTimeout(restoreScrollPosition, 0),\n [restoreScrollPosition]\n );\n\n const tdNativeAttributes = {\n ...(focusVisible as Record<string, string>),\n onFocus: scheduleRestoreScrollPosition,\n 'data-inline-editing-active': isEditing.toString(),\n };\n\n useEffectOnUpdate(() => {\n if (!isEditing && editActivateRef.current) {\n editActivateRef.current.focus({ preventScroll: true });\n }\n const timer = scheduleRestoreScrollPosition();\n return () => clearTimeout(timer);\n }, [isEditing, scheduleRestoreScrollPosition]);\n\n return (\n <TableTdElement\n {...rest}\n nativeAttributes={tdNativeAttributes as TableTdElementProps['nativeAttributes']}\n className={clsx(\n className,\n styles['body-cell-editable'],\n isEditing && styles['body-cell-edit-active'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onClick={handleEditStart}\n ref={cellRef}\n >\n {isEditing ? (\n <InlineEditor\n ariaLabels={ariaLabels}\n column={column}\n item={item}\n onEditEnd={onEditEnd}\n submitEdit={submitEdit ?? submitHandlerFallback}\n __onRender={restoreScrollPosition}\n />\n ) : (\n <>\n {column.cell(item, readonlyState)}\n <span className={styles['body-cell-editor']}>\n <Button\n __hideFocusOutline={true}\n __internalRootRef={editActivateRef}\n ariaLabel={ariaLabels?.activateEditLabel?.(column)}\n formAction=\"none\"\n iconName=\"edit\"\n variant=\"inline-icon\"\n />\n </span>\n </>\n )}\n </TableTdElement>\n );\n}\n\nexport function TableBodyCell<ItemType>({\n isEditable,\n ...rest\n}: TableBodyCellProps<ItemType> & { isEditable: boolean }) {\n if (isEditable || rest.isEditing) {\n return <TableCellEditable {...rest} />;\n }\n const { column, item } = rest;\n return <TableTdElement {...rest}>{column.cell(item, readonlyState)}</TableTdElement>;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { TableProps } from '../interfaces';
2
+ interface InlineEditorProps<ItemType> {
3
+ ariaLabels: TableProps['ariaLabels'];
4
+ column: TableProps.ColumnDefinition<ItemType>;
5
+ item: ItemType;
6
+ onEditEnd: () => void;
7
+ submitEdit: TableProps.SubmitEditFunction<ItemType>;
8
+ __onRender?: () => void;
9
+ }
10
+ export declare function InlineEditor<ItemType>({ ariaLabels, item, column, onEditEnd, submitEdit, __onRender, }: InlineEditorProps<ItemType>): JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=inline-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/inline-editor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,UAAU,iBAAiB,CAAC,QAAQ;IAClC,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,EACrC,UAAU,EACV,IAAI,EACJ,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,iBAAiB,CAAC,QAAQ,CAAC,eAqG7B"}
@@ -0,0 +1,88 @@
1
+ import { __awaiter, __generator } from "tslib";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import React, { useEffect, useState } from 'react';
5
+ import Button from '../../button/internal';
6
+ import FormField from '../../form-field/internal';
7
+ import SpaceBetween from '../../space-between/internal';
8
+ import { useClickAway } from './click-away';
9
+ import styles from './styles.css.js';
10
+ // A function that does nothing
11
+ var noop = function () { return undefined; };
12
+ export function InlineEditor(_a) {
13
+ var _b, _c;
14
+ var ariaLabels = _a.ariaLabels, item = _a.item, column = _a.column, onEditEnd = _a.onEditEnd, submitEdit = _a.submitEdit, __onRender = _a.__onRender;
15
+ var _d = useState(false), currentEditLoading = _d[0], setCurrentEditLoading = _d[1];
16
+ var _e = useState(), currentEditValue = _e[0], setCurrentEditValue = _e[1];
17
+ var cellContext = {
18
+ isEditing: true,
19
+ currentValue: currentEditValue,
20
+ setValue: setCurrentEditValue
21
+ };
22
+ function finishEdit(cancel) {
23
+ if (cancel === void 0) { cancel = false; }
24
+ if (!cancel) {
25
+ setCurrentEditValue(undefined);
26
+ }
27
+ onEditEnd();
28
+ }
29
+ function onSubmitClick(evt) {
30
+ return __awaiter(this, void 0, void 0, function () {
31
+ var e_1;
32
+ return __generator(this, function (_a) {
33
+ switch (_a.label) {
34
+ case 0:
35
+ evt.preventDefault();
36
+ if (currentEditValue === undefined) {
37
+ finishEdit();
38
+ return [2 /*return*/];
39
+ }
40
+ setCurrentEditLoading(true);
41
+ _a.label = 1;
42
+ case 1:
43
+ _a.trys.push([1, 3, , 4]);
44
+ return [4 /*yield*/, submitEdit(item, column, currentEditValue)];
45
+ case 2:
46
+ _a.sent();
47
+ setCurrentEditLoading(false);
48
+ finishEdit();
49
+ return [3 /*break*/, 4];
50
+ case 3:
51
+ e_1 = _a.sent();
52
+ setCurrentEditLoading(false);
53
+ return [3 /*break*/, 4];
54
+ case 4: return [2 /*return*/];
55
+ }
56
+ });
57
+ });
58
+ }
59
+ function onCancel() {
60
+ if (currentEditLoading) {
61
+ return;
62
+ }
63
+ finishEdit(true);
64
+ }
65
+ function handleEscape(event) {
66
+ if (event.key === 'Escape') {
67
+ onCancel();
68
+ }
69
+ }
70
+ var clickAwayRef = useClickAway(onCancel);
71
+ useEffect(function () {
72
+ if (__onRender) {
73
+ var timer_1 = setTimeout(__onRender, 1);
74
+ return function () { return clearTimeout(timer_1); };
75
+ }
76
+ }, [__onRender]);
77
+ // asserting non-undefined editConfig here because this component is unreachable otherwise
78
+ var _f = column.editConfig, _g = _f.ariaLabel, ariaLabel = _g === void 0 ? undefined : _g, _h = _f.validation, validation = _h === void 0 ? noop : _h, errorIconAriaLabel = _f.errorIconAriaLabel;
79
+ return (React.createElement("form", { ref: clickAwayRef, onSubmit: onSubmitClick, onKeyDown: handleEscape, className: styles['body-cell-editor-form'] },
80
+ React.createElement(FormField, { stretch: true, label: ariaLabel, __hideLabel: true, __disableGutters: true, __useReactAutofocus: true, i18nStrings: { errorIconAriaLabel: errorIconAriaLabel }, errorText: validation(item, currentEditValue) },
81
+ React.createElement("div", { className: styles['body-cell-editor-row'] },
82
+ column.cell(item, cellContext),
83
+ React.createElement("span", { className: styles['body-cell-editor-controls'] },
84
+ React.createElement(SpaceBetween, { direction: "horizontal", size: "xxs" },
85
+ !currentEditLoading ? (React.createElement(Button, { ariaLabel: (_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.cancelEditLabel) === null || _b === void 0 ? void 0 : _b.call(ariaLabels, column), formAction: "none", iconName: "close", variant: "inline-icon", onClick: onCancel })) : null,
86
+ React.createElement(Button, { ariaLabel: (_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.submitEditLabel) === null || _c === void 0 ? void 0 : _c.call(ariaLabels, column), formAction: "submit", iconName: "check", variant: "inline-icon", loading: currentEditLoading })))))));
87
+ }
88
+ //# sourceMappingURL=inline-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-editor.js","sourceRoot":"","sources":["../../../../src/table/body-cell/inline-editor.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,+BAA+B;AAC/B,IAAM,IAAI,GAAG,cAAM,OAAA,SAAS,EAAT,CAAS,CA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MAAM,CAAC,EAChD,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAC,aAAa,EACrB,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC,CAAC,CAAC,IAAI;wBACR,oBAAC,MAAM,IACL,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,2DAAG,MAAM,CAAC,EAChD,UAAU,EAAC,QAAQ,EACnB,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAC,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC3B,CACW,CACV,CACH,CACI,CACP,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\nimport Button from '../../button/internal';\nimport FormField from '../../form-field/internal';\nimport SpaceBetween from '../../space-between/internal';\nimport { useClickAway } from './click-away';\nimport { TableProps } from '../interfaces';\nimport styles from './styles.css.js';\nimport { Optional } from '../../internal/types';\n\n// A function that does nothing\nconst noop = () => undefined;\n\ninterface InlineEditorProps<ItemType> {\n ariaLabels: TableProps['ariaLabels'];\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n onEditEnd: () => void;\n submitEdit: TableProps.SubmitEditFunction<ItemType>;\n __onRender?: () => void;\n}\n\nexport function InlineEditor<ItemType>({\n ariaLabels,\n item,\n column,\n onEditEnd,\n submitEdit,\n __onRender,\n}: InlineEditorProps<ItemType>) {\n const [currentEditLoading, setCurrentEditLoading] = useState(false);\n const [currentEditValue, setCurrentEditValue] = useState<Optional<any>>();\n\n const cellContext = {\n isEditing: true,\n currentValue: currentEditValue,\n setValue: setCurrentEditValue,\n };\n\n function finishEdit(cancel = false) {\n if (!cancel) {\n setCurrentEditValue(undefined);\n }\n onEditEnd();\n }\n\n async function onSubmitClick(evt: React.FormEvent) {\n evt.preventDefault();\n if (currentEditValue === undefined) {\n finishEdit();\n return;\n }\n\n setCurrentEditLoading(true);\n try {\n await submitEdit(item, column, currentEditValue);\n setCurrentEditLoading(false);\n finishEdit();\n } catch (e) {\n setCurrentEditLoading(false);\n }\n }\n\n function onCancel() {\n if (currentEditLoading) {\n return;\n }\n finishEdit(true);\n }\n\n function handleEscape(event: React.KeyboardEvent): void {\n if (event.key === 'Escape') {\n onCancel();\n }\n }\n\n const clickAwayRef = useClickAway(onCancel);\n\n useEffect(() => {\n if (__onRender) {\n const timer = setTimeout(__onRender, 1);\n return () => clearTimeout(timer);\n }\n }, [__onRender]);\n\n // asserting non-undefined editConfig here because this component is unreachable otherwise\n const { ariaLabel = undefined, validation = noop, errorIconAriaLabel } = column.editConfig!;\n\n return (\n <form\n ref={clickAwayRef}\n onSubmit={onSubmitClick}\n onKeyDown={handleEscape}\n className={styles['body-cell-editor-form']}\n >\n <FormField\n stretch={true}\n label={ariaLabel}\n __hideLabel={true}\n __disableGutters={true}\n __useReactAutofocus={true}\n i18nStrings={{ errorIconAriaLabel }}\n errorText={validation(item, currentEditValue)}\n >\n <div className={styles['body-cell-editor-row']}>\n {column.cell(item, cellContext)}\n <span className={styles['body-cell-editor-controls']}>\n <SpaceBetween direction=\"horizontal\" size=\"xxs\">\n {!currentEditLoading ? (\n <Button\n ariaLabel={ariaLabels?.cancelEditLabel?.(column)}\n formAction=\"none\"\n iconName=\"close\"\n variant=\"inline-icon\"\n onClick={onCancel}\n />\n ) : null}\n <Button\n ariaLabel={ariaLabels?.submitEditLabel?.(column)}\n formAction=\"submit\"\n iconName=\"check\"\n variant=\"inline-icon\"\n loading={currentEditLoading}\n />\n </SpaceBetween>\n </span>\n </div>\n </FormField>\n </form>\n );\n}\n"]}
@@ -1,17 +1,23 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "body-cell": "awsui_body-cell_c6tup_9o7yk_9",
5
- "body-cell-wrap": "awsui_body-cell-wrap_c6tup_9o7yk_18",
6
- "body-cell-first-row": "awsui_body-cell-first-row_c6tup_9o7yk_30",
7
- "body-cell-last-row": "awsui_body-cell-last-row_c6tup_9o7yk_33",
8
- "body-cell-selected": "awsui_body-cell-selected_c6tup_9o7yk_33",
9
- "has-footer": "awsui_has-footer_c6tup_9o7yk_33",
10
- "body-cell-shaded": "awsui_body-cell-shaded_c6tup_9o7yk_43",
11
- "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_9o7yk_65",
12
- "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_9o7yk_69",
13
- "is-visual-refresh": "awsui_is-visual-refresh_c6tup_9o7yk_98",
14
- "has-selection": "awsui_has-selection_c6tup_9o7yk_114",
15
- "has-striped-rows": "awsui_has-striped-rows_c6tup_9o7yk_117"
4
+ "body-cell": "awsui_body-cell_c6tup_17cg6_93",
5
+ "body-cell-wrap": "awsui_body-cell-wrap_c6tup_17cg6_102",
6
+ "is-visual-refresh": "awsui_is-visual-refresh_c6tup_17cg6_114",
7
+ "has-striped-rows": "awsui_has-striped-rows_c6tup_17cg6_126",
8
+ "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_17cg6_129",
9
+ "body-cell-editable": "awsui_body-cell-editable_c6tup_17cg6_129",
10
+ "has-selection": "awsui_has-selection_c6tup_17cg6_135",
11
+ "body-cell-first-row": "awsui_body-cell-first-row_c6tup_17cg6_141",
12
+ "body-cell-last-row": "awsui_body-cell-last-row_c6tup_17cg6_144",
13
+ "body-cell-selected": "awsui_body-cell-selected_c6tup_17cg6_144",
14
+ "has-footer": "awsui_has-footer_c6tup_17cg6_144",
15
+ "body-cell-shaded": "awsui_body-cell-shaded_c6tup_17cg6_154",
16
+ "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_17cg6_176",
17
+ "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_17cg6_180",
18
+ "body-cell-editor": "awsui_body-cell-editor_c6tup_17cg6_204",
19
+ "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_17cg6_214",
20
+ "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_17cg6_223",
21
+ "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_17cg6_233"
16
22
  };
17
23
 
@@ -6,7 +6,91 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9) {
9
+ /*
10
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
+ SPDX-License-Identifier: Apache-2.0
12
+ */
13
+ /*
14
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
+ SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ /*
18
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+ */
21
+ /*
22
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
+ SPDX-License-Identifier: Apache-2.0
24
+ */
25
+ /*
26
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
+ SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ /*
30
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
+ SPDX-License-Identifier: Apache-2.0
32
+ */
33
+ /*
34
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
+ SPDX-License-Identifier: Apache-2.0
36
+ */
37
+ /*
38
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
+ SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ /*
42
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
+ SPDX-License-Identifier: Apache-2.0
44
+ */
45
+ /*
46
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
+ SPDX-License-Identifier: Apache-2.0
48
+ */
49
+ /*
50
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
+ SPDX-License-Identifier: Apache-2.0
52
+ */
53
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
54
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
55
+ /*
56
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
57
+ SPDX-License-Identifier: Apache-2.0
58
+ */
59
+ /*
60
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
61
+ SPDX-License-Identifier: Apache-2.0
62
+ */
63
+ /*
64
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
65
+ SPDX-License-Identifier: Apache-2.0
66
+ */
67
+ /*
68
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
69
+ SPDX-License-Identifier: Apache-2.0
70
+ */
71
+ /*
72
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
73
+ SPDX-License-Identifier: Apache-2.0
74
+ */
75
+ /*
76
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
77
+ SPDX-License-Identifier: Apache-2.0
78
+ */
79
+ /*
80
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
81
+ SPDX-License-Identifier: Apache-2.0
82
+ */
83
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
84
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
85
+ /*
86
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
+ SPDX-License-Identifier: Apache-2.0
88
+ */
89
+ /*
90
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
+ SPDX-License-Identifier: Apache-2.0
92
+ */
93
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9) {
10
94
  box-sizing: border-box;
11
95
  padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px) calc(
12
96
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
@@ -15,108 +99,207 @@
15
99
  word-wrap: break-word;
16
100
  border-bottom: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
17
101
  }
18
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_body-cell-wrap_c6tup_9o7yk_18) {
102
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9):not(.awsui_body-cell-wrap_c6tup_17cg6_102) {
19
103
  white-space: nowrap;
20
104
  overflow: hidden;
21
105
  text-overflow: ellipsis;
22
106
  }
23
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9):first-child {
107
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child {
24
108
  border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
25
109
  }
26
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9):last-child {
110
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9):last-child {
27
111
  border-right: var(--border-item-width-qbbbsa, 2px) solid transparent;
28
112
  padding-right: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
29
113
  }
30
- .awsui_body-cell-first-row_c6tup_9o7yk_30:not(#\9) {
114
+ .awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child {
115
+ /*
116
+ Striped rows requires additional left padding because the
117
+ shaded background makes the child content appear too close
118
+ to the table edge.
119
+ */
120
+ /*
121
+ Remove the placeholder border if the row is not selectable.
122
+ Rows that are not selectable will reserve the horizontal space
123
+ that the placeholder border would consume.
124
+ */
125
+ }
126
+ .awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) {
127
+ padding-left: var(--space-xxxs-k2w98v, 2px);
128
+ }
129
+ .awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126):not(.awsui_body-cell-edit-active_c6tup_17cg6_129).awsui_body-cell-editable_c6tup_17cg6_129:hover {
130
+ padding-left: calc(var(--space-xxxs-k2w98v, 2px) + var(--border-divider-list-width-hacikr, 1px));
131
+ }
132
+ .awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:first-child.awsui_has-striped-rows_c6tup_17cg6_126 {
133
+ padding-left: var(--space-xxs-ynfts5, 4px);
134
+ }
135
+ .awsui_body-cell_c6tup_17cg6_93.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):first-child:not(.awsui_has-selection_c6tup_17cg6_135):not(.awsui_body-cell-editable_c6tup_17cg6_129) {
136
+ border-left: none;
137
+ }
138
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_is-visual-refresh_c6tup_17cg6_114) {
139
+ padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
140
+ }
141
+ .awsui_body-cell-first-row_c6tup_17cg6_141:not(#\9) {
31
142
  border-top: var(--border-item-width-qbbbsa, 2px) solid transparent;
32
143
  }
33
- .awsui_body-cell-last-row_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33):not(.awsui_has-footer_c6tup_9o7yk_33) {
144
+ .awsui_body-cell-last-row_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144):not(.awsui_has-footer_c6tup_17cg6_144) {
34
145
  border-bottom: var(--border-item-width-qbbbsa, 2px) solid transparent;
35
146
  }
36
- .awsui_body-cell-last-row_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33).awsui_has-footer_c6tup_9o7yk_33 {
147
+ .awsui_body-cell-last-row_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144).awsui_has-footer_c6tup_17cg6_144 {
37
148
  /*
38
- Add a bottom border to the body cells of the last row as a separator between the
149
+ Add a bottom border to the body cells of the last row as a separator between the
39
150
  table and the footer
40
151
  */
41
152
  border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
42
153
  }
43
- .awsui_body-cell-shaded_c6tup_9o7yk_43:not(#\9) {
154
+ .awsui_body-cell-shaded_c6tup_17cg6_154:not(#\9) {
44
155
  background: var(--color-background-cell-shaded-26ubfj, #f8f8f8);
45
156
  }
46
- .awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9) {
157
+ .awsui_body-cell-selected_c6tup_17cg6_144:not(#\9) {
47
158
  background-color: var(--color-background-item-selected-ebt4bi, #f2f8fd);
48
159
  border-top: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
49
160
  border-bottom: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
50
161
  padding-bottom: var(--space-scaled-xs-6859qs, 8px);
51
162
  }
52
- .awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):first-child {
163
+ .awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):first-child {
53
164
  border-left: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
54
165
  border-radius: var(--border-radius-item-u2ibpi, 8px) 0 0 var(--border-radius-item-u2ibpi, 8px);
55
166
  }
56
- .awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):last-child {
167
+ .awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):last-child {
57
168
  border-right: var(--border-item-width-qbbbsa, 2px) solid var(--color-border-item-selected-ppkssz, #0972d3);
58
169
  border-radius: 0 var(--border-radius-item-u2ibpi, 8px) var(--border-radius-item-u2ibpi, 8px) 0;
59
170
  }
60
- .awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):not(:first-child) {
171
+ .awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):not(:first-child) {
61
172
  padding-top: calc(
62
173
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
63
174
  );
64
175
  }
65
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_body-cell-selected_c6tup_9o7yk_33).awsui_body-cell-next-selected_c6tup_9o7yk_65 {
176
+ .awsui_body-cell_c6tup_17cg6_93:not(#\9):not(.awsui_body-cell-selected_c6tup_17cg6_144).awsui_body-cell-next-selected_c6tup_17cg6_176 {
66
177
  border-bottom: 0;
67
178
  padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) + var(--border-divider-list-width-hacikr, 1px));
68
179
  }
69
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9) {
180
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9) {
70
181
  padding-top: calc(
71
182
  var(--space-scaled-xs-6859qs, 8px) + (var(--border-item-width-qbbbsa, 2px) - var(--border-divider-list-width-hacikr, 1px))
72
183
  );
73
184
  border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-item-placeholder-jgzhnb, #0972d3);
74
185
  }
75
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9) {
186
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9) {
76
187
  border-bottom-width: var(--border-divider-list-width-hacikr, 1px);
77
188
  }
78
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9):first-child {
189
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9):first-child {
79
190
  border-bottom-left-radius: 0;
80
191
  }
81
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-next-selected_c6tup_9o7yk_65:not(#\9):last-child {
192
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-next-selected_c6tup_17cg6_176:not(#\9):last-child {
82
193
  border-bottom-right-radius: 0;
83
194
  }
84
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9):first-child {
195
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9):first-child {
85
196
  border-top-left-radius: 0;
86
197
  }
87
- .awsui_body-cell-selected_c6tup_9o7yk_33.awsui_body-cell-prev-selected_c6tup_9o7yk_69:not(#\9):last-child {
198
+ .awsui_body-cell-selected_c6tup_17cg6_144.awsui_body-cell-prev-selected_c6tup_17cg6_180:not(#\9):last-child {
88
199
  border-top-right-radius: 0;
89
200
  }
90
- .awsui_body-cell-selected_c6tup_9o7yk_33:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_9o7yk_69) {
201
+ .awsui_body-cell-selected_c6tup_17cg6_144:not(#\9):not(.awsui_body-cell-prev-selected_c6tup_17cg6_180) {
91
202
  padding-top: var(--space-scaled-xs-6859qs, 8px);
92
203
  }
93
-
94
- /*
95
- In Visual Refresh the first cell of each row should align with the
96
- left edge of the table as closely as possible.
97
- */
98
- .awsui_body-cell_c6tup_9o7yk_9:not(#\9):not(.awsui_is-visual-refresh_c6tup_9o7yk_98):first-child {
99
- padding-left: calc(var(--space-l-4vl6xu, 20px) - var(--border-item-width-qbbbsa, 2px));
204
+ .awsui_body-cell-editor_c6tup_17cg6_204:not(#\9) {
205
+ top: 0;
206
+ right: 0;
207
+ bottom: 0;
208
+ position: absolute;
209
+ display: flex;
210
+ align-items: center;
211
+ justify-content: flex-end;
212
+ padding-right: var(--space-xs-rsr2qu, 8px);
100
213
  }
101
-
102
- .awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9) {
103
- /*
104
- Remove the placeholder border if the row is not selectable.
105
- Rows that are not selectable will reserve the horizontal space
106
- that the placeholder border would consume.
107
- */
108
- /*
109
- Striped rows requires additional left padding because the
110
- shaded background makes the child content appear too close
111
- to the table edge.
112
- */
214
+ .awsui_body-cell-editor-form_c6tup_17cg6_214:not(#\9) {
215
+ margin: calc(-1 * var(--space-xs-rsr2qu, 8px)) calc(-1.5 * var(--space-xs-rsr2qu, 8px));
113
216
  }
114
- .awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child:not(.awsui_has-selection_c6tup_9o7yk_114) {
115
- border-left: none;
217
+ .awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child.awsui_has-striped-rows_c6tup_17cg6_126 > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
218
+ margin-left: calc(-1 * var(--space-xxs-ynfts5, 4px));
116
219
  }
117
- .awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_9o7yk_117) {
118
- padding-left: var(--space-xxxs-k2w98v, 2px);
220
+ .awsui_is-visual-refresh_c6tup_17cg6_114.awsui_body-cell_c6tup_17cg6_93:not(#\9):first-child:not(.awsui_has-striped-rows_c6tup_17cg6_126) > .awsui_body-cell-editor-form_c6tup_17cg6_214 {
221
+ margin-left: calc(-1 * var(--space-xxxs-k2w98v, 2px));
119
222
  }
120
- .awsui_body-cell_c6tup_9o7yk_9.awsui_is-visual-refresh_c6tup_9o7yk_98:not(#\9):first-child.awsui_has-striped-rows_c6tup_9o7yk_117 {
121
- padding-left: var(--space-xxs-ynfts5, 4px);
223
+ .awsui_body-cell-editor-row_c6tup_17cg6_223:not(#\9) {
224
+ display: flex;
225
+ flex-flow: row nowrap;
226
+ align-items: center;
227
+ justify-content: space-between;
228
+ column-gap: var(--space-xxs-ynfts5, 4px);
229
+ }
230
+ .awsui_body-cell-editor-row_c6tup_17cg6_223 > :not(#\9):not(:last-child) {
231
+ flex-grow: 1;
232
+ }
233
+ .awsui_body-cell-editor-controls_c6tup_17cg6_233:not(#\9) {
234
+ flex-shrink: 0;
235
+ }
236
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9) {
237
+ position: relative;
238
+ cursor: pointer;
239
+ }
240
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129.awsui_body-cell-edit-active_c6tup_17cg6_129:not(#\9) {
241
+ overflow: visible;
242
+ }
243
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129) > .awsui_body-cell-editor_c6tup_17cg6_204 {
244
+ opacity: 0;
245
+ }
246
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover {
247
+ position: relative;
248
+ background-color: var(--color-background-dropdown-item-hover-mqsxkv, #f4f4f4);
249
+ border: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-control-default-m3lmsh, #7d8998);
250
+ left: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
251
+ right: calc(-1 * var(--border-divider-list-width-hacikr, 1px));
252
+ }
253
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204 {
254
+ padding-right: calc(var(--space-xs-rsr2qu, 8px) - (2 * var(--border-divider-list-width-hacikr, 1px)));
255
+ }
256
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144.awsui_body-cell-selected_c6tup_17cg6_144, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-next-selected_c6tup_17cg6_176 {
257
+ padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
258
+ padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px) / 2));
259
+ }
260
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-last-row_c6tup_17cg6_144:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
261
+ padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
262
+ }
263
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-first-row_c6tup_17cg6_141:not(.awsui_body-cell-selected_c6tup_17cg6_144) {
264
+ padding-top: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
265
+ padding-bottom: calc(var(--space-scaled-xs-6859qs, 8px) - calc(var(--border-divider-list-width-hacikr, 1px)));
266
+ }
267
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within {
268
+ padding-right: calc(var(--space-scaled-l-t03y3z, 20px) + var(--space-l-4vl6xu, 20px));
269
+ }
270
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover > .awsui_body-cell-editor_c6tup_17cg6_204, .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:focus-within > .awsui_body-cell-editor_c6tup_17cg6_204 {
271
+ opacity: 1;
272
+ }
273
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:first-child {
274
+ left: 0;
275
+ right: 0;
276
+ }
277
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
278
+ position: relative;
279
+ }
280
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within {
281
+ outline: 2px dotted transparent;
282
+ outline-offset: calc(calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)) - 1px);
283
+ }
284
+ .awsui_body-cell_c6tup_17cg6_93.awsui_body-cell-editable_c6tup_17cg6_129:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129)[data-awsui-focus-visible=true]:not(:hover):focus-within::before {
285
+ content: " ";
286
+ display: block;
287
+ position: absolute;
288
+ left: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
289
+ top: calc(-1 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
290
+ width: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
291
+ height: calc(100% + 2 * calc(-1 * var(--space-scaled-xxs-95dhkm, 4px)));
292
+ border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
293
+ box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
294
+ }
295
+ .awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:first-child {
296
+ border-top-left-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
297
+ border-bottom-left-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
298
+ }
299
+ .awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover:last-child {
300
+ border-top-right-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
301
+ border-bottom-right-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
302
+ }
303
+ .awsui_body-cell-editable_c6tup_17cg6_129.awsui_is-visual-refresh_c6tup_17cg6_114:not(#\9):not(.awsui_body-cell-edit-active_c6tup_17cg6_129):hover.awsui_body-cell-first-row_c6tup_17cg6_141 > .awsui_body-cell-editor_c6tup_17cg6_204 {
304
+ padding-top: var(--border-divider-list-width-hacikr, 1px);
122
305
  }