@cloudscape-design/components 3.0.708 → 3.0.710
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +20 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/area-chart/chart-container.d.ts +2 -1
- package/area-chart/chart-container.d.ts.map +1 -1
- package/area-chart/chart-container.js +2 -2
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/internal.d.ts.map +1 -1
- package/area-chart/internal.js +1 -1
- package/area-chart/internal.js.map +1 -1
- package/button/internal.d.ts +2 -0
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +2 -2
- package/button/internal.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-group/icon-button-item.d.ts +12 -0
- package/button-group/icon-button-item.d.ts.map +1 -0
- package/button-group/icon-button-item.js +21 -0
- package/button-group/icon-button-item.js.map +1 -0
- package/button-group/index.d.ts +6 -0
- package/button-group/index.d.ts.map +1 -0
- package/button-group/index.js +24 -0
- package/button-group/index.js.map +1 -0
- package/button-group/interfaces.d.ts +111 -0
- package/button-group/interfaces.d.ts.map +1 -0
- package/button-group/interfaces.js +4 -0
- package/button-group/interfaces.js.map +1 -0
- package/button-group/internal.d.ts +5 -0
- package/button-group/internal.d.ts.map +1 -0
- package/button-group/internal.js +123 -0
- package/button-group/internal.js.map +1 -0
- package/button-group/item-element.d.ts +20 -0
- package/button-group/item-element.d.ts.map +1 -0
- package/button-group/item-element.js +74 -0
- package/button-group/item-element.js.map +1 -0
- package/button-group/menu-dropdown-item.d.ts +13 -0
- package/button-group/menu-dropdown-item.d.ts.map +1 -0
- package/button-group/menu-dropdown-item.js +20 -0
- package/button-group/menu-dropdown-item.js.map +1 -0
- package/button-group/styles.css.js +9 -0
- package/button-group/styles.scoped.css +149 -0
- package/button-group/styles.selectors.js +10 -0
- package/button-group/test-classes/styles.css.js +10 -0
- package/button-group/test-classes/styles.scoped.css +23 -0
- package/button-group/test-classes/styles.selectors.js +11 -0
- package/help-panel/implementation.d.ts.map +1 -1
- package/help-panel/implementation.js +2 -3
- package/help-panel/implementation.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/components/cartesian-chart/block-end-labels.d.ts +2 -1
- package/internal/components/cartesian-chart/block-end-labels.d.ts.map +1 -1
- package/internal/components/cartesian-chart/block-end-labels.js +5 -3
- package/internal/components/cartesian-chart/block-end-labels.js.map +1 -1
- package/internal/components/dropdown/interfaces.d.ts +1 -1
- package/internal/components/dropdown/interfaces.js.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js +1 -1
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/dom.d.ts +3 -0
- package/internal/utils/dom.d.ts.map +1 -1
- package/internal/utils/dom.js +30 -1
- package/internal/utils/dom.js.map +1 -1
- package/internal/utils/handle-key.d.ts.map +1 -1
- package/internal/utils/handle-key.js +2 -1
- package/internal/utils/handle-key.js.map +1 -1
- package/internal/utils/node-belongs.js +4 -4
- package/internal/utils/node-belongs.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +1 -1
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/package.json +2 -1
- package/test-utils/dom/button-group/index.d.ts +22 -0
- package/test-utils/dom/button-group/index.js +42 -0
- package/test-utils/dom/button-group/index.js.map +1 -0
- package/test-utils/dom/index.d.ts +3 -0
- package/test-utils/dom/index.js +10 -2
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/button-group/index.d.ts +22 -0
- package/test-utils/selectors/button-group/index.js +42 -0
- package/test-utils/selectors/button-group/index.js.map +1 -0
- package/test-utils/selectors/index.d.ts +3 -0
- package/test-utils/selectors/index.js +10 -2
- package/test-utils/selectors/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
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
|
+
/*
|
|
54
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
55
|
+
SPDX-License-Identifier: Apache-2.0
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
/*
|
|
66
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
67
|
+
SPDX-License-Identifier: Apache-2.0
|
|
68
|
+
*/
|
|
69
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
70
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
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
|
+
/*
|
|
84
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
85
|
+
SPDX-License-Identifier: Apache-2.0
|
|
86
|
+
*/
|
|
87
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
88
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
.awsui_root_vdkpj_1c4cy_97:not(#\9) {
|
|
98
|
+
border-collapse: separate;
|
|
99
|
+
border-spacing: 0;
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
caption-side: top;
|
|
102
|
+
cursor: auto;
|
|
103
|
+
direction: inherit;
|
|
104
|
+
empty-cells: show;
|
|
105
|
+
font-family: serif;
|
|
106
|
+
font-size: medium;
|
|
107
|
+
font-style: normal;
|
|
108
|
+
font-variant: normal;
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
font-stretch: normal;
|
|
111
|
+
line-height: normal;
|
|
112
|
+
-webkit-hyphens: none;
|
|
113
|
+
hyphens: none;
|
|
114
|
+
letter-spacing: normal;
|
|
115
|
+
list-style: disc outside none;
|
|
116
|
+
tab-size: 8;
|
|
117
|
+
text-align: start;
|
|
118
|
+
text-indent: 0;
|
|
119
|
+
text-shadow: none;
|
|
120
|
+
text-transform: none;
|
|
121
|
+
visibility: visible;
|
|
122
|
+
white-space: normal;
|
|
123
|
+
word-spacing: normal;
|
|
124
|
+
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
125
|
+
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
126
|
+
color: var(--color-text-body-default-at06ol, #000716);
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
font-family: var(--font-family-base-dnvic8, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
129
|
+
-webkit-font-smoothing: auto;
|
|
130
|
+
-moz-osx-font-smoothing: auto;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: row;
|
|
133
|
+
flex-wrap: wrap;
|
|
134
|
+
gap: var(--space-scaled-xs-26e2du, 8px);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.awsui_item-wrapper_vdkpj_1c4cy_136:not(#\9) {
|
|
138
|
+
display: inline-block;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.awsui_group_vdkpj_1c4cy_140:not(#\9) {
|
|
142
|
+
display: contents;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.awsui_divider_vdkpj_1c4cy_144:not(#\9) {
|
|
146
|
+
background-color: var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
147
|
+
inline-size: var(--border-divider-section-width-1061zr, 1px);
|
|
148
|
+
margin-block: var(--space-static-xs-7sfb63, 8px);
|
|
149
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"root": "awsui_root_vdkpj_1c4cy_97",
|
|
6
|
+
"item-wrapper": "awsui_item-wrapper_vdkpj_1c4cy_136",
|
|
7
|
+
"group": "awsui_group_vdkpj_1c4cy_140",
|
|
8
|
+
"divider": "awsui_divider_vdkpj_1c4cy_144"
|
|
9
|
+
};
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"button-group": "awsui_button-group_1v2mg_1s3dt_5",
|
|
5
|
+
"button-group-item": "awsui_button-group-item_1v2mg_1s3dt_9",
|
|
6
|
+
"button-group-tooltip": "awsui_button-group-tooltip_1v2mg_1s3dt_13",
|
|
7
|
+
"item": "awsui_item_1v2mg_1s3dt_17",
|
|
8
|
+
"tooltip": "awsui_tooltip_1v2mg_1s3dt_21"
|
|
9
|
+
};
|
|
10
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
.awsui_button-group_1v2mg_1s3dt_5:not(#\9) {
|
|
6
|
+
/* used in test-utils */
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.awsui_button-group-item_1v2mg_1s3dt_9:not(#\9) {
|
|
10
|
+
/* used in test-utils */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.awsui_button-group-tooltip_1v2mg_1s3dt_13:not(#\9) {
|
|
14
|
+
/* used in test-utils */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.awsui_item_1v2mg_1s3dt_17:not(#\9) {
|
|
18
|
+
/* used in test-utils */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.awsui_tooltip_1v2mg_1s3dt_21:not(#\9) {
|
|
22
|
+
/* used in test-utils */
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"button-group": "awsui_button-group_1v2mg_1s3dt_5",
|
|
6
|
+
"button-group-item": "awsui_button-group-item_1v2mg_1s3dt_9",
|
|
7
|
+
"button-group-tooltip": "awsui_button-group-tooltip_1v2mg_1s3dt_13",
|
|
8
|
+
"item": "awsui_item_1v2mg_1s3dt_17",
|
|
9
|
+
"tooltip": "awsui_tooltip_1v2mg_1s3dt_21"
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,0BAA0B,CAAC;AAEjF,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,sBAAsB,eAsBxB;AAED,eAAO,MAAM,yBAAyB,yFAAqD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { __rest } from "tslib";
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import {
|
|
6
|
+
import { isAppLayoutToolbarEnabled } from '../app-layout/utils/feature-flags';
|
|
7
7
|
import { useInternalI18n } from '../i18n/context';
|
|
8
8
|
import { getBaseProps } from '../internal/base-component';
|
|
9
9
|
import LiveRegion from '../internal/components/live-region';
|
|
@@ -15,8 +15,7 @@ export function HelpPanelImplementation(_a) {
|
|
|
15
15
|
var { header, footer, children, loading, loadingText, __internalRootRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "loading", "loadingText", "__internalRootRef"]);
|
|
16
16
|
const baseProps = getBaseProps(restProps);
|
|
17
17
|
const i18n = useInternalI18n('help-panel');
|
|
18
|
-
const
|
|
19
|
-
const containerProps = Object.assign(Object.assign({}, baseProps), { className: clsx(baseProps.className, styles['help-panel'], hasToolbar && styles['with-toolbar']) });
|
|
18
|
+
const containerProps = Object.assign(Object.assign({}, baseProps), { className: clsx(baseProps.className, styles['help-panel'], isAppLayoutToolbarEnabled() && styles['with-toolbar']) });
|
|
20
19
|
return loading ? (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
21
20
|
React.createElement(InternalStatusIndicator, { type: "loading" },
|
|
22
21
|
React.createElement(LiveRegion, { visible: true }, i18n('loadingText', loadingText))))) : (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAE7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,uBAAuB,MAAM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on.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { isAppLayoutToolbarEnabled } from '../app-layout/utils/feature-flags';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport LiveRegion from '../internal/components/live-region';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { HelpPanelProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport type HelpPanelInternalProps = HelpPanelProps & InternalBaseComponentProps;\n\nexport function HelpPanelImplementation({\n header,\n footer,\n children,\n loading,\n loadingText,\n __internalRootRef,\n ...restProps\n}: HelpPanelInternalProps) {\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('help-panel');\n const containerProps = {\n ...baseProps,\n className: clsx(baseProps.className, styles['help-panel'], isAppLayoutToolbarEnabled() && styles['with-toolbar']),\n };\n return loading ? (\n <div {...containerProps} ref={__internalRootRef}>\n <InternalStatusIndicator type=\"loading\">\n <LiveRegion visible={true}>{i18n('loadingText', loadingText)}</LiveRegion>\n </InternalStatusIndicator>\n </div>\n ) : (\n <div {...containerProps} ref={__internalRootRef}>\n {header && <div className={clsx(styles.header)}>{header}</div>}\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <div className={styles.content}>{children}</div>\n </LinkDefaultVariantContext.Provider>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n );\n}\n\nexport const createWidgetizedHelpPanel = createWidgetizedComponent(HelpPanelImplementation);\n"]}
|
package/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { default as Box, BoxProps } from './box';
|
|
|
11
11
|
export { default as BreadcrumbGroup, BreadcrumbGroupProps } from './breadcrumb-group';
|
|
12
12
|
export { default as Button, ButtonProps } from './button';
|
|
13
13
|
export { default as ButtonDropdown, ButtonDropdownProps } from './button-dropdown';
|
|
14
|
+
export { default as ButtonGroup, ButtonGroupProps } from './button-group';
|
|
14
15
|
export { default as Calendar, CalendarProps } from './calendar';
|
|
15
16
|
export { default as Cards, CardsProps } from './cards';
|
|
16
17
|
export { default as Checkbox, CheckboxProps } from './checkbox';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;A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,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC"}
|
package/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { default as Box } from './box';
|
|
|
11
11
|
export { default as BreadcrumbGroup } from './breadcrumb-group';
|
|
12
12
|
export { default as Button } from './button';
|
|
13
13
|
export { default as ButtonDropdown } from './button-dropdown';
|
|
14
|
+
export { default as ButtonGroup } from './button-group';
|
|
14
15
|
export { default as Calendar } from './calendar';
|
|
15
16
|
export { default as Cards } from './cards';
|
|
16
17
|
export { default as Checkbox } from './checkbox';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAyB,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAoB,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,KAAK,EA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AM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC","sourcesContent":["export { default as Alert, AlertProps } from './alert';\nexport { default as AnchorNavigation, AnchorNavigationProps } from './anchor-navigation';\nexport { default as AnnotationContext, AnnotationContextProps } from './annotation-context';\nexport { default as AppLayout, AppLayoutProps } from './app-layout';\nexport { default as AreaChart, AreaChartProps } from './area-chart';\nexport { default as AttributeEditor, AttributeEditorProps } from './attribute-editor';\nexport { default as Autosuggest, AutosuggestProps } from './autosuggest';\nexport { default as Badge, BadgeProps } from './badge';\nexport { default as BarChart, BarChartProps } from './bar-chart';\nexport { default as Box, BoxProps } from './box';\nexport { default as BreadcrumbGroup, BreadcrumbGroupProps } from './breadcrumb-group';\nexport { default as Button, ButtonProps } from './button';\nexport { default as ButtonDropdown, ButtonDropdownProps } from './button-dropdown';\nexport { default as Calendar, CalendarProps } from './calendar';\nexport { default as Cards, CardsProps } from './cards';\nexport { default as Checkbox, CheckboxProps } from './checkbox';\nexport { default as CodeEditor, CodeEditorProps } from './code-editor';\nexport { default as CollectionPreferences, CollectionPreferencesProps } from './collection-preferences';\nexport { default as ColumnLayout, ColumnLayoutProps } from './column-layout';\nexport { default as Container, ContainerProps } from './container';\nexport { default as ContentLayout, ContentLayoutProps } from './content-layout';\nexport { default as CopyToClipboard, CopyToClipboardProps } from './copy-to-clipboard';\nexport { default as DateInput, DateInputProps } from './date-input';\nexport { default as DatePicker, DatePickerProps } from './date-picker';\nexport { default as DateRangePicker, DateRangePickerProps } from './date-range-picker';\nexport { default as Drawer, DrawerProps } from './drawer';\nexport { default as ExpandableSection, ExpandableSectionProps } from './expandable-section';\nexport { default as FileUpload, FileUploadProps } from './file-upload';\nexport { default as Flashbar, FlashbarProps } from './flashbar';\nexport { default as Form, FormProps } from './form';\nexport { default as FormField, FormFieldProps } from './form-field';\nexport { default as Grid, GridProps } from './grid';\nexport { default as Header, HeaderProps } from './header';\nexport { default as HelpPanel, HelpPanelProps } from './help-panel';\nexport { default as Hotspot, HotspotProps } from './hotspot';\nexport { default as Icon, IconProps } from './icon';\nexport { default as Input, InputProps } from './input';\nexport { default as KeyValuePairs, KeyValuePairsProps } from './key-value-pairs';\nexport { default as LineChart, LineChartProps } from './line-chart';\nexport { default as Link, LinkProps } from './link';\nexport { default as MixedLineBarChart, MixedLineBarChartProps } from './mixed-line-bar-chart';\nexport { default as Modal, ModalProps } from './modal';\nexport { default as Multiselect, MultiselectProps } from './multiselect';\nexport { default as Pagination, PaginationProps } from './pagination';\nexport { default as PieChart, PieChartProps } from './pie-chart';\nexport { default as Popover, PopoverProps } from './popover';\nexport { default as ProgressBar, ProgressBarProps } from './progress-bar';\nexport { default as PromptInput, PromptInputProps } from './prompt-input';\nexport { default as PropertyFilter, PropertyFilterProps } from './property-filter';\nexport { default as RadioGroup, RadioGroupProps } from './radio-group';\nexport { default as S3ResourceSelector, S3ResourceSelectorProps } from './s3-resource-selector';\nexport { default as SegmentedControl, SegmentedControlProps } from './segmented-control';\nexport { default as Select, SelectProps } from './select';\nexport { default as SideNavigation, SideNavigationProps } from './side-navigation';\nexport { default as Slider, SliderProps } from './slider';\nexport { default as SpaceBetween, SpaceBetweenProps } from './space-between';\nexport { default as Spinner, SpinnerProps } from './spinner';\nexport { default as SplitPanel, SplitPanelProps } from './split-panel';\nexport { default as StatusIndicator, StatusIndicatorProps } from './status-indicator';\nexport { default as Table, TableProps } from './table';\nexport { default as Tabs, TabsProps } from './tabs';\nexport { default as TagEditor, TagEditorProps } from './tag-editor';\nexport { default as TextContent, TextContentProps } from './text-content';\nexport { default as TextFilter, TextFilterProps } from './text-filter';\nexport { default as Textarea, TextareaProps } from './textarea';\nexport { default as Tiles, TilesProps } from './tiles';\nexport { default as TimeInput, TimeInputProps } from './time-input';\nexport { default as Toggle, ToggleProps } from './toggle';\nexport { default as ToggleButton, ToggleButtonProps } from './toggle-button';\nexport { default as TokenGroup, TokenGroupProps } from './token-group';\nexport { default as TopNavigation, TopNavigationProps } from './top-navigation';\nexport { default as TutorialPanel, TutorialPanelProps } from './tutorial-panel';\nexport { default as Wizard, WizardProps } from './wizard';\nexport * from './interfaces';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAyB,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAoB,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAiB,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAY,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,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AAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC","sourcesContent":["export { default as Alert, AlertProps } from './alert';\nexport { default as AnchorNavigation, AnchorNavigationProps } from './anchor-navigation';\nexport { default as AnnotationContext, AnnotationContextProps } from './annotation-context';\nexport { default as AppLayout, AppLayoutProps } from './app-layout';\nexport { default as AreaChart, AreaChartProps } from './area-chart';\nexport { default as AttributeEditor, AttributeEditorProps } from './attribute-editor';\nexport { default as Autosuggest, AutosuggestProps } from './autosuggest';\nexport { default as Badge, BadgeProps } from './badge';\nexport { default as BarChart, BarChartProps } from './bar-chart';\nexport { default as Box, BoxProps } from './box';\nexport { default as BreadcrumbGroup, BreadcrumbGroupProps } from './breadcrumb-group';\nexport { default as Button, ButtonProps } from './button';\nexport { default as ButtonDropdown, ButtonDropdownProps } from './button-dropdown';\nexport { default as ButtonGroup, ButtonGroupProps } from './button-group';\nexport { default as Calendar, CalendarProps } from './calendar';\nexport { default as Cards, CardsProps } from './cards';\nexport { default as Checkbox, CheckboxProps } from './checkbox';\nexport { default as CodeEditor, CodeEditorProps } from './code-editor';\nexport { default as CollectionPreferences, CollectionPreferencesProps } from './collection-preferences';\nexport { default as ColumnLayout, ColumnLayoutProps } from './column-layout';\nexport { default as Container, ContainerProps } from './container';\nexport { default as ContentLayout, ContentLayoutProps } from './content-layout';\nexport { default as CopyToClipboard, CopyToClipboardProps } from './copy-to-clipboard';\nexport { default as DateInput, DateInputProps } from './date-input';\nexport { default as DatePicker, DatePickerProps } from './date-picker';\nexport { default as DateRangePicker, DateRangePickerProps } from './date-range-picker';\nexport { default as Drawer, DrawerProps } from './drawer';\nexport { default as ExpandableSection, ExpandableSectionProps } from './expandable-section';\nexport { default as FileUpload, FileUploadProps } from './file-upload';\nexport { default as Flashbar, FlashbarProps } from './flashbar';\nexport { default as Form, FormProps } from './form';\nexport { default as FormField, FormFieldProps } from './form-field';\nexport { default as Grid, GridProps } from './grid';\nexport { default as Header, HeaderProps } from './header';\nexport { default as HelpPanel, HelpPanelProps } from './help-panel';\nexport { default as Hotspot, HotspotProps } from './hotspot';\nexport { default as Icon, IconProps } from './icon';\nexport { default as Input, InputProps } from './input';\nexport { default as KeyValuePairs, KeyValuePairsProps } from './key-value-pairs';\nexport { default as LineChart, LineChartProps } from './line-chart';\nexport { default as Link, LinkProps } from './link';\nexport { default as MixedLineBarChart, MixedLineBarChartProps } from './mixed-line-bar-chart';\nexport { default as Modal, ModalProps } from './modal';\nexport { default as Multiselect, MultiselectProps } from './multiselect';\nexport { default as Pagination, PaginationProps } from './pagination';\nexport { default as PieChart, PieChartProps } from './pie-chart';\nexport { default as Popover, PopoverProps } from './popover';\nexport { default as ProgressBar, ProgressBarProps } from './progress-bar';\nexport { default as PromptInput, PromptInputProps } from './prompt-input';\nexport { default as PropertyFilter, PropertyFilterProps } from './property-filter';\nexport { default as RadioGroup, RadioGroupProps } from './radio-group';\nexport { default as S3ResourceSelector, S3ResourceSelectorProps } from './s3-resource-selector';\nexport { default as SegmentedControl, SegmentedControlProps } from './segmented-control';\nexport { default as Select, SelectProps } from './select';\nexport { default as SideNavigation, SideNavigationProps } from './side-navigation';\nexport { default as Slider, SliderProps } from './slider';\nexport { default as SpaceBetween, SpaceBetweenProps } from './space-between';\nexport { default as Spinner, SpinnerProps } from './spinner';\nexport { default as SplitPanel, SplitPanelProps } from './split-panel';\nexport { default as StatusIndicator, StatusIndicatorProps } from './status-indicator';\nexport { default as Table, TableProps } from './table';\nexport { default as Tabs, TabsProps } from './tabs';\nexport { default as TagEditor, TagEditorProps } from './tag-editor';\nexport { default as TextContent, TextContentProps } from './text-content';\nexport { default as TextFilter, TextFilterProps } from './text-filter';\nexport { default as Textarea, TextareaProps } from './textarea';\nexport { default as Tiles, TilesProps } from './tiles';\nexport { default as TimeInput, TimeInputProps } from './time-input';\nexport { default as Toggle, ToggleProps } from './toggle';\nexport { default as ToggleButton, ToggleButtonProps } from './toggle-button';\nexport { default as TokenGroup, TokenGroupProps } from './token-group';\nexport { default as TopNavigation, TopNavigationProps } from './top-navigation';\nexport { default as TutorialPanel, TutorialPanelProps } from './tutorial-panel';\nexport { default as Wizard, WizardProps } from './wizard';\nexport * from './interfaces';\n"]}
|
|
@@ -13,6 +13,7 @@ interface BlockEndLabelsProps {
|
|
|
13
13
|
offsetRight?: number;
|
|
14
14
|
virtualTextRef: React.Ref<SVGTextElement>;
|
|
15
15
|
formattedTicks: readonly FormattedTick[];
|
|
16
|
+
isRTL?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare function useBLockEndLabels({ ticks, scale, tickFormatter, }: {
|
|
18
19
|
scale: ChartScale | NumericChartScale;
|
|
@@ -25,5 +26,5 @@ export declare function useBLockEndLabels({ ticks, scale, tickFormatter, }: {
|
|
|
25
26
|
};
|
|
26
27
|
declare const _default: typeof BlockEndLabels;
|
|
27
28
|
export default _default;
|
|
28
|
-
declare function BlockEndLabels({ axis, width, height, scale, title, ariaRoleDescription, offsetLeft, offsetRight, virtualTextRef, formattedTicks, }: BlockEndLabelsProps): JSX.Element;
|
|
29
|
+
declare function BlockEndLabels({ axis, width, height, scale, title, ariaRoleDescription, offsetLeft, offsetRight, virtualTextRef, formattedTicks, isRTL, }: BlockEndLabelsProps): JSX.Element;
|
|
29
30
|
//# sourceMappingURL=block-end-labels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-end-labels.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAgC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"block-end-labels.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAgC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,MAAM,CAAC;CACnD;;;;EA4BA;;AAED,wBAA6D;AAG7D,iBAAS,cAAc,CAAC,EACtB,IAAU,EACV,KAAK,EACL,MAAM,EACN,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,UAAc,EACd,WAAe,EACf,cAAc,EACd,cAAc,EACd,KAAa,GACd,EAAE,mBAAmB,eAqDrB"}
|
|
@@ -32,11 +32,13 @@ export function useBLockEndLabels({ ticks, scale, tickFormatter, }) {
|
|
|
32
32
|
}
|
|
33
33
|
export default memo(BlockEndLabels);
|
|
34
34
|
// Renders the visible tick labels on the bottom axis, as well as their grid lines.
|
|
35
|
-
function BlockEndLabels({ axis = 'x', width, height, scale, title, ariaRoleDescription, offsetLeft = 0, offsetRight = 0, virtualTextRef, formattedTicks, }) {
|
|
35
|
+
function BlockEndLabels({ axis = 'x', width, height, scale, title, ariaRoleDescription, offsetLeft = 0, offsetRight = 0, virtualTextRef, formattedTicks, isRTL = false, }) {
|
|
36
36
|
const i18n = useInternalI18n('[charts]');
|
|
37
37
|
const xOffset = scale.isCategorical() && axis === 'x' ? Math.max(0, scale.d3Scale.bandwidth() - 1) / 2 : 0;
|
|
38
|
-
const
|
|
39
|
-
const
|
|
38
|
+
const offsetInlineStart = isRTL ? offsetRight : offsetLeft;
|
|
39
|
+
const offsetInlineEnd = isRTL ? offsetLeft : offsetRight;
|
|
40
|
+
const from = 0 - offsetInlineStart - xOffset;
|
|
41
|
+
const until = width + offsetInlineEnd - xOffset;
|
|
40
42
|
const balanceLabels = axis === 'x' && scale.scaleType !== 'log';
|
|
41
43
|
const visibleTicks = getVisibleTicks(formattedTicks, from, until, balanceLabels);
|
|
42
44
|
return (React.createElement("g", { transform: `translate(0,${height})`, className: styles['labels-block-end'], "aria-label": title, role: "list", "aria-roledescription": i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription), "aria-hidden": true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-end-labels.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"block-end-labels.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,GAKd;IAC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AE,CAC7B,QAAQ,CAAC,QAAQ,CAAC,IAAI,CACpB,2BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,aAAa,QAAQ,GAAG,OAAO,KAAK,EAC/C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE;gBACrD,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,KAAK,GAAG;gBAClC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,KAAK,GAAG;aACnC,CAAC,EACF,IAAI,EAAC,UAAU,gBACH,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAE5B,8BAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,iBAAc,MAAM,GAAG;YAC/F,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAC9B,8BACE,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,GAAG,EAAE,SAAS,EACd,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,IAE1D,IAAI,CACA,CACR,CAAC,CACA,CACL,CACJ;QAED,8BAAM,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAc,MAAM,GAAQ,CAChG,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport { TICK_LENGTH, TICK_LINE_HEIGHT, TICK_MARGIN } from './constants';\nimport { ChartDataTypes } from './interfaces';\nimport { FormattedTick, formatTicks, getVisibleTicks } from './label-utils';\nimport { ChartScale, NumericChartScale } from './scales';\n\nimport styles from './styles.css.js';\n\ninterface BlockEndLabelsProps {\n axis?: 'x' | 'y';\n width: number;\n height: number;\n scale: ChartScale | NumericChartScale;\n title?: string;\n ariaRoleDescription?: string;\n offsetLeft?: number;\n offsetRight?: number;\n virtualTextRef: React.Ref<SVGTextElement>;\n formattedTicks: readonly FormattedTick[];\n isRTL?: boolean;\n}\n\nexport function useBLockEndLabels({\n ticks,\n scale,\n tickFormatter,\n}: {\n scale: ChartScale | NumericChartScale;\n ticks: readonly ChartDataTypes[];\n tickFormatter?: (value: ChartDataTypes) => string;\n}) {\n const virtualTextRef = useRef<SVGTextElement>(null);\n\n const cacheRef = useRef<{ [label: string]: number }>({});\n const getLabelSpace = (label: string) => {\n if (cacheRef.current[label] !== undefined && cacheRef.current[label] !== 0) {\n return cacheRef.current[label];\n }\n if (virtualTextRef.current && virtualTextRef.current.getComputedTextLength) {\n virtualTextRef.current.textContent = label;\n cacheRef.current[label] = virtualTextRef.current.getComputedTextLength();\n return cacheRef.current[label];\n }\n return 0;\n };\n\n const formattedTicks = formatTicks({ ticks, scale, getLabelSpace, tickFormatter });\n\n if (virtualTextRef.current) {\n virtualTextRef.current.textContent = '';\n }\n\n let height = TICK_LENGTH + TICK_MARGIN;\n for (const { lines } of formattedTicks) {\n height = Math.max(height, TICK_LENGTH + TICK_MARGIN + lines.length * TICK_LINE_HEIGHT);\n }\n\n return { virtualTextRef, formattedTicks, height };\n}\n\nexport default memo(BlockEndLabels) as typeof BlockEndLabels;\n\n// Renders the visible tick labels on the bottom axis, as well as their grid lines.\nfunction BlockEndLabels({\n axis = 'x',\n width,\n height,\n scale,\n title,\n ariaRoleDescription,\n offsetLeft = 0,\n offsetRight = 0,\n virtualTextRef,\n formattedTicks,\n isRTL = false,\n}: BlockEndLabelsProps) {\n const i18n = useInternalI18n('[charts]');\n\n const xOffset = scale.isCategorical() && axis === 'x' ? Math.max(0, scale.d3Scale.bandwidth() - 1) / 2 : 0;\n\n const offsetInlineStart = isRTL ? offsetRight : offsetLeft;\n const offsetInlineEnd = isRTL ? offsetLeft : offsetRight;\n\n const from = 0 - offsetInlineStart - xOffset;\n const until = width + offsetInlineEnd - xOffset;\n const balanceLabels = axis === 'x' && scale.scaleType !== 'log';\n const visibleTicks = getVisibleTicks(formattedTicks, from, until, balanceLabels);\n\n return (\n <g\n transform={`translate(0,${height})`}\n className={styles['labels-block-end']}\n aria-label={title}\n role=\"list\"\n aria-roledescription={i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription)}\n aria-hidden={true}\n >\n {visibleTicks.map(\n ({ position, lines }, index) =>\n isFinite(position) && (\n <g\n key={index}\n transform={`translate(${position + xOffset},0)`}\n className={clsx(styles.ticks, styles['ticks--bottom'], {\n [styles['ticks--x']]: axis === 'x',\n [styles['ticks--y']]: axis === 'y',\n })}\n role=\"listitem\"\n aria-label={lines.join('\\n')}\n >\n <line className={styles.ticks__line} x1={0} x2={0} y1={0} y2={TICK_LENGTH} aria-hidden=\"true\" />\n {lines.map((line, lineIndex) => (\n <text\n className={styles.ticks__text}\n key={lineIndex}\n x={0}\n y={TICK_LENGTH + TICK_MARGIN + lineIndex * TICK_LINE_HEIGHT}\n >\n {line}\n </text>\n ))}\n </g>\n )\n )}\n\n <text ref={virtualTextRef} x={0} y={0} style={{ visibility: 'hidden' }} aria-hidden=\"true\"></text>\n </g>\n );\n}\n"]}
|
|
@@ -149,7 +149,7 @@ export interface ExpandToViewport {
|
|
|
149
149
|
* Set this property if the dropdown would otherwise be constrained by a scrollable container,
|
|
150
150
|
* for example inside table and split view layouts.
|
|
151
151
|
*
|
|
152
|
-
*
|
|
152
|
+
* We recommend you use discretion, and don't enable this property unless necessary
|
|
153
153
|
* because fixed positioning results in a slight, visible lag when scrolling complex pages.
|
|
154
154
|
*/
|
|
155
155
|
expandToViewport?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { NonCancelableEventHandler } from '../../events';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n **/\n onLoadItems?: NonCancelableEventHandler<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Whether the dropdown content can grow beyond the width of the trigger.\n */\n stretchBeyondTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * ID for the dropdown content wrapper\n */\n dropdownContentId?: string;\n /**\n * HTML role for the dropdown content wrapper\n */\n dropdownContentRole?: string;\n /**\n * Labelledby for the dropdown (required when role=\"dialog\")\n */\n ariaLabelledby?: string;\n /**\n * Describedby for the dropdown (recommended when role=\"dialog\")\n */\n ariaDescribedby?: string;\n}\n\nexport interface ExpandToViewport {\n /**\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { NonCancelableEventHandler } from '../../events';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n **/\n onLoadItems?: NonCancelableEventHandler<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Whether the dropdown content can grow beyond the width of the trigger.\n */\n stretchBeyondTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * ID for the dropdown content wrapper\n */\n dropdownContentId?: string;\n /**\n * HTML role for the dropdown content wrapper\n */\n dropdownContentRole?: string;\n /**\n * Labelledby for the dropdown (required when role=\"dialog\")\n */\n ariaLabelledby?: string;\n /**\n * Describedby for the dropdown (recommended when role=\"dialog\")\n */\n ariaDescribedby?: string;\n}\n\nexport interface ExpandToViewport {\n /**\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n expandToViewport?: boolean;\n}\n"]}
|
|
@@ -42,7 +42,7 @@ export const SingleTabStopNavigationProvider = forwardRef(({ navigationActive, c
|
|
|
42
42
|
const isUnregisteringFocusedNode = nodeBelongs(focusableElement, document.activeElement);
|
|
43
43
|
if (isUnregisteringFocusedNode) {
|
|
44
44
|
// Wait for unmounted node to get removed from the DOM.
|
|
45
|
-
|
|
45
|
+
setTimeout(() => onUnregisterActive === null || onUnregisterActive === void 0 ? void 0 : onUnregisterActive(focusableElement), 0);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
// Register a focusable element to allow navigating into it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-tab-stop-navigation-context.js","sourceRoot":"","sources":["../../../../src/internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQpD,MAAM,CAAC,MAAM,YAAY,GAGrB;IACF,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAA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,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACmB,EACvC,GAA0C,EAC1C,EAAE;IACF,2EAA2E;IAC3E,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,GAAG,EAAW,CAAC,CAAC;IAC9C,uFAAuF;IACvF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,GAAG,EAAmC,CAAC,CAAC;IACzE,iGAAiG;IACjG,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,OAAO,EAAoB,CAAC,CAAC;IAChE,gDAAgD;IAChD,MAAM,WAAW,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IAErD,SAAS,qBAAqB,CAAC,gBAAyB;QACtD,MAAM,0BAA0B,GAAG,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;QACzF,IAAI,0BAA0B,EAAE;YAC9B,uDAAuD;YACvD,
|
|
1
|
+
{"version":3,"file":"single-tab-stop-navigation-context.js","sourceRoot":"","sources":["../../../../src/internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAQpD,MAAM,CAAC,MAAM,YAAY,GAGrB;IACF,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAE1E,MAAM,UAAU,0BAA0B,CACxC,SAA8C,EAC9C,OAA+B;;IAE/B,MAAM,EAAE,gBAAgB,EAAE,uBAAuB,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,OAAO,CACL,oBAAC,8BAA8B,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,IACpF,QAAQ,CAC+B,CAC3C,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, {\n createContext,\n forwardRef,\n useContext,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { nodeBelongs } from '../utils/node-belongs';\n\nexport type FocusableChangeHandler = (isFocusable: boolean) => void;\n\nexport interface SingleTabStopNavigationOptions {\n tabIndex?: number;\n}\n\nexport const defaultValue: {\n navigationActive: boolean;\n registerFocusable(focusable: HTMLElement, handler: FocusableChangeHandler): () => void;\n} = {\n navigationActive: false,\n registerFocusable: () => () => {},\n};\n\n/**\n * Single tab stop navigation context is used together with keyboard navigation that requires a single tab stop.\n * It instructs interactive elements to override tab indices for just a single one to remain user-focusable.\n */\nexport const SingleTabStopNavigationContext = createContext(defaultValue);\n\nexport function useSingleTabStopNavigation(\n focusable: null | React.RefObject<HTMLElement>,\n options?: { tabIndex?: number }\n) {\n const { navigationActive: contextNavigationActive, registerFocusable } = useContext(SingleTabStopNavigationContext);\n const [focusTargetActive, setFocusTargetActive] = useState(false);\n const navigationDisabled = options?.tabIndex && options?.tabIndex < 0;\n const navigationActive = contextNavigationActive && !navigationDisabled;\n\n useLayoutEffect(() => {\n if (navigationActive && focusable && focusable.current) {\n const unregister = registerFocusable(focusable.current, isFocusable => setFocusTargetActive(isFocusable));\n return () => unregister();\n }\n });\n\n let tabIndex = options?.tabIndex;\n if (navigationActive) {\n tabIndex = !focusTargetActive ? -1 : options?.tabIndex ?? 0;\n }\n\n return { navigationActive, tabIndex };\n}\n\nexport interface SingleTabStopNavigationProviderProps {\n navigationActive: boolean;\n children: React.ReactNode;\n getNextFocusTarget: () => null | HTMLElement;\n isElementSuppressed?(focusableElement: Element): boolean;\n onRegisterFocusable?(focusableElement: Element): void;\n onUnregisterActive?(focusableElement: Element): void;\n}\n\nexport interface SingleTabStopNavigationAPI {\n updateFocusTarget(): void;\n getFocusTarget(): null | HTMLElement;\n isRegistered(element: Element): boolean;\n}\n\nexport const SingleTabStopNavigationProvider = forwardRef(\n (\n {\n navigationActive,\n children,\n getNextFocusTarget,\n isElementSuppressed,\n onRegisterFocusable,\n onUnregisterActive,\n }: SingleTabStopNavigationProviderProps,\n ref: React.Ref<SingleTabStopNavigationAPI>\n ) => {\n // A set of registered focusable elements that can use keyboard navigation.\n const focusables = useRef(new Set<Element>());\n // A map of registered focusable element handlers to update the respective tab indices.\n const focusHandlers = useRef(new Map<Element, FocusableChangeHandler>());\n // A map of focusable element states to avoid issuing unnecessary updates to registered elements.\n const focusablesState = useRef(new WeakMap<Element, boolean>());\n // A reference to the currently focused element.\n const focusTarget = useRef<null | HTMLElement>(null);\n\n function onUnregisterFocusable(focusableElement: Element) {\n const isUnregisteringFocusedNode = nodeBelongs(focusableElement, document.activeElement);\n if (isUnregisteringFocusedNode) {\n // Wait for unmounted node to get removed from the DOM.\n setTimeout(() => onUnregisterActive?.(focusableElement), 0);\n }\n }\n\n // Register a focusable element to allow navigating into it.\n // The focusable element tabIndex is only set to 0 if the element matches the focus target.\n function registerFocusable(focusableElement: Element, changeHandler: FocusableChangeHandler) {\n focusables.current.add(focusableElement);\n focusHandlers.current.set(focusableElement, changeHandler);\n const isFocusable = !!focusablesState.current.get(focusableElement);\n const newIsFocusable = focusTarget.current === focusableElement || !!isElementSuppressed?.(focusableElement);\n if (newIsFocusable !== isFocusable) {\n focusablesState.current.set(focusableElement, newIsFocusable);\n changeHandler(newIsFocusable);\n }\n onRegisterFocusable?.(focusableElement);\n return () => unregisterFocusable(focusableElement);\n }\n function unregisterFocusable(focusableElement: Element) {\n focusables.current.delete(focusableElement);\n focusHandlers.current.delete(focusableElement);\n onUnregisterFocusable?.(focusableElement);\n }\n\n // Update focus target with next single focusable element and notify all registered focusables of a change.\n function updateFocusTarget() {\n focusTarget.current = getNextFocusTarget();\n for (const focusableElement of focusables.current) {\n const isFocusable = focusablesState.current.get(focusableElement) ?? false;\n const newIsFocusable = focusTarget.current === focusableElement || !!isElementSuppressed?.(focusableElement);\n if (newIsFocusable !== isFocusable) {\n focusablesState.current.set(focusableElement, newIsFocusable);\n focusHandlers.current.get(focusableElement)!(newIsFocusable);\n }\n }\n }\n\n function getFocusTarget() {\n return focusTarget.current;\n }\n\n function isRegistered(element: Element) {\n return focusables.current.has(element);\n }\n\n useImperativeHandle(ref, () => ({ updateFocusTarget, getFocusTarget, isRegistered }));\n\n return (\n <SingleTabStopNavigationContext.Provider value={{ navigationActive, registerFocusable }}>\n {children}\n </SingleTabStopNavigationContext.Provider>\n );\n }\n);\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/internal/utils/dom.d.ts
CHANGED
|
@@ -11,4 +11,7 @@ export declare function getContainingBlock(startElement: HTMLElement): HTMLEleme
|
|
|
11
11
|
* the fallback value will be extracted and returned instead.
|
|
12
12
|
*/
|
|
13
13
|
export declare function parseCssVariable(value: string): string;
|
|
14
|
+
export declare function isNode(target: unknown): target is Node;
|
|
15
|
+
export declare function isHTMLElement(target: unknown): target is HTMLElement;
|
|
16
|
+
export declare function isSVGElement(target: unknown): target is SVGElement;
|
|
14
17
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,WAAW,GAAG,IAAI,CAY9G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAchF;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAiB7C"}
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/dom.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,WAAW,GAAG,IAAI,CAY9G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAchF;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAiB7C;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,IAAI,CAYtD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,WAAW,CAUpE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,UAAU,CAQlE"}
|