@cloudscape-design/components 3.0.341 → 3.0.343
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/area-chart/chart-container.d.ts +3 -1
- package/area-chart/chart-container.d.ts.map +1 -1
- package/area-chart/chart-container.js +3 -2
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/internal.d.ts +1 -1
- package/area-chart/internal.d.ts.map +1 -1
- package/area-chart/internal.js +3 -2
- package/area-chart/internal.js.map +1 -1
- package/area-chart/model/index.d.ts +1 -0
- package/area-chart/model/index.d.ts.map +1 -1
- package/area-chart/model/index.js.map +1 -1
- package/area-chart/model/use-chart-model.d.ts +2 -1
- package/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/area-chart/model/use-chart-model.js +8 -2
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/autosuggest/internal.js +4 -4
- package/autosuggest/internal.js.map +1 -1
- package/button-dropdown/tooltip.js +1 -1
- package/button-dropdown/tooltip.js.map +1 -1
- package/cards/index.d.ts.map +1 -1
- package/cards/index.js +8 -6
- package/cards/index.js.map +1 -1
- package/code-editor/index.js +1 -1
- package/code-editor/index.js.map +1 -1
- package/flashbar/common.js +2 -2
- package/flashbar/common.js.map +1 -1
- package/internal/analytics/components/analytics-funnel.d.ts +1 -1
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +24 -5
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/context/analytics-context.d.ts +1 -0
- package/internal/analytics/context/analytics-context.d.ts.map +1 -1
- package/internal/analytics/context/analytics-context.js +1 -0
- package/internal/analytics/context/analytics-context.js.map +1 -1
- package/internal/analytics/index.d.ts.map +1 -1
- package/internal/analytics/index.js +1 -0
- package/internal/analytics/index.js.map +1 -1
- package/internal/analytics/interfaces.d.ts +13 -2
- package/internal/analytics/interfaces.d.ts.map +1 -1
- package/internal/analytics/interfaces.js.map +1 -1
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +10 -9
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/cartesian-chart/chart-container.d.ts +2 -0
- package/internal/components/cartesian-chart/chart-container.d.ts.map +1 -1
- package/internal/components/cartesian-chart/chart-container.js +16 -3
- package/internal/components/cartesian-chart/chart-container.js.map +1 -1
- package/internal/components/cartesian-chart/interfaces.d.ts +5 -0
- package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/internal/components/cartesian-chart/interfaces.js.map +1 -1
- package/internal/components/cartesian-chart/styles.css.js +27 -23
- package/internal/components/cartesian-chart/styles.scoped.css +54 -27
- package/internal/components/cartesian-chart/styles.selectors.js +27 -23
- package/internal/components/chart-plot/index.d.ts +2 -2
- package/internal/components/chart-plot/index.d.ts.map +1 -1
- package/internal/components/chart-plot/index.js +3 -1
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/components/chart-wrapper/index.d.ts +1 -0
- package/internal/components/chart-wrapper/index.d.ts.map +1 -1
- package/internal/components/chart-wrapper/index.js +21 -6
- package/internal/components/chart-wrapper/index.js.map +1 -1
- package/internal/components/chart-wrapper/styles.css.js +9 -6
- package/internal/components/chart-wrapper/styles.scoped.css +20 -6
- package/internal/components/chart-wrapper/styles.selectors.js +9 -6
- package/internal/components/transition/index.js +1 -1
- package/internal/components/transition/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +6 -0
- package/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
- package/internal/hooks/use-portal-mode-classes/index.js +2 -1
- package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
- package/internal/hooks/use-visual-mode/index.d.ts +0 -4
- package/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
- package/internal/hooks/use-visual-mode/index.js +0 -30
- package/internal/hooks/use-visual-mode/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts +2 -1
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +8 -2
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/internal.d.ts +1 -1
- package/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/mixed-line-bar-chart/internal.js +3 -3
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/package.json +1 -1
- package/pie-chart/index.d.ts +1 -1
- package/pie-chart/index.d.ts.map +1 -1
- package/pie-chart/index.js +10 -3
- package/pie-chart/index.js.map +1 -1
- package/pie-chart/interfaces.d.ts +5 -0
- package/pie-chart/interfaces.d.ts.map +1 -1
- package/pie-chart/interfaces.js.map +1 -1
- package/pie-chart/labels.d.ts +3 -2
- package/pie-chart/labels.d.ts.map +1 -1
- package/pie-chart/labels.js +4 -4
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/pie-chart.d.ts +2 -1
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js +18 -14
- package/pie-chart/pie-chart.js.map +1 -1
- package/pie-chart/segments.d.ts +3 -2
- package/pie-chart/segments.d.ts.map +1 -1
- package/pie-chart/segments.js +2 -6
- package/pie-chart/segments.js.map +1 -1
- package/pie-chart/styles.css.js +27 -23
- package/pie-chart/styles.scoped.css +58 -38
- package/pie-chart/styles.selectors.js +27 -23
- package/pie-chart/utils.d.ts +12 -2
- package/pie-chart/utils.d.ts.map +1 -1
- package/pie-chart/utils.js +37 -9
- package/pie-chart/utils.js.map +1 -1
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +9 -3
- package/popover/internal.js.map +1 -1
- package/tabs/smooth-scroll.js +1 -1
- package/tabs/smooth-scroll.js.map +1 -1
- package/internal/motion.d.ts +0 -2
- package/internal/motion.d.ts.map +0 -1
- package/internal/motion.js +0 -9
- package/internal/motion.js.map +0 -1
|
@@ -24,9 +24,19 @@ export interface FunnelStepProps extends BaseFunnelProps {
|
|
|
24
24
|
stepNameSelector: string;
|
|
25
25
|
subStepAllSelector: string;
|
|
26
26
|
}
|
|
27
|
+
export interface FunnelStepStartProps extends FunnelStepProps {
|
|
28
|
+
totalSubSteps?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface FunnelStepCompleteProps extends FunnelStepProps {
|
|
31
|
+
totalSubSteps?: number;
|
|
32
|
+
}
|
|
27
33
|
export interface FunnelStepNavigationProps extends FunnelStepProps {
|
|
28
34
|
destinationStepNumber: number;
|
|
29
35
|
navigationType: string;
|
|
36
|
+
totalSubSteps?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface FunnelStepErrorProps extends FunnelStepProps {
|
|
39
|
+
stepErrorSelector: string;
|
|
30
40
|
}
|
|
31
41
|
export interface FunnelSubStepProps extends FunnelStepProps {
|
|
32
42
|
subStepSelector: string;
|
|
@@ -50,9 +60,10 @@ export interface IFunnelMetrics {
|
|
|
50
60
|
funnelComplete: FunnelMethod<BaseFunnelProps>;
|
|
51
61
|
funnelSuccessful: FunnelMethod<BaseFunnelProps>;
|
|
52
62
|
funnelCancelled: FunnelMethod<BaseFunnelProps>;
|
|
53
|
-
funnelStepStart: FunnelMethod<
|
|
54
|
-
funnelStepComplete: FunnelMethod<
|
|
63
|
+
funnelStepStart: FunnelMethod<FunnelStepStartProps>;
|
|
64
|
+
funnelStepComplete: FunnelMethod<FunnelStepCompleteProps>;
|
|
55
65
|
funnelStepNavigation: FunnelMethod<FunnelStepNavigationProps>;
|
|
66
|
+
funnelStepError: FunnelMethod<FunnelStepErrorProps>;
|
|
56
67
|
funnelSubStepStart: FunnelMethod<FunnelSubStepProps>;
|
|
57
68
|
funnelSubStepComplete: FunnelMethod<FunnelSubStepProps>;
|
|
58
69
|
funnelSubStepError: FunnelMethod<OptionalFunnelSubStepErrorProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/analytics/interfaces.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,aAA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E,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9C,gBAAgB,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAChD,eAAe,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAC/C,eAAe,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACpD,kBAAkB,EAAE,YAAY,CAAC,uBAAuB,CAAC,CAAC;IAC1D,oBAAoB,EAAE,YAAY,CAAC,yBAAyB,CAAC,CAAC;IAC9D,eAAe,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACpD,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACrD,qBAAqB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACxD,kBAAkB,EAAE,YAAY,CAAC,+BAA+B,CAAC,CAAC;IAClE,mBAAmB,EAAE,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC9D,sBAAsB,EAAE,YAAY,CAAC,0BAA0B,CAAC,CAAC;CAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/analytics/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type FunnelType = 'single-page' | 'multi-page';\n\n// Common properties for all funnels\nexport interface BaseFunnelProps {\n funnelInteractionId: string;\n}\n\nexport interface FunnelProps extends BaseFunnelProps {\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n funnelType: FunnelType;\n}\n\nexport interface FunnelStartProps {\n funnelNameSelector: string;\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n funnelType: FunnelType;\n funnelVersion: string;\n componentVersion: string;\n theme: string;\n}\n\n// A function type for a generic funnel method\nexport type FunnelMethod<T extends BaseFunnelProps> = (props: T) => void;\n\n// A function type specifically for funnelStart\nexport type FunnelStartMethod = (props: FunnelStartProps) => string;\n\n// Define individual method props by extending the base\nexport interface FunnelStepProps extends BaseFunnelProps {\n stepNumber: number;\n stepName?: string | undefined;\n stepNameSelector: string;\n subStepAllSelector: string;\n}\n\nexport interface FunnelStepNavigationProps extends FunnelStepProps {\n destinationStepNumber: number;\n navigationType: string;\n}\n\nexport interface FunnelSubStepProps extends FunnelStepProps {\n subStepSelector: string;\n subStepName?: string | undefined;\n subStepNameSelector: string;\n}\n\nexport interface FunnelSubStepErrorProps extends FunnelSubStepProps {\n fieldLabelSelector: string;\n fieldErrorSelector: string;\n}\n\nexport interface OptionalFunnelSubStepErrorProps extends FunnelSubStepProps {\n fieldLabelSelector?: string;\n fieldErrorSelector?: string;\n}\n\nexport interface FunnelLinkInteractionProps extends FunnelSubStepProps {\n elementSelector: string;\n}\n\n// Define the interface using the method type\nexport interface IFunnelMetrics {\n funnelStart: FunnelStartMethod;\n funnelError: FunnelMethod<BaseFunnelProps>;\n funnelComplete: FunnelMethod<BaseFunnelProps>;\n funnelSuccessful: FunnelMethod<BaseFunnelProps>;\n funnelCancelled: FunnelMethod<BaseFunnelProps>;\n funnelStepStart: FunnelMethod<
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/analytics/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type FunnelType = 'single-page' | 'multi-page';\n\n// Common properties for all funnels\nexport interface BaseFunnelProps {\n funnelInteractionId: string;\n}\n\nexport interface FunnelProps extends BaseFunnelProps {\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n funnelType: FunnelType;\n}\n\nexport interface FunnelStartProps {\n funnelNameSelector: string;\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n funnelType: FunnelType;\n funnelVersion: string;\n componentVersion: string;\n theme: string;\n}\n\n// A function type for a generic funnel method\nexport type FunnelMethod<T extends BaseFunnelProps> = (props: T) => void;\n\n// A function type specifically for funnelStart\nexport type FunnelStartMethod = (props: FunnelStartProps) => string;\n\n// Define individual method props by extending the base\nexport interface FunnelStepProps extends BaseFunnelProps {\n stepNumber: number;\n stepName?: string | undefined;\n stepNameSelector: string;\n subStepAllSelector: string;\n}\n\nexport interface FunnelStepStartProps extends FunnelStepProps {\n totalSubSteps?: number;\n}\nexport interface FunnelStepCompleteProps extends FunnelStepProps {\n totalSubSteps?: number;\n}\n\nexport interface FunnelStepNavigationProps extends FunnelStepProps {\n destinationStepNumber: number;\n navigationType: string;\n totalSubSteps?: number;\n}\n\nexport interface FunnelStepErrorProps extends FunnelStepProps {\n stepErrorSelector: string;\n}\n\nexport interface FunnelSubStepProps extends FunnelStepProps {\n subStepSelector: string;\n subStepName?: string | undefined;\n subStepNameSelector: string;\n}\n\nexport interface FunnelSubStepErrorProps extends FunnelSubStepProps {\n fieldLabelSelector: string;\n fieldErrorSelector: string;\n}\n\nexport interface OptionalFunnelSubStepErrorProps extends FunnelSubStepProps {\n fieldLabelSelector?: string;\n fieldErrorSelector?: string;\n}\n\nexport interface FunnelLinkInteractionProps extends FunnelSubStepProps {\n elementSelector: string;\n}\n\n// Define the interface using the method type\nexport interface IFunnelMetrics {\n funnelStart: FunnelStartMethod;\n funnelError: FunnelMethod<BaseFunnelProps>;\n funnelComplete: FunnelMethod<BaseFunnelProps>;\n funnelSuccessful: FunnelMethod<BaseFunnelProps>;\n funnelCancelled: FunnelMethod<BaseFunnelProps>;\n funnelStepStart: FunnelMethod<FunnelStepStartProps>;\n funnelStepComplete: FunnelMethod<FunnelStepCompleteProps>;\n funnelStepNavigation: FunnelMethod<FunnelStepNavigationProps>;\n funnelStepError: FunnelMethod<FunnelStepErrorProps>;\n funnelSubStepStart: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepComplete: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepError: FunnelMethod<OptionalFunnelSubStepErrorProps>;\n helpPanelInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n externalLinkInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAErH,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAK5E,MAAM,WAAW,qBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAErH,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAK5E,MAAM,WAAW,qBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGAgPrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -53,18 +53,19 @@ const AutosuggestInput = React.forwardRef((_a, ref) => {
|
|
|
53
53
|
}
|
|
54
54
|
preventOpenOnFocusRef.current = false;
|
|
55
55
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const fireKeydown = (event) => fireCancelableEvent(onKeyDown, event.detail, event);
|
|
57
|
+
const handleKeyDown = (event) => {
|
|
58
|
+
switch (event.detail.keyCode) {
|
|
58
59
|
case KeyCode.down: {
|
|
59
60
|
onPressArrowDown === null || onPressArrowDown === void 0 ? void 0 : onPressArrowDown();
|
|
60
61
|
openDropdown();
|
|
61
|
-
|
|
62
|
+
event.preventDefault();
|
|
62
63
|
break;
|
|
63
64
|
}
|
|
64
65
|
case KeyCode.up: {
|
|
65
66
|
onPressArrowUp === null || onPressArrowUp === void 0 ? void 0 : onPressArrowUp();
|
|
66
67
|
openDropdown();
|
|
67
|
-
|
|
68
|
+
event.preventDefault();
|
|
68
69
|
break;
|
|
69
70
|
}
|
|
70
71
|
case KeyCode.enter: {
|
|
@@ -72,9 +73,9 @@ const AutosuggestInput = React.forwardRef((_a, ref) => {
|
|
|
72
73
|
if (!(onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter())) {
|
|
73
74
|
closeDropdown();
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
event.preventDefault();
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
fireKeydown(event);
|
|
78
79
|
break;
|
|
79
80
|
}
|
|
80
81
|
case KeyCode.escape: {
|
|
@@ -84,12 +85,12 @@ const AutosuggestInput = React.forwardRef((_a, ref) => {
|
|
|
84
85
|
else if (value) {
|
|
85
86
|
fireNonCancelableEvent(onChange, { value: '' });
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
fireKeydown(event);
|
|
89
90
|
break;
|
|
90
91
|
}
|
|
91
92
|
default: {
|
|
92
|
-
|
|
93
|
+
fireKeydown(event);
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAsB,YAAY,EAAE,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EJ,WAAW,EAAE,uBAAuB,EACpC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,eAAe,EAC/B,MAAM,EACJ,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,IAC9D,cAAc,CACX,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IAEnB,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACzB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useRef, useState, useImperativeHandle, useEffect } from 'react';\n\nimport Dropdown from '../dropdown';\n\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport InternalInput from '../../../input/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n} from '../../../input/interfaces';\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\n\nexport interface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n}\n\nexport interface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const handleKeyDown = (e: CustomEvent<BaseKeyDetail>) => {\n switch (e.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n e.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n e.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n e.preventDefault();\n }\n fireCancelableEvent(onKeyDown, e.detail);\n break;\n }\n case KeyCode.escape: {\n if (open) {\n closeDropdown();\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n e.preventDefault();\n fireCancelableEvent(onKeyDown, e.detail);\n break;\n }\n default: {\n fireCancelableEvent(onKeyDown, e.detail);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !inputRef.current?.contains(event.target as Node) &&\n !dropdownContentRef.current?.contains(event.target as Node) &&\n !dropdownFooterRef.current?.contains(event.target as Node)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n __nativeAttributes={nativeAttributes}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && !!dropdownContent}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']}>\n {dropdownFooter}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AACrH,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAWpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AAqCxB,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EAiCwB,EACxB,GAA6B,EAC7B,EAAE;QAnCF,EACE,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,yBAAyB,GAAG,KAAK,EACjC,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,gBAAgB,GAAG,IAAI,EACvB,kBAAkB,EAClB,wBAAwB,GAAG,KAAK,EAChC,eAAe,GAAG,IAAI,EACtB,cAAc,GAAG,IAAI,EACrB,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,iBAAiB,OAEK,EADnB,SAAS,cAhCd,+fAiCC,CADa;IAId,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MA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CAAC,KAAK,CAAC,EACnD,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACjE,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,yBAAyB,EAAE,yBAAyB,EACpD,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,KAAK,EACnB,kBAAkB,EAAE,gBAAgB,IAChC,gBAAgB,EACpB,EAEJ,WAAW,EAAE,uBAAuB,EACpC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,eAAe,EAC/B,MAAM,EACJ,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,IAC9D,cAAc,CACX,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IAEnB,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACzB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useRef, useState, useImperativeHandle, useEffect } from 'react';\n\nimport Dropdown from '../dropdown';\n\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport InternalInput from '../../../input/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n} from '../../../input/interfaces';\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\n\nexport interface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n}\n\nexport interface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n if (open) {\n closeDropdown();\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !inputRef.current?.contains(event.target as Node) &&\n !dropdownContentRef.current?.contains(event.target as Node) &&\n !dropdownFooterRef.current?.contains(event.target as Node)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n __nativeAttributes={nativeAttributes}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && !!dropdownContent}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']}>\n {dropdownFooter}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/chart-container.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/chart-container.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,UAAU,4BAA4B;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAID,eAAO,MAAM,uBAAuB,qGAyDnC,CAAC"}
|
|
@@ -2,12 +2,25 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import styles from './styles.css.js';
|
|
5
|
-
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
const CONTENT_MIN_HEIGHT_BOUNDARY = 40;
|
|
7
|
+
export const CartesianChartContainer = forwardRef(({ minHeight, fitHeight, leftAxisLabel, leftAxisLabelMeasure, bottomAxisLabel, chartPlot, popover, }, ref) => {
|
|
8
|
+
if (fitHeight) {
|
|
9
|
+
return (React.createElement("div", { className: clsx(styles['chart-container'], styles['fit-height']), ref: ref },
|
|
10
|
+
leftAxisLabel,
|
|
11
|
+
React.createElement("div", { className: clsx(styles['chart-container-outer'], styles['fit-height']) },
|
|
12
|
+
leftAxisLabelMeasure,
|
|
13
|
+
React.createElement("div", { className: styles['chart-container-inner'] },
|
|
14
|
+
React.createElement("div", { className: clsx(styles['chart-container-plot-wrapper'], styles['fit-height']), style: { minHeight: Math.max(minHeight, CONTENT_MIN_HEIGHT_BOUNDARY) } },
|
|
15
|
+
React.createElement("div", { className: clsx(styles['chart-container-plot'], styles['fit-height']) }, chartPlot)),
|
|
16
|
+
React.createElement("div", { className: clsx(styles['chart-container-bottom-labels'], styles['fit-height']) }, bottomAxisLabel)),
|
|
17
|
+
popover)));
|
|
18
|
+
}
|
|
6
19
|
return (React.createElement("div", { className: styles['chart-container'], ref: ref },
|
|
7
20
|
leftAxisLabel,
|
|
8
|
-
React.createElement("div", { className: styles['chart-
|
|
21
|
+
React.createElement("div", { className: styles['chart-container-outer'] },
|
|
9
22
|
leftAxisLabelMeasure,
|
|
10
|
-
React.createElement("div", { className: styles['chart-
|
|
23
|
+
React.createElement("div", { className: styles['chart-container-inner'] },
|
|
11
24
|
chartPlot,
|
|
12
25
|
bottomAxisLabel),
|
|
13
26
|
popover)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-container.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/chart-container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-container.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/chart-container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AAYxB,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAC/C,CACE,EACE,SAAS,EACT,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,OAAO,GACsB,EAC/B,GAA8B,EAC9B,EAAE;IACF,IAAI,SAAS,EAAE;QACb,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG;YAC5E,aAAa;YAEd,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;gBACxE,oBAAoB;gBAErB,6BAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC;oBAC7C,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,8BAA8B,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAC7E,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,2BAA2B,CAAC,EAAE;wBAEtE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,IAAG,SAAS,CAAO,CACzF;oBAEN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,+BAA+B,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,IAChF,eAAe,CACZ,CACF;gBAEL,OAAO,CACJ,CACF,CACP,CAAC;KACH;IAED,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,GAAG;QAChD,aAAa;QAEd,6BAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC;YAC5C,oBAAoB;YAErB,6BAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC;gBAC5C,SAAS;gBACT,eAAe,CACZ;YAEL,OAAO,CACJ,CACF,CACP,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, { forwardRef } from 'react';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\n\ninterface CartesianChartContainerProps {\n minHeight: number;\n fitHeight: boolean;\n leftAxisLabel: React.ReactNode;\n leftAxisLabelMeasure: React.ReactNode;\n bottomAxisLabel: React.ReactNode;\n chartPlot: React.ReactNode;\n popover: React.ReactNode;\n}\n\nconst CONTENT_MIN_HEIGHT_BOUNDARY = 40;\n\nexport const CartesianChartContainer = forwardRef(\n (\n {\n minHeight,\n fitHeight,\n leftAxisLabel,\n leftAxisLabelMeasure,\n bottomAxisLabel,\n chartPlot,\n popover,\n }: CartesianChartContainerProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (fitHeight) {\n return (\n <div className={clsx(styles['chart-container'], styles['fit-height'])} ref={ref}>\n {leftAxisLabel}\n\n <div className={clsx(styles['chart-container-outer'], styles['fit-height'])}>\n {leftAxisLabelMeasure}\n\n <div className={styles['chart-container-inner']}>\n <div\n className={clsx(styles['chart-container-plot-wrapper'], styles['fit-height'])}\n style={{ minHeight: Math.max(minHeight, CONTENT_MIN_HEIGHT_BOUNDARY) }}\n >\n <div className={clsx(styles['chart-container-plot'], styles['fit-height'])}>{chartPlot}</div>\n </div>\n\n <div className={clsx(styles['chart-container-bottom-labels'], styles['fit-height'])}>\n {bottomAxisLabel}\n </div>\n </div>\n\n {popover}\n </div>\n </div>\n );\n }\n\n return (\n <div className={styles['chart-container']} ref={ref}>\n {leftAxisLabel}\n\n <div className={styles['chart-container-outer']}>\n {leftAxisLabelMeasure}\n\n <div className={styles['chart-container-inner']}>\n {chartPlot}\n {bottomAxisLabel}\n </div>\n\n {popover}\n </div>\n </div>\n );\n }\n);\n"]}
|
|
@@ -71,6 +71,7 @@ export interface CartesianChartProps<T extends ChartDataTypes, Series> extends B
|
|
|
71
71
|
/**
|
|
72
72
|
* An optional pixel value number that fixes the height of the chart area.
|
|
73
73
|
* If not set explicitly, the component will use a default height that is defined internally.
|
|
74
|
+
* When used with `fitHeight`, this property defines the minimum height of the chart area.
|
|
74
75
|
*/
|
|
75
76
|
height?: number;
|
|
76
77
|
/**
|
|
@@ -155,6 +156,10 @@ export interface CartesianChartProps<T extends ChartDataTypes, Series> extends B
|
|
|
155
156
|
* Called when the highlighted series has changed because of user interaction.
|
|
156
157
|
*/
|
|
157
158
|
onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;
|
|
159
|
+
/**
|
|
160
|
+
* Enable this property to make the chart fit into the available height of the parent container.
|
|
161
|
+
*/
|
|
162
|
+
fitHeight?: boolean;
|
|
158
163
|
}
|
|
159
164
|
export declare namespace CartesianChartProps {
|
|
160
165
|
interface FilterChangeDetail<Series> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,MAAM,CAAE,SAAQ,kBAAkB;IAC/F;;OAEG;IACH,UAAU,CAAC,EAA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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n}\n\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n * When used with `fitHeight`, this property defines the minimum height of the chart area.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\n\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"axis": "
|
|
5
|
-
"vertical-marker": "awsui_vertical-
|
|
6
|
-
"axis--emphasized": "awsui_axis--
|
|
7
|
-
"axis-label": "awsui_axis-
|
|
8
|
-
"axis-label--x": "awsui_axis-label--
|
|
9
|
-
"axis-label--y": "awsui_axis-label--
|
|
10
|
-
"grid": "
|
|
11
|
-
"ticks__line": "
|
|
12
|
-
"ticks__text": "
|
|
13
|
-
"ticks--y": "awsui_ticks--
|
|
14
|
-
"ticks--x": "awsui_ticks--
|
|
15
|
-
"ticks--bottom": "awsui_ticks--
|
|
16
|
-
"labels-left": "awsui_labels-
|
|
17
|
-
"ticks": "
|
|
18
|
-
"labels-left__label": "awsui_labels-
|
|
19
|
-
"labels-left--hidden": "awsui_labels-left--
|
|
20
|
-
"labels-bottom": "awsui_labels-
|
|
21
|
-
"vertical-marker-circle": "awsui_vertical-marker-
|
|
22
|
-
"vertical-marker-circle-active": "awsui_vertical-marker-circle-
|
|
23
|
-
"focus-outline": "awsui_focus-
|
|
24
|
-
"chart-container": "awsui_chart-
|
|
25
|
-
"
|
|
26
|
-
"chart-
|
|
4
|
+
"axis": "awsui_axis_f0fot_1xwwo_9",
|
|
5
|
+
"vertical-marker": "awsui_vertical-marker_f0fot_1xwwo_10",
|
|
6
|
+
"axis--emphasized": "awsui_axis--emphasized_f0fot_1xwwo_15",
|
|
7
|
+
"axis-label": "awsui_axis-label_f0fot_1xwwo_19",
|
|
8
|
+
"axis-label--x": "awsui_axis-label--x_f0fot_1xwwo_24",
|
|
9
|
+
"axis-label--y": "awsui_axis-label--y_f0fot_1xwwo_25",
|
|
10
|
+
"grid": "awsui_grid_f0fot_1xwwo_29",
|
|
11
|
+
"ticks__line": "awsui_ticks__line_f0fot_1xwwo_34",
|
|
12
|
+
"ticks__text": "awsui_ticks__text_f0fot_1xwwo_39",
|
|
13
|
+
"ticks--y": "awsui_ticks--y_f0fot_1xwwo_44",
|
|
14
|
+
"ticks--x": "awsui_ticks--x_f0fot_1xwwo_45",
|
|
15
|
+
"ticks--bottom": "awsui_ticks--bottom_f0fot_1xwwo_49",
|
|
16
|
+
"labels-left": "awsui_labels-left_f0fot_1xwwo_54",
|
|
17
|
+
"ticks": "awsui_ticks_f0fot_1xwwo_34",
|
|
18
|
+
"labels-left__label": "awsui_labels-left__label_f0fot_1xwwo_69",
|
|
19
|
+
"labels-left--hidden": "awsui_labels-left--hidden_f0fot_1xwwo_73",
|
|
20
|
+
"labels-bottom": "awsui_labels-bottom_f0fot_1xwwo_81",
|
|
21
|
+
"vertical-marker-circle": "awsui_vertical-marker-circle_f0fot_1xwwo_92",
|
|
22
|
+
"vertical-marker-circle-active": "awsui_vertical-marker-circle-active_f0fot_1xwwo_98",
|
|
23
|
+
"focus-outline": "awsui_focus-outline_f0fot_1xwwo_103",
|
|
24
|
+
"chart-container": "awsui_chart-container_f0fot_1xwwo_111",
|
|
25
|
+
"fit-height": "awsui_fit-height_f0fot_1xwwo_116",
|
|
26
|
+
"chart-container-outer": "awsui_chart-container-outer_f0fot_1xwwo_121",
|
|
27
|
+
"chart-container-inner": "awsui_chart-container-inner_f0fot_1xwwo_128",
|
|
28
|
+
"chart-container-plot-wrapper": "awsui_chart-container-plot-wrapper_f0fot_1xwwo_135",
|
|
29
|
+
"chart-container-plot": "awsui_chart-container-plot_f0fot_1xwwo_135",
|
|
30
|
+
"chart-container-bottom-labels": "awsui_chart-container-bottom-labels_f0fot_1xwwo_150"
|
|
27
31
|
};
|
|
28
32
|
|
|
@@ -6,101 +6,101 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
.
|
|
10
|
-
.awsui_vertical-
|
|
9
|
+
.awsui_axis_f0fot_1xwwo_9:not(#\9),
|
|
10
|
+
.awsui_vertical-marker_f0fot_1xwwo_10:not(#\9) {
|
|
11
11
|
stroke: var(--color-charts-line-axis-j3qg2k, #d1d5db);
|
|
12
12
|
stroke-width: 1px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.awsui_axis--
|
|
15
|
+
.awsui_axis--emphasized_f0fot_1xwwo_15:not(#\9) {
|
|
16
16
|
stroke-width: 2px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.awsui_axis-
|
|
19
|
+
.awsui_axis-label_f0fot_1xwwo_19:not(#\9) {
|
|
20
20
|
font-weight: bold;
|
|
21
21
|
fill: var(--color-text-body-default-su7kuo, #000716);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.awsui_axis-label--
|
|
25
|
-
.awsui_axis-label--
|
|
24
|
+
.awsui_axis-label--x_f0fot_1xwwo_24:not(#\9),
|
|
25
|
+
.awsui_axis-label--y_f0fot_1xwwo_25:not(#\9) {
|
|
26
26
|
/* used in test-utils */
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.awsui_grid_f0fot_1xwwo_29:not(#\9) {
|
|
30
30
|
stroke: var(--color-charts-line-grid-mz4lye, #d1d5db);
|
|
31
31
|
stroke-width: 1px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.awsui_ticks__line_f0fot_1xwwo_34:not(#\9) {
|
|
35
35
|
stroke: var(--color-charts-line-tick-arwxlx, #d1d5db);
|
|
36
36
|
stroke-width: 1px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.awsui_ticks__text_f0fot_1xwwo_39:not(#\9) {
|
|
40
40
|
font-size: var(--font-chart-detail-size-gtiv3j, 12px);
|
|
41
41
|
fill: var(--color-text-body-secondary-he5d85, #414d5c);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.awsui_ticks--
|
|
45
|
-
.awsui_ticks--
|
|
44
|
+
.awsui_ticks--y_f0fot_1xwwo_44:not(#\9),
|
|
45
|
+
.awsui_ticks--x_f0fot_1xwwo_45:not(#\9) {
|
|
46
46
|
/* used in test-utils */
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.awsui_ticks--
|
|
49
|
+
.awsui_ticks--bottom_f0fot_1xwwo_49 > .awsui_ticks__text_f0fot_1xwwo_39:not(#\9) {
|
|
50
50
|
text-anchor: middle;
|
|
51
51
|
dominant-baseline: hanging;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.awsui_labels-
|
|
54
|
+
.awsui_labels-left_f0fot_1xwwo_54 > .awsui_ticks_f0fot_1xwwo_34 > .awsui_ticks__text_f0fot_1xwwo_39:not(#\9) {
|
|
55
55
|
text-anchor: end;
|
|
56
56
|
dominant-baseline: central;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.awsui_labels-
|
|
59
|
+
.awsui_labels-left_f0fot_1xwwo_54:not(#\9) {
|
|
60
60
|
position: relative;
|
|
61
61
|
margin-right: 12px;
|
|
62
62
|
}
|
|
63
|
-
.awsui_labels-
|
|
63
|
+
.awsui_labels-left_f0fot_1xwwo_54 > .awsui_axis-label_f0fot_1xwwo_19:not(#\9) {
|
|
64
64
|
position: absolute;
|
|
65
65
|
visibility: visible;
|
|
66
66
|
white-space: nowrap;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.awsui_labels-
|
|
69
|
+
.awsui_labels-left__label_f0fot_1xwwo_69:not(#\9) {
|
|
70
70
|
position: absolute;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.awsui_labels-left--
|
|
73
|
+
.awsui_labels-left--hidden_f0fot_1xwwo_73:not(#\9) {
|
|
74
74
|
visibility: hidden;
|
|
75
75
|
}
|
|
76
|
-
.awsui_labels-left--
|
|
76
|
+
.awsui_labels-left--hidden_f0fot_1xwwo_73 > .awsui_labels-left__label_f0fot_1xwwo_69:not(#\9) {
|
|
77
77
|
position: relative;
|
|
78
78
|
white-space: nowrap;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.awsui_labels-
|
|
81
|
+
.awsui_labels-bottom_f0fot_1xwwo_81:not(#\9) {
|
|
82
82
|
position: relative;
|
|
83
83
|
display: block;
|
|
84
84
|
width: 100%;
|
|
85
85
|
overflow: visible;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.awsui_vertical-
|
|
88
|
+
.awsui_vertical-marker_f0fot_1xwwo_10:not(#\9) {
|
|
89
89
|
pointer-events: none;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.awsui_vertical-marker-
|
|
92
|
+
.awsui_vertical-marker-circle_f0fot_1xwwo_92:not(#\9) {
|
|
93
93
|
fill: var(--color-background-container-content-og3y0v, #ffffff);
|
|
94
94
|
pointer-events: none;
|
|
95
95
|
stroke-width: var(--border-line-chart-width-qfyiov, 2px);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.awsui_vertical-marker-circle-
|
|
98
|
+
.awsui_vertical-marker-circle-active_f0fot_1xwwo_98:not(#\9) {
|
|
99
99
|
cursor: pointer;
|
|
100
100
|
stroke-width: var(--border-line-chart-width-qfyiov, 2px);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.awsui_focus-
|
|
103
|
+
.awsui_focus-outline_f0fot_1xwwo_103:not(#\9) {
|
|
104
104
|
outline: none;
|
|
105
105
|
pointer-events: none;
|
|
106
106
|
fill: none;
|
|
@@ -108,18 +108,45 @@
|
|
|
108
108
|
stroke-width: 2px;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.awsui_chart-
|
|
111
|
+
.awsui_chart-container_f0fot_1xwwo_111:not(#\9) {
|
|
112
112
|
display: flex;
|
|
113
113
|
width: 100%;
|
|
114
114
|
flex-direction: column;
|
|
115
115
|
}
|
|
116
|
+
.awsui_chart-container_f0fot_1xwwo_111.awsui_fit-height_f0fot_1xwwo_116:not(#\9) {
|
|
117
|
+
height: 100%;
|
|
118
|
+
min-height: inherit;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.awsui_chart-container-outer_f0fot_1xwwo_121:not(#\9) {
|
|
122
|
+
display: flex;
|
|
123
|
+
}
|
|
124
|
+
.awsui_chart-container-outer_f0fot_1xwwo_121.awsui_fit-height_f0fot_1xwwo_116:not(#\9) {
|
|
125
|
+
flex: 1;
|
|
126
|
+
}
|
|
116
127
|
|
|
117
|
-
.awsui_chart-
|
|
128
|
+
.awsui_chart-container-inner_f0fot_1xwwo_128:not(#\9) {
|
|
129
|
+
position: relative;
|
|
118
130
|
display: flex;
|
|
119
131
|
flex-direction: column;
|
|
120
132
|
width: 100%;
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
.awsui_chart-
|
|
124
|
-
display:
|
|
135
|
+
.awsui_chart-container-plot-wrapper_f0fot_1xwwo_135.awsui_fit-height_f0fot_1xwwo_116:not(#\9) {
|
|
136
|
+
display: block;
|
|
137
|
+
position: relative;
|
|
138
|
+
flex: 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.awsui_chart-container-plot_f0fot_1xwwo_135.awsui_fit-height_f0fot_1xwwo_116:not(#\9) {
|
|
142
|
+
display: block;
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: 0;
|
|
145
|
+
right: 0;
|
|
146
|
+
bottom: 0;
|
|
147
|
+
left: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.awsui_chart-container-bottom-labels_f0fot_1xwwo_150.awsui_fit-height_f0fot_1xwwo_116:not(#\9) {
|
|
151
|
+
display: block;
|
|
125
152
|
}
|