@cloudscape-design/components 3.0.304 → 3.0.306
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/column-layout/flexible-column-layout/index.d.ts +9 -0
- package/column-layout/flexible-column-layout/index.d.ts.map +1 -0
- package/column-layout/flexible-column-layout/index.js +33 -0
- package/column-layout/flexible-column-layout/index.js.map +1 -0
- package/column-layout/flexible-column-layout/styles.css.js +10 -0
- package/column-layout/flexible-column-layout/styles.scoped.css +24 -0
- package/column-layout/flexible-column-layout/styles.selectors.js +11 -0
- package/column-layout/grid-column-layout.d.ts +10 -0
- package/column-layout/grid-column-layout.d.ts.map +1 -0
- package/column-layout/grid-column-layout.js +32 -0
- package/column-layout/grid-column-layout.js.map +1 -0
- package/column-layout/index.d.ts.map +1 -1
- package/column-layout/index.js +2 -4
- package/column-layout/index.js.map +1 -1
- package/column-layout/interfaces.d.ts +11 -0
- package/column-layout/interfaces.d.ts.map +1 -1
- package/column-layout/interfaces.js.map +1 -1
- package/column-layout/internal.d.ts +2 -3
- package/column-layout/internal.d.ts.map +1 -1
- package/column-layout/internal.js +6 -27
- package/column-layout/internal.js.map +1 -1
- package/expandable-section/expandable-section-header.d.ts +4 -1
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +19 -10
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/interfaces.d.ts +11 -3
- package/expandable-section/interfaces.d.ts.map +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/internal.d.ts +1 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js +2 -2
- package/expandable-section/internal.js.map +1 -1
- package/expandable-section/styles.css.js +26 -24
- package/expandable-section/styles.scoped.css +50 -58
- package/expandable-section/styles.selectors.js +26 -24
- package/internal/components/chart-plot/index.js +1 -1
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/tag-editor/index.js +1 -1
- package/tag-editor/index.js.map +1 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { ExpandableSectionProps } from './interfaces';
|
|
3
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
4
4
|
type InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;
|
|
5
|
-
export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, headerText, headerCounter, headerDescription, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
|
|
5
|
+
export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, headerText, headerCounter, headerDescription, headerInfo, headerActions, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,KAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,KAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,eA0FhC"}
|
|
@@ -13,7 +13,7 @@ import styles from './styles.css.js';
|
|
|
13
13
|
import { ExpandableSectionContainer } from './expandable-section-container';
|
|
14
14
|
import { ExpandableSectionHeader } from './expandable-section-header';
|
|
15
15
|
export default function InternalExpandableSection(_a) {
|
|
16
|
-
var { expanded: controlledExpanded, defaultExpanded, onChange, variant = 'default', children, header, headerText, headerCounter, headerDescription, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef } = _a, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "headerText", "headerCounter", "headerDescription", "headingTagOverride", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
|
|
16
|
+
var { expanded: controlledExpanded, defaultExpanded, onChange, variant = 'default', children, header, headerText, headerCounter, headerDescription, headerInfo, headerActions, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef } = _a, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "headerText", "headerCounter", "headerDescription", "headerInfo", "headerActions", "headingTagOverride", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
|
|
17
17
|
const ref = useRef(null);
|
|
18
18
|
const controlId = useUniqueId();
|
|
19
19
|
const triggerControlId = `${controlId}-trigger`;
|
|
@@ -50,7 +50,7 @@ export default function InternalExpandableSection(_a) {
|
|
|
50
50
|
onKeyDown,
|
|
51
51
|
onClick,
|
|
52
52
|
};
|
|
53
|
-
return (React.createElement(ExpandableSectionContainer, Object.assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, Object.assign({ id: triggerControlId, className: clsx(styles.header, styles[`header-${variant}`]), variant: variant, expanded: !!expanded, header: header, headerText: headerText, headerDescription: headerDescription, headerCounter: headerCounter, headingTagOverride: headingTagOverride }, triggerProps)), __internalRootRef: __internalRootRef }),
|
|
53
|
+
return (React.createElement(ExpandableSectionContainer, Object.assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, Object.assign({ id: triggerControlId, className: clsx(styles.header, styles[`header-${variant}`]), variant: variant, expanded: !!expanded, header: header, headerText: headerText, headerDescription: headerDescription, headerCounter: headerCounter, headerInfo: headerInfo, headerActions: headerActions, headingTagOverride: headingTagOverride }, triggerProps)), __internalRootRef: __internalRootRef }),
|
|
54
54
|
React.createElement(CSSTransition, { in: expanded, timeout: 30, classNames: { enter: styles['content-enter'] }, nodeRef: ref },
|
|
55
55
|
React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy }, children))));
|
|
56
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAA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,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG;YACpG,6BACE,EAAE,EAAE,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACrG,IAAI,EAAC,OAAO,gBACA,YAAY,CAAC,SAAS,qBACjB,YAAY,CAAC,cAAc,IAE3C,QAAQ,CACL,CACQ,CACW,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { ExpandableSectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { ExpandableSectionContainer } from './expandable-section-container';\nimport { ExpandableSectionHeader } from './expandable-section-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\ntype InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;\n\nexport default function InternalExpandableSection({\n expanded: controlledExpanded,\n defaultExpanded,\n onChange,\n variant = 'default',\n children,\n header,\n headerText,\n headerCounter,\n headerDescription,\n headerInfo,\n headerActions,\n headingTagOverride,\n disableContentPaddings,\n headerAriaLabel,\n __internalRootRef,\n ...props\n}: InternalExpandableSectionProps) {\n const ref = useRef<HTMLDivElement>(null);\n const controlId = useUniqueId();\n const triggerControlId = `${controlId}-trigger`;\n\n const baseProps = getBaseProps(props);\n const [expanded, setExpanded] = useControllable(controlledExpanded, onChange, defaultExpanded, {\n componentName: 'ExpandableSection',\n controlledProp: 'expanded',\n changeHandler: 'onChange',\n });\n\n const onExpandChange = useCallback(\n (expanded: boolean) => {\n setExpanded(expanded);\n fireNonCancelableEvent(onChange, { expanded });\n },\n [onChange, setExpanded]\n );\n\n const onClick = useCallback(() => {\n onExpandChange(!expanded);\n }, [onExpandChange, expanded]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent<Element>) => {\n const interactionKeys = [KeyCode.enter, KeyCode.space];\n\n if (interactionKeys.indexOf(event.keyCode) !== -1) {\n onExpandChange(!expanded);\n }\n },\n [onExpandChange, expanded]\n );\n\n const onKeyDown = useCallback((event: KeyboardEvent<Element>) => {\n if (event.keyCode === KeyCode.space) {\n // Prevent the page from scrolling when toggling the component with the space bar.\n event.preventDefault();\n }\n }, []);\n\n const triggerProps = {\n ariaControls: controlId,\n ariaLabel: headerAriaLabel,\n ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,\n onKeyUp,\n onKeyDown,\n onClick,\n };\n\n return (\n <ExpandableSectionContainer\n {...baseProps}\n expanded={expanded}\n className={clsx(baseProps.className, styles.root)}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n header={\n <ExpandableSectionHeader\n id={triggerControlId}\n className={clsx(styles.header, styles[`header-${variant}`])}\n variant={variant}\n expanded={!!expanded}\n header={header}\n headerText={headerText}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n {...triggerProps}\n />\n }\n __internalRootRef={__internalRootRef}\n >\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }} nodeRef={ref}>\n <div\n id={controlId}\n ref={ref}\n className={clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded'])}\n role=\"group\"\n aria-label={triggerProps.ariaLabel}\n aria-labelledby={triggerProps.ariaLabelledBy}\n >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-enter": "awsui_content-
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"trigger-expanded": "awsui_trigger-
|
|
7
|
-
"icon": "
|
|
8
|
-
"root": "
|
|
9
|
-
"expanded": "
|
|
10
|
-
"icon-container": "awsui_icon-
|
|
11
|
-
"icon-container-container": "awsui_icon-container-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"header
|
|
19
|
-
"header-
|
|
20
|
-
"header-
|
|
21
|
-
"header-container-button": "awsui_header-container-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"content
|
|
26
|
-
"content-
|
|
27
|
-
"
|
|
4
|
+
"content-enter": "awsui_content-enter_gwq0h_1g95t_97",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_1g95t_1",
|
|
6
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_1g95t_119",
|
|
7
|
+
"icon": "awsui_icon_gwq0h_1g95t_133",
|
|
8
|
+
"root": "awsui_root_gwq0h_1g95t_151",
|
|
9
|
+
"expanded": "awsui_expanded_gwq0h_1g95t_171",
|
|
10
|
+
"icon-container": "awsui_icon-container_gwq0h_1g95t_175",
|
|
11
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_1g95t_180",
|
|
12
|
+
"wrapper": "awsui_wrapper_gwq0h_1g95t_184",
|
|
13
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_1g95t_192",
|
|
14
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_1g95t_195",
|
|
15
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_1g95t_201",
|
|
16
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_1g95t_215",
|
|
17
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_1g95t_221",
|
|
18
|
+
"header": "awsui_header_gwq0h_1g95t_225",
|
|
19
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_1g95t_228",
|
|
20
|
+
"header-button": "awsui_header-button_gwq0h_1g95t_235",
|
|
21
|
+
"header-container-button": "awsui_header-container-button_gwq0h_1g95t_239",
|
|
22
|
+
"with-interactive-elements": "awsui_with-interactive-elements_gwq0h_1g95t_257",
|
|
23
|
+
"header-container": "awsui_header-container_gwq0h_1g95t_239",
|
|
24
|
+
"header-navigation": "awsui_header-navigation_gwq0h_1g95t_269",
|
|
25
|
+
"content": "awsui_content_gwq0h_1g95t_97",
|
|
26
|
+
"content-default": "awsui_content-default_gwq0h_1g95t_305",
|
|
27
|
+
"content-footer": "awsui_content-footer_gwq0h_1g95t_308",
|
|
28
|
+
"content-expanded": "awsui_content-expanded_gwq0h_1g95t_311",
|
|
29
|
+
"focusable": "awsui_focusable_gwq0h_1g95t_315"
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -94,10 +94,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.awsui_content-
|
|
98
|
-
animation: awsui_awsui-motion-fade-
|
|
97
|
+
.awsui_content-enter_gwq0h_1g95t_97:not(#\9) {
|
|
98
|
+
animation: awsui_awsui-motion-fade-in_gwq0h_1g95t_1 var(--motion-duration-show-paced-uryptc, 180ms) var(--motion-easing-show-paced-tbgeqx, ease-out);
|
|
99
99
|
}
|
|
100
|
-
@keyframes awsui_awsui-motion-fade-
|
|
100
|
+
@keyframes awsui_awsui-motion-fade-in_gwq0h_1g95t_1 {
|
|
101
101
|
from {
|
|
102
102
|
opacity: 0.2;
|
|
103
103
|
}
|
|
@@ -106,40 +106,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
@media (prefers-reduced-motion: reduce) {
|
|
109
|
-
.awsui_content-
|
|
109
|
+
.awsui_content-enter_gwq0h_1g95t_97:not(#\9) {
|
|
110
110
|
animation: none;
|
|
111
111
|
transition: none;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
.awsui-motion-disabled .awsui_content-
|
|
114
|
+
.awsui-motion-disabled .awsui_content-enter_gwq0h_1g95t_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_1g95t_97:not(#\9) {
|
|
115
115
|
animation: none;
|
|
116
116
|
transition: none;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.awsui_trigger-
|
|
119
|
+
.awsui_trigger-expanded_gwq0h_1g95t_119:not(#\9) {
|
|
120
120
|
transition: border-bottom-color var(--motion-duration-show-paced-uryptc, 180ms) var(--motion-easing-show-paced-tbgeqx, ease-out);
|
|
121
121
|
}
|
|
122
122
|
@media (prefers-reduced-motion: reduce) {
|
|
123
|
-
.awsui_trigger-
|
|
123
|
+
.awsui_trigger-expanded_gwq0h_1g95t_119:not(#\9) {
|
|
124
124
|
animation: none;
|
|
125
125
|
transition: none;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
.awsui-motion-disabled .awsui_trigger-
|
|
128
|
+
.awsui-motion-disabled .awsui_trigger-expanded_gwq0h_1g95t_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_1g95t_119:not(#\9) {
|
|
129
129
|
animation: none;
|
|
130
130
|
transition: none;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
.awsui_icon_gwq0h_1g95t_133:not(#\9) {
|
|
134
134
|
transition: transform var(--motion-duration-rotate-90-jfxxiy, 135ms) var(--motion-easing-rotate-90-ax5lt7, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
135
135
|
}
|
|
136
136
|
@media (prefers-reduced-motion: reduce) {
|
|
137
|
-
.
|
|
137
|
+
.awsui_icon_gwq0h_1g95t_133:not(#\9) {
|
|
138
138
|
animation: none;
|
|
139
139
|
transition: none;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
.awsui-motion-disabled .
|
|
142
|
+
.awsui-motion-disabled .awsui_icon_gwq0h_1g95t_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_1g95t_133:not(#\9) {
|
|
143
143
|
animation: none;
|
|
144
144
|
transition: none;
|
|
145
145
|
}
|
|
@@ -148,7 +148,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
148
148
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
149
149
|
SPDX-License-Identifier: Apache-2.0
|
|
150
150
|
*/
|
|
151
|
-
.
|
|
151
|
+
.awsui_root_gwq0h_1g95t_151:not(#\9) {
|
|
152
152
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
153
153
|
border-collapse: separate;
|
|
154
154
|
border-spacing: 0;
|
|
@@ -191,24 +191,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
display: block;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.
|
|
194
|
+
.awsui_icon_gwq0h_1g95t_133:not(#\9) {
|
|
195
195
|
transform: rotate(-90deg);
|
|
196
196
|
}
|
|
197
|
-
.
|
|
197
|
+
.awsui_icon_gwq0h_1g95t_133.awsui_expanded_gwq0h_1g95t_171:not(#\9) {
|
|
198
198
|
transform: rotate(0deg);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
.awsui_icon-
|
|
201
|
+
.awsui_icon-container_gwq0h_1g95t_175:not(#\9) {
|
|
202
202
|
position: relative;
|
|
203
203
|
margin-left: calc((var(--font-body-m-line-height-rfgrp9, 22px) - var(--size-icon-normal-jq6jat, 16px)) / -2);
|
|
204
204
|
margin-right: calc(var(--space-xxs-ja5cp8, 4px) + var(--border-divider-list-width-um3zli, 1px));
|
|
205
205
|
}
|
|
206
|
-
.awsui_icon-container-
|
|
206
|
+
.awsui_icon-container-container_gwq0h_1g95t_180:not(#\9) {
|
|
207
207
|
margin-right: var(--space-xs-edba2s, 8px);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.
|
|
211
|
-
cursor: pointer;
|
|
210
|
+
.awsui_wrapper_gwq0h_1g95t_184:not(#\9) {
|
|
212
211
|
box-sizing: border-box;
|
|
213
212
|
display: flex;
|
|
214
213
|
border: none;
|
|
@@ -216,19 +215,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
215
|
line-height: var(--font-body-m-line-height-rfgrp9, 22px);
|
|
217
216
|
text-align: left;
|
|
218
217
|
}
|
|
219
|
-
.
|
|
218
|
+
.awsui_wrapper-default_gwq0h_1g95t_192:not(#\9) {
|
|
220
219
|
padding: var(--space-scaled-xxs-t2t62i, 4px) var(--space-xxs-ja5cp8, 4px);
|
|
221
220
|
}
|
|
222
|
-
.
|
|
221
|
+
.awsui_wrapper-footer_gwq0h_1g95t_195:not(#\9) {
|
|
223
222
|
padding: var(--space-scaled-xxs-t2t62i, 4px) 0;
|
|
224
223
|
}
|
|
225
|
-
.
|
|
224
|
+
.awsui_wrapper-default_gwq0h_1g95t_192:not(#\9), .awsui_wrapper-footer_gwq0h_1g95t_195:not(#\9) {
|
|
226
225
|
border: var(--border-divider-section-width-orq175, 2px) solid transparent;
|
|
227
226
|
}
|
|
228
|
-
.
|
|
227
|
+
.awsui_wrapper-navigation_gwq0h_1g95t_201:not(#\9) {
|
|
229
228
|
border-left: var(--border-divider-section-width-orq175, 2px) solid transparent;
|
|
230
229
|
}
|
|
231
|
-
.
|
|
230
|
+
.awsui_wrapper-default_gwq0h_1g95t_192:not(#\9), .awsui_wrapper-navigation_gwq0h_1g95t_201:not(#\9), .awsui_wrapper-footer_gwq0h_1g95t_195:not(#\9) {
|
|
232
231
|
color: var(--color-text-expandable-section-default-fvf8va, #000716);
|
|
233
232
|
font-weight: var(--font-heading-s-weight-5y5giq, 800);
|
|
234
233
|
-webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
|
|
@@ -236,41 +235,41 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
235
|
font-size: var(--font-expandable-heading-size-mkp9vq, 16px);
|
|
237
236
|
letter-spacing: var(--font-heading-s-letter-spacing-j4vcrt, -0.005em);
|
|
238
237
|
}
|
|
239
|
-
.
|
|
238
|
+
.awsui_wrapper-default_gwq0h_1g95t_192:not(#\9):hover, .awsui_wrapper-navigation_gwq0h_1g95t_201:not(#\9):hover, .awsui_wrapper-footer_gwq0h_1g95t_195:not(#\9):hover {
|
|
240
239
|
color: var(--color-text-expandable-section-hover-o9ggrx, #0972d3);
|
|
241
240
|
}
|
|
242
|
-
.
|
|
241
|
+
.awsui_wrapper-container_gwq0h_1g95t_215:not(#\9) {
|
|
243
242
|
padding: var(--space-container-header-vertical-di96ce, 12px) var(--space-container-horizontal-jxdgil, 20px);
|
|
244
243
|
}
|
|
245
|
-
body[data-awsui-focus-visible=true] .
|
|
244
|
+
body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_1g95t_215:not(#\9):focus {
|
|
246
245
|
padding: calc(var(--space-scaled-s-913kwi, 12px) - var(--border-divider-section-width-orq175, 2px)) calc(var(--space-l-f4l5gr, 20px) - var(--border-divider-section-width-orq175, 2px));
|
|
247
246
|
}
|
|
248
|
-
.
|
|
247
|
+
.awsui_wrapper-default_gwq0h_1g95t_192.awsui_wrapper-expanded_gwq0h_1g95t_221:not(#\9) {
|
|
249
248
|
border-bottom-color: var(--color-border-divider-default-9o8zql, #e9ebed);
|
|
250
249
|
}
|
|
251
250
|
|
|
252
|
-
.
|
|
251
|
+
.awsui_header_gwq0h_1g95t_225:not(#\9) {
|
|
253
252
|
display: flex;
|
|
254
253
|
}
|
|
255
|
-
.awsui_header-
|
|
254
|
+
.awsui_header-wrapper_gwq0h_1g95t_228:not(#\9) {
|
|
256
255
|
font-weight: inherit;
|
|
257
256
|
font-size: inherit;
|
|
258
257
|
letter-spacing: inherit;
|
|
259
258
|
margin: 0;
|
|
260
259
|
padding: 0;
|
|
261
260
|
}
|
|
262
|
-
.awsui_header-
|
|
261
|
+
.awsui_header-button_gwq0h_1g95t_235:not(#\9) {
|
|
263
262
|
box-sizing: border-box;
|
|
264
263
|
display: flex;
|
|
265
264
|
}
|
|
266
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
265
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1g95t_235:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1g95t_239:not(#\9):focus {
|
|
267
266
|
position: relative;
|
|
268
267
|
}
|
|
269
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
268
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1g95t_235:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1g95t_239:not(#\9):focus {
|
|
270
269
|
outline: 2px dotted transparent;
|
|
271
270
|
outline-offset: calc(0px - 1px);
|
|
272
271
|
}
|
|
273
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
272
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1g95t_235:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1g95t_239:not(#\9):focus::before {
|
|
274
273
|
content: " ";
|
|
275
274
|
display: block;
|
|
276
275
|
position: absolute;
|
|
@@ -281,26 +280,19 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1rozr_236:not(#\9
|
|
|
281
280
|
border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
|
|
282
281
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
|
|
283
282
|
}
|
|
284
|
-
.
|
|
283
|
+
.awsui_header_gwq0h_1g95t_225:not(#\9):not(.awsui_with-interactive-elements_gwq0h_1g95t_257) {
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
}
|
|
286
|
+
.awsui_header-container_gwq0h_1g95t_239:not(#\9) {
|
|
285
287
|
width: 100%;
|
|
286
288
|
}
|
|
287
|
-
.awsui_header-
|
|
289
|
+
.awsui_header-container_gwq0h_1g95t_239 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9) {
|
|
288
290
|
margin-top: var(--space-expandable-section-icon-offset-top-qfofw6, 4px);
|
|
289
291
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
text-decoration: none;
|
|
293
|
-
padding: calc(var(--space-scaled-s-913kwi, 12px) - var(--border-divider-section-width-orq175, 2px)) calc(var(--space-l-f4l5gr, 20px) - var(--border-divider-section-width-orq175, 2px));
|
|
294
|
-
outline: 2px dotted transparent;
|
|
295
|
-
border: var(--border-field-width-riro62, 2px) solid var(--color-border-item-focused-4t19h5, #0972d3);
|
|
296
|
-
border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
|
|
297
|
-
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-cwek11, 0px) var(--color-border-item-focused-4t19h5, #0972d3);
|
|
298
|
-
}
|
|
299
|
-
body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1rozr_273:not(#\9):focus {
|
|
300
|
-
outline: none;
|
|
301
|
-
text-decoration: none;
|
|
292
|
+
.awsui_header-container_gwq0h_1g95t_239.awsui_with-interactive-elements_gwq0h_1g95t_257 .awsui_header-container-button_gwq0h_1g95t_239:not(#\9) {
|
|
293
|
+
cursor: pointer;
|
|
302
294
|
}
|
|
303
|
-
.awsui_header-
|
|
295
|
+
.awsui_header-navigation_gwq0h_1g95t_269 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9) {
|
|
304
296
|
display: inline-flex;
|
|
305
297
|
cursor: pointer;
|
|
306
298
|
color: var(--color-text-expandable-section-navigation-icon-default-lzmj1u, #414d5c);
|
|
@@ -311,17 +303,17 @@ body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1rozr_2
|
|
|
311
303
|
text-decoration: none;
|
|
312
304
|
flex-direction: column;
|
|
313
305
|
}
|
|
314
|
-
.awsui_header-
|
|
306
|
+
.awsui_header-navigation_gwq0h_1g95t_269 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9):hover {
|
|
315
307
|
color: var(--color-text-expandable-section-hover-o9ggrx, #0972d3);
|
|
316
308
|
}
|
|
317
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
309
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1g95t_269 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9):focus {
|
|
318
310
|
position: relative;
|
|
319
311
|
}
|
|
320
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
312
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1g95t_269 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9):focus {
|
|
321
313
|
outline: 2px dotted transparent;
|
|
322
314
|
outline-offset: calc(2px - 1px);
|
|
323
315
|
}
|
|
324
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
316
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1g95t_269 > .awsui_icon-container_gwq0h_1g95t_175:not(#\9):focus::before {
|
|
325
317
|
content: " ";
|
|
326
318
|
display: block;
|
|
327
319
|
position: absolute;
|
|
@@ -333,24 +325,24 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1rozr_277 > .
|
|
|
333
325
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
|
|
334
326
|
}
|
|
335
327
|
|
|
336
|
-
.
|
|
328
|
+
.awsui_content_gwq0h_1g95t_97:not(#\9) {
|
|
337
329
|
display: none;
|
|
338
330
|
}
|
|
339
|
-
.awsui_content-
|
|
331
|
+
.awsui_content-default_gwq0h_1g95t_305:not(#\9) {
|
|
340
332
|
padding: var(--space-scaled-xs-wbfgrv, 8px) 0;
|
|
341
333
|
}
|
|
342
|
-
.awsui_content-
|
|
334
|
+
.awsui_content-footer_gwq0h_1g95t_308:not(#\9) {
|
|
343
335
|
padding: var(--space-xs-edba2s, 8px) 0;
|
|
344
336
|
}
|
|
345
|
-
.awsui_content-
|
|
337
|
+
.awsui_content-expanded_gwq0h_1g95t_311:not(#\9) {
|
|
346
338
|
display: block;
|
|
347
339
|
}
|
|
348
340
|
|
|
349
|
-
.
|
|
341
|
+
.awsui_focusable_gwq0h_1g95t_315:not(#\9):focus {
|
|
350
342
|
outline: none;
|
|
351
343
|
text-decoration: none;
|
|
352
344
|
}
|
|
353
|
-
body[data-awsui-focus-visible=true] .
|
|
345
|
+
body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_1g95t_315:not(#\9):focus {
|
|
354
346
|
outline: 2px dotted transparent;
|
|
355
347
|
border: var(--border-field-width-riro62, 2px) solid var(--color-border-item-focused-4t19h5, #0972d3);
|
|
356
348
|
border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
|
|
@@ -2,29 +2,31 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-enter": "awsui_content-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"trigger-expanded": "awsui_trigger-
|
|
8
|
-
"icon": "
|
|
9
|
-
"root": "
|
|
10
|
-
"expanded": "
|
|
11
|
-
"icon-container": "awsui_icon-
|
|
12
|
-
"icon-container-container": "awsui_icon-container-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"header
|
|
20
|
-
"header-
|
|
21
|
-
"header-
|
|
22
|
-
"header-container-button": "awsui_header-container-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"content
|
|
27
|
-
"content-
|
|
28
|
-
"
|
|
5
|
+
"content-enter": "awsui_content-enter_gwq0h_1g95t_97",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_1g95t_1",
|
|
7
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_1g95t_119",
|
|
8
|
+
"icon": "awsui_icon_gwq0h_1g95t_133",
|
|
9
|
+
"root": "awsui_root_gwq0h_1g95t_151",
|
|
10
|
+
"expanded": "awsui_expanded_gwq0h_1g95t_171",
|
|
11
|
+
"icon-container": "awsui_icon-container_gwq0h_1g95t_175",
|
|
12
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_1g95t_180",
|
|
13
|
+
"wrapper": "awsui_wrapper_gwq0h_1g95t_184",
|
|
14
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_1g95t_192",
|
|
15
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_1g95t_195",
|
|
16
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_1g95t_201",
|
|
17
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_1g95t_215",
|
|
18
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_1g95t_221",
|
|
19
|
+
"header": "awsui_header_gwq0h_1g95t_225",
|
|
20
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_1g95t_228",
|
|
21
|
+
"header-button": "awsui_header-button_gwq0h_1g95t_235",
|
|
22
|
+
"header-container-button": "awsui_header-container-button_gwq0h_1g95t_239",
|
|
23
|
+
"with-interactive-elements": "awsui_with-interactive-elements_gwq0h_1g95t_257",
|
|
24
|
+
"header-container": "awsui_header-container_gwq0h_1g95t_239",
|
|
25
|
+
"header-navigation": "awsui_header-navigation_gwq0h_1g95t_269",
|
|
26
|
+
"content": "awsui_content_gwq0h_1g95t_97",
|
|
27
|
+
"content-default": "awsui_content-default_gwq0h_1g95t_305",
|
|
28
|
+
"content-footer": "awsui_content-footer_gwq0h_1g95t_308",
|
|
29
|
+
"content-expanded": "awsui_content-expanded_gwq0h_1g95t_311",
|
|
30
|
+
"focusable": "awsui_focusable_gwq0h_1g95t_315"
|
|
29
31
|
};
|
|
30
32
|
|
|
@@ -99,7 +99,7 @@ function ChartPlot(_a, ref) {
|
|
|
99
99
|
[styles.precise]: isPrecise,
|
|
100
100
|
}), onMouseDown: onPlotMouseDown, onFocus: onPlotFocus, onBlur: onPlotBlur, onKeyDown: onPlotKeyDown }),
|
|
101
101
|
React.createElement(FocusOutline, { elementRef: svgRef, elementKey: isPlotFocused, offset: focusOffset }),
|
|
102
|
-
React.createElement("g", { transform: transform
|
|
102
|
+
React.createElement("g", { transform: transform },
|
|
103
103
|
React.createElement(ApplicationController, { activeElementKey: activeElementKey || null, activeElementRef: activeElementRef, ref: applicationRef, onFocus: onApplicationFocus, onBlur: onApplicationBlur, onKeyDown: onApplicationKeyDown }),
|
|
104
104
|
ariaDescription && plotFocusable && (React.createElement("desc", { "aria-hidden": "true", id: internalDescriptionId }, ariaDescription)),
|
|
105
105
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,qBAAyC,M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YAAY,EAAE,YAAY;gBAC1B,UAAU,EAAE,UAAU;gBACtB,WAAW,EAAE,WAAW;aACzB,EACD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW;gBAC/B,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS;aAC5B,CAAC,EACF,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,aAAa;YAExB,oBAAC,YAAY,IAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAI;YAEpF,2BAAG,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO;gBACnC,oBAAC,qBAAqB,IACpB,gBAAgB,EAAE,gBAAgB,IAAI,IAAI,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,oBAAoB,GAC/B;gBAGD,eAAe,IAAI,aAAa,IAAI,CACnC,6CAAkB,MAAM,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,UAAU,QAAE,cAAc,CAAc,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport { Offset } from '../interfaces';\nimport { useInternalI18n } from '../../i18n/context.js';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number;\n height: number;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: React.ReactNode;\n isClickable?: boolean;\n isPrecise?: boolean;\n onMouseDown?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onMouseDown,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onMouseDown && onMouseDown(event);\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n width={width}\n height={height}\n style={{\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform} role=\"group\">\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,qBAAyC,MAAM,0BAA0B,CAAC;AACjF,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAqCvC;;;;;;;;;EASE;AACF,eAAe,UAAU,CAAC,SAAS,CAAC,CAAC;AAErC,SAAS,SAAS,CAChB,EA0BiB,EACjB,GAA4B;QA3B5B,EACE,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,SAAS,EACT,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,WAAW,GAAG,yBAAyB,EACvC,wBAAwB,GAAG,4BAA4B,OAExC,EADZ,SAAS,cAzBd,oXA0BC,CADa;IAId,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG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M,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,UAAU,QAAE,cAAc,CAAc,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport { Offset } from '../interfaces';\nimport { useInternalI18n } from '../../i18n/context.js';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number;\n height: number;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: React.ReactNode;\n isClickable?: boolean;\n isPrecise?: boolean;\n onMouseDown?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onMouseDown,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onMouseDown && onMouseDown(event);\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n width={width}\n height={height}\n style={{\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform}>\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
package/tag-editor/index.js
CHANGED
|
@@ -166,7 +166,7 @@ const TagEditor = React.forwardRef((_a, ref) => {
|
|
|
166
166
|
React.createElement(LiveRegion, { visible: true }, i18n('i18nStrings.loading', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.loading)))));
|
|
167
167
|
}
|
|
168
168
|
const baseProps = getBaseProps(restProps);
|
|
169
|
-
return (React.createElement(InternalAttributeEditor, Object.assign({}, baseProps, baseComponentProps, { ref: attributeEditorRef, className: clsx(styles.root, baseProps.className), items: internalTags, isItemRemovable: isItemRemovable, onAddButtonClick: onAddButtonClick, onRemoveButtonClick: onRemoveButtonClick, addButtonText: (_b = i18n('i18nStrings.addButton', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.addButton)) !== null && _b !== void 0 ? _b : '', removeButtonText: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.removeButton, disableAddButton: remainingTags <= 0, empty: i18n('i18nStrings.emptyTags', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.emptyTags), additionalInfo: remainingTags < 0 ? (React.createElement(FormFieldError, { errorIconAriaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.errorIconAriaLabel }, (_d = i18n('i18nStrings.tagLimitExceeded', (_c = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimitExceeded) === null || _c === void 0 ? void 0 : _c.call(i18nStrings, tagLimit), format => format({ tagLimit }))) !== null && _d !== void 0 ? _d : '')) : remainingTags === 0 ? ((_f = i18n('i18nStrings.tagLimitReached', (_e = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimitReached) === null || _e === void 0 ? void 0 : _e.call(i18nStrings, tagLimit), format => format({ tagLimit }))) !== null && _f !== void 0 ? _f : '') : (i18n('i18nStrings.tagLimit', (_g = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimit) === null || _g === void 0 ? void 0 : _g.call(i18nStrings, remainingTags, tagLimit), format => format({ tagLimitAvailable: `${remainingTags === tagLimit}`, availableTags: remainingTags }))), definition: definition, i18nStrings: forwardedI18nStrings })));
|
|
169
|
+
return (React.createElement(InternalAttributeEditor, Object.assign({}, baseProps, baseComponentProps, { ref: attributeEditorRef, className: clsx(styles.root, baseProps.className), items: internalTags, isItemRemovable: isItemRemovable, onAddButtonClick: onAddButtonClick, onRemoveButtonClick: onRemoveButtonClick, addButtonText: (_b = i18n('i18nStrings.addButton', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.addButton)) !== null && _b !== void 0 ? _b : '', removeButtonText: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.removeButton, disableAddButton: remainingTags <= 0, empty: i18n('i18nStrings.emptyTags', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.emptyTags), additionalInfo: remainingTags < 0 ? (React.createElement(FormFieldError, { errorIconAriaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.errorIconAriaLabel }, (_d = i18n('i18nStrings.tagLimitExceeded', (_c = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimitExceeded) === null || _c === void 0 ? void 0 : _c.call(i18nStrings, tagLimit), format => format({ tagLimit }))) !== null && _d !== void 0 ? _d : '')) : remainingTags === 0 ? ((_f = i18n('i18nStrings.tagLimitReached', (_e = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimitReached) === null || _e === void 0 ? void 0 : _e.call(i18nStrings, tagLimit), format => format({ tagLimit }))) !== null && _f !== void 0 ? _f : '') : (i18n('i18nStrings.tagLimit', (_g = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.tagLimit) === null || _g === void 0 ? void 0 : _g.call(i18nStrings, remainingTags, tagLimit), format => format({ tagLimitAvailable: `${remainingTags === tagLimit}`, availableTags: remainingTags, tagLimit }))), definition: definition, i18nStrings: forwardedI18nStrings })));
|
|
170
170
|
});
|
|
171
171
|
applyDisplayName(TagEditor, 'TagEditor');
|
|
172
172
|
export default TagEditor;
|