@cloudscape-design/components 3.0.799 → 3.0.800

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 (109) hide show
  1. package/attribute-editor/additional-info.js +2 -2
  2. package/attribute-editor/additional-info.js.map +1 -1
  3. package/attribute-editor/internal.d.ts.map +1 -1
  4. package/attribute-editor/internal.js +2 -2
  5. package/attribute-editor/internal.js.map +1 -1
  6. package/button/internal.d.ts.map +1 -1
  7. package/button/internal.js +3 -3
  8. package/button/internal.js.map +1 -1
  9. package/button-group/icon-button-item.d.ts.map +1 -1
  10. package/button-group/icon-button-item.js +3 -2
  11. package/button-group/icon-button-item.js.map +1 -1
  12. package/cards/index.js +3 -3
  13. package/cards/index.js.map +1 -1
  14. package/code-editor/index.d.ts.map +1 -1
  15. package/code-editor/index.js +2 -2
  16. package/code-editor/index.js.map +1 -1
  17. package/code-editor/status-bar.js +2 -2
  18. package/code-editor/status-bar.js.map +1 -1
  19. package/date-picker/index.js +2 -2
  20. package/date-picker/index.js.map +1 -1
  21. package/date-range-picker/calendar/header/index.js +2 -2
  22. package/date-range-picker/calendar/header/index.js.map +1 -1
  23. package/date-range-picker/calendar/index.d.ts.map +1 -1
  24. package/date-range-picker/calendar/index.js +2 -2
  25. package/date-range-picker/calendar/index.js.map +1 -1
  26. package/date-range-picker/dropdown.d.ts.map +1 -1
  27. package/date-range-picker/dropdown.js +2 -2
  28. package/date-range-picker/dropdown.js.map +1 -1
  29. package/drawer/implementation.d.ts.map +1 -1
  30. package/drawer/implementation.js +2 -2
  31. package/drawer/implementation.js.map +1 -1
  32. package/flashbar/flash.d.ts.map +1 -1
  33. package/flashbar/flash.js +2 -2
  34. package/flashbar/flash.js.map +1 -1
  35. package/form/internal.js +2 -2
  36. package/form/internal.js.map +1 -1
  37. package/form-field/internal.js +3 -3
  38. package/form-field/internal.js.map +1 -1
  39. package/help-panel/implementation.js +2 -2
  40. package/help-panel/implementation.js.map +1 -1
  41. package/internal/components/chart-plot/index.js +2 -2
  42. package/internal/components/chart-plot/index.js.map +1 -1
  43. package/internal/components/chart-status-container/index.d.ts.map +1 -1
  44. package/internal/components/chart-status-container/index.js +3 -1
  45. package/internal/components/chart-status-container/index.js.map +1 -1
  46. package/internal/components/dropdown-footer/index.d.ts.map +1 -1
  47. package/internal/components/dropdown-footer/index.js +2 -2
  48. package/internal/components/dropdown-footer/index.js.map +1 -1
  49. package/internal/components/live-region/controller.d.ts +35 -0
  50. package/internal/components/live-region/controller.d.ts.map +1 -0
  51. package/internal/components/live-region/controller.js +77 -0
  52. package/internal/components/live-region/controller.js.map +1 -0
  53. package/internal/components/live-region/index.d.ts +5 -64
  54. package/internal/components/live-region/index.d.ts.map +1 -1
  55. package/internal/components/live-region/index.js +11 -122
  56. package/internal/components/live-region/index.js.map +1 -1
  57. package/internal/components/live-region/interfaces.d.ts +34 -0
  58. package/internal/components/live-region/interfaces.d.ts.map +1 -0
  59. package/internal/components/live-region/interfaces.js +4 -0
  60. package/internal/components/live-region/interfaces.js.map +1 -0
  61. package/internal/components/live-region/internal.d.ts +31 -0
  62. package/internal/components/live-region/internal.d.ts.map +1 -0
  63. package/internal/components/live-region/internal.js +80 -0
  64. package/internal/components/live-region/internal.js.map +1 -0
  65. package/internal/components/live-region/styles.css.js +2 -2
  66. package/internal/components/live-region/styles.scoped.css +146 -4
  67. package/internal/components/live-region/styles.selectors.js +2 -2
  68. package/internal/environment.js +1 -1
  69. package/internal/environment.json +1 -1
  70. package/internal/manifest.json +1 -1
  71. package/package.json +1 -1
  72. package/pie-chart/pie-chart.js +2 -2
  73. package/pie-chart/pie-chart.js.map +1 -1
  74. package/progress-bar/index.js +2 -2
  75. package/progress-bar/index.js.map +1 -1
  76. package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
  77. package/s3-resource-selector/s3-in-context/index.js +2 -3
  78. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  79. package/s3-resource-selector/s3-modal/basic-table.js +2 -2
  80. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  81. package/select/parts/filter.d.ts +1 -1
  82. package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  83. package/table/body-cell/disabled-inline-editor.js +2 -1
  84. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  85. package/table/body-cell/index.d.ts.map +1 -1
  86. package/table/body-cell/index.js +2 -2
  87. package/table/body-cell/index.js.map +1 -1
  88. package/table/body-cell/inline-editor.d.ts.map +1 -1
  89. package/table/body-cell/inline-editor.js +4 -4
  90. package/table/body-cell/inline-editor.js.map +1 -1
  91. package/table/internal.js +2 -2
  92. package/table/internal.js.map +1 -1
  93. package/table/no-data-cell.js +2 -2
  94. package/table/no-data-cell.js.map +1 -1
  95. package/table/progressive-loading/items-loader.js +3 -3
  96. package/table/progressive-loading/items-loader.js.map +1 -1
  97. package/tag-editor/index.js +2 -2
  98. package/tag-editor/index.js.map +1 -1
  99. package/test-utils/dom/internal/live-region.d.ts +4 -0
  100. package/test-utils/dom/internal/live-region.js +11 -0
  101. package/test-utils/dom/internal/live-region.js.map +1 -0
  102. package/test-utils/selectors/internal/live-region.d.ts +4 -0
  103. package/test-utils/selectors/internal/live-region.js +11 -0
  104. package/test-utils/selectors/internal/live-region.js.map +1 -0
  105. package/test-utils/tsconfig.tsbuildinfo +1 -1
  106. package/text-filter/search-results.js +2 -2
  107. package/text-filter/search-results.js.map +1 -1
  108. package/tutorial-panel/components/tutorial-list/index.js +2 -2
  109. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
@@ -1,128 +1,17 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { __rest } from "tslib";
4
- /* eslint-disable @cloudscape-design/prefer-live-region */
5
- import React, { memo, useEffect, useRef } from 'react';
6
- import clsx from 'clsx';
7
- import ScreenreaderOnly from '../screenreader-only';
8
- import styles from './styles.css.js';
9
- /**
10
- * The live region is hidden in the layout, but visible for screen readers.
11
- * It's purpose it to announce changes e.g. when custom navigation logic is used.
12
- *
13
- * The way live region works differently in different browsers and screen readers and
14
- * it is recommended to manually test every new implementation.
15
- *
16
- * If you notice there are different words being merged together,
17
- * check if there are text nodes not being wrapped in elements, like:
18
- * ```
19
- * <LiveRegion>
20
- * {title}
21
- * <span><Details /></span>
22
- * </LiveRegion>
23
- * ```
24
- *
25
- * To fix, wrap "title" in an element:
26
- * ```
27
- * <LiveRegion>
28
- * <span>{title}</span>
29
- * <span><Details /></span>
30
- * </LiveRegion>
31
- * ```
32
- *
33
- * Or create a single text node if possible:
34
- * ```
35
- * <LiveRegion>
36
- * {`${title} ${details}`}
37
- * </LiveRegion>
38
- * ```
39
- *
40
- * The live region is always atomic, because non-atomic regions can be treated by screen readers
41
- * differently and produce unexpected results. To imitate non-atomic announcements simply use
42
- * multiple live regions:
43
- * ```
44
- * <>
45
- * <LiveRegion>{title}</LiveRegion>
46
- * <LiveRegion><Details /></LiveRegion>
47
- * </>
48
- * ```
49
- *
50
- * If you place interactive content inside the LiveRegion, the content will still be
51
- * interactive (e.g. as a tab stop). Consider using the `source` property instead.
52
- */
53
- export default memo(LiveRegion);
4
+ import React from 'react';
5
+ // import useBaseComponent from '../../hooks/use-base-component';
6
+ import { applyDisplayName } from '../../utils/apply-display-name';
7
+ import InternalLiveRegion from './internal';
54
8
  function LiveRegion(_a) {
55
- var { assertive = false, delay = 10, visible = false, tagName: TagName = 'span', children, id, source } = _a, restProps = __rest(_a, ["assertive", "delay", "visible", "tagName", "children", "id", "source"]);
56
- const sourceRef = useRef(null);
57
- const targetRef = useRef(null);
58
- /*
59
- When React state changes, React often produces too many DOM updates, causing NVDA to
60
- issue many announcements for the same logical event (See https://github.com/nvaccess/nvda/issues/7996).
61
-
62
- The code below imitates a debouncing, scheduling a callback every time new React state
63
- update is detected. When a callback resolves, it copies content from a muted element
64
- to the live region, which is recognized by screen readers as an update.
65
-
66
- If the use case requires no announcement to be ignored, use delay = 0, but ensure it
67
- does not impact the performance. If it does, prefer using a string as children prop.
68
- */
69
- useEffect(() => {
70
- function getSourceContent() {
71
- if (source) {
72
- return source
73
- .map(item => {
74
- if (!item) {
75
- return undefined;
76
- }
77
- if (typeof item === 'string') {
78
- return item;
79
- }
80
- if (item.current) {
81
- return extractInnerText(item.current);
82
- }
83
- })
84
- .filter(Boolean)
85
- .join(' ');
86
- }
87
- if (sourceRef.current) {
88
- return extractInnerText(sourceRef.current);
89
- }
90
- }
91
- function updateLiveRegion() {
92
- const sourceContent = getSourceContent();
93
- if (targetRef.current && sourceContent) {
94
- const targetContent = extractInnerText(targetRef.current);
95
- if (targetContent !== sourceContent) {
96
- // The aria-atomic does not work properly in Voice Over, causing
97
- // certain parts of the content to be ignored. To fix that,
98
- // we assign the source text content as a single node.
99
- targetRef.current.innerText = sourceContent;
100
- }
101
- }
102
- }
103
- let timeoutId;
104
- if (delay) {
105
- timeoutId = setTimeout(updateLiveRegion, delay);
106
- }
107
- else {
108
- updateLiveRegion();
109
- }
110
- return () => {
111
- if (timeoutId) {
112
- clearTimeout(timeoutId);
113
- }
114
- };
115
- });
116
- return (React.createElement(React.Fragment, null,
117
- visible && !source && (React.createElement(TagName, { ref: sourceRef, id: id, className: styles.source }, children)),
118
- React.createElement(ScreenreaderOnly, Object.assign({}, restProps, { className: clsx(styles.root, restProps.className) }),
119
- !visible && !source && (React.createElement(TagName, { ref: sourceRef, "aria-hidden": "true", className: styles.source }, children)),
120
- React.createElement("span", { ref: targetRef, "aria-atomic": "true", "aria-live": assertive ? 'assertive' : 'polite' }))));
121
- }
122
- // This only extracts text content from the node including all its children which is enough for now.
123
- // To make it more powerful, it is possible to create a more sophisticated extractor with respect to
124
- // ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.
125
- function extractInnerText(node) {
126
- return (node.innerText || '').replace(/\s+/g, ' ').trim();
9
+ var { assertive = false, hidden = false, tagName = 'div' } = _a, restProps = __rest(_a, ["assertive", "hidden", "tagName"]);
10
+ // TODO: Switch this out when moving this component out of internal
11
+ // const baseComponentProps = useBaseComponent('LiveRegion');
12
+ const baseComponentProps = { __internalRootRef: React.useRef() };
13
+ return (React.createElement(InternalLiveRegion, Object.assign({ assertive: assertive, hidden: hidden, tagName: tagName }, baseComponentProps, restProps)));
127
14
  }
15
+ applyDisplayName(LiveRegion, 'LiveRegion');
16
+ export default LiveRegion;
128
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,0DAA0D;AAE1D,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,gBAA2C,MAAM,sBAAsB,CAAC;AAE/E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAkBrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC;AAEhC,SAAS,UAAU,CAAC,EASF;QATE,EAClB,SAAS,GAAG,KAAK,EACjB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,KAAK,EACf,OAAO,EAAE,OAAO,GAAG,MAAM,EACzB,QAAQ,EACR,EAAE,EACF,MAAM,OAEU,EADb,SAAS,cARM,wEASnB,CADa;IAEZ,MAAM,SAAS,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAC;IAEjE;;;;;;;;;;MAUE;IACF,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,gBAAgB;YACvB,IAAI,MAAM,EAAE;gBACV,OAAO,MAAM;qBACV,GAAG,CAAC,IAAI,CAAC,EAAE;oBACV,IAAI,CAAC,IAAI,EAAE;wBACT,OAAO,SAAS,CAAC;qBAClB;o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AAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC;YAC/E,CAAC,OAAO,IAAI,CAAC,MAAM,IAAI,CACtB,oBAAC,OAAO,IAAC,GAAG,EAAE,SAAS,iBAAc,MAAM,EAAC,SAAS,EAAE,MAAM,CAAC,MAAM,IACjE,QAAQ,CACD,CACX;YAED,8BAAM,GAAG,EAAE,SAAS,iBAAc,MAAM,eAAY,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,GAAS,CAC9E,CAClB,CACJ,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,oGAAoG;AACpG,0FAA0F;AAC1F,SAAS,gBAAgB,CAAC,IAAiB;IACzC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @cloudscape-design/prefer-live-region */\n\nimport React, { memo, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport ScreenreaderOnly, { ScreenreaderOnlyProps } from '../screenreader-only';\n\nimport styles from './styles.css.js';\n\nexport interface LiveRegionProps extends ScreenreaderOnlyProps {\n assertive?: boolean;\n delay?: number;\n visible?: boolean;\n tagName?: 'span' | 'div';\n id?: string;\n /**\n * Use a list of strings and/or existing DOM elements for building the\n * announcement text. This avoids rendering separate content just for this\n * LiveRegion.\n *\n * If this property is set, the `children` will be ignored.\n */\n source?: Array<string | React.RefObject<HTMLElement> | undefined>;\n}\n\n/**\n * The live region is hidden in the layout, but visible for screen readers.\n * It's purpose it to announce changes e.g. when custom navigation logic is used.\n *\n * The way live region works differently in different browsers and screen readers and\n * it is recommended to manually test every new implementation.\n *\n * If you notice there are different words being merged together,\n * check if there are text nodes not being wrapped in elements, like:\n * ```\n * <LiveRegion>\n * {title}\n * <span><Details /></span>\n * </LiveRegion>\n * ```\n *\n * To fix, wrap \"title\" in an element:\n * ```\n * <LiveRegion>\n * <span>{title}</span>\n * <span><Details /></span>\n * </LiveRegion>\n * ```\n *\n * Or create a single text node if possible:\n * ```\n * <LiveRegion>\n * {`${title} ${details}`}\n * </LiveRegion>\n * ```\n *\n * The live region is always atomic, because non-atomic regions can be treated by screen readers\n * differently and produce unexpected results. To imitate non-atomic announcements simply use\n * multiple live regions:\n * ```\n * <>\n * <LiveRegion>{title}</LiveRegion>\n * <LiveRegion><Details /></LiveRegion>\n * </>\n * ```\n *\n * If you place interactive content inside the LiveRegion, the content will still be\n * interactive (e.g. as a tab stop). Consider using the `source` property instead.\n */\nexport default memo(LiveRegion);\n\nfunction LiveRegion({\n assertive = false,\n delay = 10,\n visible = false,\n tagName: TagName = 'span',\n children,\n id,\n source,\n ...restProps\n}: LiveRegionProps) {\n const sourceRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n const targetRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n\n /*\n When React state changes, React often produces too many DOM updates, causing NVDA to\n issue many announcements for the same logical event (See https://github.com/nvaccess/nvda/issues/7996).\n\n The code below imitates a debouncing, scheduling a callback every time new React state\n update is detected. When a callback resolves, it copies content from a muted element\n to the live region, which is recognized by screen readers as an update.\n\n If the use case requires no announcement to be ignored, use delay = 0, but ensure it\n does not impact the performance. If it does, prefer using a string as children prop.\n */\n useEffect(() => {\n function getSourceContent() {\n if (source) {\n return source\n .map(item => {\n if (!item) {\n return undefined;\n }\n if (typeof item === 'string') {\n return item;\n }\n if (item.current) {\n return extractInnerText(item.current);\n }\n })\n .filter(Boolean)\n .join(' ');\n }\n\n if (sourceRef.current) {\n return extractInnerText(sourceRef.current);\n }\n }\n function updateLiveRegion() {\n const sourceContent = getSourceContent();\n\n if (targetRef.current && sourceContent) {\n const targetContent = extractInnerText(targetRef.current);\n if (targetContent !== sourceContent) {\n // The aria-atomic does not work properly in Voice Over, causing\n // certain parts of the content to be ignored. To fix that,\n // we assign the source text content as a single node.\n targetRef.current.innerText = sourceContent;\n }\n }\n }\n\n let timeoutId: null | number;\n if (delay) {\n timeoutId = setTimeout(updateLiveRegion, delay);\n } else {\n updateLiveRegion();\n }\n\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n });\n\n return (\n <>\n {visible && !source && (\n <TagName ref={sourceRef} id={id} className={styles.source}>\n {children}\n </TagName>\n )}\n\n <ScreenreaderOnly {...restProps} className={clsx(styles.root, restProps.className)}>\n {!visible && !source && (\n <TagName ref={sourceRef} aria-hidden=\"true\" className={styles.source}>\n {children}\n </TagName>\n )}\n\n <span ref={targetRef} aria-atomic=\"true\" aria-live={assertive ? 'assertive' : 'polite'}></span>\n </ScreenreaderOnly>\n </>\n );\n}\n\n// This only extracts text content from the node including all its children which is enough for now.\n// To make it more powerful, it is possible to create a more sophisticated extractor with respect to\n// ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.\nfunction extractInnerText(node: HTMLElement) {\n return (node.innerText || '').replace(/\\s+/g, ' ').trim();\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,iEAAiE;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,kBAAkB,MAAM,YAAY,CAAC;AAI5C,SAAS,UAAU,CAAC,EAAqF;QAArF,EAAE,SAAS,GAAG,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,OAAiC,EAA5B,SAAS,cAAlE,kCAAoE,CAAF;IACpF,mEAAmE;IACnE,6DAA6D;IAC7D,MAAM,kBAAkB,GAAG,EAAE,iBAAiB,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;IAEjE,OAAO,CACL,oBAAC,kBAAkB,kBACjB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,IACZ,kBAAkB,EAClB,SAAS,EACb,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAE3C,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\n// import useBaseComponent from '../../hooks/use-base-component';\nimport { applyDisplayName } from '../../utils/apply-display-name';\nimport { LiveRegionProps } from './interfaces';\nimport InternalLiveRegion from './internal';\n\nexport { LiveRegionProps };\n\nfunction LiveRegion({ assertive = false, hidden = false, tagName = 'div', ...restProps }: LiveRegionProps) {\n // TODO: Switch this out when moving this component out of internal\n // const baseComponentProps = useBaseComponent('LiveRegion');\n const baseComponentProps = { __internalRootRef: React.useRef() };\n\n return (\n <InternalLiveRegion\n assertive={assertive}\n hidden={hidden}\n tagName={tagName}\n {...baseComponentProps}\n {...restProps}\n />\n );\n}\n\napplyDisplayName(LiveRegion, 'LiveRegion');\n\nexport default LiveRegion;\n"]}
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ import { BaseComponentProps } from '../../base-component';
3
+ export interface LiveRegionProps extends BaseComponentProps {
4
+ /**
5
+ * The string for the aria-live announcement text. When this content
6
+ * changes, the text will be re-announced to assistive technologies. If this
7
+ * property is provided, it will be used for the live announcement instead of
8
+ * the `children` slot.
9
+ */
10
+ message?: string;
11
+ /**
12
+ * Whether the announcements should be made using assertive aria-live.
13
+ * Assertive announcements interrupt the user's action, so they should only
14
+ * be used when absolutely necessary.
15
+ */
16
+ assertive?: boolean;
17
+ /**
18
+ * The tag name to use for the wrapper around the `children` slot.
19
+ */
20
+ tagName?: LiveRegionProps.TagName;
21
+ /**
22
+ * Defines whether to visually hide the contents of the `children` slot.
23
+ */
24
+ hidden?: boolean;
25
+ /**
26
+ * Use the rendered content as the source for the announcement text.
27
+ * Prefer `message` if announcement text can be provided as a string.
28
+ */
29
+ children?: React.ReactNode;
30
+ }
31
+ export declare namespace LiveRegionProps {
32
+ type TagName = 'span' | 'div';
33
+ }
34
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/interfaces.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,yBAAiB,eAAe,CAAC;IAC/B,KAAY,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;CACtC"}
@@ -0,0 +1,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export {};
4
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BaseComponentProps } from '../../base-component';\n\nexport interface LiveRegionProps extends BaseComponentProps {\n /**\n * The string for the aria-live announcement text. When this content\n * changes, the text will be re-announced to assistive technologies. If this\n * property is provided, it will be used for the live announcement instead of\n * the `children` slot.\n */\n message?: string;\n\n /**\n * Whether the announcements should be made using assertive aria-live.\n * Assertive announcements interrupt the user's action, so they should only\n * be used when absolutely necessary.\n */\n assertive?: boolean;\n\n /**\n * The tag name to use for the wrapper around the `children` slot.\n */\n tagName?: LiveRegionProps.TagName;\n\n /**\n * Defines whether to visually hide the contents of the `children` slot.\n */\n hidden?: boolean;\n\n /**\n * Use the rendered content as the source for the announcement text.\n * Prefer `message` if announcement text can be provided as a string.\n */\n children?: React.ReactNode;\n}\n\nexport namespace LiveRegionProps {\n export type TagName = 'span' | 'div';\n}\n"]}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { InternalBaseComponentProps } from '../../hooks/use-base-component';
3
+ import { LiveRegionProps } from './interfaces';
4
+ export interface InternalLiveRegionProps extends InternalBaseComponentProps, LiveRegionProps {
5
+ /**
6
+ * The delay between each announcement from this live region. You should
7
+ * leave this set to the default unless this live region is commonly
8
+ * interrupted by other actions (like text entry in text filtering).
9
+ */
10
+ delay?: number;
11
+ /**
12
+ * Use a list of strings and/or refs to existing elements for building the
13
+ * announcement text. If this property is set, `children` and `message` will
14
+ * be ignored.
15
+ */
16
+ sources?: ReadonlyArray<string | React.RefObject<HTMLElement> | undefined>;
17
+ }
18
+ export interface InternalLiveRegionRef {
19
+ /**
20
+ * Force the live region to announce the message, even if it's the same as
21
+ * the previously announced message.
22
+ *
23
+ * This is useful when making status updates after a change (e.g. filtering)
24
+ * where the new message might be the same as the old one, but the announcement
25
+ * also serves to tell screen reader users that the action was performed.
26
+ */
27
+ reannounce(): void;
28
+ }
29
+ declare const _default: React.ForwardRefExoticComponent<InternalLiveRegionProps & React.RefAttributes<InternalLiveRegionRef>>;
30
+ export default _default;
31
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B,EAAE,eAAe;IAC1F;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB;;AAED,wBAsEG"}
@@ -0,0 +1,80 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { __rest } from "tslib";
4
+ import React, { useEffect, useImperativeHandle, useRef } from 'react';
5
+ import clsx from 'clsx';
6
+ import { getBaseProps } from '../../base-component';
7
+ import { useMergeRefs } from '../../hooks/use-merge-refs';
8
+ import { LiveRegionController } from './controller';
9
+ import styles from './styles.css.js';
10
+ export default React.forwardRef(function InternalLiveRegion(_a, ref) {
11
+ var { assertive = false, hidden = false, tagName: TagName = 'div', delay, sources, message, children, __internalRootRef, className } = _a, restProps = __rest(_a, ["assertive", "hidden", "tagName", "delay", "sources", "message", "children", "__internalRootRef", "className"]);
12
+ const baseProps = getBaseProps(restProps);
13
+ const childrenRef = useRef(null);
14
+ const mergedRef = useMergeRefs(childrenRef, __internalRootRef);
15
+ useEffect(() => {
16
+ // We have to do this because `inert` isn't properly supported until
17
+ // React 19 and this seems much more maintainable than version detection.
18
+ // `inert` is better than `hidden` because it also blocks pointer and
19
+ // focus events as well as hiding the contents from screen readers.
20
+ // https://github.com/facebook/react/issues/17157
21
+ if (childrenRef.current) {
22
+ childrenRef.current.inert = hidden;
23
+ }
24
+ }, [hidden]);
25
+ // Initialize the live region controller inside an effect. We have to do this
26
+ // because the controller depends on DOM elements, which aren't available on the
27
+ // server.
28
+ const liveRegionControllerRef = useRef();
29
+ useEffect(() => {
30
+ const liveRegionController = new LiveRegionController(assertive ? 'assertive' : 'polite');
31
+ liveRegionControllerRef.current = liveRegionController;
32
+ return () => {
33
+ liveRegionController.destroy();
34
+ liveRegionControllerRef.current = undefined;
35
+ };
36
+ }, [assertive]);
37
+ const getContent = () => {
38
+ return sources
39
+ ? getSourceContent(sources)
40
+ : message
41
+ ? message
42
+ : childrenRef.current
43
+ ? extractTextContent(childrenRef.current)
44
+ : undefined;
45
+ };
46
+ // Call the controller on every render. The controller will deduplicate the
47
+ // message against the previous announcement internally.
48
+ useEffect(() => {
49
+ var _a;
50
+ (_a = liveRegionControllerRef.current) === null || _a === void 0 ? void 0 : _a.announce({ message: getContent(), delay });
51
+ });
52
+ useImperativeHandle(ref, () => ({
53
+ reannounce() {
54
+ var _a;
55
+ (_a = liveRegionControllerRef.current) === null || _a === void 0 ? void 0 : _a.announce({ message: getContent(), delay, forceReannounce: true });
56
+ },
57
+ }));
58
+ return (React.createElement(TagName, Object.assign({ ref: mergedRef }, baseProps, { className: clsx(styles.root, className), hidden: hidden }), children));
59
+ });
60
+ function extractTextContent(node) {
61
+ // We use the text content of the node as the announcement text.
62
+ // This only extracts text content from the node including all its children which is enough for now.
63
+ // To make it more powerful, it is possible to create a more sophisticated extractor with respect to
64
+ // ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.
65
+ return (node.textContent || '').replace(/\s+/g, ' ').trim();
66
+ }
67
+ function getSourceContent(source) {
68
+ return source
69
+ .map(item => {
70
+ if (!item || typeof item === 'string') {
71
+ return item;
72
+ }
73
+ if (item.current) {
74
+ return extractTextContent(item.current);
75
+ }
76
+ })
77
+ .filter(Boolean)
78
+ .join(' ');
79
+ }
80
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../../src/internal/components/live-region/internal.t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;AAEH,SAAS,kBAAkB,CAAC,IAAiB;IAC3C,gEAAgE;IAChE,oGAAoG;IACpG,oGAAoG;IACpG,0FAA0F;IAC1F,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAwE;IAChG,OAAO,MAAM;SACV,GAAG,CAAC,IAAI,CAAC,EAAE;QACV,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACrC,OAAO,IAAI,CAAC;SACb;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACzC;IACH,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../../base-component';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport { LiveRegionController } from './controller';\nimport { LiveRegionProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalLiveRegionProps extends InternalBaseComponentProps, LiveRegionProps {\n /**\n * The delay between each announcement from this live region. You should\n * leave this set to the default unless this live region is commonly\n * interrupted by other actions (like text entry in text filtering).\n */\n delay?: number;\n\n /**\n * Use a list of strings and/or refs to existing elements for building the\n * announcement text. If this property is set, `children` and `message` will\n * be ignored.\n */\n sources?: ReadonlyArray<string | React.RefObject<HTMLElement> | undefined>;\n}\n\nexport interface InternalLiveRegionRef {\n /**\n * Force the live region to announce the message, even if it's the same as\n * the previously announced message.\n *\n * This is useful when making status updates after a change (e.g. filtering)\n * where the new message might be the same as the old one, but the announcement\n * also serves to tell screen reader users that the action was performed.\n */\n reannounce(): void;\n}\n\nexport default React.forwardRef(function InternalLiveRegion(\n {\n assertive = false,\n hidden = false,\n tagName: TagName = 'div',\n delay,\n sources,\n message,\n children,\n __internalRootRef,\n className,\n ...restProps\n }: InternalLiveRegionProps,\n ref: React.Ref<InternalLiveRegionRef>\n) {\n const baseProps = getBaseProps(restProps);\n const childrenRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n const mergedRef = useMergeRefs(childrenRef, __internalRootRef);\n\n useEffect(() => {\n // We have to do this because `inert` isn't properly supported until\n // React 19 and this seems much more maintainable than version detection.\n // `inert` is better than `hidden` because it also blocks pointer and\n // focus events as well as hiding the contents from screen readers.\n // https://github.com/facebook/react/issues/17157\n if (childrenRef.current) {\n childrenRef.current.inert = hidden;\n }\n }, [hidden]);\n\n // Initialize the live region controller inside an effect. We have to do this\n // because the controller depends on DOM elements, which aren't available on the\n // server.\n const liveRegionControllerRef = useRef<LiveRegionController | undefined>();\n useEffect(() => {\n const liveRegionController = new LiveRegionController(assertive ? 'assertive' : 'polite');\n liveRegionControllerRef.current = liveRegionController;\n return () => {\n liveRegionController.destroy();\n liveRegionControllerRef.current = undefined;\n };\n }, [assertive]);\n\n const getContent = () => {\n return sources\n ? getSourceContent(sources)\n : message\n ? message\n : childrenRef.current\n ? extractTextContent(childrenRef.current)\n : undefined;\n };\n\n // Call the controller on every render. The controller will deduplicate the\n // message against the previous announcement internally.\n useEffect(() => {\n liveRegionControllerRef.current?.announce({ message: getContent(), delay });\n });\n\n useImperativeHandle(ref, () => ({\n reannounce() {\n liveRegionControllerRef.current?.announce({ message: getContent(), delay, forceReannounce: true });\n },\n }));\n\n return (\n <TagName ref={mergedRef} {...baseProps} className={clsx(styles.root, className)} hidden={hidden}>\n {children}\n </TagName>\n );\n});\n\nfunction extractTextContent(node: HTMLElement): string {\n // We use the text content of the node as the announcement text.\n // This only extracts text content from the node including all its children which is enough for now.\n // To make it more powerful, it is possible to create a more sophisticated extractor with respect to\n // ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.\n return (node.textContent || '').replace(/\\s+/g, ' ').trim();\n}\n\nfunction getSourceContent(source: ReadonlyArray<string | React.RefObject<HTMLElement> | undefined>): string {\n return source\n .map(item => {\n if (!item || typeof item === 'string') {\n return item;\n }\n if (item.current) {\n return extractTextContent(item.current);\n }\n })\n .filter(Boolean)\n .join(' ');\n}\n"]}
@@ -1,7 +1,7 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_3bgfn_64bxr_5",
5
- "source": "awsui_source_3bgfn_64bxr_9"
4
+ "root": "awsui_root_3bgfn_di2un_141",
5
+ "announcer": "awsui_announcer_3bgfn_di2un_149"
6
6
  };
7
7
 
@@ -2,10 +2,152 @@
2
2
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- .awsui_root_3bgfn_64bxr_5:not(#\9) {
6
- /* used in test-utils */
5
+ /*
6
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
+ SPDX-License-Identifier: Apache-2.0
8
+ */
9
+ /*
10
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
+ SPDX-License-Identifier: Apache-2.0
12
+ */
13
+ /*
14
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
+ SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ /*
18
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+ */
21
+ /*
22
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
+ SPDX-License-Identifier: Apache-2.0
24
+ */
25
+ /*
26
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
+ SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ /*
30
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
+ SPDX-License-Identifier: Apache-2.0
32
+ */
33
+ /*
34
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
+ SPDX-License-Identifier: Apache-2.0
36
+ */
37
+ /*
38
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
+ SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ /*
42
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
+ SPDX-License-Identifier: Apache-2.0
44
+ */
45
+ /*
46
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
+ SPDX-License-Identifier: Apache-2.0
48
+ */
49
+ /*
50
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
+ SPDX-License-Identifier: Apache-2.0
52
+ */
53
+ /*
54
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
55
+ SPDX-License-Identifier: Apache-2.0
56
+ */
57
+ /*
58
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
59
+ SPDX-License-Identifier: Apache-2.0
60
+ */
61
+ /*
62
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
63
+ SPDX-License-Identifier: Apache-2.0
64
+ */
65
+ /*
66
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
67
+ SPDX-License-Identifier: Apache-2.0
68
+ */
69
+ /*
70
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
71
+ SPDX-License-Identifier: Apache-2.0
72
+ */
73
+ /*
74
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
75
+ SPDX-License-Identifier: Apache-2.0
76
+ */
77
+ /*
78
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
79
+ SPDX-License-Identifier: Apache-2.0
80
+ */
81
+ /*
82
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83
+ SPDX-License-Identifier: Apache-2.0
84
+ */
85
+ /*
86
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
+ SPDX-License-Identifier: Apache-2.0
88
+ */
89
+ /*
90
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
+ SPDX-License-Identifier: Apache-2.0
92
+ */
93
+ /*
94
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
+ SPDX-License-Identifier: Apache-2.0
96
+ */
97
+ /*
98
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
+ SPDX-License-Identifier: Apache-2.0
100
+ */
101
+ /*
102
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
103
+ SPDX-License-Identifier: Apache-2.0
104
+ */
105
+ /*
106
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
107
+ SPDX-License-Identifier: Apache-2.0
108
+ */
109
+ /*
110
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
111
+ SPDX-License-Identifier: Apache-2.0
112
+ */
113
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
114
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
115
+ /*
116
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
117
+ SPDX-License-Identifier: Apache-2.0
118
+ */
119
+ /*
120
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
121
+ SPDX-License-Identifier: Apache-2.0
122
+ */
123
+ /*
124
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
125
+ SPDX-License-Identifier: Apache-2.0
126
+ */
127
+ /*
128
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
129
+ SPDX-License-Identifier: Apache-2.0
130
+ */
131
+ /*
132
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
133
+ SPDX-License-Identifier: Apache-2.0
134
+ */
135
+ /*
136
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
137
+ SPDX-License-Identifier: Apache-2.0
138
+ */
139
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
140
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
141
+ .awsui_root_3bgfn_di2un_141:not(#\9) {
142
+ display: contents;
143
+ }
144
+
145
+ .awsui_root_3bgfn_di2un_141[hidden]:not(#\9) {
146
+ display: none;
7
147
  }
8
148
 
9
- .awsui_source_3bgfn_64bxr_9:not(#\9) {
10
- /* used in test-utils */
149
+ .awsui_announcer_3bgfn_di2un_149:not(#\9) {
150
+ position: absolute !important;
151
+ inset-block-start: -9999px !important;
152
+ inset-inline-start: -9999px !important;
11
153
  }
@@ -2,7 +2,7 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_3bgfn_64bxr_5",
6
- "source": "awsui_source_3bgfn_64bxr_9"
5
+ "root": "awsui_root_3bgfn_di2un_141",
6
+ "announcer": "awsui_announcer_3bgfn_di2un_149"
7
7
  };
8
8
 
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (dfa0e8b1)";
2
+ export var PACKAGE_VERSION = "3.0.0 (6ac2909a)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (dfa0e8b1)",
3
+ "PACKAGE_VERSION": "3.0.0 (6ac2909a)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "dfa0e8b13a71bf7fb2afae2eaf43631bd196b5ff"
2
+ "commit": "6ac2909a5cc68a7a2dd040ac560f5c0392da89d0"
3
3
  }
package/package.json CHANGED
@@ -127,7 +127,7 @@
127
127
  "./internal/base-component/index.js",
128
128
  "./internal/base-component/styles.css.js"
129
129
  ],
130
- "version": "3.0.799",
130
+ "version": "3.0.800",
131
131
  "repository": {
132
132
  "type": "git",
133
133
  "url": "https://github.com/cloudscape-design/components.git"
@@ -10,7 +10,7 @@ import ChartPopover from '../internal/components/chart-popover';
10
10
  import ChartPopoverFooter from '../internal/components/chart-popover-footer';
11
11
  import SeriesDetails from '../internal/components/chart-series-details';
12
12
  import SeriesMarker from '../internal/components/chart-series-marker';
13
- import LiveRegion from '../internal/components/live-region';
13
+ import InternalLiveRegion from '../internal/components/live-region/internal';
14
14
  import { useHeightMeasure } from '../internal/hooks/container-queries/use-height-measure';
15
15
  import { useUniqueId } from '../internal/hooks/use-unique-id';
16
16
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
@@ -199,6 +199,6 @@ export default ({ fitHeight, height: explicitHeight, variant, size, width, i18nS
199
199
  popoverData.series.label)), trackRef: popoverData.trackRef, trackKey: popoverData.series.index, dismissButton: pinnedSegment !== null, dismissAriaLabel: i18nStrings.detailPopoverDismissAriaLabel, onDismiss: onPopoverDismiss, container: ((_b = plotRef.current) === null || _b === void 0 ? void 0 : _b.svg) || null, size: detailPopoverSize, onMouseLeave: checkMouseLeave, onBlur: onApplicationBlur },
200
200
  popoverContent,
201
201
  detailPopoverFooterContent && React.createElement(ChartPopoverFooter, null, detailPopoverFooterContent))),
202
- React.createElement(LiveRegion, { source: [popoverContentRef] })));
202
+ React.createElement(InternalLiveRegion, { sources: [popoverContentRef] })));
203
203
  };
204
204
  //# sourceMappingURL=pie-chart.js.map