@cloudscape-design/components-themeable 3.0.1025 → 3.0.1027
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/annotation-context/index.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/index.js +1 -4
- package/lib/internal/template/annotation-context/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/context.js +9 -3
- package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/navigation.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/navigation.js +1 -3
- package/lib/internal/template/app-layout/visual-refresh/navigation.js.map +1 -1
- package/lib/internal/template/autosuggest/load-more-controller.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/load-more-controller.js +3 -1
- package/lib/internal/template/autosuggest/load-more-controller.js.map +1 -1
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +1 -4
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/calendar/internal.d.ts.map +1 -1
- package/lib/internal/template/calendar/internal.js +3 -1
- package/lib/internal/template/calendar/internal.js.map +1 -1
- package/lib/internal/template/collection-preferences/index.d.ts.map +1 -1
- package/lib/internal/template/collection-preferences/index.js +4 -1
- package/lib/internal/template/collection-preferences/index.js.map +1 -1
- package/lib/internal/template/file-dropzone/use-files-dragging.d.ts.map +1 -1
- package/lib/internal/template/file-dropzone/use-files-dragging.js +6 -2
- package/lib/internal/template/file-dropzone/use-files-dragging.js.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +1 -5
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/flash.js +1 -1
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js +1 -6
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/grid/internal.d.ts.map +1 -1
- package/lib/internal/template/grid/internal.js +0 -1
- package/lib/internal/template/grid/internal.js.map +1 -1
- package/lib/internal/template/i18n/dynamic.d.ts +1 -1
- package/lib/internal/template/i18n/testing.js +1 -1
- package/lib/internal/template/i18n/testing.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +2 -4
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +3 -1
- package/lib/internal/template/internal/components/chart-plot/application-controller.js +5 -3
- package/lib/internal/template/internal/components/chart-plot/application-controller.js.map +1 -1
- package/lib/internal/template/internal/components/chart-plot/index.js +3 -6
- package/lib/internal/template/internal/components/chart-plot/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/resize-icon.js +1 -1
- package/lib/internal/template/internal/components/drag-handle/resize-icon.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +3 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/masked-input/use-mask.js +2 -2
- package/lib/internal/template/internal/components/masked-input/use-mask.js.map +1 -1
- package/lib/internal/template/internal/components/menu-dropdown/index.js +1 -1
- package/lib/internal/template/internal/components/menu-dropdown/index.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +9 -0
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +9 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +9 -0
- package/lib/internal/template/internal/generated/theming/index.js +9 -0
- package/lib/internal/template/internal/utils/scrollable-containers.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/scrollable-containers.js +3 -1
- package/lib/internal/template/internal/utils/scrollable-containers.js.map +1 -1
- package/lib/internal/template/link/internal.d.ts.map +1 -1
- package/lib/internal/template/link/internal.js +1 -4
- package/lib/internal/template/link/internal.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.js +3 -1
- package/lib/internal/template/mixed-line-bar-chart/internal.js.map +1 -1
- package/lib/internal/template/pie-chart/index.d.ts.map +1 -1
- package/lib/internal/template/pie-chart/index.js +3 -1
- package/lib/internal/template/pie-chart/index.js.map +1 -1
- package/lib/internal/template/popover/internal.js +2 -3
- package/lib/internal/template/popover/internal.js.map +1 -1
- package/lib/internal/template/select/utils/use-load-items.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-load-items.js +2 -1
- package/lib/internal/template/select/utils/use-load-items.js.map +1 -1
- package/lib/internal/template/side-navigation/implementation.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/implementation.js +0 -1
- package/lib/internal/template/side-navigation/implementation.js.map +1 -1
- package/lib/internal/template/side-navigation/util.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/util.js +0 -1
- package/lib/internal/template/side-navigation/util.js.map +1 -1
- package/lib/internal/template/split-panel/icons/bottom-icon-refresh.js +1 -1
- package/lib/internal/template/split-panel/icons/bottom-icon-refresh.js.map +1 -1
- package/lib/internal/template/split-panel/icons/bottom-icon.js +1 -1
- package/lib/internal/template/split-panel/icons/bottom-icon.js.map +1 -1
- package/lib/internal/template/split-panel/icons/side-position-refresh.js +1 -1
- package/lib/internal/template/split-panel/icons/side-position-refresh.js.map +1 -1
- package/lib/internal/template/split-panel/icons/side-position.js +1 -1
- package/lib/internal/template/split-panel/icons/side-position.js.map +1 -1
- package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
- package/lib/internal/template/table/resizer/index.js +4 -2
- package/lib/internal/template/table/resizer/index.js.map +1 -1
- package/lib/internal/template/table/table-role/grid-navigation.d.ts.map +1 -1
- package/lib/internal/template/table/table-role/grid-navigation.js +5 -2
- package/lib/internal/template/table/table-role/grid-navigation.js.map +1 -1
- package/lib/internal/template/test-utils/dom/autosuggest/index.js +0 -2
- package/lib/internal/template/test-utils/dom/autosuggest/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/input/base-input.js +0 -1
- package/lib/internal/template/test-utils/dom/input/base-input.js.map +1 -1
- package/lib/internal/template/test-utils/dom/internal/option.js +0 -1
- package/lib/internal/template/test-utils/dom/internal/option.js.map +1 -1
- package/lib/internal/template/test-utils/dom/top-navigation/1.0-beta/index.js +0 -1
- package/lib/internal/template/test-utils/dom/top-navigation/1.0-beta/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/autosuggest/index.js +0 -2
- package/lib/internal/template/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/input/base-input.js +0 -1
- package/lib/internal/template/test-utils/selectors/input/base-input.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/internal/option.js +0 -1
- package/lib/internal/template/test-utils/selectors/internal/option.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/top-navigation/1.0-beta/index.js +0 -1
- package/lib/internal/template/test-utils/selectors/top-navigation/1.0-beta/index.js.map +1 -1
- package/lib/internal/template/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/1.0-beta/internal.js +1 -4
- package/lib/internal/template/top-navigation/1.0-beta/internal.js.map +1 -1
- package/lib/internal/template/top-navigation/internal.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/internal.js +1 -4
- package/lib/internal/template/top-navigation/internal.js.map +1 -1
- package/lib/internal/template/top-navigation/parts/overflow-menu/header.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/parts/overflow-menu/header.js +1 -7
- package/lib/internal/template/top-navigation/parts/overflow-menu/header.js.map +1 -1
- package/lib/internal/template/wizard/wizard-navigation.js +6 -1
- package/lib/internal/template/wizard/wizard-navigation.js.map +1 -1
- package/lib/theming.d.ts.map +1 -1
- package/lib/theming.js +1 -1
- package/lib/theming.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAC3C,CACE,EACE,cAAc,EACd,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,GACY,EACrB,GAAmB,EACnB,EAAE;IACF,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC;IAE/C,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,gBAAgB,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE;YACpF,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;SAC5B,CAAC,gBACU,SAAS,mBACN,CAAC,CAAC,QAAQ,mBACV,IAAI,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,KAAK,CAAC,EAAE;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/menu-dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAC3C,CACE,EACE,cAAc,EACd,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,GACY,EACrB,GAAmB,EACnB,EAAE;IACF,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC;IAE/C,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,gBAAgB,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE;YACpF,C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AClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACK,CACjB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,sBAAsB,oBACjB,SAAS,EACT,KAAK,IACT,OAAO,EAAC,YAAY,EACpB,oBAAoB,EAAE,eAAe,EACrC,YAAY,EAAE,IAAI,IAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAC/C,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { CustomTriggerProps } from '../../../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../../../button-dropdown/internal';\nimport InternalIcon from '../../../icon/internal';\nimport { getBaseProps } from '../../base-component';\nimport { spinWhenOpen } from '../../styles/motion/utils';\nimport { applyDisplayName } from '../../utils/apply-display-name';\nimport { ButtonTriggerProps, MenuDropdownProps } from './interfaces';\n\nimport buttonDropdownStyles from '../../../button-dropdown/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { MenuDropdownProps };\n\nexport const ButtonTrigger = React.forwardRef(\n (\n {\n testUtilsClass,\n iconName,\n iconUrl,\n iconAlt,\n iconSvg,\n badge,\n ariaLabel,\n offsetRight,\n disabled,\n expanded,\n children,\n onClick,\n }: ButtonTriggerProps,\n ref: React.Ref<any>\n ) => {\n const hasIcon = iconName || iconUrl || iconSvg;\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(styles.button, styles[`offset-right-${offsetRight}`], testUtilsClass, {\n [styles.expanded]: expanded,\n })}\n aria-label={ariaLabel}\n aria-expanded={!!expanded}\n aria-haspopup={true}\n disabled={disabled}\n onClick={event => {\n event.preventDefault();\n onClick?.();\n }}\n >\n {hasIcon && (\n <InternalIcon\n className={styles.icon}\n name={iconName}\n url={iconUrl}\n alt={iconAlt}\n svg={iconSvg}\n badge={badge}\n />\n )}\n {children && <span className={styles.text}>{children}</span>}\n {children && (\n <InternalIcon name=\"caret-down-filled\" className={spinWhenOpen(buttonDropdownStyles, 'rotate', !!expanded)} />\n )}\n </button>\n );\n }\n);\n\nconst MenuDropdown = ({\n iconName,\n iconUrl,\n iconAlt,\n iconSvg,\n badge,\n offsetRight,\n children,\n ...props\n}: MenuDropdownProps) => {\n const baseProps = getBaseProps(props);\n\n const dropdownTrigger = ({\n triggerRef,\n ariaLabel,\n isOpen,\n testUtilsClass,\n disabled,\n onClick,\n }: CustomTriggerProps) => {\n return (\n <ButtonTrigger\n testUtilsClass={testUtilsClass}\n ref={triggerRef}\n disabled={disabled}\n expanded={isOpen}\n iconName={iconName}\n iconUrl={iconUrl}\n iconAlt={iconAlt}\n iconSvg={iconSvg}\n badge={badge}\n ariaLabel={ariaLabel}\n offsetRight={offsetRight}\n onClick={onClick}\n >\n {children}\n </ButtonTrigger>\n );\n };\n\n return (\n <InternalButtonDropdown\n {...baseProps}\n {...props}\n variant=\"navigation\"\n customTriggerBuilder={dropdownTrigger}\n preferCenter={true}\n />\n );\n};\n\napplyDisplayName(MenuDropdown, 'MenuDropdown');\nexport default MenuDropdown;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (76a1204c)";
|
|
3
|
+
export var GIT_SHA = "76a1204c";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -203,6 +203,7 @@ export const colorChartsPaletteCategorical47: string;
|
|
|
203
203
|
export const colorChartsPaletteCategorical48: string;
|
|
204
204
|
export const colorChartsPaletteCategorical49: string;
|
|
205
205
|
export const colorChartsPaletteCategorical50: string;
|
|
206
|
+
export const colorChartsErrorBarMarker: string;
|
|
206
207
|
export const colorSeverityDarkRed: string;
|
|
207
208
|
export const colorSeverityRed: string;
|
|
208
209
|
export const colorSeverityOrange: string;
|
|
@@ -203,6 +203,7 @@ export var colorChartsPaletteCategorical47 = "var(--color-charts-palette-categor
|
|
|
203
203
|
export var colorChartsPaletteCategorical48 = "var(--color-charts-palette-categorical-48-5s2n0r, #014b44)";
|
|
204
204
|
export var colorChartsPaletteCategorical49 = "var(--color-charts-palette-categorical-49-bub0l1, #431d84)";
|
|
205
205
|
export var colorChartsPaletteCategorical50 = "var(--color-charts-palette-categorical-50-utrpu5, #732c02)";
|
|
206
|
+
export var colorChartsErrorBarMarker = "var(--color-charts-error-bar-marker-r10jgv, #131920)";
|
|
206
207
|
export var colorSeverityDarkRed = "var(--color-severity-dark-red-j8bmoc, #870303)";
|
|
207
208
|
export var colorSeverityRed = "var(--color-severity-red-wf5w2d, #ce3311)";
|
|
208
209
|
export var colorSeverityOrange = "var(--color-severity-orange-rpbcus, #f89256)";
|
|
@@ -706,6 +706,10 @@ module.exports.preset = {
|
|
|
706
706
|
"light": "{colorChartsOrange1000}",
|
|
707
707
|
"dark": "{colorChartsOrange1000}"
|
|
708
708
|
},
|
|
709
|
+
"colorChartsErrorBarMarker": {
|
|
710
|
+
"light": "{colorGrey900}",
|
|
711
|
+
"dark": "{colorWhite}"
|
|
712
|
+
},
|
|
709
713
|
"colorSeverityDarkRed": {
|
|
710
714
|
"light": "#870303",
|
|
711
715
|
"dark": "#d63f38"
|
|
@@ -9938,6 +9942,7 @@ module.exports.preset = {
|
|
|
9938
9942
|
"colorChartsPaletteCategorical48": "color",
|
|
9939
9943
|
"colorChartsPaletteCategorical49": "color",
|
|
9940
9944
|
"colorChartsPaletteCategorical50": "color",
|
|
9945
|
+
"colorChartsErrorBarMarker": "color",
|
|
9941
9946
|
"colorSeverityDarkRed": "color",
|
|
9942
9947
|
"colorSeverityRed": "color",
|
|
9943
9948
|
"colorSeverityOrange": "color",
|
|
@@ -10461,6 +10466,7 @@ module.exports.preset = {
|
|
|
10461
10466
|
"colorChartsPaletteCategorical48",
|
|
10462
10467
|
"colorChartsPaletteCategorical49",
|
|
10463
10468
|
"colorChartsPaletteCategorical50",
|
|
10469
|
+
"colorChartsErrorBarMarker",
|
|
10464
10470
|
"colorBackgroundNotificationSeverityCritical",
|
|
10465
10471
|
"colorBackgroundNotificationSeverityHigh",
|
|
10466
10472
|
"colorBackgroundNotificationSeverityMedium",
|
|
@@ -10810,6 +10816,7 @@ module.exports.preset = {
|
|
|
10810
10816
|
"colorChartsPaletteCategorical48",
|
|
10811
10817
|
"colorChartsPaletteCategorical49",
|
|
10812
10818
|
"colorChartsPaletteCategorical50",
|
|
10819
|
+
"colorChartsErrorBarMarker",
|
|
10813
10820
|
"colorBackgroundNotificationSeverityCritical",
|
|
10814
10821
|
"colorBackgroundNotificationSeverityHigh",
|
|
10815
10822
|
"colorBackgroundNotificationSeverityMedium",
|
|
@@ -11250,6 +11257,7 @@ module.exports.preset = {
|
|
|
11250
11257
|
"colorChartsPaletteCategorical48": "color-charts-palette-categorical-48",
|
|
11251
11258
|
"colorChartsPaletteCategorical49": "color-charts-palette-categorical-49",
|
|
11252
11259
|
"colorChartsPaletteCategorical50": "color-charts-palette-categorical-50",
|
|
11260
|
+
"colorChartsErrorBarMarker": "color-charts-error-bar-marker",
|
|
11253
11261
|
"colorSeverityDarkRed": "color-severity-dark-red",
|
|
11254
11262
|
"colorSeverityRed": "color-severity-red",
|
|
11255
11263
|
"colorSeverityOrange": "color-severity-orange",
|
|
@@ -12007,6 +12015,7 @@ module.exports.preset = {
|
|
|
12007
12015
|
"colorChartsPaletteCategorical48": "--color-charts-palette-categorical-48-5s2n0r",
|
|
12008
12016
|
"colorChartsPaletteCategorical49": "--color-charts-palette-categorical-49-bub0l1",
|
|
12009
12017
|
"colorChartsPaletteCategorical50": "--color-charts-palette-categorical-50-utrpu5",
|
|
12018
|
+
"colorChartsErrorBarMarker": "--color-charts-error-bar-marker-r10jgv",
|
|
12010
12019
|
"colorSeverityDarkRed": "--color-severity-dark-red-j8bmoc",
|
|
12011
12020
|
"colorSeverityRed": "--color-severity-red-wf5w2d",
|
|
12012
12021
|
"colorSeverityOrange": "--color-severity-orange-rpbcus",
|
|
@@ -62,6 +62,7 @@ export declare interface TypedOverride {
|
|
|
62
62
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
63
63
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
64
64
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
65
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
65
66
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
66
67
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
67
68
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -320,6 +321,7 @@ export declare interface TypedOverride {
|
|
|
320
321
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
321
322
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
322
323
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
324
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
323
325
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
324
326
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
325
327
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -578,6 +580,7 @@ export declare interface TypedOverride {
|
|
|
578
580
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
579
581
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
580
582
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
583
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
581
584
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
582
585
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
583
586
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -836,6 +839,7 @@ export declare interface TypedOverride {
|
|
|
836
839
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
837
840
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
838
841
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
842
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
839
843
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
840
844
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
841
845
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1094,6 +1098,7 @@ export declare interface TypedOverride {
|
|
|
1094
1098
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1095
1099
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1096
1100
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1101
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1097
1102
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1098
1103
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1099
1104
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1352,6 +1357,7 @@ export declare interface TypedOverride {
|
|
|
1352
1357
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1353
1358
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1354
1359
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1360
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1355
1361
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1356
1362
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1357
1363
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1610,6 +1616,7 @@ export declare interface TypedOverride {
|
|
|
1610
1616
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1611
1617
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1612
1618
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1619
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1613
1620
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1614
1621
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1615
1622
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1868,6 +1875,7 @@ export declare interface TypedOverride {
|
|
|
1868
1875
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1869
1876
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1870
1877
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1878
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1871
1879
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1872
1880
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1873
1881
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2126,6 +2134,7 @@ export declare interface TypedOverride {
|
|
|
2126
2134
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2127
2135
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2128
2136
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2137
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2129
2138
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2130
2139
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2131
2140
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -62,6 +62,7 @@ export declare interface TypedOverride {
|
|
|
62
62
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
63
63
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
64
64
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
65
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
65
66
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
66
67
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
67
68
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -320,6 +321,7 @@ export declare interface TypedOverride {
|
|
|
320
321
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
321
322
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
322
323
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
324
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
323
325
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
324
326
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
325
327
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -578,6 +580,7 @@ export declare interface TypedOverride {
|
|
|
578
580
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
579
581
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
580
582
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
583
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
581
584
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
582
585
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
583
586
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -836,6 +839,7 @@ export declare interface TypedOverride {
|
|
|
836
839
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
837
840
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
838
841
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
842
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
839
843
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
840
844
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
841
845
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1094,6 +1098,7 @@ export declare interface TypedOverride {
|
|
|
1094
1098
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1095
1099
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1096
1100
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1101
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1097
1102
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1098
1103
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1099
1104
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1352,6 +1357,7 @@ export declare interface TypedOverride {
|
|
|
1352
1357
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1353
1358
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1354
1359
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1360
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1355
1361
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1356
1362
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1357
1363
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1610,6 +1616,7 @@ export declare interface TypedOverride {
|
|
|
1610
1616
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1611
1617
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1612
1618
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1619
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1613
1620
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1614
1621
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1615
1622
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1868,6 +1875,7 @@ export declare interface TypedOverride {
|
|
|
1868
1875
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1869
1876
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1870
1877
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1878
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1871
1879
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1872
1880
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1873
1881
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2126,6 +2134,7 @@ export declare interface TypedOverride {
|
|
|
2126
2134
|
colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2127
2135
|
colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2128
2136
|
colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2137
|
+
colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2129
2138
|
colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2130
2139
|
colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2131
2140
|
colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -706,6 +706,10 @@ export var preset = {
|
|
|
706
706
|
"light": "{colorChartsOrange1000}",
|
|
707
707
|
"dark": "{colorChartsOrange1000}"
|
|
708
708
|
},
|
|
709
|
+
"colorChartsErrorBarMarker": {
|
|
710
|
+
"light": "{colorGrey900}",
|
|
711
|
+
"dark": "{colorWhite}"
|
|
712
|
+
},
|
|
709
713
|
"colorSeverityDarkRed": {
|
|
710
714
|
"light": "#870303",
|
|
711
715
|
"dark": "#d63f38"
|
|
@@ -9938,6 +9942,7 @@ export var preset = {
|
|
|
9938
9942
|
"colorChartsPaletteCategorical48": "color",
|
|
9939
9943
|
"colorChartsPaletteCategorical49": "color",
|
|
9940
9944
|
"colorChartsPaletteCategorical50": "color",
|
|
9945
|
+
"colorChartsErrorBarMarker": "color",
|
|
9941
9946
|
"colorSeverityDarkRed": "color",
|
|
9942
9947
|
"colorSeverityRed": "color",
|
|
9943
9948
|
"colorSeverityOrange": "color",
|
|
@@ -10461,6 +10466,7 @@ export var preset = {
|
|
|
10461
10466
|
"colorChartsPaletteCategorical48",
|
|
10462
10467
|
"colorChartsPaletteCategorical49",
|
|
10463
10468
|
"colorChartsPaletteCategorical50",
|
|
10469
|
+
"colorChartsErrorBarMarker",
|
|
10464
10470
|
"colorBackgroundNotificationSeverityCritical",
|
|
10465
10471
|
"colorBackgroundNotificationSeverityHigh",
|
|
10466
10472
|
"colorBackgroundNotificationSeverityMedium",
|
|
@@ -10810,6 +10816,7 @@ export var preset = {
|
|
|
10810
10816
|
"colorChartsPaletteCategorical48",
|
|
10811
10817
|
"colorChartsPaletteCategorical49",
|
|
10812
10818
|
"colorChartsPaletteCategorical50",
|
|
10819
|
+
"colorChartsErrorBarMarker",
|
|
10813
10820
|
"colorBackgroundNotificationSeverityCritical",
|
|
10814
10821
|
"colorBackgroundNotificationSeverityHigh",
|
|
10815
10822
|
"colorBackgroundNotificationSeverityMedium",
|
|
@@ -11250,6 +11257,7 @@ export var preset = {
|
|
|
11250
11257
|
"colorChartsPaletteCategorical48": "color-charts-palette-categorical-48",
|
|
11251
11258
|
"colorChartsPaletteCategorical49": "color-charts-palette-categorical-49",
|
|
11252
11259
|
"colorChartsPaletteCategorical50": "color-charts-palette-categorical-50",
|
|
11260
|
+
"colorChartsErrorBarMarker": "color-charts-error-bar-marker",
|
|
11253
11261
|
"colorSeverityDarkRed": "color-severity-dark-red",
|
|
11254
11262
|
"colorSeverityRed": "color-severity-red",
|
|
11255
11263
|
"colorSeverityOrange": "color-severity-orange",
|
|
@@ -12007,6 +12015,7 @@ export var preset = {
|
|
|
12007
12015
|
"colorChartsPaletteCategorical48": "--color-charts-palette-categorical-48-5s2n0r",
|
|
12008
12016
|
"colorChartsPaletteCategorical49": "--color-charts-palette-categorical-49-bub0l1",
|
|
12009
12017
|
"colorChartsPaletteCategorical50": "--color-charts-palette-categorical-50-utrpu5",
|
|
12018
|
+
"colorChartsErrorBarMarker": "--color-charts-error-bar-marker-r10jgv",
|
|
12010
12019
|
"colorSeverityDarkRed": "--color-severity-dark-red-j8bmoc",
|
|
12011
12020
|
"colorSeverityRed": "--color-severity-red-wf5w2d",
|
|
12012
12021
|
"colorSeverityOrange": "--color-severity-orange-rpbcus",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,EAUpE,CAAC;AAEF,eAAO,MAAM,2BAA2B;aAM7B,WAAW;0BACE,OAAO;sBACX,OAAO;8BACC,OAAO;MAC/B,WAAW,EAuCd,CAAC;AAEF,KAAK,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,OAAO,GAAE,qBAA+D,QAGzE;AAED,wBAAgB,eAAe,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,WAAW,UAW1E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,WAAW,EAAE,gBAAgB,CAAC,EAAE,WAAW,QAKvF;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,CAOtF"}
|
|
@@ -5,7 +5,9 @@ export const getOverflowParents = (element) => {
|
|
|
5
5
|
const parents = [];
|
|
6
6
|
let node = element;
|
|
7
7
|
while ((node = node.parentElement) && node !== element.ownerDocument.body) {
|
|
8
|
-
getComputedStyle(node).overflow !== 'visible'
|
|
8
|
+
if (getComputedStyle(node).overflow !== 'visible') {
|
|
9
|
+
parents.push(node);
|
|
10
|
+
}
|
|
9
11
|
}
|
|
10
12
|
return parents;
|
|
11
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable-containers.js","sourceRoot":"","sources":["../../../../src/internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AASvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE;QACzE,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"scrollable-containers.js","sourceRoot":"","sources":["../../../../src/internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AASvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE;QACzE,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,EAAE;YACjD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpB;KACF;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,OAAO,EACP,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,GAAG,KAAK,EACxB,wBAAwB,GAAG,KAAK,GAMjC,EAAiB,EAAE;;IAClB,MAAM,OAAO,GAAG,gBAAgB;QAC9B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,CAA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CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IAClF,CAAC,CAAC,IAAI,SAAS,CAChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nexport interface BoundingBox {\n blockSize: number;\n inlineSize: number;\n insetBlockStart: number;\n insetInlineStart: number;\n}\n\nexport const getOverflowParents = (element: HTMLElement): HTMLElement[] => {\n const parents = [];\n let node: HTMLElement | null = element;\n\n while ((node = node.parentElement) && node !== element.ownerDocument.body) {\n if (getComputedStyle(node).overflow !== 'visible') {\n parents.push(node);\n }\n }\n return parents;\n};\n\nexport const getOverflowParentDimensions = ({\n element,\n excludeClosestParent = false,\n expandToViewport = false,\n canExpandOutsideViewport = false,\n}: {\n element: HTMLElement;\n excludeClosestParent: boolean;\n expandToViewport: boolean;\n canExpandOutsideViewport: boolean;\n}): BoundingBox[] => {\n const parents = expandToViewport\n ? []\n : getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n // Treat the whole scrollable area as the available height\n // if we're allowed to expand past the viewport.\n blockSize: canExpandOutsideViewport ? el.scrollHeight : height,\n inlineSize: width,\n insetBlockStart: top,\n insetInlineStart: left,\n };\n });\n\n if (canExpandOutsideViewport && !expandToViewport) {\n const document = element.ownerDocument;\n const documentDimensions = document.documentElement.getBoundingClientRect();\n parents.push({\n inlineSize: Math.max(documentDimensions.width, document.documentElement.clientWidth),\n blockSize: Math.max(documentDimensions.height, document.documentElement.clientHeight),\n insetBlockStart: documentDimensions.top,\n insetInlineStart: documentDimensions.left,\n });\n } else {\n const owningWindow = element.ownerDocument.defaultView ?? window;\n parents.push({\n blockSize: owningWindow.visualViewport?.height ?? owningWindow.innerHeight,\n inlineSize: owningWindow.visualViewport?.width ?? owningWindow.innerWidth,\n insetBlockStart: 0,\n insetInlineStart: 0,\n });\n }\n\n if (excludeClosestParent && !expandToViewport) {\n parents.shift();\n }\n\n return parents;\n};\n\ntype ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];\n\n/**\n * Calls `scrollIntoView` on the provided element with sensible defaults. If\n * the element does not exist or does not support the `scrollIntoView`\n * method, it will do nothing. This wrapper is created to support environments\n * where the native function is not available like JSDom (feature request:\n * https://github.com/jsdom/jsdom/issues/1422).\n *\n * @param element to be scrolled into view\n * @param options native options for `scrollIntoView`\n */\nexport function scrollElementIntoView(\n element: HTMLElement | undefined,\n options: ScrollIntoViewOptions = { block: 'nearest', inline: 'nearest' }\n) {\n element?.scrollIntoView?.(options);\n}\n\nexport function calculateScroll({ insetBlockStart, blockSize }: BoundingBox) {\n if (insetBlockStart < 0) {\n return insetBlockStart;\n } else if (insetBlockStart + blockSize > window.innerHeight) {\n if (blockSize > window.innerHeight) {\n return insetBlockStart;\n } else {\n return insetBlockStart + blockSize - window.innerHeight;\n }\n }\n return 0;\n}\n\n/**\n * For elements with fixed position, the browser's native scrollIntoView API doesn't work,\n * so we need to manually scroll to the element's position.\n * Supports only vertical scrolling.\n */\nexport function scrollRectangleIntoView(box: BoundingBox, scrollableParent?: HTMLElement) {\n const scrollAmount = calculateScroll(box);\n if (scrollAmount) {\n (scrollableParent || window).scrollBy(0, scrollAmount);\n }\n}\n\nexport function getFirstScrollableParent(element: HTMLElement): HTMLElement | undefined {\n return (\n findUpUntil(element, el => {\n const overflows = el.scrollHeight > el.clientHeight;\n return overflows && ['scroll', 'auto'].includes(getComputedStyle(el).overflowY);\n }) || undefined\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/link/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAqBlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,QAAA,MAAM,YAAY;cAHJ,SAAS,CAAC,SAAS,CAAC,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/link/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAqBlD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,QAAA,MAAM,YAAY;cAHJ,SAAS,CAAC,SAAS,CAAC,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU;uCA0M1E,CAAC;AAqBF,eAAe,YAAY,CAAC"}
|
|
@@ -129,10 +129,7 @@ const InternalLink = React.forwardRef((_a, ref) => {
|
|
|
129
129
|
if (isButton) {
|
|
130
130
|
return (React.createElement("a", Object.assign({}, sharedProps, { role: "button", tabIndex: tabIndex, onKeyDown: handleButtonKeyDown, onClick: handleButtonClick }), content));
|
|
131
131
|
}
|
|
132
|
-
return (
|
|
133
|
-
// we dynamically set proper rel in the code above
|
|
134
|
-
// eslint-disable-next-line react/jsx-no-target-blank
|
|
135
|
-
React.createElement("a", Object.assign({}, sharedProps, { tabIndex: tabIndex, target: anchorTarget, rel: anchorRel, href: href, onClick: handleLinkClick }), content));
|
|
132
|
+
return (React.createElement("a", Object.assign({}, sharedProps, { tabIndex: tabIndex, target: anchorTarget, rel: anchorRel, href: href, onClick: handleLinkClick }), content));
|
|
136
133
|
});
|
|
137
134
|
function getVariantStyle(variant) {
|
|
138
135
|
return `variant-${variant.replace(/^awsui-/, '')}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/link/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,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useContext, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireCancelableEvent, fireNonCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { LinkProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalLinkProps = InternalBaseComponentProps<HTMLAnchorElement> &\n Omit<LinkProps, 'variant'> & {\n variant?: LinkProps['variant'] | 'top-navigation' | 'link' | 'recovery';\n };\n\nconst InternalLink = React.forwardRef(\n (\n {\n variant: providedVariant,\n fontSize = 'body-m',\n color = 'normal',\n external = false,\n target,\n href,\n rel,\n ariaLabel,\n externalIconAriaLabel,\n onFollow,\n onClick,\n children,\n __internalRootRef = null,\n ...props\n }: InternalLinkProps,\n ref: React.Ref<LinkProps.Ref>\n ) => {\n checkSafeUrl('Link', href);\n const isButton = !href;\n const { defaultVariant } = useContext(LinkDefaultVariantContext);\n const variant = providedVariant || defaultVariant;\n const specialStyles = ['top-navigation', 'link', 'recovery'];\n const hasSpecialStyle = specialStyles.indexOf(variant) > -1;\n\n const i18n = useInternalI18n('link');\n const baseProps = getBaseProps(props);\n const anchorTarget = target ?? (external ? '_blank' : undefined);\n const anchorRel = rel ?? (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);\n const uniqueId = useUniqueId('link');\n const linkId = useUniqueId('link-self');\n const infoId = useUniqueId('link-info');\n\n const infoLinkLabelFromContext = useContext(InfoLinkLabelContext);\n\n const { funnelIdentifier, funnelInteractionId } = useFunnel();\n const { stepIdentifier, stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepIdentifier, subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const fireFunnelEvent = (funnelInteractionId: string) => {\n if (variant === 'info') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.helpPanelInteracted({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n subStepIdentifier,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n } else if (external) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n };\n\n const fireFollowEvent = (event: React.SyntheticEvent) => {\n if (funnelInteractionId) {\n fireFunnelEvent(funnelInteractionId);\n }\n\n fireCancelableEvent(onFollow, { href, external, target: anchorTarget }, event);\n };\n\n const fireClickEvent = (event: React.MouseEvent | React.KeyboardEvent) => {\n const { altKey, ctrlKey, metaKey, shiftKey } = event;\n const button = 'button' in event ? event.button : 0;\n // make onClick non-cancelable to prevent it from being used to block full page reload\n // for navigation use `onFollow` event instead\n fireNonCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey });\n };\n\n const handleLinkClick = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollowEvent(event);\n }\n fireClickEvent(event);\n };\n\n const handleButtonClick = (event: React.MouseEvent) => {\n fireFollowEvent(event);\n fireClickEvent(event);\n };\n\n const handleButtonKeyDown = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.space || event.keyCode === KeyCode.enter) {\n event.preventDefault();\n fireFollowEvent(event);\n fireClickEvent(event);\n }\n };\n\n const linkRef = useRef<HTMLElement>(null);\n const isVisualRefresh = useVisualRefresh();\n useForwardFocus(ref, linkRef);\n\n // Visual refresh should only add styles to buttons that don't already have unique styles (e.g. primary/secondary variants)\n const applyButtonStyles = isButton && isVisualRefresh && !hasSpecialStyle;\n\n const sharedProps = {\n id: linkId,\n ...baseProps,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(linkRef, __internalRootRef),\n className: clsx(\n styles.link,\n baseProps.className,\n applyButtonStyles ? styles.button : null,\n styles[getVariantStyle(variant)],\n styles[getFontSizeStyle(variant, fontSize)],\n styles[getColorStyle(variant, color)]\n ),\n 'aria-label': ariaLabel,\n 'aria-labelledby': undefined as string | undefined,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n };\n\n if (variant === 'info' && infoLinkLabelFromContext && !ariaLabel) {\n sharedProps['aria-labelledby'] = `${sharedProps.id} ${infoId} ${infoLinkLabelFromContext}`;\n }\n\n const renderedExternalIconAriaLabel = i18n('externalIconAriaLabel', externalIconAriaLabel);\n const content = (\n <>\n {children}\n {external && (\n <span className={styles['icon-wrapper']}>\n \n <span\n className={styles.icon}\n aria-label={renderedExternalIconAriaLabel}\n role={renderedExternalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" size=\"inherit\" />\n </span>\n </span>\n )}\n {variant === 'info' && (\n <span hidden={true} id={infoId}>\n :\n </span>\n )}\n </>\n );\n\n const { tabIndex } = useSingleTabStopNavigation(linkRef, { tabIndex: isButton ? 0 : undefined });\n\n if (isButton) {\n return (\n <a\n {...sharedProps}\n role=\"button\"\n tabIndex={tabIndex}\n onKeyDown={handleButtonKeyDown}\n onClick={handleButtonClick}\n >\n {content}\n </a>\n );\n }\n\n return (\n // we dynamically set proper rel in the code above\n // eslint-disable-next-line react/jsx-no-target-blank\n <a\n {...sharedProps}\n tabIndex={tabIndex}\n target={anchorTarget}\n rel={anchorRel}\n href={href}\n onClick={handleLinkClick}\n >\n {content}\n </a>\n );\n }\n);\n\nfunction getVariantStyle(variant: Exclude<InternalLinkProps['variant'], undefined>) {\n return `variant-${variant.replace(/^awsui-/, '')}`;\n}\n\nfunction getFontSizeStyle(variant: InternalLinkProps['variant'], fontSize: InternalLinkProps['fontSize']) {\n switch (variant) {\n case 'info':\n return 'font-size-body-s';\n case 'awsui-value-large':\n return 'font-size-display-l';\n default:\n return `font-size-${fontSize}`;\n }\n}\n\nfunction getColorStyle(variant: InternalLinkProps['variant'], color: InternalLinkProps['color']) {\n return `color-${variant === 'info' ? 'normal' : color}`;\n}\n\nexport default InternalLink;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/link/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAA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AAmB,EAC9B,OAAO,EAAE,iBAAiB,KAEzB,OAAO,CACN,CACL,CAAC;KACH;IAED,OAAO,CACL,2CACM,WAAW,IACf,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,KAEvB,OAAO,CACN,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,OAAyD;IAChF,OAAO,WAAW,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAqC,EAAE,QAAuC;IACtG,QAAQ,OAAO,EAAE;QACf,KAAK,MAAM;YACT,OAAO,kBAAkB,CAAC;QAC5B,KAAK,mBAAmB;YACtB,OAAO,qBAAqB,CAAC;QAC/B;YACE,OAAO,aAAa,QAAQ,EAAE,CAAC;KAClC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,OAAqC,EAAE,KAAiC;IAC7F,OAAO,SAAS,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FUNNEL_VALUE,\n getFunnelValueSelector,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireCancelableEvent, fireNonCancelableEvent, isPlainLeftClick } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { LinkProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalLinkProps = InternalBaseComponentProps<HTMLAnchorElement> &\n Omit<LinkProps, 'variant'> & {\n variant?: LinkProps['variant'] | 'top-navigation' | 'link' | 'recovery';\n };\n\nconst InternalLink = React.forwardRef(\n (\n {\n variant: providedVariant,\n fontSize = 'body-m',\n color = 'normal',\n external = false,\n target,\n href,\n rel,\n ariaLabel,\n externalIconAriaLabel,\n onFollow,\n onClick,\n children,\n __internalRootRef = null,\n ...props\n }: InternalLinkProps,\n ref: React.Ref<LinkProps.Ref>\n ) => {\n checkSafeUrl('Link', href);\n const isButton = !href;\n const { defaultVariant } = useContext(LinkDefaultVariantContext);\n const variant = providedVariant || defaultVariant;\n const specialStyles = ['top-navigation', 'link', 'recovery'];\n const hasSpecialStyle = specialStyles.indexOf(variant) > -1;\n\n const i18n = useInternalI18n('link');\n const baseProps = getBaseProps(props);\n const anchorTarget = target ?? (external ? '_blank' : undefined);\n const anchorRel = rel ?? (anchorTarget === '_blank' ? 'noopener noreferrer' : undefined);\n const uniqueId = useUniqueId('link');\n const linkId = useUniqueId('link-self');\n const infoId = useUniqueId('link-info');\n\n const infoLinkLabelFromContext = useContext(InfoLinkLabelContext);\n\n const { funnelIdentifier, funnelInteractionId } = useFunnel();\n const { stepIdentifier, stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepIdentifier, subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const fireFunnelEvent = (funnelInteractionId: string) => {\n if (variant === 'info') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.helpPanelInteracted({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n subStepIdentifier,\n stepNameSelector,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n } else if (external) {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n FunnelMetrics.externalLinkInteracted({\n funnelIdentifier,\n funnelInteractionId,\n stepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n elementSelector: getFunnelValueSelector(uniqueId),\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n };\n\n const fireFollowEvent = (event: React.SyntheticEvent) => {\n if (funnelInteractionId) {\n fireFunnelEvent(funnelInteractionId);\n }\n\n fireCancelableEvent(onFollow, { href, external, target: anchorTarget }, event);\n };\n\n const fireClickEvent = (event: React.MouseEvent | React.KeyboardEvent) => {\n const { altKey, ctrlKey, metaKey, shiftKey } = event;\n const button = 'button' in event ? event.button : 0;\n // make onClick non-cancelable to prevent it from being used to block full page reload\n // for navigation use `onFollow` event instead\n fireNonCancelableEvent(onClick, { altKey, button, ctrlKey, metaKey, shiftKey });\n };\n\n const handleLinkClick = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireFollowEvent(event);\n }\n fireClickEvent(event);\n };\n\n const handleButtonClick = (event: React.MouseEvent) => {\n fireFollowEvent(event);\n fireClickEvent(event);\n };\n\n const handleButtonKeyDown = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.space || event.keyCode === KeyCode.enter) {\n event.preventDefault();\n fireFollowEvent(event);\n fireClickEvent(event);\n }\n };\n\n const linkRef = useRef<HTMLElement>(null);\n const isVisualRefresh = useVisualRefresh();\n useForwardFocus(ref, linkRef);\n\n // Visual refresh should only add styles to buttons that don't already have unique styles (e.g. primary/secondary variants)\n const applyButtonStyles = isButton && isVisualRefresh && !hasSpecialStyle;\n\n const sharedProps = {\n id: linkId,\n ...baseProps,\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: useMergeRefs(linkRef, __internalRootRef),\n className: clsx(\n styles.link,\n baseProps.className,\n applyButtonStyles ? styles.button : null,\n styles[getVariantStyle(variant)],\n styles[getFontSizeStyle(variant, fontSize)],\n styles[getColorStyle(variant, color)]\n ),\n 'aria-label': ariaLabel,\n 'aria-labelledby': undefined as string | undefined,\n [DATA_ATTR_FUNNEL_VALUE]: uniqueId,\n };\n\n if (variant === 'info' && infoLinkLabelFromContext && !ariaLabel) {\n sharedProps['aria-labelledby'] = `${sharedProps.id} ${infoId} ${infoLinkLabelFromContext}`;\n }\n\n const renderedExternalIconAriaLabel = i18n('externalIconAriaLabel', externalIconAriaLabel);\n const content = (\n <>\n {children}\n {external && (\n <span className={styles['icon-wrapper']}>\n \n <span\n className={styles.icon}\n aria-label={renderedExternalIconAriaLabel}\n role={renderedExternalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" size=\"inherit\" />\n </span>\n </span>\n )}\n {variant === 'info' && (\n <span hidden={true} id={infoId}>\n :\n </span>\n )}\n </>\n );\n\n const { tabIndex } = useSingleTabStopNavigation(linkRef, { tabIndex: isButton ? 0 : undefined });\n\n if (isButton) {\n return (\n <a\n {...sharedProps}\n role=\"button\"\n tabIndex={tabIndex}\n onKeyDown={handleButtonKeyDown}\n onClick={handleButtonClick}\n >\n {content}\n </a>\n );\n }\n\n return (\n <a\n {...sharedProps}\n tabIndex={tabIndex}\n target={anchorTarget}\n rel={anchorRel}\n href={href}\n onClick={handleLinkClick}\n >\n {content}\n </a>\n );\n }\n);\n\nfunction getVariantStyle(variant: Exclude<InternalLinkProps['variant'], undefined>) {\n return `variant-${variant.replace(/^awsui-/, '')}`;\n}\n\nfunction getFontSizeStyle(variant: InternalLinkProps['variant'], fontSize: InternalLinkProps['fontSize']) {\n switch (variant) {\n case 'info':\n return 'font-size-body-s';\n case 'awsui-value-large':\n return 'font-size-display-l';\n default:\n return `font-size-${fontSize}`;\n }\n}\n\nfunction getColorStyle(variant: InternalLinkProps['variant'], color: InternalLinkProps['color']) {\n return `color-${variant === 'info' ? 'normal' : color}`;\n}\n\nexport default InternalLink;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAMtE,KAAK,8BAA8B,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAC1E,sBAAsB,CAAC,CAAC,CAAC,EACvB,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,CAC1B,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,EAClF,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,aAAa,EAAE,uBAAuB,EACtC,MAAM,EAAE,cAAc,EACtB,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,iBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,8BAA8B,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAMtE,KAAK,8BAA8B,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAC1E,sBAAsB,CAAC,CAAC,CAAC,EACvB,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,CAC1B,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,EAClF,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,aAAa,EAAE,uBAAuB,EACtC,MAAM,EAAE,cAAc,EACtB,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,iBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,8BAA8B,CAAC,CAAC,CAAC,eA8NnC"}
|
|
@@ -90,7 +90,9 @@ export default function InternalMixedLineBarChart(_a) {
|
|
|
90
90
|
};
|
|
91
91
|
const onBlur = (event) => {
|
|
92
92
|
if (event.relatedTarget && !nodeBelongs(containerRef.current, event.relatedTarget)) {
|
|
93
|
-
|
|
93
|
+
if (highlightedSeries) {
|
|
94
|
+
onHighlightChange(highlightedSeries);
|
|
95
|
+
}
|
|
94
96
|
setHighlightedPoint(null);
|
|
95
97
|
setHighlightedGroupIndex(null);
|
|
96
98
|
setLegendSeries(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,MAAM,MAAM,qCAAqC,CAAC;AACzD,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAC3E,OAAO,oBAAoB,EAAE,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAA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AA0B,EACtD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,GACxB,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EACJ,UAAU,CAAC,CAAC,CAAC,CACX,oBAAC,mBAAmB,IAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,qBAAqB,IAAI,EAAE,EAC1C,iBAAiB,EAAE,YAAY,EAC/B,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,eAAe,EACvC,gBAAgB,EAAE,YAAY,GAC9B,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport Filter from '../internal/components/chart-filter';\nimport ChartSeriesMarker from '../internal/components/chart-series-marker';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { ChartWrapper } from '../internal/components/chart-wrapper';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport ChartContainer from './chart-container';\nimport InternalChartLegend from './chart-legend';\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport { ScaledPoint } from './make-scaled-series';\nimport { chartLegendMap, isXThreshold, isYThreshold } from './utils';\n\nimport styles from './styles.css.js';\n\ntype InternalMixedLineBarChartProps<T extends ChartDataTypes> = SomeRequired<\n MixedLineBarChartProps<T>,\n | 'series'\n | 'height'\n | 'xScaleType'\n | 'yScaleType'\n | 'stackedBars'\n | 'horizontalBars'\n | 'statusType'\n | 'detailPopoverSize'\n | 'emphasizeBaselineAxis'\n> &\n InternalBaseComponentProps;\n\nexport default function InternalMixedLineBarChart<T extends number | string | Date>({\n fitHeight,\n height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\n xTickFormatter,\n yTickFormatter,\n highlightedSeries: controlledHighlightedSeries,\n visibleSeries: controlledVisibleSeries,\n series: externalSeries,\n onFilterChange,\n onHighlightChange: controlledOnHighlightChange,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n xTitle,\n yTitle,\n stackedBars,\n horizontalBars,\n hideFilter,\n additionalFilters,\n hideLegend,\n legendTitle,\n statusType,\n detailPopoverSize,\n detailPopoverFooter,\n detailPopoverSeriesContent,\n emphasizeBaselineAxis,\n empty,\n noMatch,\n errorText,\n loadingText,\n recoveryText,\n onRecoveryClick,\n __internalRootRef = null,\n ...props\n}: InternalMixedLineBarChartProps<T>) {\n const baseProps = getBaseProps(props);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const gotBarSeries = externalSeries.some(s => s.type === 'bar');\n const gotLineSeries = externalSeries.some(s => s.type === 'line');\n\n if (xScaleType !== 'categorical' && gotBarSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Bar series cannot be used with a ${xScaleType} scale. Use a categorical x axis instead.`\n );\n }\n\n if (horizontalBars && gotLineSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Property horizontalBars can only be used with charts that contain only bar or threshold series.`\n );\n }\n\n for (const s of externalSeries) {\n if (s.type === 'threshold' && s.x !== undefined && s.y !== undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n if (s.type === 'threshold' && s.x === undefined && s.y === undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n }\n }, [xScaleType, horizontalBars, externalSeries]);\n\n const series = useMemo(() => {\n // Generate series colors if not explicitly provided.\n // The thresholds use a dedicated colour scale.\n const colors = createCategoryColorScale(\n externalSeries,\n it => isYThreshold(it) || isXThreshold(it),\n it => it.color || null\n );\n\n return externalSeries.map((s, i) => ({ index: i, color: colors[i], series: s }));\n }, [externalSeries]);\n\n const [highlightedPoint, setHighlightedPoint] = useState<ScaledPoint<T> | null>(null);\n const [highlightedGroupIndex, setHighlightedGroupIndex] = useState<number | null>(null);\n const [highlightedSeries = null, setHighlightedSeries] = useControllable(\n controlledHighlightedSeries,\n controlledOnHighlightChange,\n null,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'highlightedSeries',\n changeHandler: 'onHighlightChange',\n }\n );\n const [legendSeries, setLegendSeries] = useState<MixedLineBarChartProps.ChartSeries<T> | null>(highlightedSeries);\n useEffect(() => {\n setLegendSeries(controlledHighlightedSeries || null);\n }, [controlledHighlightedSeries]);\n\n const [externalVisibleSeries, setExternalVisibleSeries] = useControllable(\n controlledVisibleSeries,\n onFilterChange,\n externalSeries,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'visibleSeries',\n changeHandler: 'onFilterChange',\n }\n );\n\n if (isDevelopment) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousSeries = usePrevious(externalSeries);\n\n const hasPrevious = !!(previousSeries && previousSeries.length);\n const hasCurrent = !!externalSeries.length;\n\n if (hasPrevious && hasCurrent && externalSeries !== previousSeries && !controlledVisibleSeries && !hideFilter) {\n warnOnce(\n 'MixedLineBarChart',\n 'The `series` value passed into the component changed. ' +\n 'This may cause problems with filtering - we recommend that you make the `series` value constant, ' +\n 'or provide a `visibleSeries` value that derives from the current `series` value.'\n );\n }\n }\n\n const visibleSeries = useMemo(\n () => series.filter(s => externalVisibleSeries?.indexOf(s.series) !== -1),\n [series, externalVisibleSeries]\n );\n\n const filterChange = (selectedSeries: ReadonlyArray<MixedLineBarChartProps.ChartSeries<T>>) => {\n setExternalVisibleSeries(selectedSeries);\n fireNonCancelableEvent(onFilterChange, {\n visibleSeries: selectedSeries,\n });\n };\n\n const onHighlightChange = (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n setHighlightedSeries(series);\n fireNonCancelableEvent(controlledOnHighlightChange, {\n highlightedSeries: series,\n });\n setLegendSeries(series);\n };\n\n const onBlur = (event: React.FocusEvent) => {\n if (event.relatedTarget && !nodeBelongs(containerRef.current, event.relatedTarget)) {\n highlightedSeries && onHighlightChange(highlightedSeries);\n setHighlightedPoint(null);\n setHighlightedGroupIndex(null);\n setLegendSeries(null);\n }\n };\n\n const { isEmpty, isNoMatch, showChart } = getChartStatus({\n externalData: externalSeries,\n visibleData: visibleSeries || [],\n statusType,\n });\n const showFilters = statusType === 'finished' && (!isEmpty || isNoMatch) && (additionalFilters || !hideFilter);\n const showLegend = !hideLegend && !isEmpty && statusType === 'finished';\n const reserveLegendSpace = !showChart && !hideLegend;\n const reserveFilterSpace = !showChart && !isNoMatch && (!hideFilter || additionalFilters);\n const mergedRef = useMergeRefs(containerRef, __internalRootRef);\n\n const filterItems = series.map(({ series, color }) => ({\n label: series.title,\n marker: <ChartSeriesMarker type={chartLegendMap[series.type]} color={color} />,\n datum: series,\n }));\n\n return (\n <ChartWrapper\n ref={mergedRef}\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n fitHeight={!!fitHeight}\n contentMinHeight={height}\n defaultFilter={\n showFilters && !hideFilter ? (\n <Filter\n series={filterItems}\n onChange={filterChange}\n selectedSeries={externalVisibleSeries || []}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n additionalFilters={showFilters ? additionalFilters : null}\n reserveFilterSpace={!!reserveFilterSpace}\n reserveLegendSpace={!!reserveLegendSpace}\n chartStatus={\n <ChartStatusContainer\n isEmpty={isEmpty}\n isNoMatch={isNoMatch}\n showChart={showChart}\n statusType={statusType}\n empty={empty}\n noMatch={noMatch}\n loadingText={loadingText}\n errorText={errorText}\n recoveryText={recoveryText}\n onRecoveryClick={onRecoveryClick}\n />\n }\n chart={\n showChart ? (\n <ChartContainer\n fitHeight={fitHeight}\n hasFilters={!!showFilters}\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={xTickFormatter ?? i18nStrings?.xTickFormatter}\n yTickFormatter={yTickFormatter ?? i18nStrings?.yTickFormatter}\n emphasizeBaselineAxis={emphasizeBaselineAxis}\n stackedBars={stackedBars}\n horizontalBars={horizontalBars}\n series={series}\n visibleSeries={visibleSeries}\n highlightedSeries={highlightedSeries}\n onHighlightChange={onHighlightChange}\n highlightedPoint={highlightedPoint}\n setHighlightedPoint={setHighlightedPoint}\n highlightedGroupIndex={highlightedGroupIndex}\n setHighlightedGroupIndex={setHighlightedGroupIndex}\n detailPopoverSize={detailPopoverSize}\n detailPopoverFooter={detailPopoverFooter}\n detailPopoverSeriesContent={detailPopoverSeriesContent}\n xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n legend={\n showLegend ? (\n <InternalChartLegend\n series={series}\n visibleSeries={externalVisibleSeries || []}\n highlightedSeries={legendSeries}\n onHighlightChange={onHighlightChange}\n legendTitle={legendTitle}\n ariaLabel={i18nStrings?.legendAriaLabel}\n plotContainerRef={containerRef}\n />\n ) : null\n }\n onBlur={onBlur}\n />\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE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.0\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport Filter from '../internal/components/chart-filter';\nimport ChartSeriesMarker from '../internal/components/chart-series-marker';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { ChartWrapper } from '../internal/components/chart-wrapper';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport ChartContainer from './chart-container';\nimport InternalChartLegend from './chart-legend';\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport { ScaledPoint } from './make-scaled-series';\nimport { chartLegendMap, isXThreshold, isYThreshold } from './utils';\n\nimport styles from './styles.css.js';\n\ntype InternalMixedLineBarChartProps<T extends ChartDataTypes> = SomeRequired<\n MixedLineBarChartProps<T>,\n | 'series'\n | 'height'\n | 'xScaleType'\n | 'yScaleType'\n | 'stackedBars'\n | 'horizontalBars'\n | 'statusType'\n | 'detailPopoverSize'\n | 'emphasizeBaselineAxis'\n> &\n InternalBaseComponentProps;\n\nexport default function InternalMixedLineBarChart<T extends number | string | Date>({\n fitHeight,\n height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\n xTickFormatter,\n yTickFormatter,\n highlightedSeries: controlledHighlightedSeries,\n visibleSeries: controlledVisibleSeries,\n series: externalSeries,\n onFilterChange,\n onHighlightChange: controlledOnHighlightChange,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n xTitle,\n yTitle,\n stackedBars,\n horizontalBars,\n hideFilter,\n additionalFilters,\n hideLegend,\n legendTitle,\n statusType,\n detailPopoverSize,\n detailPopoverFooter,\n detailPopoverSeriesContent,\n emphasizeBaselineAxis,\n empty,\n noMatch,\n errorText,\n loadingText,\n recoveryText,\n onRecoveryClick,\n __internalRootRef = null,\n ...props\n}: InternalMixedLineBarChartProps<T>) {\n const baseProps = getBaseProps(props);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const gotBarSeries = externalSeries.some(s => s.type === 'bar');\n const gotLineSeries = externalSeries.some(s => s.type === 'line');\n\n if (xScaleType !== 'categorical' && gotBarSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Bar series cannot be used with a ${xScaleType} scale. Use a categorical x axis instead.`\n );\n }\n\n if (horizontalBars && gotLineSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Property horizontalBars can only be used with charts that contain only bar or threshold series.`\n );\n }\n\n for (const s of externalSeries) {\n if (s.type === 'threshold' && s.x !== undefined && s.y !== undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n if (s.type === 'threshold' && s.x === undefined && s.y === undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n }\n }, [xScaleType, horizontalBars, externalSeries]);\n\n const series = useMemo(() => {\n // Generate series colors if not explicitly provided.\n // The thresholds use a dedicated colour scale.\n const colors = createCategoryColorScale(\n externalSeries,\n it => isYThreshold(it) || isXThreshold(it),\n it => it.color || null\n );\n\n return externalSeries.map((s, i) => ({ index: i, color: colors[i], series: s }));\n }, [externalSeries]);\n\n const [highlightedPoint, setHighlightedPoint] = useState<ScaledPoint<T> | null>(null);\n const [highlightedGroupIndex, setHighlightedGroupIndex] = useState<number | null>(null);\n const [highlightedSeries = null, setHighlightedSeries] = useControllable(\n controlledHighlightedSeries,\n controlledOnHighlightChange,\n null,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'highlightedSeries',\n changeHandler: 'onHighlightChange',\n }\n );\n const [legendSeries, setLegendSeries] = useState<MixedLineBarChartProps.ChartSeries<T> | null>(highlightedSeries);\n useEffect(() => {\n setLegendSeries(controlledHighlightedSeries || null);\n }, [controlledHighlightedSeries]);\n\n const [externalVisibleSeries, setExternalVisibleSeries] = useControllable(\n controlledVisibleSeries,\n onFilterChange,\n externalSeries,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'visibleSeries',\n changeHandler: 'onFilterChange',\n }\n );\n\n if (isDevelopment) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousSeries = usePrevious(externalSeries);\n\n const hasPrevious = !!(previousSeries && previousSeries.length);\n const hasCurrent = !!externalSeries.length;\n\n if (hasPrevious && hasCurrent && externalSeries !== previousSeries && !controlledVisibleSeries && !hideFilter) {\n warnOnce(\n 'MixedLineBarChart',\n 'The `series` value passed into the component changed. ' +\n 'This may cause problems with filtering - we recommend that you make the `series` value constant, ' +\n 'or provide a `visibleSeries` value that derives from the current `series` value.'\n );\n }\n }\n\n const visibleSeries = useMemo(\n () => series.filter(s => externalVisibleSeries?.indexOf(s.series) !== -1),\n [series, externalVisibleSeries]\n );\n\n const filterChange = (selectedSeries: ReadonlyArray<MixedLineBarChartProps.ChartSeries<T>>) => {\n setExternalVisibleSeries(selectedSeries);\n fireNonCancelableEvent(onFilterChange, {\n visibleSeries: selectedSeries,\n });\n };\n\n const onHighlightChange = (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n setHighlightedSeries(series);\n fireNonCancelableEvent(controlledOnHighlightChange, {\n highlightedSeries: series,\n });\n setLegendSeries(series);\n };\n\n const onBlur = (event: React.FocusEvent) => {\n if (event.relatedTarget && !nodeBelongs(containerRef.current, event.relatedTarget)) {\n if (highlightedSeries) {\n onHighlightChange(highlightedSeries);\n }\n setHighlightedPoint(null);\n setHighlightedGroupIndex(null);\n setLegendSeries(null);\n }\n };\n\n const { isEmpty, isNoMatch, showChart } = getChartStatus({\n externalData: externalSeries,\n visibleData: visibleSeries || [],\n statusType,\n });\n const showFilters = statusType === 'finished' && (!isEmpty || isNoMatch) && (additionalFilters || !hideFilter);\n const showLegend = !hideLegend && !isEmpty && statusType === 'finished';\n const reserveLegendSpace = !showChart && !hideLegend;\n const reserveFilterSpace = !showChart && !isNoMatch && (!hideFilter || additionalFilters);\n const mergedRef = useMergeRefs(containerRef, __internalRootRef);\n\n const filterItems = series.map(({ series, color }) => ({\n label: series.title,\n marker: <ChartSeriesMarker type={chartLegendMap[series.type]} color={color} />,\n datum: series,\n }));\n\n return (\n <ChartWrapper\n ref={mergedRef}\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n fitHeight={!!fitHeight}\n contentMinHeight={height}\n defaultFilter={\n showFilters && !hideFilter ? (\n <Filter\n series={filterItems}\n onChange={filterChange}\n selectedSeries={externalVisibleSeries || []}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n additionalFilters={showFilters ? additionalFilters : null}\n reserveFilterSpace={!!reserveFilterSpace}\n reserveLegendSpace={!!reserveLegendSpace}\n chartStatus={\n <ChartStatusContainer\n isEmpty={isEmpty}\n isNoMatch={isNoMatch}\n showChart={showChart}\n statusType={statusType}\n empty={empty}\n noMatch={noMatch}\n loadingText={loadingText}\n errorText={errorText}\n recoveryText={recoveryText}\n onRecoveryClick={onRecoveryClick}\n />\n }\n chart={\n showChart ? (\n <ChartContainer\n fitHeight={fitHeight}\n hasFilters={!!showFilters}\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={xTickFormatter ?? i18nStrings?.xTickFormatter}\n yTickFormatter={yTickFormatter ?? i18nStrings?.yTickFormatter}\n emphasizeBaselineAxis={emphasizeBaselineAxis}\n stackedBars={stackedBars}\n horizontalBars={horizontalBars}\n series={series}\n visibleSeries={visibleSeries}\n highlightedSeries={highlightedSeries}\n onHighlightChange={onHighlightChange}\n highlightedPoint={highlightedPoint}\n setHighlightedPoint={setHighlightedPoint}\n highlightedGroupIndex={highlightedGroupIndex}\n setHighlightedGroupIndex={setHighlightedGroupIndex}\n detailPopoverSize={detailPopoverSize}\n detailPopoverFooter={detailPopoverFooter}\n detailPopoverSeriesContent={detailPopoverSeriesContent}\n xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n legend={\n showLegend ? (\n <InternalChartLegend\n series={series}\n visibleSeries={externalVisibleSeries || []}\n highlightedSeries={legendSeries}\n onHighlightChange={onHighlightChange}\n legendTitle={legendTitle}\n ariaLabel={i18nStrings?.legendAriaLabel}\n plotContainerRef={containerRef}\n />\n ) : null\n }\n onBlur={onBlur}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/index.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/index.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,QAAA,MAAM,QAAQ,obA2Nb,CAAC;AAGF,eAAe,QAAQ,CAAC"}
|