@cloudscape-design/components 3.0.639 → 3.0.641

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 (158) hide show
  1. package/app-layout/drawer/index.js +1 -1
  2. package/app-layout/drawer/index.js.map +1 -1
  3. package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  4. package/app-layout/drawer/resizable-drawer.js +2 -5
  5. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  6. package/app-layout/drawer/styles.css.js +13 -12
  7. package/app-layout/drawer/styles.scoped.css +30 -20
  8. package/app-layout/drawer/styles.selectors.js +13 -12
  9. package/app-layout/utils/use-resize.d.ts.map +1 -1
  10. package/app-layout/utils/use-resize.js +3 -7
  11. package/app-layout/utils/use-resize.js.map +1 -1
  12. package/app-layout/visual-refresh/drawers.js +3 -3
  13. package/app-layout/visual-refresh/drawers.js.map +1 -1
  14. package/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
  15. package/app-layout/visual-refresh/split-panel.js +1 -3
  16. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  17. package/app-layout/visual-refresh/tools.js +2 -2
  18. package/app-layout/visual-refresh/tools.js.map +1 -1
  19. package/autosuggest/plain-list.d.ts.map +1 -1
  20. package/autosuggest/plain-list.js +1 -3
  21. package/autosuggest/plain-list.js.map +1 -1
  22. package/autosuggest/virtual-list.d.ts.map +1 -1
  23. package/autosuggest/virtual-list.js +1 -3
  24. package/autosuggest/virtual-list.js.map +1 -1
  25. package/calendar/utils/intl.d.ts.map +1 -1
  26. package/calendar/utils/intl.js +0 -3
  27. package/calendar/utils/intl.js.map +1 -1
  28. package/container/internal.d.ts.map +1 -1
  29. package/container/internal.js +3 -0
  30. package/container/internal.js.map +1 -1
  31. package/container/styles.css.js +29 -28
  32. package/container/styles.scoped.css +55 -52
  33. package/container/styles.selectors.js +29 -28
  34. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  35. package/date-range-picker/calendar/grids/index.js +0 -8
  36. package/date-range-picker/calendar/grids/index.js.map +1 -1
  37. package/form/interfaces.d.ts +3 -8
  38. package/form/interfaces.d.ts.map +1 -1
  39. package/form/interfaces.js.map +1 -1
  40. package/form/internal.d.ts +1 -1
  41. package/form/internal.d.ts.map +1 -1
  42. package/form/internal.js +14 -20
  43. package/form/internal.js.map +1 -1
  44. package/form/styles.css.js +8 -9
  45. package/form/styles.scoped.css +8 -8
  46. package/form/styles.selectors.js +8 -9
  47. package/header/internal.d.ts.map +1 -1
  48. package/header/internal.js +1 -3
  49. package/header/internal.js.map +1 -1
  50. package/header/styles.css.js +34 -35
  51. package/header/styles.scoped.css +50 -53
  52. package/header/styles.selectors.js +34 -35
  53. package/input/styles.css.js +13 -13
  54. package/input/styles.scoped.css +32 -35
  55. package/input/styles.selectors.js +13 -13
  56. package/internal/components/chart-plot/application-controller.js +3 -13
  57. package/internal/components/chart-plot/application-controller.js.map +1 -1
  58. package/internal/components/dropdown/index.d.ts.map +1 -1
  59. package/internal/components/dropdown/index.js +0 -2
  60. package/internal/components/dropdown/index.js.map +1 -1
  61. package/internal/components/dropdown/styles.css.js +20 -20
  62. package/internal/components/dropdown/styles.scoped.css +39 -45
  63. package/internal/components/dropdown/styles.selectors.js +20 -20
  64. package/internal/components/panel-resize-handle/icon.d.ts +5 -0
  65. package/internal/components/panel-resize-handle/icon.d.ts.map +1 -0
  66. package/internal/components/panel-resize-handle/icon.js +9 -0
  67. package/internal/components/panel-resize-handle/icon.js.map +1 -0
  68. package/internal/components/panel-resize-handle/index.d.ts +12 -0
  69. package/internal/components/panel-resize-handle/index.d.ts.map +1 -0
  70. package/internal/components/panel-resize-handle/index.js +11 -0
  71. package/internal/components/panel-resize-handle/index.js.map +1 -0
  72. package/internal/components/panel-resize-handle/styles.css.js +10 -0
  73. package/internal/components/panel-resize-handle/styles.scoped.css +153 -0
  74. package/internal/components/panel-resize-handle/styles.selectors.js +11 -0
  75. package/internal/context/single-tab-stop-navigation-context.js +2 -2
  76. package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
  77. package/internal/environment.js +1 -1
  78. package/internal/environment.json +1 -1
  79. package/internal/manifest.json +1 -1
  80. package/internal/utils/content-header-utils.d.ts +0 -2
  81. package/internal/utils/content-header-utils.d.ts.map +1 -1
  82. package/internal/utils/content-header-utils.js +0 -3
  83. package/internal/utils/content-header-utils.js.map +1 -1
  84. package/internal/utils/dom.d.ts.map +1 -1
  85. package/internal/utils/dom.js +7 -27
  86. package/internal/utils/dom.js.map +1 -1
  87. package/internal/utils/global-flags.d.ts +0 -1
  88. package/internal/utils/global-flags.d.ts.map +1 -1
  89. package/internal/utils/global-flags.js.map +1 -1
  90. package/link/interfaces.d.ts +6 -1
  91. package/link/interfaces.d.ts.map +1 -1
  92. package/link/interfaces.js.map +1 -1
  93. package/link/internal.d.ts.map +1 -1
  94. package/link/internal.js +12 -2
  95. package/link/internal.js.map +1 -1
  96. package/package.json +1 -1
  97. package/pie-chart/labels.d.ts.map +1 -1
  98. package/pie-chart/labels.js +1 -4
  99. package/pie-chart/labels.js.map +1 -1
  100. package/pie-chart/pie-chart.d.ts.map +1 -1
  101. package/pie-chart/pie-chart.js +0 -3
  102. package/pie-chart/pie-chart.js.map +1 -1
  103. package/pie-chart/utils.d.ts.map +1 -1
  104. package/pie-chart/utils.js +0 -4
  105. package/pie-chart/utils.js.map +1 -1
  106. package/popover/internal.js +3 -6
  107. package/popover/internal.js.map +1 -1
  108. package/popover/styles.css.js +49 -50
  109. package/popover/styles.scoped.css +66 -69
  110. package/popover/styles.selectors.js +49 -50
  111. package/segmented-control/styles.css.js +14 -14
  112. package/segmented-control/styles.scoped.css +33 -33
  113. package/segmented-control/styles.selectors.js +14 -14
  114. package/split-panel/bottom.d.ts.map +1 -1
  115. package/split-panel/bottom.js +4 -2
  116. package/split-panel/bottom.js.map +1 -1
  117. package/split-panel/icons/bottom-icon.js +1 -1
  118. package/split-panel/icons/bottom-icon.js.map +1 -1
  119. package/split-panel/icons/side-position-refresh.js +1 -1
  120. package/split-panel/icons/side-position-refresh.js.map +1 -1
  121. package/split-panel/icons/side-position.js +1 -1
  122. package/split-panel/icons/side-position.js.map +1 -1
  123. package/split-panel/icons/styles.css.js +27 -0
  124. package/split-panel/icons/styles.scoped.css +168 -0
  125. package/split-panel/icons/styles.selectors.js +28 -0
  126. package/split-panel/implementation.d.ts.map +1 -1
  127. package/split-panel/implementation.js +12 -8
  128. package/split-panel/implementation.js.map +1 -1
  129. package/split-panel/side.d.ts.map +1 -1
  130. package/split-panel/side.js +5 -3
  131. package/split-panel/side.js.map +1 -1
  132. package/split-panel/styles.css.js +26 -57
  133. package/split-panel/styles.scoped.css +41 -281
  134. package/split-panel/styles.selectors.js +26 -57
  135. package/split-panel/test-classes/styles.css.js +13 -0
  136. package/split-panel/test-classes/styles.scoped.css +14 -0
  137. package/split-panel/test-classes/styles.selectors.js +14 -0
  138. package/table/selection/selection-control.d.ts.map +1 -1
  139. package/table/selection/selection-control.js.map +1 -1
  140. package/table/table-role/utils.d.ts.map +1 -1
  141. package/table/table-role/utils.js +6 -1
  142. package/table/table-role/utils.js.map +1 -1
  143. package/test-utils/dom/app-layout/index.js +1 -1
  144. package/test-utils/dom/app-layout/index.js.map +1 -1
  145. package/test-utils/dom/split-panel/index.js +3 -3
  146. package/test-utils/dom/split-panel/index.js.map +1 -1
  147. package/test-utils/selectors/app-layout/index.js +1 -1
  148. package/test-utils/selectors/app-layout/index.js.map +1 -1
  149. package/test-utils/selectors/split-panel/index.js +3 -3
  150. package/test-utils/selectors/split-panel/index.js.map +1 -1
  151. package/test-utils/tsconfig.tsbuildinfo +1 -1
  152. package/tiles/styles.css.js +29 -29
  153. package/tiles/styles.scoped.css +82 -95
  154. package/tiles/styles.selectors.js +29 -29
  155. package/split-panel/icons/resize-handler.d.ts +0 -6
  156. package/split-panel/icons/resize-handler.d.ts.map +0 -1
  157. package/split-panel/icons/resize-handler.js +0 -8
  158. package/split-panel/icons/resize-handler.js.map +0 -1
@@ -1 +1 @@
1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C,EAAE,GAAG,gBAAgB,CAC/B,CAAC;IACF,IAAI,mBAAmB,GAAG,qBAAqB,EAAE;QAC/C,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../i18n/context';\nimport { PieChartProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport interface Dimension {\n innerRadius: number;\n outerRadius: number;\n padding: number;\n paddingLabels: number;\n innerLabelPadding: number;\n cornerRadius?: number;\n}\n\nconst minRadius = 30;\nconst paddingLabels = 44; // = 2 * (size-lineHeight-body-100)\nconst defaultPadding = 12; // = space-s\nconst smallPadding = 8; // = space-xs\nexport const minLabelLineAngularPadding = Math.PI / 20;\n\nexport const dimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n innerRadius: 33,\n outerRadius: 50,\n innerLabelPadding: smallPadding,\n padding: smallPadding,\n paddingLabels,\n },\n medium: {\n innerRadius: 66,\n outerRadius: 100,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n large: {\n innerRadius: 93,\n outerRadius: 140,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n};\n\nexport const refreshDimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n ...dimensionsBySize.small,\n innerRadius: 38,\n cornerRadius: 3,\n },\n medium: {\n ...dimensionsBySize.medium,\n innerRadius: 75,\n cornerRadius: 4,\n },\n large: {\n ...dimensionsBySize.large,\n innerRadius: 105,\n cornerRadius: 5,\n },\n};\n\n/**\n * When `size` is a string (\"small\", \"medium\" or \"large\") the predefined pie chart element dimensions for classic and visual refresh are used.\n * When `size` is a number the outer and inner radii are computed and the rest of the dimensions are taken from the closest predefined size.\n */\nexport function getDimensionsBySize({\n size,\n hasLabels,\n visualRefresh,\n}: {\n size: NonNullable<PieChartProps['size']> | number;\n hasLabels: boolean;\n visualRefresh?: boolean;\n}): Dimension & { size: NonNullable<PieChartProps['size']> } {\n if (typeof size === 'string') {\n const dimensions = visualRefresh ? refreshDimensionsBySize[size] : dimensionsBySize[size];\n return { ...dimensions, size };\n }\n const sizeSpec = visualRefresh ? refreshDimensionsBySize : dimensionsBySize;\n const getPixelSize = (d: Dimension) => d.outerRadius * 2 + d.padding * 2 + (hasLabels ? d.paddingLabels : 0) * 2;\n\n let matchedSize: NonNullable<PieChartProps['size']> = 'small';\n if (size > getPixelSize(sizeSpec.medium)) {\n matchedSize = 'medium';\n }\n if (size > getPixelSize(sizeSpec.large)) {\n matchedSize = 'large';\n }\n\n const padding = sizeSpec[matchedSize].padding;\n const paddingLabels = hasLabels ? sizeSpec[matchedSize].paddingLabels : 0;\n const radiiRatio = sizeSpec[matchedSize].outerRadius / sizeSpec[matchedSize].innerRadius;\n const outerRadius = Math.max(minRadius, (size - 2 * paddingLabels - 2 * padding) / 2);\n const innerRadius = outerRadius / radiiRatio;\n\n return { ...sizeSpec[matchedSize], outerRadius, innerRadius, size: matchedSize };\n}\n\nexport const defaultDetails =\n (i18n: ComponentFormatFunction<'pie-chart'>, i18nStrings: PieChartProps.I18nStrings) =>\n (datum: PieChartProps.Datum, dataSum: number) => [\n { key: i18n('i18nStrings.detailsValue', i18nStrings.detailsValue) || '', value: datum.value },\n {\n key: i18n('i18nStrings.detailsPercentage', i18nStrings.detailsPercentage) || '',\n value: `${((datum.value * 100) / dataSum).toFixed(0)}%`,\n },\n ];\n\n/**\n * Adjusts the position of the given label nodes to avoid visual overlapping.\n * @param nodes List of label nodes of the entire chart (both left and right side)\n * @param markers Markers array that was calculated in <Labels>, but we just need the `endY` values\n * @param leftSide Boolean flag whether we are processing the left or right side of the chart labels\n */\nexport const balanceLabelNodes = (\n nodes: NodeListOf<SVGGElement>,\n markers: Array<{ endY: number; endX: number }>,\n leftSide: boolean,\n radius: number\n) => {\n const MARGIN = 10;\n\n let previousBBox: { x: number; y: number; height: number } | null = null;\n\n // When traversing the right side of labels, we start at the beginning of the array and go forwards.\n // For the left side, we need to traverse backwards from the end, so that overlapping nodes are pushed down in the right order.\n let i = leftSide ? nodes.length - 1 : 0;\n\n while ((leftSide && i >= 0) || (!leftSide && i < nodes.length)) {\n const node = nodes[i];\n\n // Currently using dataset attributes to determine the base position.\n // This implementation can be changed back to using `getBBox` when we drop IE11 support.\n // Unfortunately, there is no good alternative for `getBBox` that is supported by IE11.\n // `getBoundingClientRect` works for width and height calculations in SVG, but the x/y positions are inaccurate.\n const x = parseFloat(node.getAttribute('data-x') || '0');\n const y = parseFloat(node.getAttribute('data-y') || '0');\n const box = {\n x,\n y,\n height: node.getBoundingClientRect().height,\n };\n\n const marker = markers[i];\n\n if (leftSide) {\n i--;\n } else {\n i++;\n }\n\n if (!previousBBox) {\n previousBBox = box;\n node.setAttribute('transform', '');\n continue;\n }\n\n if ((!leftSide && box.x < 0) || (leftSide && box.x >= 0)) {\n // We have reached a label that is on the other side of the chart, so we're done.\n break;\n }\n\n node.setAttribute('transform', '');\n\n // Calculate how much the current node is overlapping with the previous one.\n const yOffset = previousBBox.y + previousBBox.height + MARGIN - box.y;\n\n if (yOffset > 0) {\n const xOffset = computeXOffset(box, yOffset, radius) * (leftSide ? -1 : 1);\n // Move the label down.\n node.setAttribute('transform', `translate(${xOffset} ${yOffset})`);\n\n // Adjust the attached line accordingly.\n const lineNode = node.parentNode?.querySelector(`.${styles['label-line']}`);\n if (lineNode) {\n const { endY, endX } = marker;\n lineNode.setAttribute('y2', '' + (endY + yOffset));\n lineNode.setAttribute('x2', '' + (endX + xOffset));\n }\n\n // Update the position accordingly to inform the next label\n box.y += yOffset;\n box.x += xOffset;\n }\n\n previousBBox = box;\n }\n};\n\nconst squareDistance = (edge: [number, number]): number => Math.pow(edge[0], 2) + Math.pow(edge[1], 2);\n\nconst computeXOffset = (box: { x: number; y: number; height: number }, yOffset: number, radius: number): number => {\n const upperEdge: [number, number] = [box.x, box.y + yOffset];\n const lowerEdge: [number, number] = [box.x, box.y + box.height + yOffset];\n const closestEdge = squareDistance(upperEdge) < squareDistance(lowerEdge) ? upperEdge : lowerEdge;\n\n if (squareDistance(closestEdge) < Math.pow(radius, 2)) {\n return Math.sqrt(Math.pow(radius, 2) - Math.pow(closestEdge[1], 2)) - Math.abs(closestEdge[0]);\n }\n return 0;\n};\n\nexport const computeSmartAngle = (startAngle: number, endAngle: number, optimize = false): number => {\n if (!optimize || endAngle - startAngle < 2 * minLabelLineAngularPadding) {\n return (endAngle + startAngle) / 2;\n }\n const paddedStartAngle = startAngle + minLabelLineAngularPadding;\n const paddedEndAngle = endAngle - minLabelLineAngularPadding;\n if (paddedStartAngle < 0 && paddedEndAngle > 0) {\n return 0;\n }\n if (paddedStartAngle < Math.PI && paddedEndAngle > Math.PI) {\n return Math.PI;\n }\n\n const endAngleMinDistance = Math.min(\n paddedEndAngle,\n Math.abs(Math.PI - paddedEndAngle),\n 2 * Math.PI - paddedEndAngle\n );\n const startAngleMinDistance = Math.min(\n paddedStartAngle,\n Math.abs(Math.PI - paddedStartAngle),\n 2 * Math.PI - paddedStartAngle\n );\n if (endAngleMinDistance < startAngleMinDistance) {\n return paddedEndAngle;\n }\n return paddedStartAngle;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/pie-chart/utils.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAWrC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,aAAa,GAAG,EAAE,CAAC,CAAC,mCAAmC;AAC7D,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,YAAY;AACvC,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,aAAa;AACrC,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAA0D;IACrF,KAAK,EAAE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AG,0BAA0B,EAAE;QACvE,OAAO,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;KACpC;IACD,MAAM,gBAAgB,GAAG,UAAU,GAAG,0BAA0B,CAAC;IACjE,MAAM,cAAc,GAAG,QAAQ,GAAG,0BAA0B,CAAC;IAC7D,IAAI,gBAAgB,GAAG,CAAC,IAAI,cAAc,GAAG,CAAC,EAAE;QAC9C,OAAO,CAAC,CAAC;KACV;IACD,IAAI,gBAAgB,GAAG,IAAI,CAAC,EAAE,IAAI,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE;QAC1D,OAAO,IAAI,CAAC,EAAE,CAAC;KAChB;IAED,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAClC,cAAc,EACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,cAAc,CAAC,EAClC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,cAAc,CAC7B,CAAC;IACF,MAAM,qBAAqB,GAAG,IAAI,CAAC,GAAG,CACpC,gBAAgB,EAChB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC,EACpC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAC/B,CAAC;IACF,IAAI,mBAAmB,GAAG,qBAAqB,EAAE;QAC/C,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../i18n/context';\nimport { PieChartProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport interface Dimension {\n innerRadius: number;\n outerRadius: number;\n padding: number;\n paddingLabels: number;\n innerLabelPadding: number;\n cornerRadius?: number;\n}\n\nconst minRadius = 30;\nconst paddingLabels = 44; // = 2 * (size-lineHeight-body-100)\nconst defaultPadding = 12; // = space-s\nconst smallPadding = 8; // = space-xs\nexport const minLabelLineAngularPadding = Math.PI / 20;\n\nexport const dimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n innerRadius: 33,\n outerRadius: 50,\n innerLabelPadding: smallPadding,\n padding: smallPadding,\n paddingLabels,\n },\n medium: {\n innerRadius: 66,\n outerRadius: 100,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n large: {\n innerRadius: 93,\n outerRadius: 140,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n};\n\nexport const refreshDimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n ...dimensionsBySize.small,\n innerRadius: 38,\n cornerRadius: 3,\n },\n medium: {\n ...dimensionsBySize.medium,\n innerRadius: 75,\n cornerRadius: 4,\n },\n large: {\n ...dimensionsBySize.large,\n innerRadius: 105,\n cornerRadius: 5,\n },\n};\n\n/**\n * When `size` is a string (\"small\", \"medium\" or \"large\") the predefined pie chart element dimensions for classic and visual refresh are used.\n * When `size` is a number the outer and inner radii are computed and the rest of the dimensions are taken from the closest predefined size.\n */\nexport function getDimensionsBySize({\n size,\n hasLabels,\n visualRefresh,\n}: {\n size: NonNullable<PieChartProps['size']> | number;\n hasLabels: boolean;\n visualRefresh?: boolean;\n}): Dimension & { size: NonNullable<PieChartProps['size']> } {\n if (typeof size === 'string') {\n const dimensions = visualRefresh ? refreshDimensionsBySize[size] : dimensionsBySize[size];\n return { ...dimensions, size };\n }\n const sizeSpec = visualRefresh ? refreshDimensionsBySize : dimensionsBySize;\n const getPixelSize = (d: Dimension) => d.outerRadius * 2 + d.padding * 2 + (hasLabels ? d.paddingLabels : 0) * 2;\n\n let matchedSize: NonNullable<PieChartProps['size']> = 'small';\n if (size > getPixelSize(sizeSpec.medium)) {\n matchedSize = 'medium';\n }\n if (size > getPixelSize(sizeSpec.large)) {\n matchedSize = 'large';\n }\n\n const padding = sizeSpec[matchedSize].padding;\n const paddingLabels = hasLabels ? sizeSpec[matchedSize].paddingLabels : 0;\n const radiiRatio = sizeSpec[matchedSize].outerRadius / sizeSpec[matchedSize].innerRadius;\n const outerRadius = Math.max(minRadius, (size - 2 * paddingLabels - 2 * padding) / 2);\n const innerRadius = outerRadius / radiiRatio;\n\n return { ...sizeSpec[matchedSize], outerRadius, innerRadius, size: matchedSize };\n}\n\nexport const defaultDetails =\n (i18n: ComponentFormatFunction<'pie-chart'>, i18nStrings: PieChartProps.I18nStrings) =>\n (datum: PieChartProps.Datum, dataSum: number) => [\n { key: i18n('i18nStrings.detailsValue', i18nStrings.detailsValue) || '', value: datum.value },\n {\n key: i18n('i18nStrings.detailsPercentage', i18nStrings.detailsPercentage) || '',\n value: `${((datum.value * 100) / dataSum).toFixed(0)}%`,\n },\n ];\n\n/**\n * Adjusts the position of the given label nodes to avoid visual overlapping.\n * @param nodes List of label nodes of the entire chart (both left and right side)\n * @param markers Markers array that was calculated in <Labels>, but we just need the `endY` values\n * @param leftSide Boolean flag whether we are processing the left or right side of the chart labels\n */\nexport const balanceLabelNodes = (\n nodes: NodeListOf<SVGGElement>,\n markers: Array<{ endY: number; endX: number }>,\n leftSide: boolean,\n radius: number\n) => {\n const MARGIN = 10;\n\n let previousBBox: { x: number; y: number; height: number } | null = null;\n\n // When traversing the right side of labels, we start at the beginning of the array and go forwards.\n // For the left side, we need to traverse backwards from the end, so that overlapping nodes are pushed down in the right order.\n let i = leftSide ? nodes.length - 1 : 0;\n\n while ((leftSide && i >= 0) || (!leftSide && i < nodes.length)) {\n const node = nodes[i];\n\n const x = parseFloat(node.getAttribute('data-x') || '0');\n const y = parseFloat(node.getAttribute('data-y') || '0');\n const box = {\n x,\n y,\n height: node.getBoundingClientRect().height,\n };\n\n const marker = markers[i];\n\n if (leftSide) {\n i--;\n } else {\n i++;\n }\n\n if (!previousBBox) {\n previousBBox = box;\n node.setAttribute('transform', '');\n continue;\n }\n\n if ((!leftSide && box.x < 0) || (leftSide && box.x >= 0)) {\n // We have reached a label that is on the other side of the chart, so we're done.\n break;\n }\n\n node.setAttribute('transform', '');\n\n // Calculate how much the current node is overlapping with the previous one.\n const yOffset = previousBBox.y + previousBBox.height + MARGIN - box.y;\n\n if (yOffset > 0) {\n const xOffset = computeXOffset(box, yOffset, radius) * (leftSide ? -1 : 1);\n // Move the label down.\n node.setAttribute('transform', `translate(${xOffset} ${yOffset})`);\n\n // Adjust the attached line accordingly.\n const lineNode = node.parentNode?.querySelector(`.${styles['label-line']}`);\n if (lineNode) {\n const { endY, endX } = marker;\n lineNode.setAttribute('y2', '' + (endY + yOffset));\n lineNode.setAttribute('x2', '' + (endX + xOffset));\n }\n\n // Update the position accordingly to inform the next label\n box.y += yOffset;\n box.x += xOffset;\n }\n\n previousBBox = box;\n }\n};\n\nconst squareDistance = (edge: [number, number]): number => Math.pow(edge[0], 2) + Math.pow(edge[1], 2);\n\nconst computeXOffset = (box: { x: number; y: number; height: number }, yOffset: number, radius: number): number => {\n const upperEdge: [number, number] = [box.x, box.y + yOffset];\n const lowerEdge: [number, number] = [box.x, box.y + box.height + yOffset];\n const closestEdge = squareDistance(upperEdge) < squareDistance(lowerEdge) ? upperEdge : lowerEdge;\n\n if (squareDistance(closestEdge) < Math.pow(radius, 2)) {\n return Math.sqrt(Math.pow(radius, 2) - Math.pow(closestEdge[1], 2)) - Math.abs(closestEdge[0]);\n }\n return 0;\n};\n\nexport const computeSmartAngle = (startAngle: number, endAngle: number, optimize = false): number => {\n if (!optimize || endAngle - startAngle < 2 * minLabelLineAngularPadding) {\n return (endAngle + startAngle) / 2;\n }\n const paddedStartAngle = startAngle + minLabelLineAngularPadding;\n const paddedEndAngle = endAngle - minLabelLineAngularPadding;\n if (paddedStartAngle < 0 && paddedEndAngle > 0) {\n return 0;\n }\n if (paddedStartAngle < Math.PI && paddedEndAngle > Math.PI) {\n return Math.PI;\n }\n\n const endAngleMinDistance = Math.min(\n paddedEndAngle,\n Math.abs(Math.PI - paddedEndAngle),\n 2 * Math.PI - paddedEndAngle\n );\n const startAngleMinDistance = Math.min(\n paddedStartAngle,\n Math.abs(Math.PI - paddedStartAngle),\n 2 * Math.PI - paddedStartAngle\n );\n if (endAngleMinDistance < startAngleMinDistance) {\n return paddedEndAngle;\n }\n return paddedStartAngle;\n};\n"]}
@@ -70,11 +70,9 @@ function InternalPopover(_a, ref) {
70
70
  setVisible(false);
71
71
  }
72
72
  };
73
- // useCapture=false makes sure this listener is called after the one attached to the element.
74
- // the options.capture notation is unsupported by IE.
75
- document.addEventListener('mousedown', onDocumentClick, false);
73
+ document.addEventListener('mousedown', onDocumentClick);
76
74
  return () => {
77
- document.removeEventListener('mousedown', onDocumentClick, false);
75
+ document.removeEventListener('mousedown', onDocumentClick);
78
76
  };
79
77
  }, []);
80
78
  const popoverClasses = usePortalModeClasses(triggerRef);
@@ -98,8 +96,7 @@ function InternalPopover(_a, ref) {
98
96
  clickFrameId.current = null;
99
97
  });
100
98
  } }),
101
- triggerType === 'text' ? (React.createElement("button", Object.assign({}, triggerProps, { tabIndex: triggerTabIndex, type: "button", "aria-haspopup": "dialog", id: referrerId, "aria-label": triggerAriaLabel }),
102
- React.createElement("span", { className: styles['trigger-inner-text'] }, children))) : (React.createElement("span", Object.assign({}, triggerProps, { id: referrerId }), children)),
99
+ triggerType === 'text' ? (React.createElement("button", Object.assign({}, triggerProps, { tabIndex: triggerTabIndex, type: "button", "aria-haspopup": "dialog", id: referrerId, "aria-label": triggerAriaLabel }), children)) : (React.createElement("span", Object.assign({}, triggerProps, { id: referrerId }), children)),
103
100
  React.createElement(ResetContextsForModal, null, renderWithPortal ? React.createElement(Portal, null, popoverContent) : popoverContent)));
104
101
  }
105
102
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ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B,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDACM,YAAY,IAChB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB;YAE5B,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,WAAW,MAAM,QAAQ,CAAC;AAEjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA6B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,qBAAqB,MAAM,8CAA8C,CAAC;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E,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,eAAe,EAAC,MAAM,IAErB,OAAO,CACI,CACqB,CACpB,CACpB,CACG,CACP,CAAC;IAEF,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE9D,OAAO,CACL,8CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,EACjD,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,GAAG,EAAE;YAChB,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDACM,YAAY,IAChB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB,KAE3B,QAAQ,CACF,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n {children}\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
@@ -1,55 +1,54 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_xjuzf_ov8et_197",
5
- "arrow-outer": "awsui_arrow-outer_xjuzf_ov8et_201",
6
- "arrow-inner": "awsui_arrow-inner_xjuzf_ov8et_201",
7
- "refresh": "awsui_refresh_xjuzf_ov8et_235",
8
- "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_ov8et_245",
9
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_ov8et_245",
10
- "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_ov8et_248",
11
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_ov8et_248",
12
- "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_ov8et_251",
13
- "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_ov8et_251",
14
- "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_ov8et_251",
15
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_ov8et_251",
16
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_ov8et_254",
17
- "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_ov8et_254",
18
- "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_ov8et_254",
19
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_ov8et_254",
20
- "body": "awsui_body_xjuzf_ov8et_356",
21
- "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_ov8et_395",
22
- "has-dismiss": "awsui_has-dismiss_xjuzf_ov8et_399",
23
- "dismiss": "awsui_dismiss_xjuzf_ov8et_404",
24
- "dismiss-control": "awsui_dismiss-control_xjuzf_ov8et_412",
25
- "header-row": "awsui_header-row_xjuzf_ov8et_416",
26
- "header": "awsui_header_xjuzf_ov8et_416",
27
- "content": "awsui_content_xjuzf_ov8et_442",
28
- "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_ov8et_450",
29
- "container": "awsui_container_xjuzf_ov8et_552",
30
- "container-body": "awsui_container-body_xjuzf_ov8et_560",
31
- "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_ov8et_603",
32
- "container-body-size-small": "awsui_container-body-size-small_xjuzf_ov8et_608",
33
- "fixed-width": "awsui_fixed-width_xjuzf_ov8et_611",
34
- "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_ov8et_615",
35
- "container-body-size-large": "awsui_container-body-size-large_xjuzf_ov8et_622",
36
- "container-arrow": "awsui_container-arrow_xjuzf_ov8et_634",
37
- "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_ov8et_638",
38
- "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_ov8et_638",
39
- "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_ov8et_654",
40
- "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_ov8et_654",
41
- "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_ov8et_670",
42
- "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_ov8et_670",
43
- "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_ov8et_670",
44
- "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_ov8et_670",
45
- "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_ov8et_686",
46
- "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_ov8et_690",
47
- "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_ov8et_694",
48
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_ov8et_1",
49
- "root": "awsui_root_xjuzf_ov8et_840",
50
- "trigger": "awsui_trigger_xjuzf_ov8et_876",
51
- "trigger-type-text": "awsui_trigger-type-text_xjuzf_ov8et_883",
52
- "trigger-inner-text": "awsui_trigger-inner-text_xjuzf_ov8et_918",
53
- "popover-inline-content": "awsui_popover-inline-content_xjuzf_ov8et_922"
4
+ "arrow": "awsui_arrow_xjuzf_1lb7z_197",
5
+ "arrow-outer": "awsui_arrow-outer_xjuzf_1lb7z_201",
6
+ "arrow-inner": "awsui_arrow-inner_xjuzf_1lb7z_201",
7
+ "refresh": "awsui_refresh_xjuzf_1lb7z_235",
8
+ "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_1lb7z_245",
9
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_1lb7z_245",
10
+ "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_1lb7z_248",
11
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_1lb7z_248",
12
+ "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_1lb7z_251",
13
+ "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_1lb7z_251",
14
+ "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_1lb7z_251",
15
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_1lb7z_251",
16
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_1lb7z_254",
17
+ "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_1lb7z_254",
18
+ "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_1lb7z_254",
19
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_1lb7z_254",
20
+ "body": "awsui_body_xjuzf_1lb7z_356",
21
+ "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_1lb7z_395",
22
+ "has-dismiss": "awsui_has-dismiss_xjuzf_1lb7z_399",
23
+ "dismiss": "awsui_dismiss_xjuzf_1lb7z_404",
24
+ "dismiss-control": "awsui_dismiss-control_xjuzf_1lb7z_412",
25
+ "header-row": "awsui_header-row_xjuzf_1lb7z_416",
26
+ "header": "awsui_header_xjuzf_1lb7z_416",
27
+ "content": "awsui_content_xjuzf_1lb7z_442",
28
+ "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_1lb7z_450",
29
+ "container": "awsui_container_xjuzf_1lb7z_552",
30
+ "container-body": "awsui_container-body_xjuzf_1lb7z_560",
31
+ "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_1lb7z_603",
32
+ "container-body-size-small": "awsui_container-body-size-small_xjuzf_1lb7z_608",
33
+ "fixed-width": "awsui_fixed-width_xjuzf_1lb7z_611",
34
+ "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_1lb7z_615",
35
+ "container-body-size-large": "awsui_container-body-size-large_xjuzf_1lb7z_622",
36
+ "container-arrow": "awsui_container-arrow_xjuzf_1lb7z_634",
37
+ "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_1lb7z_638",
38
+ "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_1lb7z_638",
39
+ "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_1lb7z_654",
40
+ "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_1lb7z_654",
41
+ "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_1lb7z_670",
42
+ "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_1lb7z_670",
43
+ "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_1lb7z_670",
44
+ "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_1lb7z_670",
45
+ "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_1lb7z_686",
46
+ "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_1lb7z_690",
47
+ "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_1lb7z_694",
48
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_1lb7z_1",
49
+ "root": "awsui_root_xjuzf_1lb7z_840",
50
+ "trigger": "awsui_trigger_xjuzf_1lb7z_876",
51
+ "trigger-type-text": "awsui_trigger-type-text_xjuzf_1lb7z_883",
52
+ "popover-inline-content": "awsui_popover-inline-content_xjuzf_1lb7z_919"
54
53
  };
55
54