@cloudscape-design/components 3.0.313 → 3.0.315

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.
Files changed (74) hide show
  1. package/app-layout/index.js +1 -1
  2. package/app-layout/index.js.map +1 -1
  3. package/app-layout/visual-refresh/context.js +1 -1
  4. package/app-layout/visual-refresh/context.js.map +1 -1
  5. package/area-chart/internal.js +1 -1
  6. package/area-chart/internal.js.map +1 -1
  7. package/autosuggest/internal.js +1 -1
  8. package/autosuggest/internal.js.map +1 -1
  9. package/collection-preferences/index.js +1 -1
  10. package/collection-preferences/index.js.map +1 -1
  11. package/date-range-picker/index.js +1 -1
  12. package/date-range-picker/index.js.map +1 -1
  13. package/date-range-picker/time-offset.js +1 -1
  14. package/date-range-picker/time-offset.js.map +1 -1
  15. package/expandable-section/expandable-section-header.js +1 -1
  16. package/expandable-section/expandable-section-header.js.map +1 -1
  17. package/file-upload/internal.js +1 -1
  18. package/file-upload/internal.js.map +1 -1
  19. package/flashbar/common.js +1 -1
  20. package/flashbar/common.js.map +1 -1
  21. package/flashbar/flash.js +1 -1
  22. package/flashbar/flash.js.map +1 -1
  23. package/grid/internal.js +2 -2
  24. package/grid/internal.js.map +1 -1
  25. package/i18n/provider.js +1 -1
  26. package/i18n/provider.js.map +1 -1
  27. package/icon/internal.js +1 -1
  28. package/icon/internal.js.map +1 -1
  29. package/internal/base-component/styles.scoped.css +6 -0
  30. package/internal/components/masked-input/use-mask.js +2 -2
  31. package/internal/components/masked-input/use-mask.js.map +1 -1
  32. package/internal/components/option/index.js +1 -1
  33. package/internal/components/option/index.js.map +1 -1
  34. package/internal/environment.js +1 -1
  35. package/internal/generated/theming/index.cjs +54 -0
  36. package/internal/generated/theming/index.js +54 -0
  37. package/internal/hooks/check-controlled/index.js +1 -1
  38. package/internal/hooks/check-controlled/index.js.map +1 -1
  39. package/internal/hooks/use-controllable/index.js +1 -1
  40. package/internal/hooks/use-controllable/index.js.map +1 -1
  41. package/internal/hooks/use-visual-mode/index.js +1 -1
  42. package/internal/hooks/use-visual-mode/index.js.map +1 -1
  43. package/internal/manifest.json +1 -1
  44. package/internal/utils/check-safe-url.js +1 -1
  45. package/internal/utils/check-safe-url.js.map +1 -1
  46. package/internal/utils/locale/normalize-locale.js +1 -1
  47. package/internal/utils/locale/normalize-locale.js.map +1 -1
  48. package/mixed-line-bar-chart/internal.js +1 -1
  49. package/mixed-line-bar-chart/internal.js.map +1 -1
  50. package/package.json +1 -1
  51. package/pie-chart/styles.css.js +27 -27
  52. package/pie-chart/styles.scoped.css +44 -44
  53. package/pie-chart/styles.selectors.js +27 -27
  54. package/popover/index.js +1 -1
  55. package/popover/index.js.map +1 -1
  56. package/progress-bar/index.js +1 -1
  57. package/progress-bar/index.js.map +1 -1
  58. package/select/utils/check-option-value-field.js +1 -1
  59. package/select/utils/check-option-value-field.js.map +1 -1
  60. package/side-navigation/util.js +1 -1
  61. package/side-navigation/util.js.map +1 -1
  62. package/table/body-cell/styles.css.js +28 -28
  63. package/table/body-cell/styles.scoped.css +70 -70
  64. package/table/body-cell/styles.selectors.js +28 -28
  65. package/table/use-column-widths.js +1 -1
  66. package/table/use-column-widths.js.map +1 -1
  67. package/table/utils.js +1 -1
  68. package/table/utils.js.map +1 -1
  69. package/wizard/internal.js +1 -1
  70. package/wizard/internal.js.map +1 -1
  71. package/internal/logging.d.ts +0 -2
  72. package/internal/logging.d.ts.map +0 -1
  73. package/internal/logging.js +0 -14
  74. package/internal/logging.js.map +0 -1
@@ -1112,6 +1112,10 @@ export var preset = {
1112
1112
  "light": "transparent",
1113
1113
  "dark": "transparent"
1114
1114
  },
1115
+ "colorBorderEditableCellHover": {
1116
+ "light": "{colorBorderDropdownItemHover}",
1117
+ "dark": "{colorBorderDropdownItemHover}"
1118
+ },
1115
1119
  "colorBorderInputDefault": {
1116
1120
  "light": "{colorGrey500}",
1117
1121
  "dark": "{colorGrey550}"
@@ -1224,6 +1228,10 @@ export var preset = {
1224
1228
  "light": "{colorGreyTransparentLight}",
1225
1229
  "dark": "{colorGreyTransparentLight}"
1226
1230
  },
1231
+ "colorStrokeChartLine": {
1232
+ "light": "{colorGrey500}",
1233
+ "dark": "{colorGrey500}"
1234
+ },
1227
1235
  "colorStrokeCodeEditorResizeHandler": {
1228
1236
  "light": "{colorGrey600}",
1229
1237
  "dark": "{colorGrey300}"
@@ -3081,6 +3089,10 @@ export var preset = {
3081
3089
  "light": "transparent",
3082
3090
  "dark": "transparent"
3083
3091
  },
3092
+ "colorBorderEditableCellHover": {
3093
+ "light": "{colorBorderDropdownItemHover}",
3094
+ "dark": "{colorBorderDropdownItemHover}"
3095
+ },
3084
3096
  "colorBorderInputDefault": {
3085
3097
  "light": "{colorGrey550}",
3086
3098
  "dark": "{colorGrey550}"
@@ -3193,6 +3205,10 @@ export var preset = {
3193
3205
  "light": "{colorGreyTransparentLight}",
3194
3206
  "dark": "{colorGreyTransparentLight}"
3195
3207
  },
3208
+ "colorStrokeChartLine": {
3209
+ "light": "{colorGrey500}",
3210
+ "dark": "{colorGrey500}"
3211
+ },
3196
3212
  "colorStrokeCodeEditorResizeHandler": {
3197
3213
  "light": "{colorGrey300}",
3198
3214
  "dark": "{colorGrey300}"
@@ -4075,6 +4091,10 @@ export var preset = {
4075
4091
  "light": "transparent",
4076
4092
  "dark": "transparent"
4077
4093
  },
4094
+ "colorBorderEditableCellHover": {
4095
+ "light": "{colorBorderDropdownItemHover}",
4096
+ "dark": "{colorBorderDropdownItemHover}"
4097
+ },
4078
4098
  "colorBorderInputDefault": {
4079
4099
  "light": "{colorGrey550}",
4080
4100
  "dark": "{colorGrey550}"
@@ -4187,6 +4207,10 @@ export var preset = {
4187
4207
  "light": "{colorGreyTransparentLight}",
4188
4208
  "dark": "{colorGreyTransparentLight}"
4189
4209
  },
4210
+ "colorStrokeChartLine": {
4211
+ "light": "{colorGrey500}",
4212
+ "dark": "{colorGrey500}"
4213
+ },
4190
4214
  "colorStrokeCodeEditorResizeHandler": {
4191
4215
  "light": "{colorGrey300}",
4192
4216
  "dark": "{colorGrey300}"
@@ -5001,6 +5025,10 @@ export var preset = {
5001
5025
  "light": "transparent",
5002
5026
  "dark": "transparent"
5003
5027
  },
5028
+ "colorBorderEditableCellHover": {
5029
+ "light": "{colorBorderDropdownItemHover}",
5030
+ "dark": "{colorBorderDropdownItemHover}"
5031
+ },
5004
5032
  "colorBorderInputDefault": {
5005
5033
  "light": "{colorGrey500}",
5006
5034
  "dark": "{colorGrey550}"
@@ -5113,6 +5141,10 @@ export var preset = {
5113
5141
  "light": "{colorGreyTransparentLight}",
5114
5142
  "dark": "{colorGreyTransparentLight}"
5115
5143
  },
5144
+ "colorStrokeChartLine": {
5145
+ "light": "{colorGrey500}",
5146
+ "dark": "{colorGrey500}"
5147
+ },
5116
5148
  "colorStrokeCodeEditorResizeHandler": {
5117
5149
  "light": "{colorGrey600}",
5118
5150
  "dark": "{colorGrey300}"
@@ -5927,6 +5959,10 @@ export var preset = {
5927
5959
  "light": "transparent",
5928
5960
  "dark": "transparent"
5929
5961
  },
5962
+ "colorBorderEditableCellHover": {
5963
+ "light": "{colorBorderDropdownItemHover}",
5964
+ "dark": "{colorBorderDropdownItemHover}"
5965
+ },
5930
5966
  "colorBorderInputDefault": {
5931
5967
  "light": "{colorGrey500}",
5932
5968
  "dark": "{colorGrey550}"
@@ -6039,6 +6075,10 @@ export var preset = {
6039
6075
  "light": "{colorGreyTransparentLight}",
6040
6076
  "dark": "{colorGreyTransparentLight}"
6041
6077
  },
6078
+ "colorStrokeChartLine": {
6079
+ "light": "{colorGrey500}",
6080
+ "dark": "{colorGrey500}"
6081
+ },
6042
6082
  "colorStrokeCodeEditorResizeHandler": {
6043
6083
  "light": "{colorGrey600}",
6044
6084
  "dark": "{colorGrey300}"
@@ -6853,6 +6893,10 @@ export var preset = {
6853
6893
  "light": "transparent",
6854
6894
  "dark": "transparent"
6855
6895
  },
6896
+ "colorBorderEditableCellHover": {
6897
+ "light": "{colorBorderDropdownItemHover}",
6898
+ "dark": "{colorBorderDropdownItemHover}"
6899
+ },
6856
6900
  "colorBorderInputDefault": {
6857
6901
  "light": "{colorGrey550}",
6858
6902
  "dark": "{colorGrey550}"
@@ -6965,6 +7009,10 @@ export var preset = {
6965
7009
  "light": "{colorGreyTransparentLight}",
6966
7010
  "dark": "{colorGreyTransparentLight}"
6967
7011
  },
7012
+ "colorStrokeChartLine": {
7013
+ "light": "{colorGrey500}",
7014
+ "dark": "{colorGrey500}"
7015
+ },
6968
7016
  "colorStrokeCodeEditorResizeHandler": {
6969
7017
  "light": "{colorGrey300}",
6970
7018
  "dark": "{colorGrey300}"
@@ -7622,6 +7670,7 @@ export var preset = {
7622
7670
  "colorBorderDropdownItemDimmedHover": "color",
7623
7671
  "colorBorderDropdownItemSelected": "color",
7624
7672
  "colorBorderDropdownItemTop": "color",
7673
+ "colorBorderEditableCellHover": "color",
7625
7674
  "colorBorderInputDefault": "color",
7626
7675
  "colorBorderInputDisabled": "color",
7627
7676
  "colorBorderItemFocused": "color",
@@ -7650,6 +7699,7 @@ export var preset = {
7650
7699
  "colorShadowLayoutToggle": "color",
7651
7700
  "colorShadowMedium": "color",
7652
7701
  "colorShadowSide": "color",
7702
+ "colorStrokeChartLine": "color",
7653
7703
  "colorStrokeCodeEditorResizeHandler": "color",
7654
7704
  "colorStrokeCodeEditorGutterActiveLineDefault": "color",
7655
7705
  "colorStrokeCodeEditorGutterActiveLineHover": "color",
@@ -8690,6 +8740,7 @@ export var preset = {
8690
8740
  "colorBorderDropdownItemDimmedHover": "color-border-dropdown-item-dimmed-hover",
8691
8741
  "colorBorderDropdownItemSelected": "color-border-dropdown-item-selected",
8692
8742
  "colorBorderDropdownItemTop": "color-border-dropdown-item-top",
8743
+ "colorBorderEditableCellHover": "color-border-editable-cell-hover",
8693
8744
  "colorBorderInputDefault": "color-border-input-default",
8694
8745
  "colorBorderInputDisabled": "color-border-input-disabled",
8695
8746
  "colorBorderItemFocused": "color-border-item-focused",
@@ -8718,6 +8769,7 @@ export var preset = {
8718
8769
  "colorShadowLayoutToggle": "color-shadow-layout-toggle",
8719
8770
  "colorShadowMedium": "color-shadow-medium",
8720
8771
  "colorShadowSide": "color-shadow-side",
8772
+ "colorStrokeChartLine": "color-stroke-chart-line",
8721
8773
  "colorStrokeCodeEditorResizeHandler": "color-stroke-code-editor-resize-handler",
8722
8774
  "colorStrokeCodeEditorGutterActiveLineDefault": "color-stroke-code-editor-gutter-active-line-default",
8723
8775
  "colorStrokeCodeEditorGutterActiveLineHover": "color-stroke-code-editor-gutter-active-line-hover",
@@ -9360,6 +9412,7 @@ export var preset = {
9360
9412
  "colorBorderDropdownItemDimmedHover": "--color-border-dropdown-item-dimmed-hover-3tdni4",
9361
9413
  "colorBorderDropdownItemSelected": "--color-border-dropdown-item-selected-3zay2y",
9362
9414
  "colorBorderDropdownItemTop": "--color-border-dropdown-item-top-x77i10",
9415
+ "colorBorderEditableCellHover": "--color-border-editable-cell-hover-zeuchn",
9363
9416
  "colorBorderInputDefault": "--color-border-input-default-zb6g42",
9364
9417
  "colorBorderInputDisabled": "--color-border-input-disabled-06dcc0",
9365
9418
  "colorBorderItemFocused": "--color-border-item-focused-4t19h5",
@@ -9388,6 +9441,7 @@ export var preset = {
9388
9441
  "colorShadowLayoutToggle": "--color-shadow-layout-toggle-u6bbly",
9389
9442
  "colorShadowMedium": "--color-shadow-medium-ncb0av",
9390
9443
  "colorShadowSide": "--color-shadow-side-priy5p",
9444
+ "colorStrokeChartLine": "--color-stroke-chart-line-7sdstd",
9391
9445
  "colorStrokeCodeEditorResizeHandler": "--color-stroke-code-editor-resize-handler-upcfz7",
9392
9446
  "colorStrokeCodeEditorGutterActiveLineDefault": "--color-stroke-code-editor-gutter-active-line-default-kc336v",
9393
9447
  "colorStrokeCodeEditorGutterActiveLineHover": "--color-stroke-code-editor-gutter-active-line-hover-czlv75",
@@ -1,7 +1,7 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { isDevelopment } from '../../is-development';
4
- import { warnOnce } from '../../logging';
4
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
5
5
  export default function checkControlled(componentName, propertyName, propertyValue, handlerName, handlerValue) {
6
6
  if (propertyValue !== undefined && handlerValue === undefined && isDevelopment) {
7
7
  warnOnce(componentName, `You provided \`${propertyName}\` prop without an \`${handlerName}\` handler. This will render a read-only component. If the component should be mutable, set an \`${handlerName}\` handler.`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/check-controlled/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,aAAqB,EACrB,YAAoB,EACpB,aAAoC,EACpC,WAAmB,EACnB,YAAoE;IAEpE,IAAI,aAAa,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,aAAa,EAAE;QAC9E,QAAQ,CACN,aAAa,EACb,kBAAkB,YAAY,wBAAwB,WAAW,oGAAoG,WAAW,aAAa,CAC9L,CAAC;KACH;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '../../logging';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport default function checkControlled<ValueType, EventDetailType>(\n componentName: string,\n propertyName: string,\n propertyValue: ValueType | undefined,\n handlerName: string,\n handlerValue: NonCancelableEventHandler<EventDetailType> | undefined\n) {\n if (propertyValue !== undefined && handlerValue === undefined && isDevelopment) {\n warnOnce(\n componentName,\n `You provided \\`${propertyName}\\` prop without an \\`${handlerName}\\` handler. This will render a read-only component. If the component should be mutable, set an \\`${handlerName}\\` handler.`\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/check-controlled/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,aAAqB,EACrB,YAAoB,EACpB,aAAoC,EACpC,WAAmB,EACnB,YAAoE;IAEpE,IAAI,aAAa,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,aAAa,EAAE;QAC9E,QAAQ,CACN,aAAa,EACb,kBAAkB,YAAY,wBAAwB,WAAW,oGAAoG,WAAW,aAAa,CAC9L,CAAC;KACH;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport default function checkControlled<ValueType, EventDetailType>(\n componentName: string,\n propertyName: string,\n propertyValue: ValueType | undefined,\n handlerName: string,\n handlerValue: NonCancelableEventHandler<EventDetailType> | undefined\n) {\n if (propertyValue !== undefined && handlerValue === undefined && isDevelopment) {\n warnOnce(\n componentName,\n `You provided \\`${propertyName}\\` prop without an \\`${handlerName}\\` handler. This will render a read-only component. If the component should be mutable, set an \\`${handlerName}\\` handler.`\n );\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import * as React from 'react';
4
4
  import { isDevelopment } from '../../is-development';
5
- import { warnOnce } from '../../logging';
5
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
6
6
  /**
7
7
  * This hook allows you to make a component that can be used both in controlled mode and uncontrolled mode.
8
8
  * Pass in your component's props, and then implement your component as if it was only controlled.
@@ -1 +1 @@
1
- {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OAAO,IAAI;oBAC1F,4DAA4D,WAAW,OAAO,OAAO,oBAAoB;oBACzG,4FAA4F;oBAC5F,sDAAsD,CACzD,CAAC;aACH;QACH,CAAC,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;KACpE;IAED,mEAAmE;IACnE,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC5D,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpE,uCAAuC;IACvC,MAAM,wBAAwB,GAAG,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;IAE7E,MAAM,oBAAoB,GAAG,KAAK,CAAC,WAAW,CAC5C,CAAC,QAAyC,EAAE,EAAE;QAC5C,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,EACD,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAC/B,CAAC;IAEF,IAAI,YAAY,EAAE;QAChB,OAAO,CAAC,eAAe,EAAE,eAAe,CAAU,CAAC;KACpD;SAAM;QACL,OAAO,CAAC,wBAAwB,EAAE,oBAAoB,CAAU,CAAC;KAClE;AACH,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,KAAK,CAAC,CAAC;AAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport * as React from 'react';\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '../../logging';\n\ninterface PropertyDescription {\n componentName: string;\n controlledProp: string;\n changeHandler: string;\n}\n\n/**\n * This hook allows you to make a component that can be used both in controlled mode and uncontrolled mode.\n * Pass in your component's props, and then implement your component as if it was only controlled.\n * When calling onChange callbacks (or the equivalent for your property), you need to call both the callback returned by this function\n * as well as the callback provided in your component's props.\n *\n * A component determines its mode (either controlled or uncontrolled) on the first render and keeps it for its lifetime. The mode cannot\n * be switched later.\n *\n *\n * Example usage:\n * ```jsx\n * const [checked, setChecked] = useControllable(\n * props,\n * props.defaultEnabled ?? false,\n * {\n * componentName: 'MyCheckboxComponent',\n * controlledProp: 'enabled',\n * changeHandler: 'onCheckedStatusChange'\n * }\n * )\n *\n * return\n * <input\n * type=\"checkbox\"\n * checked={checked}\n * onChange={event => {\n * setChecked(event.target.checked);\n * fireNonCancelableEvent(props.onCheckedStatusChange, { checked: event.target.checked })\n * }} />\n * ```\n *\n * @param controlledValue value for the controlled mode\n * @param handler update handler for controlled mode\n * @param defaultValue initial value for uncontrolled mode\n * @param description property metadata\n */\nexport function useControllable<ValueType>(\n controlledValue: ValueType,\n handler: ((...args: any[]) => unknown) | undefined,\n defaultValue: ValueType,\n { componentName, changeHandler, controlledProp }: PropertyDescription\n) {\n // The decision whether a component is controlled or uncontrolled is made on its first render and cannot be changed afterwards.\n const isControlled = React.useState(controlledValue !== undefined)[0];\n\n if (isDevelopment) {\n // Print a warning if the component switches between controlled and uncontrolled mode.\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isControlled && handler === undefined) {\n warnOnce(\n componentName,\n `You provided a \\`${controlledProp}\\` prop without an \\`${changeHandler}\\` handler. This will render a non-interactive component.`\n );\n }\n }, [handler, isControlled, componentName, changeHandler, controlledProp]);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const isControlledNow = controlledValue !== undefined;\n if (isControlled !== isControlledNow) {\n const initialMode = isControlled ? 'controlled' : 'uncontrolled';\n const modeNow = isControlledNow ? 'controlled' : 'uncontrolled';\n warnOnce(\n componentName,\n `A component tried to change ${initialMode} '${controlledProp}' property to be ${modeNow}. ` +\n `This is not supported. Properties should not switch from ${initialMode} to ${modeNow} (or vice versa). ` +\n `Decide between using a controlled or uncontrolled mode for the lifetime of the component. ` +\n `More info: https://fb.me/react-controlled-components`\n );\n }\n }, [isControlled, controlledProp, componentName, controlledValue]);\n }\n\n // This is the value that is used if the component is uncontrolled.\n const [valueState, setValue] = React.useState(defaultValue);\n const [valueHasBeenSet, setValueHasBeenSet] = React.useState(false);\n\n // We track changes to the defaultValue\n const currentUncontrolledValue = valueHasBeenSet ? valueState : defaultValue;\n\n const setUncontrolledValue = React.useCallback(\n (newValue: React.SetStateAction<ValueType>) => {\n setValue(newValue);\n setValueHasBeenSet(true);\n },\n [setValue, setValueHasBeenSet]\n );\n\n if (isControlled) {\n return [controlledValue, defaultCallback] as const;\n } else {\n return [currentUncontrolledValue, setUncontrolledValue] as const;\n }\n}\n\nfunction defaultCallback() {\n return void 0;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-controllable/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAQzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,eAAe,CAC7B,eAA0B,EAC1B,OAAkD,EAClD,YAAuB,EACvB,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAuB;IAErE,+HAA+H;IAC/H,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,IAAI,aAAa,EAAE;QACjB,sFAAsF;QAEtF,sDAAsD;QACtD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,IAAI,YAAY,IAAI,OAAO,KAAK,SAAS,EAAE;gBACzC,QAAQ,CACN,aAAa,EACb,oBAAoB,cAAc,wBAAwB,aAAa,2DAA2D,CACnI,CA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AO,CAAC,eAAe,EAAE,eAAe,CAAU,CAAC;KACpD;SAAM;QACL,OAAO,CAAC,wBAAwB,EAAE,oBAAoB,CAAU,CAAC;KAClE;AACH,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,KAAK,CAAC,CAAC;AAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport * as React from 'react';\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\ninterface PropertyDescription {\n componentName: string;\n controlledProp: string;\n changeHandler: string;\n}\n\n/**\n * This hook allows you to make a component that can be used both in controlled mode and uncontrolled mode.\n * Pass in your component's props, and then implement your component as if it was only controlled.\n * When calling onChange callbacks (or the equivalent for your property), you need to call both the callback returned by this function\n * as well as the callback provided in your component's props.\n *\n * A component determines its mode (either controlled or uncontrolled) on the first render and keeps it for its lifetime. The mode cannot\n * be switched later.\n *\n *\n * Example usage:\n * ```jsx\n * const [checked, setChecked] = useControllable(\n * props,\n * props.defaultEnabled ?? false,\n * {\n * componentName: 'MyCheckboxComponent',\n * controlledProp: 'enabled',\n * changeHandler: 'onCheckedStatusChange'\n * }\n * )\n *\n * return\n * <input\n * type=\"checkbox\"\n * checked={checked}\n * onChange={event => {\n * setChecked(event.target.checked);\n * fireNonCancelableEvent(props.onCheckedStatusChange, { checked: event.target.checked })\n * }} />\n * ```\n *\n * @param controlledValue value for the controlled mode\n * @param handler update handler for controlled mode\n * @param defaultValue initial value for uncontrolled mode\n * @param description property metadata\n */\nexport function useControllable<ValueType>(\n controlledValue: ValueType,\n handler: ((...args: any[]) => unknown) | undefined,\n defaultValue: ValueType,\n { componentName, changeHandler, controlledProp }: PropertyDescription\n) {\n // The decision whether a component is controlled or uncontrolled is made on its first render and cannot be changed afterwards.\n const isControlled = React.useState(controlledValue !== undefined)[0];\n\n if (isDevelopment) {\n // Print a warning if the component switches between controlled and uncontrolled mode.\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isControlled && handler === undefined) {\n warnOnce(\n componentName,\n `You provided a \\`${controlledProp}\\` prop without an \\`${changeHandler}\\` handler. This will render a non-interactive component.`\n );\n }\n }, [handler, isControlled, componentName, changeHandler, controlledProp]);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const isControlledNow = controlledValue !== undefined;\n if (isControlled !== isControlledNow) {\n const initialMode = isControlled ? 'controlled' : 'uncontrolled';\n const modeNow = isControlledNow ? 'controlled' : 'uncontrolled';\n warnOnce(\n componentName,\n `A component tried to change ${initialMode} '${controlledProp}' property to be ${modeNow}. ` +\n `This is not supported. Properties should not switch from ${initialMode} to ${modeNow} (or vice versa). ` +\n `Decide between using a controlled or uncontrolled mode for the lifetime of the component. ` +\n `More info: https://fb.me/react-controlled-components`\n );\n }\n }, [isControlled, controlledProp, componentName, controlledValue]);\n }\n\n // This is the value that is used if the component is uncontrolled.\n const [valueState, setValue] = React.useState(defaultValue);\n const [valueHasBeenSet, setValueHasBeenSet] = React.useState(false);\n\n // We track changes to the defaultValue\n const currentUncontrolledValue = valueHasBeenSet ? valueState : defaultValue;\n\n const setUncontrolledValue = React.useCallback(\n (newValue: React.SetStateAction<ValueType>) => {\n setValue(newValue);\n setValueHasBeenSet(true);\n },\n [setValue, setValueHasBeenSet]\n );\n\n if (isControlled) {\n return [controlledValue, defaultCallback] as const;\n } else {\n return [currentUncontrolledValue, setUncontrolledValue] as const;\n }\n}\n\nfunction defaultCallback() {\n return void 0;\n}\n"]}
@@ -6,7 +6,7 @@ import { isMotionDisabled } from '../../motion';
6
6
  import { findUpUntil } from '../../utils/dom';
7
7
  import { useMutationObserver } from '../use-mutation-observer';
8
8
  import { isDevelopment } from '../../is-development';
9
- import { warnOnce } from '../../logging';
9
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
10
10
  // Note that this hook doesn't take into consideration @media print (unlike the dark mode CSS),
11
11
  // due to challenges with cross-browser implementations of media/print state change listeners.
12
12
  // This means that components using this hook will render in dark mode even when printing.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-visual-mode/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,+FAA+F;AAC/F,8FAA8F;AAC9F,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,UAAwC;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAmB,OAAO,CAAC,CAAC;IAC9D,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;QACrC,MAAM,cAAc,GAAG,WAAW,CAChC,IAAI,EACJ,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CACzG,CAAC;QACF,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAwC;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAA4B,aAAa,CAAC,CAAC;IAC7E,mBAAmB,CAAC,U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mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;QACrC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState } from 'react';\nimport { ALWAYS_VISUAL_REFRESH } from '../../environment';\nimport { isMotionDisabled } from '../../motion';\nimport { findUpUntil } from '../../utils/dom';\nimport { useMutationObserver } from '../use-mutation-observer';\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '../../logging';\n\n// Note that this hook doesn't take into consideration @media print (unlike the dark mode CSS),\n// due to challenges with cross-browser implementations of media/print state change listeners.\n// This means that components using this hook will render in dark mode even when printing.\nexport function useCurrentMode(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState<'light' | 'dark'>('light');\n useMutationObserver(elementRef, node => {\n const darkModeParent = findUpUntil(\n node,\n node => node.classList.contains('awsui-polaris-dark-mode') || node.classList.contains('awsui-dark-mode')\n );\n setValue(darkModeParent ? 'dark' : 'light');\n });\n return value;\n}\n\nexport function useDensityMode(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState<'comfortable' | 'compact'>('comfortable');\n useMutationObserver(elementRef, node => {\n const compactModeParent = findUpUntil(\n node,\n node => node.classList.contains('awsui-polaris-compact-mode') || node.classList.contains('awsui-compact-mode')\n );\n setValue(compactModeParent ? 'compact' : 'comfortable');\n });\n return value;\n}\n\nexport const useVisualRefresh = ALWAYS_VISUAL_REFRESH ? () => true : useVisualRefreshDynamic;\n\n// We expect VR is to be set only once and before the application is rendered.\nlet visualRefreshState: undefined | boolean = undefined;\n\n// for testing\nexport function clearVisualRefreshState() {\n visualRefreshState = undefined;\n}\n\nfunction detectVisualRefresh() {\n return typeof document !== 'undefined' && !!document.querySelector('.awsui-visual-refresh');\n}\n\nexport function useVisualRefreshDynamic() {\n if (visualRefreshState === undefined) {\n visualRefreshState = detectVisualRefresh();\n }\n if (isDevelopment) {\n const newVisualRefreshState = detectVisualRefresh();\n if (newVisualRefreshState !== visualRefreshState) {\n warnOnce(\n 'Visual Refresh',\n 'Dynamic visual refresh change detected. This is not supported. ' +\n 'Make sure `awsui-visual-refresh` is attached to the `<body>` element before initial React render'\n );\n }\n }\n return visualRefreshState;\n}\n\nexport function useReducedMotion(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState(false);\n useMutationObserver(elementRef, node => {\n setValue(isMotionDisabled(node));\n });\n return value;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-visual-mode/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,+FAA+F;AAC/F,8FAA8F;AAC9F,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,UAAwC;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAmB,OAAO,CAAC,CAAC;IAC9D,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;QACrC,MAAM,cAAc,GAAG,WAAW,CAChC,IAAI,EACJ,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,QAA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qBAAqB,GAAG,mBAAmB,EAAE,CAAC;QACpD,IAAI,qBAAqB,KAAK,kBAAkB,EAAE;YAChD,QAAQ,CACN,gBAAgB,EAChB,iEAAiE;gBAC/D,kGAAkG,CACrG,CAAC;SACH;KACF;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,UAAwC;IACvE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;QACrC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState } from 'react';\nimport { ALWAYS_VISUAL_REFRESH } from '../../environment';\nimport { isMotionDisabled } from '../../motion';\nimport { findUpUntil } from '../../utils/dom';\nimport { useMutationObserver } from '../use-mutation-observer';\nimport { isDevelopment } from '../../is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\n// Note that this hook doesn't take into consideration @media print (unlike the dark mode CSS),\n// due to challenges with cross-browser implementations of media/print state change listeners.\n// This means that components using this hook will render in dark mode even when printing.\nexport function useCurrentMode(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState<'light' | 'dark'>('light');\n useMutationObserver(elementRef, node => {\n const darkModeParent = findUpUntil(\n node,\n node => node.classList.contains('awsui-polaris-dark-mode') || node.classList.contains('awsui-dark-mode')\n );\n setValue(darkModeParent ? 'dark' : 'light');\n });\n return value;\n}\n\nexport function useDensityMode(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState<'comfortable' | 'compact'>('comfortable');\n useMutationObserver(elementRef, node => {\n const compactModeParent = findUpUntil(\n node,\n node => node.classList.contains('awsui-polaris-compact-mode') || node.classList.contains('awsui-compact-mode')\n );\n setValue(compactModeParent ? 'compact' : 'comfortable');\n });\n return value;\n}\n\nexport const useVisualRefresh = ALWAYS_VISUAL_REFRESH ? () => true : useVisualRefreshDynamic;\n\n// We expect VR is to be set only once and before the application is rendered.\nlet visualRefreshState: undefined | boolean = undefined;\n\n// for testing\nexport function clearVisualRefreshState() {\n visualRefreshState = undefined;\n}\n\nfunction detectVisualRefresh() {\n return typeof document !== 'undefined' && !!document.querySelector('.awsui-visual-refresh');\n}\n\nexport function useVisualRefreshDynamic() {\n if (visualRefreshState === undefined) {\n visualRefreshState = detectVisualRefresh();\n }\n if (isDevelopment) {\n const newVisualRefreshState = detectVisualRefresh();\n if (newVisualRefreshState !== visualRefreshState) {\n warnOnce(\n 'Visual Refresh',\n 'Dynamic visual refresh change detected. This is not supported. ' +\n 'Make sure `awsui-visual-refresh` is attached to the `<body>` element before initial React render'\n );\n }\n }\n return visualRefreshState;\n}\n\nexport function useReducedMotion(elementRef: React.RefObject<HTMLElement>) {\n const [value, setValue] = useState(false);\n useMutationObserver(elementRef, node => {\n setValue(isMotionDisabled(node));\n });\n return value;\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "6c67b6e5142dfa4b6ec421b0d5f53d8fd011c0fc"
2
+ "commit": "3635d7aab926d6d7d9bb4d66eadbcdb4d705d3dc"
3
3
  }
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { warnOnce } from '../logging';
3
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
4
4
  const allowedJavascriptUrls = ['javascript:void(0)', 'javascript:void(0);', 'javascript:;'];
5
5
  export function checkSafeUrl(component, url) {
6
6
  if (!url) {
@@ -1 +1 @@
1
- {"version":3,"file":"check-safe-url.js","sourceRoot":"lib/default/","sources":["internal/utils/check-safe-url.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,qBAAqB,GAAG,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,CAAC,CAAC;AAE5F,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,GAA8B;IAC5E,IAAI,CAAC,GAAG,EAAE;QACR,OAAO;KACR;IACD,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE;QAC3D,OAAO;KACR;IAED,IAAI,SAAc,CAAC;IACnB,IAAI;QACF,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;KAC1B;IAAC,OAAO,CAAC,EAAE;QACV,uFAAuF;QACvF,OAAO;KACR;IAED,IAAI,SAAS,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC,QAAQ,CAAC,SAAS,EAAE,wEAAwE,GAAG,IAAI,CAAC,CAAC;QACrG,sDAAsD;QACtD,mIAAmI;QACnI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;IAED,OAAO;AACT,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { warnOnce } from '../logging';\n\nconst allowedJavascriptUrls = ['javascript:void(0)', 'javascript:void(0);', 'javascript:;'];\n\nexport function checkSafeUrl(component: string, url: string | undefined | null): void {\n if (!url) {\n return;\n }\n if (allowedJavascriptUrls.indexOf(url.toLowerCase()) !== -1) {\n return;\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (e) {\n // If the URL cannot be parsed by the browser, it likely does not pose a security risk.\n return;\n }\n\n if (parsedUrl.protocol === 'javascript:') {\n warnOnce(component, `A javascript: URL was blocked as a security precaution. The URL was \"${url}\".`);\n // This mirrors the error message that React will use:\n // https://github.com/facebook/react/blob/a724a3b578dce77d427bef313102a4d0e978d9b4/packages/react-dom/src/shared/sanitizeURL.js#L30\n throw new Error(`A javascript: URL was blocked as a security precaution.`);\n }\n\n return;\n}\n"]}
1
+ {"version":3,"file":"check-safe-url.js","sourceRoot":"lib/default/","sources":["internal/utils/check-safe-url.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,MAAM,qBAAqB,GAAG,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,CAAC,CAAC;AAE5F,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,GAA8B;IAC5E,IAAI,CAAC,GAAG,EAAE;QACR,OAAO;KACR;IACD,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE;QAC3D,OAAO;KACR;IAED,IAAI,SAAc,CAAC;IACnB,IAAI;QACF,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;KAC1B;IAAC,OAAO,CAAC,EAAE;QACV,uFAAuF;QACvF,OAAO;KACR;IAED,IAAI,SAAS,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC,QAAQ,CAAC,SAAS,EAAE,wEAAwE,GAAG,IAAI,CAAC,CAAC;QACrG,sDAAsD;QACtD,mIAAmI;QACnI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;IAED,OAAO;AACT,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nconst allowedJavascriptUrls = ['javascript:void(0)', 'javascript:void(0);', 'javascript:;'];\n\nexport function checkSafeUrl(component: string, url: string | undefined | null): void {\n if (!url) {\n return;\n }\n if (allowedJavascriptUrls.indexOf(url.toLowerCase()) !== -1) {\n return;\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (e) {\n // If the URL cannot be parsed by the browser, it likely does not pose a security risk.\n return;\n }\n\n if (parsedUrl.protocol === 'javascript:') {\n warnOnce(component, `A javascript: URL was blocked as a security precaution. The URL was \"${url}\".`);\n // This mirrors the error message that React will use:\n // https://github.com/facebook/react/blob/a724a3b578dce77d427bef313102a4d0e978d9b4/packages/react-dom/src/shared/sanitizeURL.js#L30\n throw new Error(`A javascript: URL was blocked as a security precaution.`);\n }\n\n return;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { warnOnce } from '../../logging';
3
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
4
4
  import { mergeLocales } from './merge-locales';
5
5
  export function normalizeLocale(component, locale) {
6
6
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-locale.js","sourceRoot":"lib/default/","sources":["internal/utils/locale/normalize-locale.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,MAAqB;;IACtE,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACxC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAI,MAAM,EAAE;QACV,OAAO,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KAC5C;IACD,MAAM,UAAU,GAAG,WAAW,CAAC,SAAS,EAAE,MAAA,cAAc,EAAE,0CAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAClF,IAAI,UAAU,EAAE;QACd,OAAO,YAAY,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;KAChD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS,WAAW,CAAC,SAAiB,EAAE,MAAiC;IACvE,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,EAAE,EAAE;QAC5B,OAAO,EAAE,CAAC;KACX;IAED,uCAAuC;IACvC,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACzD,6CAA6C;IAC7C,kCAAkC;IAClC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE;QACrD,QAAQ,CAAC,SAAS,EAAE,4BAA4B,MAAM,2BAA2B,CAAC,CAAC;QACnF,MAAM,GAAG,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjF,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { warnOnce } from '../../logging';\nimport { mergeLocales } from './merge-locales';\n\nexport function normalizeLocale(component: string, locale: string | null): string {\n locale = checkLocale(component, locale);\n const browserLocale = getBrowserLocale();\n if (locale) {\n return mergeLocales(locale, browserLocale);\n }\n const htmlLocale = checkLocale(component, getHtmlElement()?.getAttribute('lang'));\n if (htmlLocale) {\n return mergeLocales(htmlLocale, browserLocale);\n }\n return browserLocale;\n}\n\nfunction checkLocale(component: string, locale: string | null | undefined): string {\n if (!locale || locale === '') {\n return '';\n }\n\n // Support underscore-delimited locales\n locale = locale && locale.replace(/^([a-z]{2})_/, '$1-');\n // Check that the value matches aa-BB pattern\n // TODO: support full BCP 47 spec?\n if (locale && !locale.match(/^[a-z]{2}(-[A-Z]{2})?$/)) {\n warnOnce(component, `Invalid locale provided: ${locale}. Falling back to default`);\n locale = '';\n }\n return locale;\n}\n\nfunction getHtmlElement() {\n return typeof document !== 'undefined' ? document.querySelector('html') : null;\n}\n\nfunction getBrowserLocale() {\n return new Intl.DateTimeFormat().resolvedOptions().locale;\n}\n"]}
1
+ {"version":3,"file":"normalize-locale.js","sourceRoot":"lib/default/","sources":["internal/utils/locale/normalize-locale.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,MAAqB;;IACtE,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACxC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAI,MAAM,EAAE;QACV,OAAO,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KAC5C;IACD,MAAM,UAAU,GAAG,WAAW,CAAC,SAAS,EAAE,MAAA,cAAc,EAAE,0CAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAClF,IAAI,UAAU,EAAE;QACd,OAAO,YAAY,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;KAChD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS,WAAW,CAAC,SAAiB,EAAE,MAAiC;IACvE,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,EAAE,EAAE;QAC5B,OAAO,EAAE,CAAC;KACX;IAED,uCAAuC;IACvC,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACzD,6CAA6C;IAC7C,kCAAkC;IAClC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE;QACrD,QAAQ,CAAC,SAAS,EAAE,4BAA4B,MAAM,2BAA2B,CAAC,CAAC;QACnF,MAAM,GAAG,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjF,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { mergeLocales } from './merge-locales';\n\nexport function normalizeLocale(component: string, locale: string | null): string {\n locale = checkLocale(component, locale);\n const browserLocale = getBrowserLocale();\n if (locale) {\n return mergeLocales(locale, browserLocale);\n }\n const htmlLocale = checkLocale(component, getHtmlElement()?.getAttribute('lang'));\n if (htmlLocale) {\n return mergeLocales(htmlLocale, browserLocale);\n }\n return browserLocale;\n}\n\nfunction checkLocale(component: string, locale: string | null | undefined): string {\n if (!locale || locale === '') {\n return '';\n }\n\n // Support underscore-delimited locales\n locale = locale && locale.replace(/^([a-z]{2})_/, '$1-');\n // Check that the value matches aa-BB pattern\n // TODO: support full BCP 47 spec?\n if (locale && !locale.match(/^[a-z]{2}(-[A-Z]{2})?$/)) {\n warnOnce(component, `Invalid locale provided: ${locale}. Falling back to default`);\n locale = '';\n }\n return locale;\n}\n\nfunction getHtmlElement() {\n return typeof document !== 'undefined' ? document.querySelector('html') : null;\n}\n\nfunction getBrowserLocale() {\n return new Intl.DateTimeFormat().resolvedOptions().locale;\n}\n"]}
@@ -9,7 +9,7 @@ import InternalBox from '../box/internal';
9
9
  import ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';
10
10
  import { useControllable } from '../internal/hooks/use-controllable';
11
11
  import { usePrevious } from '../internal/hooks/use-previous';
12
- import { warnOnce } from '../internal/logging';
12
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
13
13
  import InternalChartFilters from './chart-filters';
14
14
  import InternalChartLegend from './chart-legend';
15
15
  import ChartContainer from './chart-container';
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["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,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,oBAAoB,EAAE,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,oBAAoB,MAAM,iBAAiB,CAAC;AACnD,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,eAAe,MAAM,sDAAsD,CAAC;AACnF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,wBAAwB,MAAM,+CAA+C,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAu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,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAC3C,cAAc,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAC3C,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,YAAY,GAC9B,CACH,CACG;QAEL,UAAU,IAAI,CACb,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YAC/B,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,CACU,CACf,CACG,CACP,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 { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport InternalBox from '../box/internal';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { warnOnce } from '../internal/logging';\n\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport InternalChartFilters from './chart-filters';\nimport InternalChartLegend from './chart-legend';\nimport ChartContainer from './chart-container';\nimport cartesianStyles from '../internal/components/cartesian-chart/styles.css.js';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { ScaledPoint } from './make-scaled-series';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { nodeContains } from '../internal/utils/dom';\nimport { SomeRequired } from '../internal/types';\nimport { isXThreshold, isYThreshold } from './utils';\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 height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\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 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 && !nodeContains(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 return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={mergedRef} onBlur={onBlur}>\n {showFilters && (\n <InternalBox className={cartesianStyles['filter-container']} margin={{ bottom: 'l' }}>\n <InternalChartFilters\n series={series}\n visibleSeries={externalVisibleSeries || []}\n onChange={filterChange}\n i18nStrings={i18nStrings}\n hideFilter={hideFilter}\n additionalFilters={additionalFilters}\n />\n </InternalBox>\n )}\n\n <div\n className={clsx(styles.content, {\n [styles['content--reserve-filter']]: reserveFilterSpace,\n [styles['content--reserve-legend']]: reserveLegendSpace,\n })}\n style={{ minHeight: height }}\n >\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 {showChart && (\n <ChartContainer\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={i18nStrings?.xTickFormatter}\n 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 xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n plotContainerRef={containerRef}\n />\n )}\n </div>\n\n {showLegend && (\n <InternalBox margin={{ top: 'm' }}>\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 </InternalBox>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["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,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,oBAAoB,EAAE,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,oBAAoB,MAAM,iBAAiB,CAAC;AACnD,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,eAAe,MAAM,sDAAsD,CAAC;AACnF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,wBAAwB,MAAM,+CAA+C,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgBrD,MAAM,CAAC,O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,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAC3C,cAAc,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAC3C,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,YAAY,GAC9B,CACH,CACG;QAEL,UAAU,IAAI,CACb,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YAC/B,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,CACU,CACf,CACG,CACP,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 { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport InternalBox from '../box/internal';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport InternalChartFilters from './chart-filters';\nimport InternalChartLegend from './chart-legend';\nimport ChartContainer from './chart-container';\nimport cartesianStyles from '../internal/components/cartesian-chart/styles.css.js';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { ScaledPoint } from './make-scaled-series';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { nodeContains } from '../internal/utils/dom';\nimport { SomeRequired } from '../internal/types';\nimport { isXThreshold, isYThreshold } from './utils';\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 height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\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 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 && !nodeContains(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 return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={mergedRef} onBlur={onBlur}>\n {showFilters && (\n <InternalBox className={cartesianStyles['filter-container']} margin={{ bottom: 'l' }}>\n <InternalChartFilters\n series={series}\n visibleSeries={externalVisibleSeries || []}\n onChange={filterChange}\n i18nStrings={i18nStrings}\n hideFilter={hideFilter}\n additionalFilters={additionalFilters}\n />\n </InternalBox>\n )}\n\n <div\n className={clsx(styles.content, {\n [styles['content--reserve-filter']]: reserveFilterSpace,\n [styles['content--reserve-legend']]: reserveLegendSpace,\n })}\n style={{ minHeight: height }}\n >\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 {showChart && (\n <ChartContainer\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={i18nStrings?.xTickFormatter}\n 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 xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n plotContainerRef={containerRef}\n />\n )}\n </div>\n\n {showLegend && (\n <InternalBox margin={{ top: 'm' }}>\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 </InternalBox>\n )}\n </div>\n );\n}\n"]}
package/package.json CHANGED
@@ -136,7 +136,7 @@
136
136
  "./internal/base-component/index.js",
137
137
  "./internal/base-component/styles.css.js"
138
138
  ],
139
- "version": "3.0.313",
139
+ "version": "3.0.315",
140
140
  "repository": {
141
141
  "type": "git",
142
142
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,32 +1,32 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "segment__path": "awsui_segment__path_1edmh_18i6p_97",
5
- "segment": "awsui_segment_1edmh_18i6p_97",
6
- "segment__hover": "awsui_segment__hover_1edmh_18i6p_124",
7
- "label": "awsui_label_1edmh_18i6p_138",
8
- "root": "awsui_root_1edmh_18i6p_156",
9
- "filter-container": "awsui_filter-container_1edmh_18i6p_170",
10
- "has-default-filter": "awsui_has-default-filter_1edmh_18i6p_174",
11
- "content": "awsui_content_1edmh_18i6p_178",
12
- "content--small": "awsui_content--small_1edmh_18i6p_184",
13
- "content--without-labels": "awsui_content--without-labels_1edmh_18i6p_187",
14
- "content--medium": "awsui_content--medium_1edmh_18i6p_190",
15
- "content--large": "awsui_content--large_1edmh_18i6p_196",
16
- "content--reserve-filter": "awsui_content--reserve-filter_1edmh_18i6p_202",
17
- "content--reserve-legend": "awsui_content--reserve-legend_1edmh_18i6p_205",
18
- "status-container": "awsui_status-container_1edmh_18i6p_209",
19
- "chart-container": "awsui_chart-container_1edmh_18i6p_213",
20
- "inner-content": "awsui_inner-content_1edmh_18i6p_218",
21
- "segment__highlight": "awsui_segment__highlight_1edmh_18i6p_232",
22
- "segment--dimmed": "awsui_segment--dimmed_1edmh_18i6p_247",
23
- "segment--highlighted": "awsui_segment--highlighted_1edmh_18i6p_250",
24
- "label--dimmed": "awsui_label--dimmed_1edmh_18i6p_267",
25
- "label--align-right": "awsui_label--align-right_1edmh_18i6p_270",
26
- "label-text": "awsui_label-text_1edmh_18i6p_278",
27
- "label__description": "awsui_label__description_1edmh_18i6p_286",
28
- "label-line": "awsui_label-line_1edmh_18i6p_293",
29
- "label--highlighted": "awsui_label--highlighted_1edmh_18i6p_297",
30
- "popover-header": "awsui_popover-header_1edmh_18i6p_301"
4
+ "segment__path": "awsui_segment__path_1edmh_360wr_97",
5
+ "segment": "awsui_segment_1edmh_360wr_97",
6
+ "segment__hover": "awsui_segment__hover_1edmh_360wr_124",
7
+ "label": "awsui_label_1edmh_360wr_138",
8
+ "root": "awsui_root_1edmh_360wr_156",
9
+ "filter-container": "awsui_filter-container_1edmh_360wr_170",
10
+ "has-default-filter": "awsui_has-default-filter_1edmh_360wr_174",
11
+ "content": "awsui_content_1edmh_360wr_178",
12
+ "content--small": "awsui_content--small_1edmh_360wr_184",
13
+ "content--without-labels": "awsui_content--without-labels_1edmh_360wr_187",
14
+ "content--medium": "awsui_content--medium_1edmh_360wr_190",
15
+ "content--large": "awsui_content--large_1edmh_360wr_196",
16
+ "content--reserve-filter": "awsui_content--reserve-filter_1edmh_360wr_202",
17
+ "content--reserve-legend": "awsui_content--reserve-legend_1edmh_360wr_205",
18
+ "status-container": "awsui_status-container_1edmh_360wr_209",
19
+ "chart-container": "awsui_chart-container_1edmh_360wr_213",
20
+ "inner-content": "awsui_inner-content_1edmh_360wr_218",
21
+ "segment__highlight": "awsui_segment__highlight_1edmh_360wr_232",
22
+ "segment--dimmed": "awsui_segment--dimmed_1edmh_360wr_247",
23
+ "segment--highlighted": "awsui_segment--highlighted_1edmh_360wr_250",
24
+ "label--dimmed": "awsui_label--dimmed_1edmh_360wr_267",
25
+ "label--align-right": "awsui_label--align-right_1edmh_360wr_270",
26
+ "label-text": "awsui_label-text_1edmh_360wr_278",
27
+ "label__description": "awsui_label__description_1edmh_360wr_286",
28
+ "label-line": "awsui_label-line_1edmh_360wr_293",
29
+ "label--highlighted": "awsui_label--highlighted_1edmh_360wr_297",
30
+ "popover-header": "awsui_popover-header_1edmh_360wr_301"
31
31
  };
32
32