@cloudscape-design/board-components 3.0.14 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/board/styles.css.js +7 -7
- package/board/styles.scoped.css +12 -12
- package/board/styles.selectors.js +7 -7
- package/board-item/internal.js +1 -1
- package/board-item/styles.css.js +10 -10
- package/board-item/styles.scoped.css +38 -17
- package/board-item/styles.selectors.js +10 -10
- package/internal/drag-handle/index.d.ts +1 -0
- package/internal/drag-handle/index.js +3 -2
- package/internal/drag-handle/styles.css.js +2 -1
- package/internal/drag-handle/styles.scoped.css +6 -2
- package/internal/drag-handle/styles.selectors.js +2 -1
- package/internal/environment.js +1 -1
- package/internal/handle/styles.css.js +1 -1
- package/internal/handle/styles.scoped.css +5 -26
- package/internal/handle/styles.selectors.js +1 -1
- package/internal/item-container/index.d.ts +2 -0
- package/internal/item-container/index.js +2 -0
- package/internal/manifest.json +1 -1
- package/internal/resize-handle/index.d.ts +2 -1
- package/internal/resize-handle/index.js +3 -2
- package/internal/resize-handle/styles.css.js +2 -1
- package/internal/resize-handle/styles.scoped.css +5 -1
- package/internal/resize-handle/styles.selectors.js +2 -1
- package/package.json +1 -1
package/board/styles.css.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"placeholder": "
|
|
5
|
-
"placeholder--active": "awsui_placeholder--
|
|
6
|
-
"placeholder--hover": "awsui_placeholder--
|
|
7
|
-
"root": "
|
|
8
|
-
"empty": "
|
|
9
|
-
"current-operation-reorder": "awsui_current-operation-
|
|
10
|
-
"current-operation-resize": "awsui_current-operation-
|
|
4
|
+
"placeholder": "awsui_placeholder_1h7dk_11u65_1",
|
|
5
|
+
"placeholder--active": "awsui_placeholder--active_1h7dk_11u65_5",
|
|
6
|
+
"placeholder--hover": "awsui_placeholder--hover_1h7dk_11u65_8",
|
|
7
|
+
"root": "awsui_root_1h7dk_11u65_12",
|
|
8
|
+
"empty": "awsui_empty_1h7dk_11u65_16",
|
|
9
|
+
"current-operation-reorder": "awsui_current-operation-reorder_1h7dk_11u65_25",
|
|
10
|
+
"current-operation-resize": "awsui_current-operation-resize_1h7dk_11u65_29"
|
|
11
11
|
};
|
|
12
12
|
|
package/board/styles.scoped.css
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
.
|
|
2
|
-
border-radius: var(--border-radius-container-
|
|
1
|
+
.awsui_placeholder_1h7dk_11u65_1:not(#\9) {
|
|
2
|
+
border-radius: var(--border-radius-container-b3z48i, 16px);
|
|
3
3
|
height: 100%;
|
|
4
4
|
}
|
|
5
|
-
.awsui_placeholder--
|
|
6
|
-
background-color: var(--color-board-placeholder-active-
|
|
5
|
+
.awsui_placeholder--active_1h7dk_11u65_5:not(#\9) {
|
|
6
|
+
background-color: var(--color-board-placeholder-active-ks5yr9, #e9ebed);
|
|
7
7
|
}
|
|
8
|
-
.awsui_placeholder--
|
|
9
|
-
background-color: var(--color-board-placeholder-hover-
|
|
8
|
+
.awsui_placeholder--hover_1h7dk_11u65_8:not(#\9) {
|
|
9
|
+
background-color: var(--color-board-placeholder-hover-4nulhj, #d3e7f9);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
12
|
+
.awsui_root_1h7dk_11u65_12:not(#\9) {
|
|
13
13
|
/* used in test-utils */
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.awsui_empty_1h7dk_11u65_16:not(#\9) {
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
width: 100%;
|
|
19
|
-
padding: var(--space-scaled-m-
|
|
20
|
-
color: var(--color-text-empty-
|
|
19
|
+
padding: var(--space-scaled-m-9q5ipc, 16px) var(--space-scaled-l-x5pubp, 20px) var(--space-scaled-l-x5pubp, 20px);
|
|
20
|
+
color: var(--color-text-empty-qnnj2s, #5f6b7a);
|
|
21
21
|
display: flex;
|
|
22
22
|
justify-content: center;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.awsui_current-operation-
|
|
25
|
+
.awsui_current-operation-reorder_1h7dk_11u65_25:not(#\9) {
|
|
26
26
|
cursor: grabbing;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.awsui_current-operation-
|
|
29
|
+
.awsui_current-operation-resize_1h7dk_11u65_29:not(#\9) {
|
|
30
30
|
cursor: nwse-resize;
|
|
31
31
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"placeholder": "
|
|
6
|
-
"placeholder--active": "awsui_placeholder--
|
|
7
|
-
"placeholder--hover": "awsui_placeholder--
|
|
8
|
-
"root": "
|
|
9
|
-
"empty": "
|
|
10
|
-
"current-operation-reorder": "awsui_current-operation-
|
|
11
|
-
"current-operation-resize": "awsui_current-operation-
|
|
5
|
+
"placeholder": "awsui_placeholder_1h7dk_11u65_1",
|
|
6
|
+
"placeholder--active": "awsui_placeholder--active_1h7dk_11u65_5",
|
|
7
|
+
"placeholder--hover": "awsui_placeholder--hover_1h7dk_11u65_8",
|
|
8
|
+
"root": "awsui_root_1h7dk_11u65_12",
|
|
9
|
+
"empty": "awsui_empty_1h7dk_11u65_16",
|
|
10
|
+
"current-operation-reorder": "awsui_current-operation-reorder_1h7dk_11u65_25",
|
|
11
|
+
"current-operation-resize": "awsui_current-operation-resize_1h7dk_11u65_29"
|
|
12
12
|
};
|
|
13
13
|
|
package/board-item/internal.js
CHANGED
|
@@ -17,5 +17,5 @@ export function InternalBoardItem({ children, header, settings, disableContentPa
|
|
|
17
17
|
const dragHandleAriaDescribedBy = useId();
|
|
18
18
|
const resizeHandleAriaLabelledBy = useId();
|
|
19
19
|
const resizeHandleAriaDescribedBy = useId();
|
|
20
|
-
return (_jsxs("div", { ref: __internalRootRef, className: styles.root, ...getDataAttributes(rest), children: [_jsx(Container, { fitHeight: true, disableHeaderPaddings: true, header: _jsx(WidgetContainerHeader, { handle: _jsx(DragHandle, { ref: dragHandle.ref, ariaLabelledBy: dragHandleAriaLabelledBy, ariaDescribedBy: dragHandleAriaDescribedBy, onPointerDown: dragHandle.onPointerDown, onKeyDown: dragHandle.onKeyDown }), settings: settings, children: header }), footer: footer, disableContentPaddings: disableContentPaddings, className: clsx(styles["container-override"], isActive && styles.active), children: children }), resizeHandle && (_jsx("div", { className: styles.resizer, children: _jsx(ResizeHandle, { ariaLabelledBy: resizeHandleAriaLabelledBy, ariaDescribedBy: resizeHandleAriaDescribedBy, onPointerDown: resizeHandle.onPointerDown, onKeyDown: resizeHandle.onKeyDown }) })), _jsx(ScreenreaderOnly, { id: dragHandleAriaLabelledBy, children: i18nStrings.dragHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: dragHandleAriaDescribedBy, children: i18nStrings.dragHandleAriaDescription }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaLabelledBy, children: i18nStrings.resizeHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaDescribedBy, children: i18nStrings.resizeHandleAriaDescription })] }));
|
|
20
|
+
return (_jsxs("div", { ref: __internalRootRef, className: styles.root, ...getDataAttributes(rest), children: [_jsx(Container, { fitHeight: true, disableHeaderPaddings: true, header: _jsx(WidgetContainerHeader, { handle: _jsx(DragHandle, { ref: dragHandle.ref, ariaLabelledBy: dragHandleAriaLabelledBy, ariaDescribedBy: dragHandleAriaDescribedBy, onPointerDown: dragHandle.onPointerDown, onKeyDown: dragHandle.onKeyDown, isActive: dragHandle.isActive }), settings: settings, children: header }), footer: footer, disableContentPaddings: disableContentPaddings, className: clsx(styles["container-override"], isActive && styles.active), children: children }), resizeHandle && (_jsx("div", { className: styles.resizer, children: _jsx(ResizeHandle, { ariaLabelledBy: resizeHandleAriaLabelledBy, ariaDescribedBy: resizeHandleAriaDescribedBy, onPointerDown: resizeHandle.onPointerDown, onKeyDown: resizeHandle.onKeyDown, isActive: resizeHandle.isActive }) })), _jsx(ScreenreaderOnly, { id: dragHandleAriaLabelledBy, children: i18nStrings.dragHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: dragHandleAriaDescribedBy, children: i18nStrings.dragHandleAriaDescription }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaLabelledBy, children: i18nStrings.resizeHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaDescribedBy, children: i18nStrings.resizeHandleAriaDescription })] }));
|
|
21
21
|
}
|
package/board-item/styles.css.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"container-override": "awsui_container-
|
|
6
|
-
"active": "
|
|
7
|
-
"header": "
|
|
8
|
-
"flexible": "
|
|
9
|
-
"handle": "
|
|
10
|
-
"header-content": "awsui_header-
|
|
11
|
-
"settings": "
|
|
12
|
-
"fixed": "
|
|
13
|
-
"resizer": "
|
|
4
|
+
"root": "awsui_root_9ckv7_18rkp_1",
|
|
5
|
+
"container-override": "awsui_container-override_9ckv7_18rkp_6",
|
|
6
|
+
"active": "awsui_active_9ckv7_18rkp_6",
|
|
7
|
+
"header": "awsui_header_9ckv7_18rkp_31",
|
|
8
|
+
"flexible": "awsui_flexible_9ckv7_18rkp_37",
|
|
9
|
+
"handle": "awsui_handle_9ckv7_18rkp_41",
|
|
10
|
+
"header-content": "awsui_header-content_9ckv7_18rkp_45",
|
|
11
|
+
"settings": "awsui_settings_9ckv7_18rkp_49",
|
|
12
|
+
"fixed": "awsui_fixed_9ckv7_18rkp_54",
|
|
13
|
+
"resizer": "awsui_resizer_9ckv7_18rkp_58"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,41 +1,62 @@
|
|
|
1
|
-
.
|
|
1
|
+
.awsui_root_9ckv7_18rkp_1:not(#\9) {
|
|
2
2
|
display: contents;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
/* TODO: use container API instead of styles override */
|
|
6
|
-
.awsui_container-
|
|
7
|
-
box-shadow: var(--shadow-container-active-
|
|
6
|
+
.awsui_container-override_9ckv7_18rkp_6.awsui_active_9ckv7_18rkp_6:not(#\9) {
|
|
7
|
+
box-shadow: var(--shadow-container-active-jaablg, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1019607843));
|
|
8
|
+
}
|
|
9
|
+
[data-awsui-focus-visible] .awsui_container-override_9ckv7_18rkp_6.awsui_active_9ckv7_18rkp_6:not(#\9) {
|
|
10
|
+
position: relative;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
outline: none;
|
|
13
|
+
}
|
|
14
|
+
[data-awsui-focus-visible] .awsui_container-override_9ckv7_18rkp_6.awsui_active_9ckv7_18rkp_6:not(#\9) {
|
|
15
|
+
outline: 2px dotted transparent;
|
|
16
|
+
outline-offset: -1px;
|
|
17
|
+
}
|
|
18
|
+
[data-awsui-focus-visible] .awsui_container-override_9ckv7_18rkp_6.awsui_active_9ckv7_18rkp_6:not(#\9)::before {
|
|
19
|
+
content: " ";
|
|
20
|
+
display: block;
|
|
21
|
+
position: absolute;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
left: calc(-1 * 0px);
|
|
24
|
+
top: calc(-1 * 0px);
|
|
25
|
+
width: calc(100% + 2 * 0px);
|
|
26
|
+
height: calc(100% + 2 * 0px);
|
|
27
|
+
border-radius: var(--border-radius-container-b3z48i, 16px);
|
|
28
|
+
border: 2px solid var(--color-border-item-focused-nwfxo7, #0972d3);
|
|
8
29
|
}
|
|
9
30
|
|
|
10
|
-
.
|
|
31
|
+
.awsui_header_9ckv7_18rkp_31:not(#\9) {
|
|
11
32
|
display: flex;
|
|
12
33
|
justify-items: center;
|
|
13
|
-
padding: var(--space-scaled-s-
|
|
34
|
+
padding: var(--space-scaled-s-gczsk7, 12px) calc(var(--space-container-horizontal-6u2610, 20px) - var(--space-scaled-xs-u0e7ft, 8px));
|
|
14
35
|
}
|
|
15
36
|
|
|
16
|
-
.
|
|
37
|
+
.awsui_flexible_9ckv7_18rkp_37:not(#\9) {
|
|
17
38
|
flex: 1 1 min-content;
|
|
18
39
|
}
|
|
19
40
|
|
|
20
|
-
.
|
|
21
|
-
margin-top: calc(var(--space-scaled-xxs-
|
|
41
|
+
.awsui_handle_9ckv7_18rkp_41:not(#\9) {
|
|
42
|
+
margin-top: calc(var(--space-scaled-xxs-ugy2pw, 4px) + 1px);
|
|
22
43
|
}
|
|
23
44
|
|
|
24
|
-
.awsui_header-
|
|
25
|
-
margin-left: var(--space-scaled-xxs-
|
|
45
|
+
.awsui_header-content_9ckv7_18rkp_45:not(#\9) {
|
|
46
|
+
margin-left: var(--space-scaled-xxs-ugy2pw, 4px);
|
|
26
47
|
}
|
|
27
48
|
|
|
28
|
-
.
|
|
29
|
-
margin-top: calc(var(--space-scaled-xxxs-
|
|
30
|
-
margin-left: var(--space-static-xs-
|
|
49
|
+
.awsui_settings_9ckv7_18rkp_49:not(#\9) {
|
|
50
|
+
margin-top: calc(var(--space-scaled-xxxs-emyscj, 2px) + 1px);
|
|
51
|
+
margin-left: var(--space-static-xs-lb1zri, 8px);
|
|
31
52
|
}
|
|
32
53
|
|
|
33
|
-
.
|
|
54
|
+
.awsui_fixed_9ckv7_18rkp_54:not(#\9) {
|
|
34
55
|
flex: 0 0 auto;
|
|
35
56
|
}
|
|
36
57
|
|
|
37
|
-
.
|
|
58
|
+
.awsui_resizer_9ckv7_18rkp_58:not(#\9) {
|
|
38
59
|
position: absolute;
|
|
39
|
-
bottom: calc(var(--space-static-xs-
|
|
40
|
-
right: calc(var(--space-static-xs-
|
|
60
|
+
bottom: calc(var(--space-static-xs-lb1zri, 8px) - var(--space-static-xxxs-lv75px, 2px));
|
|
61
|
+
right: calc(var(--space-static-xs-lb1zri, 8px) - var(--space-static-xxxs-lv75px, 2px));
|
|
41
62
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"container-override": "awsui_container-
|
|
7
|
-
"active": "
|
|
8
|
-
"header": "
|
|
9
|
-
"flexible": "
|
|
10
|
-
"handle": "
|
|
11
|
-
"header-content": "awsui_header-
|
|
12
|
-
"settings": "
|
|
13
|
-
"fixed": "
|
|
14
|
-
"resizer": "
|
|
5
|
+
"root": "awsui_root_9ckv7_18rkp_1",
|
|
6
|
+
"container-override": "awsui_container-override_9ckv7_18rkp_6",
|
|
7
|
+
"active": "awsui_active_9ckv7_18rkp_6",
|
|
8
|
+
"header": "awsui_header_9ckv7_18rkp_31",
|
|
9
|
+
"flexible": "awsui_flexible_9ckv7_18rkp_37",
|
|
10
|
+
"handle": "awsui_handle_9ckv7_18rkp_41",
|
|
11
|
+
"header-content": "awsui_header-content_9ckv7_18rkp_45",
|
|
12
|
+
"settings": "awsui_settings_9ckv7_18rkp_49",
|
|
13
|
+
"fixed": "awsui_fixed_9ckv7_18rkp_54",
|
|
14
|
+
"resizer": "awsui_resizer_9ckv7_18rkp_58"
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -4,6 +4,7 @@ export interface DragHandleProps {
|
|
|
4
4
|
ariaDescribedBy: string;
|
|
5
5
|
onPointerDown: (event: PointerEvent) => void;
|
|
6
6
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
7
|
+
isActive: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const _default: import("react").ForwardRefExoticComponent<DragHandleProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
10
|
export default _default;
|
|
@@ -2,10 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Icon } from "@cloudscape-design/components";
|
|
5
|
+
import clsx from "clsx";
|
|
5
6
|
import { forwardRef } from "react";
|
|
6
7
|
import Handle from "../handle";
|
|
7
8
|
import styles from "./styles.css.js";
|
|
8
|
-
function DragHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown }, ref) {
|
|
9
|
-
return (_jsx(Handle, { ref: ref, className: styles.handle, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onPointerDown: onPointerDown, onKeyDown: onKeyDown, children: _jsx(Icon, { name: "drag-indicator" }) }));
|
|
9
|
+
function DragHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, isActive }, ref) {
|
|
10
|
+
return (_jsx(Handle, { ref: ref, className: clsx(styles.handle, isActive && styles.active), "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onPointerDown: onPointerDown, onKeyDown: onKeyDown, children: _jsx(Icon, { name: "drag-indicator" }) }));
|
|
10
11
|
}
|
|
11
12
|
export default forwardRef(DragHandle);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.awsui_handle_umbhe_1k0eu_1:not(#\9) {
|
|
2
2
|
cursor: grab;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.awsui_handle_umbhe_1k0eu_1:not(#\9):active {
|
|
6
6
|
cursor: grabbing;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.awsui_active_umbhe_1k0eu_9:not(#\9) {
|
|
10
|
+
outline: none;
|
|
7
11
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"handle": "
|
|
5
|
+
"handle": "awsui_handle_umbhe_1k0eu_1",
|
|
6
|
+
"active": "awsui_active_umbhe_1k0eu_9"
|
|
6
7
|
};
|
|
7
8
|
|
package/internal/environment.js
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.awsui_handle_cc1pu_njct9_1:not(#\9) {
|
|
2
2
|
-webkit-appearance: none;
|
|
3
3
|
appearance: none;
|
|
4
4
|
background: transparent;
|
|
5
5
|
border: none;
|
|
6
|
-
padding: var(--space-scaled-xxs-
|
|
7
|
-
color: var(--color-text-interactive-default-
|
|
6
|
+
padding: var(--space-scaled-xxs-ugy2pw, 4px);
|
|
7
|
+
color: var(--color-text-interactive-default-pdoaf1, #414d5c);
|
|
8
8
|
}
|
|
9
|
-
.
|
|
10
|
-
color: var(--color-text-interactive-hover-
|
|
11
|
-
}
|
|
12
|
-
.awsui_handle_cc1pu_jzwgj_1:not(#\9):focus-visible {
|
|
13
|
-
position: relative;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
outline: none;
|
|
16
|
-
}
|
|
17
|
-
.awsui_handle_cc1pu_jzwgj_1:not(#\9):focus-visible {
|
|
18
|
-
outline: 2px dotted transparent;
|
|
19
|
-
outline-offset: 3px;
|
|
20
|
-
}
|
|
21
|
-
.awsui_handle_cc1pu_jzwgj_1:not(#\9):focus-visible::before {
|
|
22
|
-
content: " ";
|
|
23
|
-
display: block;
|
|
24
|
-
position: absolute;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
left: calc(-1 * 4px);
|
|
27
|
-
top: calc(-1 * 4px);
|
|
28
|
-
width: calc(100% + 2 * 4px);
|
|
29
|
-
height: calc(100% + 2 * 4px);
|
|
30
|
-
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
31
|
-
border: 2px solid var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
9
|
+
.awsui_handle_cc1pu_njct9_1:not(#\9):hover {
|
|
10
|
+
color: var(--color-text-interactive-hover-hi8qzz, #000716);
|
|
32
11
|
}
|
|
@@ -10,10 +10,12 @@ interface ItemContextType {
|
|
|
10
10
|
ref: RefObject<HTMLButtonElement>;
|
|
11
11
|
onPointerDown(event: ReactPointerEvent): void;
|
|
12
12
|
onKeyDown(event: KeyboardEvent): void;
|
|
13
|
+
isActive: boolean;
|
|
13
14
|
};
|
|
14
15
|
resizeHandle: null | {
|
|
15
16
|
onPointerDown(event: ReactPointerEvent): void;
|
|
16
17
|
onKeyDown(event: KeyboardEvent): void;
|
|
18
|
+
isActive: boolean;
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
export declare const ItemContext: import("react").Context<ItemContextType | null>;
|
|
@@ -264,11 +264,13 @@ function ItemContainerComponent({ item, placed, acquired, inTransition, transfor
|
|
|
264
264
|
ref: dragHandleRef,
|
|
265
265
|
onPointerDown: onDragHandlePointerDown,
|
|
266
266
|
onKeyDown: onDragHandleKeyDown,
|
|
267
|
+
isActive: isActive && (transition === null || transition === void 0 ? void 0 : transition.operation) === "reorder",
|
|
267
268
|
},
|
|
268
269
|
resizeHandle: placed
|
|
269
270
|
? {
|
|
270
271
|
onPointerDown: onResizeHandlePointerDown,
|
|
271
272
|
onKeyDown: onResizeHandleKeyDown,
|
|
273
|
+
isActive: isActive && (transition === null || transition === void 0 ? void 0 : transition.operation) === "resize",
|
|
272
274
|
}
|
|
273
275
|
: null,
|
|
274
276
|
}, children: childrenRef.current }) }));
|
package/internal/manifest.json
CHANGED
|
@@ -4,5 +4,6 @@ export interface ResizeHandleProps {
|
|
|
4
4
|
ariaDescribedBy: string;
|
|
5
5
|
onPointerDown: (event: PointerEvent) => void;
|
|
6
6
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
7
|
+
isActive: boolean;
|
|
7
8
|
}
|
|
8
|
-
export default function ResizeHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown }: ResizeHandleProps): JSX.Element;
|
|
9
|
+
export default function ResizeHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, isActive, }: ResizeHandleProps): JSX.Element;
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Icon } from "@cloudscape-design/components";
|
|
5
|
+
import clsx from "clsx";
|
|
5
6
|
import Handle from "../handle";
|
|
6
7
|
import styles from "./styles.css.js";
|
|
7
|
-
export default function ResizeHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown }) {
|
|
8
|
-
return (_jsx(Handle, { className: styles.handle, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onPointerDown: onPointerDown, onKeyDown: onKeyDown, children: _jsx(Icon, { name: "resize-area" }) }));
|
|
8
|
+
export default function ResizeHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, isActive, }) {
|
|
9
|
+
return (_jsx(Handle, { className: clsx(styles.handle, isActive && styles.active), "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onPointerDown: onPointerDown, onKeyDown: onKeyDown, children: _jsx(Icon, { name: "resize-area" }) }));
|
|
9
10
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"handle": "
|
|
5
|
+
"handle": "awsui_handle_19hnz_esh5b_1",
|
|
6
|
+
"active": "awsui_active_19hnz_esh5b_5"
|
|
6
7
|
};
|
|
7
8
|
|